/* ===========================
   Yujun Tech — Assembler-Inspired Design
   Corporate Website Stylesheet
   =========================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Arimo:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Familjen+Grotesk:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap');

/* --- CSS Reset / Normalize --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--theme-5);
  background-color: var(--theme-1);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: var(--fs-medium);
  font-weight: 400;
  letter-spacing: 0;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: currentColor;
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}

a:hover {
  opacity: 0.75;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* --- CSS Custom Properties (Assembler Design System) --- */
:root {
  /* Color Palette */
  --theme-1: #ffffff;    /* White — primary background */
  --theme-2: #F4B41A;   /* Amber/Gold — accent sections */
  --theme-3: #4E7B5B;   /* Muted Green — buttons, separators */
  --theme-4: #48A9C5;   /* Teal — focus outlines */
  --theme-5: #3178C6;   /* Blue — primary text */

  /* Typography */
  --font-heading: "Familjen Grotesk", sans-serif;
  --font-body: "Arimo", sans-serif;

  /* Fluid Font Sizes (from Assembler theme.json) */
  --fs-small: clamp(14px, 0.5vw + 13px, 15px);
  --fs-medium: clamp(17px, 0.5vw + 16px, 18px);
  --fs-large: clamp(24px, 4vw, 32px);
  --fs-x-large: clamp(40px, 6vw, 66px);
  --fs-xx-large: clamp(44px, 6vw, 74px);
  --fs-xxx-large: clamp(40px, 14vw, 148px);

  /* Layout */
  --content-width: 620px;
  --wide-width: 1440px;

  /* Spacing (Assembler fluid system: 10px unit × 2.5 increment) */
  --space-20: min(25px, 2vw);
  --space-30: min(50px, 2.5vw);
  --space-40: min(75px, 3vw);
  --space-50: min(100px, 4vw);
  --space-60: min(125px, 5vw);
  --space-70: min(150px, 6vw);
  --space-80: min(175px, 7vw);

  /* Navigation */
  --nav-height: 72px;

  /* Transitions */
  --transition-base: 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-40);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 400;
  color: var(--theme-5);
  text-decoration: none;
  line-height: 1.4;
}

.nav-logo:hover {
  opacity: 0.75;
  color: var(--theme-5);
}

.nav-logo-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 8px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-20);
}

.nav-links a {
  font-family: var(--font-body);
  font-size: var(--fs-medium);
  font-weight: 400;
  color: var(--theme-5);
  padding: 8px 14px;
  border-radius: 6px;
  transition: background var(--transition-base), opacity var(--transition-base);
  line-height: 1.4;
}

.nav-links a:hover {
  background: rgba(49, 120, 198, 0.06);
  opacity: 1;
}

.nav-links a.active {
  font-weight: 500;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--theme-5);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav overlay */
.nav-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--nav-height);
  background: rgba(0, 0, 0, 0.15);
  z-index: 999;
}

.nav-mobile-overlay.show {
  display: block;
}

/* --- Main Content --- */
main {
  margin-top: 0;
  min-height: calc(100vh - var(--nav-height));
}

.container {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 0 var(--space-40);
}

.container-narrow {
  max-width: var(--content-width);
  margin: 0 auto;
}

/* --- Hero Section (Cover style from Assembler) --- */
.hero {
  position: relative;
  min-height: 66vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #7c7d7e;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(124, 125, 126, 0.5);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: calc(var(--nav-height) + var(--space-60)) var(--space-30) var(--space-60);
  max-width: 620px;
  margin: 0 auto;
  color: var(--theme-1);
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: var(--fs-xxx-large);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--theme-1);
  margin-bottom: var(--space-20);
}

.hero .tagline {
  font-family: var(--font-body);
  font-size: var(--fs-medium);
  font-weight: 400;
  line-height: 1.55;
  color: var(--theme-1);
  margin-bottom: var(--space-40);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.hero .hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--theme-3);
  color: var(--theme-1);
  padding: clamp(0.75rem, 1vw, 1rem) clamp(1.75rem, 3vw, 2rem);
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: var(--fs-medium);
  font-weight: 400;
  border: none;
  cursor: pointer;
  transition: background var(--transition-base), box-shadow var(--transition-base);
  text-decoration: none;
  backdrop-filter: blur(30px);
}

.hero .hero-cta:hover {
  background: color-mix(in srgb, var(--theme-3) 85%, #000);
  color: var(--theme-1);
  opacity: 1;
  box-shadow: 0 4px 20px rgba(78, 123, 91, 0.3);
}

.hero .hero-cta svg {
  width: 18px;
  height: 18px;
}

/* --- Section Styling --- */
.section {
  padding: var(--space-60) var(--space-40);
}

.section-title {
  font-family: var(--font-heading);
  font-size: var(--fs-x-large);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--theme-5);
  margin-bottom: var(--space-20);
  text-align: center;
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: var(--fs-medium);
  color: color-mix(in srgb, var(--theme-5) 70%, transparent);
  text-align: center;
  max-width: var(--content-width);
  margin: 0 auto var(--space-40);
  line-height: 1.55;
}

/* --- Section Color Variations (from Assembler) --- */
.section-1 {
  background: var(--theme-2);
  color: var(--theme-5);
}

.section-1 .section-title,
.section-1 h2,
.section-1 h3 {
  color: var(--theme-5);
}

.section-1 .section-subtitle,
.section-1 p {
  color: color-mix(in srgb, var(--theme-5) 80%, transparent);
}

.section-1 .card {
  background: color-mix(in srgb, var(--theme-2) 85%, #000);
  color: var(--theme-5);
}

.section-2 {
  background: var(--theme-3);
  color: var(--theme-1);
}

.section-2 .section-title,
.section-2 h2,
.section-2 h3 {
  color: var(--theme-1);
}

.section-2 .section-subtitle,
.section-2 p {
  color: color-mix(in srgb, var(--theme-1) 80%, transparent);
}

.section-2 .card {
  background: color-mix(in srgb, var(--theme-3) 85%, #000);
  color: var(--theme-1);
}

.section-2 .card h3 {
  color: var(--theme-1);
}

.section-2 .card p {
  color: color-mix(in srgb, var(--theme-1) 80%, transparent);
}

.section-2 .card-icon {
  background: rgba(255, 255, 255, 0.15);
  color: var(--theme-1);
}

.section-3 {
  background: var(--theme-5);
  color: var(--theme-1);
}

.section-3 .section-title,
.section-3 h2,
.section-3 h3 {
  color: var(--theme-1);
}

.section-3 .section-subtitle,
.section-3 p {
  color: color-mix(in srgb, var(--theme-1) 80%, transparent);
}

.section-3 .card {
  background: color-mix(in srgb, var(--theme-5) 85%, #000);
  color: var(--theme-1);
}

.section-3 .card h3 {
  color: var(--theme-1);
}

.section-3 .card p {
  color: color-mix(in srgb, var(--theme-1) 80%, transparent);
}

.section-3 .card-icon {
  background: rgba(255, 255, 255, 0.15);
  color: var(--theme-1);
}

/* --- Cards --- */
.card {
  background: var(--theme-1);
  border-radius: 0;
  padding: var(--space-30);
  transition: background var(--transition-base);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: rgba(49, 120, 198, 0.08);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-20);
  color: var(--theme-5);
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

.card h3 {
  font-family: var(--font-heading);
  font-size: var(--fs-large);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 12px;
  color: var(--theme-5);
}

.card p {
  font-family: var(--font-body);
  font-size: var(--fs-medium);
  line-height: 1.55;
  color: color-mix(in srgb, var(--theme-5) 70%, transparent);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-30);
  max-width: var(--wide-width);
  margin: 0 auto;
}

.cards-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-30);
}

/* --- Buttons (Assembler pill style) --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--theme-3);
  color: var(--theme-1);
  padding: clamp(0.75rem, 1vw, 1rem) clamp(1.75rem, 3vw, 2rem);
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: var(--fs-medium);
  font-weight: 400;
  border: none;
  cursor: pointer;
  transition: background var(--transition-base);
  text-decoration: none;
  backdrop-filter: blur(30px);
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--theme-3) 85%, #000);
  color: var(--theme-1);
  opacity: 1;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: currentColor;
  padding: 15px 23px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: var(--fs-medium);
  font-weight: 400;
  border: 1px solid currentColor;
  cursor: pointer;
  transition: background var(--transition-base), color var(--transition-base);
  text-decoration: none;
}

.btn-outline:hover {
  background: currentColor;
  color: var(--theme-1);
  opacity: 1;
}

.section-2 .btn-primary {
  background: var(--theme-1);
  color: var(--theme-3);
}

.section-2 .btn-primary:hover {
  background: color-mix(in srgb, var(--theme-1) 85%, #000);
  color: var(--theme-3);
}

.section-3 .btn-primary {
  background: var(--theme-1);
  color: var(--theme-5);
}

.section-3 .btn-primary:hover {
  background: color-mix(in srgb, var(--theme-1) 85%, #000);
  color: var(--theme-5);
}

/* --- Separator --- */
.separator {
  border: none;
  border-top: 2px solid var(--theme-3);
  margin: var(--space-40) auto;
  max-width: var(--content-width);
}

/* --- Page Header (for inner pages) --- */
.page-header {
  padding: calc(var(--nav-height) + var(--space-50)) var(--space-40) var(--space-30);
  text-align: center;
}

.page-header h1 {
  font-family: var(--font-heading);
  font-size: var(--fs-xx-large);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--theme-5);
}

/* --- About Page --- */
.about-intro {
  max-width: var(--content-width);
  margin: 0 auto;
  text-align: center;
}

.about-intro p {
  font-size: var(--fs-medium);
  color: color-mix(in srgb, var(--theme-5) 80%, transparent);
  line-height: 1.55;
}

.contact-section {
  background: var(--theme-1);
  padding: var(--space-30);
  max-width: var(--content-width);
  margin: 0 auto;
  border: 1px solid color-mix(in srgb, var(--theme-5) 15%, transparent);
  border-radius: 0;
}

.contact-item {
  display: flex;
  padding: 16px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--theme-5) 15%, transparent);
  font-size: var(--fs-medium);
}

.contact-item:last-child {
  border-bottom: none;
}

.contact-label {
  font-weight: 500;
  color: var(--theme-5);
  min-width: 120px;
  flex-shrink: 0;
}

.contact-value {
  color: color-mix(in srgb, var(--theme-5) 70%, transparent);
}

.contact-value a {
  color: var(--theme-4);
}

.contact-value a:hover {
  opacity: 0.75;
}

/* --- Privacy Page --- */
.privacy-content {
  max-width: var(--content-width);
  margin: 0 auto;
  background: var(--theme-1);
  padding: var(--space-50) var(--space-40);
  border: 1px solid color-mix(in srgb, var(--theme-5) 15%, transparent);
}

.privacy-content h2 {
  font-family: var(--font-heading);
  font-size: var(--fs-x-large);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: var(--space-30);
  color: var(--theme-5);
}

.privacy-content h3 {
  font-family: var(--font-heading);
  font-size: var(--fs-large);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--theme-5);
  margin-top: var(--space-30);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--theme-5) 15%, transparent);
}

.privacy-content h3:first-of-type {
  margin-top: 0;
}

.privacy-content p {
  font-size: var(--fs-medium);
  color: color-mix(in srgb, var(--theme-5) 70%, transparent);
  line-height: 1.55;
  margin-bottom: 12px;
}

.privacy-content ul {
  padding-left: 20px;
  margin-bottom: 12px;
  list-style: disc;
}

.privacy-content ul li {
  font-size: var(--fs-medium);
  color: color-mix(in srgb, var(--theme-5) 70%, transparent);
  line-height: 1.55;
  margin-bottom: 4px;
}

.privacy-updated {
  font-size: var(--fs-small);
  color: color-mix(in srgb, var(--theme-5) 50%, transparent);
  margin-top: var(--space-40);
  padding-top: var(--space-20);
  border-top: 1px solid color-mix(in srgb, var(--theme-5) 15%, transparent);
}

/* --- Footer (section-3 style from Assembler) --- */
.footer {
  background: var(--theme-5);
  color: var(--theme-1);
  padding: var(--space-40);
}

.footer-inner {
  max-width: var(--wide-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-20);
}

.footer-nav {
  display: flex;
  gap: var(--space-20);
  flex-wrap: wrap;
}

.footer-nav a {
  font-family: var(--font-body);
  font-size: var(--fs-medium);
  font-weight: 400;
  color: var(--theme-1);
  padding: 4px 8px;
  transition: opacity var(--transition-base);
}

.footer-nav a:hover {
  opacity: 0.7;
}

.footer-copy {
  font-size: var(--fs-small);
  color: color-mix(in srgb, var(--theme-1) 60%, transparent);
  width: 100%;
  text-align: center;
  margin-top: var(--space-20);
  padding-top: var(--space-20);
  border-top: 1px solid color-mix(in srgb, var(--theme-1) 15%, transparent);
}

/* --- Expertise Section (Homepage) --- */
.expertise-section {
  text-align: left;
}

.expertise-section .cards-grid {
  text-align: left;
}

/* ===========================
   RESPONSIVE: Tablet (768-1024px)
   =========================== */
@media (max-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===========================
   RESPONSIVE: Mobile (<768px)
   =========================== */
@media (max-width: 767px) {
  :root {
    --nav-height: 60px;
  }

  .navbar {
    padding: 0 var(--space-30);
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--theme-1);
    flex-direction: column;
    padding: var(--space-20) var(--space-30) var(--space-40);
    box-shadow: 0 4px 16px rgba(49, 120, 198, 0.08);
    gap: 4px;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    padding: 14px var(--space-20);
    font-size: var(--fs-medium);
    width: 100%;
    text-align: left;
  }

  .hamburger {
    display: flex;
  }

  .hero {
    min-height: 50vh;
  }

  .hero h1 {
    font-size: clamp(40px, 12vw, 80px);
  }

  .section {
    padding: var(--space-40) var(--space-30);
  }

  .section-title {
    font-size: var(--fs-large);
  }

  .cards-grid,
  .cards-grid-2 {
    grid-template-columns: 1fr;
  }

  .privacy-content {
    padding: var(--space-30) var(--space-20);
  }

  .contact-section {
    padding: var(--space-20);
  }

  .contact-item {
    flex-direction: column;
    gap: 4px;
  }

  .page-header h1 {
    font-size: var(--fs-x-large);
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-nav {
    justify-content: center;
  }
}

/* ===========================
   RESPONSIVE: Small Mobile (<375px)
   =========================== */
@media (max-width: 374px) {
  .hero h1 {
    font-size: clamp(32px, 10vw, 60px);
  }

  .hero .tagline {
    font-size: var(--fs-small);
  }

  .section-title {
    font-size: clamp(20px, 3vw, 24px);
  }

  .privacy-content {
    padding: var(--space-20) var(--space-20);
  }
}

/* --- Focus Styles (Accessibility) --- */
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--theme-4);
  outline-offset: 2px;
}

/* --- Disabled Button --- */
button[disabled],
.btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
