/* style.css — 智研接案服務銷售頁
   Palette: 智研 deep navy #1a2332 + legal gold #c9a84c
   Typography: Noto Serif TC (display) + Noto Sans TC (body)
*/

:root,
[data-theme='light'] {
  /* Surfaces */
  --color-bg: #f5f6fa;
  --color-surface: #ffffff;
  --color-surface-2: #fbfbfd;
  --color-surface-offset: #eef0f5;
  --color-divider: #e5e7eb;
  --color-border: #dcdfe6;

  /* Brand */
  --navy: #1a2332;
  --navy-light: #243044;
  --navy-soft: #2c3a50;
  --gold: #c9a84c;
  --gold-hover: #d4b85a;
  --gold-strong: #b8963c;

  /* Text */
  --color-text: #1a2332;
  --color-text-muted: #5b6473;
  --color-text-faint: #9ca3af;
  --color-text-inverse: #f5f6fa;

  /* Semantic */
  --color-accent: #c9a84c;
  --color-accent-hover: #b8963c;
  --color-link: #1a5276;
  --status-ok: #2f7d4f;
  --status-warn: #b4882b;
  --status-info: #2563eb;

  /* Tints */
  --navy-tint-08: rgba(26, 35, 50, 0.04);
  --navy-tint-15: rgba(26, 35, 50, 0.08);
  --gold-tint-10: rgba(201, 168, 76, 0.10);
  --gold-tint-15: rgba(201, 168, 76, 0.15);

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 0.875rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  /* Shadows — tone-matched, minimal per Zhiyan spec */
  --shadow-sm: 0 1px 3px rgba(26, 35, 50, 0.06);
  --shadow-md: 0 4px 12px rgba(26, 35, 50, 0.08);
  --shadow-lg: 0 12px 32px rgba(26, 35, 50, 0.12);
  --shadow-gold: 0 8px 24px rgba(201, 168, 76, 0.22);

  /* Transitions */
  --transition-interactive: 200ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Type scale (fluid clamp) */
  --text-xs: clamp(0.75rem, 0.7rem + 0.2vw, 0.8125rem);
  --text-sm: clamp(0.875rem, 0.82rem + 0.25vw, 0.9375rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  --text-lg: clamp(1.15rem, 1.05rem + 0.5vw, 1.35rem);
  --text-xl: clamp(1.45rem, 1.2rem + 1.1vw, 2rem);
  --text-2xl: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  --text-3xl: clamp(2.6rem, 1.4rem + 5vw, 4.5rem);

  /* Spacing (4px system) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --content-narrow: 680px;
  --content-default: 1040px;
  --content-wide: 1240px;

  --font-display: 'Noto Serif TC', 'Source Han Serif TC', 'Songti TC', serif;
  --font-body: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-en: 'Inter', 'Noto Sans TC', -apple-system, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

[data-theme='dark'] {
  --color-bg: #11161f;
  --color-surface: #161c27;
  --color-surface-2: #1b2230;
  --color-surface-offset: #1f2735;
  --color-divider: #2a3344;
  --color-border: #323d50;

  --navy: #e6eaf1;
  --navy-light: #c8d0dc;
  --navy-soft: #a9b4c4;
  --gold: #c9a84c;
  --gold-hover: #d4b85a;
  --gold-strong: #c9a84c;

  --color-text: #e6eaf1;
  --color-text-muted: #9aa4b4;
  --color-text-faint: #6b7484;
  --color-text-inverse: #11161f;

  --color-accent: #d9b95e;
  --color-accent-hover: #e4c870;
  --color-link: #7cb8e6;

  --navy-tint-08: rgba(255, 255, 255, 0.03);
  --navy-tint-15: rgba(255, 255, 255, 0.06);
  --gold-tint-10: rgba(217, 185, 94, 0.10);
  --gold-tint-15: rgba(217, 185, 94, 0.15);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-gold: 0 8px 24px rgba(217, 185, 94, 0.18);
}

/* ============ Layout primitives ============ */
.container {
  width: 100%;
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: var(--space-6);
}
.container-wide { max-width: var(--content-wide); }

.section {
  padding-block: clamp(var(--space-16), 7vw, var(--space-32));
}
.section--tight { padding-block: clamp(var(--space-12), 5vw, var(--space-20)); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-strong);
  margin-bottom: var(--space-4);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--gold);
}

.section-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: var(--space-4);
  color: var(--color-text);
}
.section-lead {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 62ch;
}

/* ============ Header ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in oklab, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}
.header--scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
}
.brand__mark { flex: none; }
.brand__name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: 0.08em;
}
.brand__sub {
  font-size: var(--text-xs);
  letter-spacing: 0.22em;
  color: var(--gold-strong);
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.nav__links {
  display: flex;
  gap: var(--space-6);
  list-style: none;
}
.nav__links a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  position: relative;
}
.nav__links a:hover { color: var(--color-text); }
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: var(--gold);
  transition: width var(--transition-interactive);
}
.nav__links a:hover::after { width: 100%; }

.header__actions { display: flex; align-items: center; gap: var(--space-3); }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  border: 1px solid transparent;
  transition: background var(--transition-interactive), color var(--transition-interactive), border-color var(--transition-interactive);
}
.icon-btn:hover { background: var(--navy-tint-15); color: var(--color-text); }

.nav-toggle { display: none; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-full);
  text-decoration: none;
  border: 1px solid transparent;
  transition: all var(--transition-interactive);
  white-space: nowrap;
}
.btn--gold {
  background: linear-gradient(135deg, #d8b95e 0%, #c9a84c 100%);
  color: #1a2332;
  box-shadow: var(--shadow-gold), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn--gold:hover {
  background: linear-gradient(135deg, #e0c268 0%, #d0af50 100%);
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold), inset 0 1px 0 rgba(255,255,255,0.3);
}
.btn--navy {
  background: var(--navy);
  color: var(--color-text-inverse);
}
[data-theme='dark'] .btn--navy { color: #11161f; }
.btn--navy:hover { background: var(--navy-light); transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-strong); }
.btn--lg { padding: var(--space-4) var(--space-8); font-size: var(--text-base); }

/* ============ Hero ============ */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(var(--space-20), 9vw, var(--space-32)) var(--space-20);
  background: var(--color-bg);
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero__bg::before {
  content: "";
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  max-width: 720px;
  max-height: 720px;
  background: radial-gradient(circle, var(--gold-tint-15) 0%, transparent 65%);
  filter: blur(8px);
}
.hero__bg::after {
  content: "";
  position: absolute;
  bottom: -25%;
  left: -15%;
  width: 55vw;
  height: 55vw;
  max-width: 640px;
  max-height: 640px;
  background: radial-gradient(circle, var(--navy-tint-08) 0%, transparent 70%);
}
.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--space-16);
  align-items: center;
}
.hero__title {
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0;
  margin-bottom: var(--space-6);
}
.hero__title .hl {
  font-style: normal;
  color: var(--gold-strong);
  white-space: nowrap;
  position: relative;
  display: inline-block;
}
.hero__title .hl::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.08em;
  height: 0.28em;
  background: var(--gold-tint-15);
  z-index: -1;
  border-radius: 2px;
}
.hero__lead {
  font-size: var(--text-lg);
  line-height: 1.8;
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
  max-width: 52ch;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-bottom: var(--space-10); }
.hero__trust { display: flex; flex-wrap: wrap; gap: var(--space-6) var(--space-8); }
.trust-item { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--color-text-muted); }
.trust-item strong { color: var(--color-text); font-weight: 700; font-family: var(--font-en); font-variant-numeric: tabular-nums; }

/* Hero visual card */
.hero__visual {
  position: relative;
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-light) 100%);
  box-shadow: var(--shadow-lg);
  color: #e6eaf1;
  overflow: hidden;
}
[data-theme='dark'] .hero__visual { background: linear-gradient(160deg, #1b2230 0%, #232c3d 100%); }
.hero__visual::before {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 180px; height: 180px;
  background: radial-gradient(circle at 70% 30%, var(--gold-tint-15), transparent 70%);
}
.hero__visual-label {
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-2);
}
.hero__visual-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-5);
  color: #f5f6fa;
}
.cite-demo {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  font-size: var(--text-sm);
  line-height: 1.7;
  margin-bottom: var(--space-3);
}
.cite-demo .q { color: #c8d0dc; margin-bottom: var(--space-3); }
.cite-demo .a { color: #f5f6fa; }
.cite-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  background: var(--gold-tint-15);
  color: var(--gold);
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  margin-top: var(--space-2);
  font-family: var(--font-en);
  font-weight: 500;
}
.verified-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: #9ca3af;
  margin-top: var(--space-4);
}
.dot-ok { width: 8px; height: 8px; border-radius: 50%; background: var(--status-ok); }

/* ============ Stats bar ============ */
.stats {
  border-block: 1px solid var(--color-border);
  background: var(--color-surface);
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}
.stat {
  text-align: center;
  padding: var(--space-8) var(--space-4);
  border-right: 1px solid var(--color-divider);
}
.stat:last-child { border-right: none; }
.stat__num {
  font-family: var(--font-en);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--gold-strong);
  line-height: 1;
  margin-bottom: var(--space-2);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.stat__label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ============ Cards / services ============ */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: transform var(--transition-interactive), box-shadow var(--transition-interactive), border-color var(--transition-interactive);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold);
}
.card__icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  background: var(--gold-tint-10);
  color: var(--gold-strong);
  margin-bottom: var(--space-5);
}
.card__title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-3);
  font-family: var(--font-body);
  letter-spacing: -0.005em;
}
.card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-4);
}
.card__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.card__list li {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding-left: var(--space-5);
  position: relative;
  max-width: none;
}
.card__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.6em;
  width: 14px; height: 1.5px;
  background: var(--gold);
}

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-5); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }

/* Section header block */
.section-head { max-width: 64ch; margin-bottom: var(--space-12); }
.section-head--center { margin-inline: auto; text-align: center; }

/* ============ Capability chips ============ */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
.cap {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
}
.cap__name {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: var(--space-2);
  display: flex; align-items: center; gap: var(--space-2);
}
.cap__name .tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  background: var(--navy-tint-15);
  color: var(--color-text-muted);
  padding: 1px var(--space-2);
  border-radius: var(--radius-sm);
  font-weight: 500;
}
.cap__desc { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.65; }

/* ============ Method timeline ============ */
.timeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-4);
  counter-reset: step;
}
.step {
  position: relative;
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  counter-increment: step;
}
.step::before {
  content: "0" counter(step);
  font-family: var(--font-en);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--gold);
  display: block;
  margin-bottom: var(--space-3);
  font-variant-numeric: tabular-nums;
}
.step__title { font-size: var(--text-base); font-weight: 600; margin-bottom: var(--space-2); font-family: var(--font-body); }
.step__desc { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.6; }

/* ============ Case studies ============ */
.case {
  display: grid;
  grid-template-columns: 0.4fr 0.6fr;
  gap: var(--space-8);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}
.case:hover { border-color: var(--gold); box-shadow: var(--shadow-md); }
.case__media {
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-light) 100%);
  padding: var(--space-8);
  display: flex; flex-direction: column; justify-content: space-between;
  color: #e6eaf1;
  min-height: 220px;
}
[data-theme='dark'] .case__media { background: linear-gradient(150deg, #1b2230, #232c3d); }
.case__media .badge {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--gold);
  letter-spacing: 0.1em;
}
.case__media .name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: #f5f6fa;
}
.case__body { padding: var(--space-8); }
.case__tag {
  display: inline-block;
  font-size: var(--text-xs);
  color: var(--gold-strong);
  background: var(--gold-tint-10);
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-3);
  font-weight: 600;
}
.case__title { font-size: var(--text-lg); font-weight: 600; margin-bottom: var(--space-3); font-family: var(--font-body); }
.case__desc { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.7; margin-bottom: var(--space-4); }
.case__meta { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-5); }
.chip {
  font-size: var(--text-xs);
  font-family: var(--font-en);
  background: var(--navy-tint-08);
  color: var(--color-text-muted);
  padding: 3px var(--space-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-divider);
}
.case__link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--gold-strong);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: var(--space-2);
}
.case__link:hover { color: var(--gold-hover); }

/* ============ Pricing ============ */
.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  align-items: stretch;
}
.plan {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  display: flex; flex-direction: column;
  position: relative;
}
.plan--featured {
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
}
.plan__ribbon {
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: #1a2332;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 4px var(--space-4);
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
}
.plan__name { font-family: var(--font-body); font-size: var(--text-lg); font-weight: 700; margin-bottom: var(--space-2); }
.plan__price {
  font-family: var(--font-en);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-1);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.plan__price small { font-size: var(--text-sm); color: var(--color-text-muted); font-weight: 400; font-family: var(--font-body); }
.plan__desc { font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: var(--space-6); }
.plan__features { list-style: none; display: flex; flex-direction: column; gap: var(--space-3); margin-bottom: var(--space-8); flex: 1; }
.plan__features li {
  font-size: var(--text-sm);
  padding-left: var(--space-6);
  position: relative;
  color: var(--color-text);
  max-width: none;
}
.plan__features li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.45em;
  width: 16px; height: 16px;
  background: var(--gold-tint-15);
  border-radius: 50%;
}
.plan__features li::after {
  content: "";
  position: absolute;
  left: 5px; top: 0.7em;
  width: 6px; height: 3px;
  border-left: 2px solid var(--gold-strong);
  border-bottom: 2px solid var(--gold-strong);
  transform: rotate(-45deg);
}

/* ============ Form ============ */
.form-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-8), 4vw, var(--space-12));
  box-shadow: var(--shadow-md);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); }
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field--full { grid-column: 1 / -1; }
.field label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}
.field label .req { color: var(--gold-strong); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  color: var(--color-text);
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-tint-15);
}
.field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: var(--text-xs); color: var(--color-text-faint); margin-top: var(--space-3); }
.form-success {
  display: none;
  text-align: center;
  padding: var(--space-8);
}
.form-success.show { display: block; }
.form-success__icon {
  width: 56px; height: 56px;
  margin: 0 auto var(--space-4);
  border-radius: 50%;
  background: var(--gold-tint-15);
  color: var(--gold-strong);
  display: flex; align-items: center; justify-content: center;
}

/* ============ Footer ============ */
.footer {
  background: var(--navy);
  color: #c8d0dc;
  padding-block: var(--space-20) var(--space-12);
}
[data-theme='dark'] .footer { background: #0c1019; }
.footer a { color: #c8d0dc; text-decoration: none; }
.footer a:hover { color: var(--gold); }
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}
.footer__brand .brand__name { color: #f5f6fa; }
.footer__about { font-size: var(--text-sm); color: #8b9ab0; margin-top: var(--space-4); max-width: 38ch; line-height: 1.7; }
.footer__col h4 { color: #f5f6fa; font-size: var(--text-sm); font-family: var(--font-body); font-weight: 600; margin-bottom: var(--space-4); letter-spacing: 0.05em; }
.footer__col ul { list-style: none; display: flex; flex-direction: column; gap: var(--space-3); }
.footer__col a { font-size: var(--text-sm); color: #9aa4b4; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: var(--space-8);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-4);
  font-size: var(--text-xs);
  color: #6b7484;
}

/* ============ AI Chatbot Widget ============ */
.chat-fab {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 80;
  width: 60px; height: 60px;
  border-radius: var(--radius-full);
  background: var(--gold);
  color: #1a2332;
  box-shadow: var(--shadow-lg), var(--shadow-gold);
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--transition-interactive);
}
.chat-fab:hover { transform: scale(1.06); }
.chat-fab__pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.4;
  animation: pulse 2.4s ease-out infinite;
  z-index: -1;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.4; }
  70%, 100% { transform: scale(1.8); opacity: 0; }
}
.chat-fab__badge {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--status-warn);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--color-bg);
}

.chat-panel {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 90;
  width: min(380px, calc(100vw - 32px));
  height: min(580px, calc(100vh - 120px));
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
}
.chat-panel.open {
  display: flex;
  animation: pop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes pop {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.chat-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #f5f6fa;
  padding: var(--space-5) var(--space-5);
  display: flex; align-items: center; gap: var(--space-3);
}
[data-theme='dark'] .chat-header { background: linear-gradient(135deg, #1b2230, #232c3d); }
.chat-header__avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--gold-tint-15);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  flex: none;
}
.chat-header__info { flex: 1; }
.chat-header__name { font-family: var(--font-display); font-size: var(--text-base); font-weight: 600; }
.chat-header__status { font-size: var(--text-xs); color: #9ca3af; display: flex; align-items: center; gap: var(--space-2); }
.chat-header__status .dot-ok { width: 7px; height: 7px; }
.chat-close { color: #c8d0dc; width: 32px; height: 32px; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; }
.chat-close:hover { background: rgba(255,255,255,0.1); color: #fff; }

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-5);
  display: flex; flex-direction: column; gap: var(--space-4);
  background: var(--color-bg);
}
.msg { display: flex; flex-direction: column; gap: var(--space-1); max-width: 85%; }
.msg--ai { align-self: flex-start; }
.msg--user { align-self: flex-end; align-items: flex-end; }
.msg__bubble {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  line-height: 1.65;
}
.msg--ai .msg__bubble {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-bottom-left-radius: var(--space-1);
  color: var(--color-text);
}
.msg--user .msg__bubble {
  background: var(--navy);
  color: var(--color-text-inverse);
  border-bottom-right-radius: var(--space-1);
}
[data-theme='dark'] .msg--user .msg__bubble { color: #11161f; }
.msg__bubble a { color: var(--gold-strong); text-decoration: underline; }
.msg__time { font-size: 10px; color: var(--color-text-faint); padding: 0 var(--space-2); }

.typing { display: flex; gap: 4px; padding: var(--space-3) var(--space-4); align-self: flex-start; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); border-bottom-left-radius: var(--space-1); }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--color-text-faint); animation: blink 1.3s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.3; } 40% { opacity: 1; } }

.chat-quick { display: flex; flex-wrap: wrap; gap: var(--space-2); padding: 0 var(--space-5) var(--space-3); }
.chat-quick button {
  font-size: var(--text-xs);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--gold-tint-10);
  color: var(--gold-strong);
  border: 1px solid var(--gold-tint-15);
  font-weight: 500;
  transition: all var(--transition-interactive);
}
.chat-quick button:hover { background: var(--gold-tint-15); }

.chat-input {
  border-top: 1px solid var(--color-border);
  padding: var(--space-3);
  display: flex; gap: var(--space-2);
  background: var(--color-surface);
}
.chat-input input {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-surface-2);
  font-size: var(--text-sm);
  color: var(--color-text);
}
.chat-input input:focus { outline: none; border-color: var(--gold); }
.chat-send {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--gold);
  color: #1a2332;
  display: flex; align-items: center; justify-content: center;
  flex: none;
  transition: transform var(--transition-interactive);
}
.chat-send:hover { transform: scale(1.06); }
.chat-send:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ============ Responsive ============ */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; gap: var(--space-10); }
  .hero__visual { order: -1; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--color-divider); }
  .grid-3, .grid-4, .grid-2, .cap-grid, .plans, .timeline { grid-template-columns: 1fr; }
  .nav__links, .nav .btn--ghost { display: none; }
  .nav-toggle { display: inline-flex; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .case { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .footer__grid { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: 1fr 1fr; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { justify-content: center; }
  .chat-panel { right: var(--space-3); bottom: var(--space-3); }
  .chat-fab { right: var(--space-3); bottom: var(--space-3); }
}

/* Mobile nav drawer */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: var(--color-bg);
  display: none;
  flex-direction: column;
  padding: var(--space-8) var(--space-6);
}
.drawer.open { display: flex; }
.drawer__close { align-self: flex-end; }
.drawer nav { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-6); }
.drawer nav a {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-divider);
}
