/* ============================================================
   pmia.app — Sophia web launcher
   Page styles built on the Sophia Design System tokens.
   The warm "glow" accent comes from the Sophia presentation
   and is used sparingly on dark (navy) sections only.
   ============================================================ */

:root {
  --navy-deep: #0b1a33;          /* presentation night-navy */
  --navy:      #13264a;
  --glow:      #f5b04c;          /* presentation amber thread */
  --glow-soft: rgba(245, 176, 76, 0.16);
  --glow-strong: #f59e0b;
  --paper:     #f7f5f0;          /* presentation off-white slide paper */
  --gutter:    clamp(16px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font: var(--font-body-lg);
  color: var(--text-body);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--text-link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: none; box-shadow: 0 0 0 var(--ring-width) var(--ring-color); border-radius: var(--radius-sm); }

h1, h2, h3 { color: var(--text-strong); margin: 0; letter-spacing: var(--tracking-tight); }
h1 { font-size: clamp(36px, 6vw, 60px); line-height: 1.05; font-weight: 700; }
h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.12; font-weight: 700; }
h3 { font-size: var(--text-xl); line-height: var(--leading-snug); font-weight: 600; letter-spacing: -0.01em; }
p  { margin: 0; }

.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: var(--weight-semibold) var(--text-xs)/1 var(--font-sans);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--blue-600);
}
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.on-dark .eyebrow { color: var(--glow); }

.lead { font-size: clamp(17px, 2vw, 20px); line-height: var(--leading-relaxed); color: var(--text-muted); }
.on-dark .lead { color: rgba(255, 255, 255, 0.72); }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 12px; border-radius: var(--radius-md); z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- Buttons (DS Button) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: var(--radius-lg);
  font: var(--weight-semibold) var(--text-sm)/1 var(--font-sans);
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background var(--duration-fast) var(--ease-standard),
              border-color var(--duration-fast) var(--ease-standard),
              transform var(--duration-fast) var(--ease-standard),
              box-shadow var(--duration-fast) var(--ease-standard);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(var(--press-scale)); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-lg { height: 52px; padding: 0 26px; font-size: var(--text-base); border-radius: var(--radius-xl); }

.btn-primary { background: var(--color-primary); color: var(--color-on-primary); box-shadow: var(--shadow-primary); }
.btn-primary:hover { background: var(--color-primary-hover); }
.btn-secondary { background: var(--surface-card); color: var(--text-strong); border-color: var(--border-default); box-shadow: var(--shadow-xs); }
.btn-secondary:hover { border-color: var(--border-strong); background: var(--surface-hover); }
.btn-glow { background: var(--glow); color: var(--navy-deep); box-shadow: 0 10px 28px -8px rgba(245, 176, 76, 0.65); }
.btn-glow:hover { background: #ffc266; }
.btn-ghost-light { color: var(--white); border-color: rgba(255, 255, 255, 0.28); background: rgba(255, 255, 255, 0.04); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.5); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border-default);
}
.site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { width: 92px; height: 28px; }
.brand:hover { text-decoration: none; }
.brand-tag { font: var(--font-meta); color: var(--text-subtle); padding-left: 10px; border-left: 1px solid var(--border-default); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) {
  padding: 8px 12px; border-radius: var(--radius-md);
  font: var(--font-label); color: var(--text-muted);
  transition: color var(--duration-fast), background var(--duration-fast);
}
.nav a:not(.btn):hover { color: var(--text-strong); background: var(--surface-sunken); text-decoration: none; }
.nav a:not(.btn)[aria-current="page"] { color: var(--blue-700); background: var(--color-primary-soft); }
.nav .btn { margin-left: 8px; height: 38px; padding: 0 16px; }

.nav-toggle {
  display: none; width: 40px; height: 40px; border-radius: var(--radius-md);
  border: 1px solid var(--border-default); background: var(--surface-card); color: var(--text-strong);
  align-items: center; justify-content: center; cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 760px) {
  .brand-tag { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 12px var(--gutter) 16px;
    background: var(--surface-card); border-bottom: 1px solid var(--border-default); box-shadow: var(--shadow-lg);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: 12px; }
  .nav .btn { margin: 8px 0 0; height: 44px; }
}

/* ---------- Hero (dark) ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background:
    radial-gradient(60% 55% at 50% 110%, rgba(236, 132, 78, 0.55), transparent 70%),
    radial-gradient(40% 40% at 80% 0%, rgba(37, 99, 235, 0.25), transparent 70%),
    linear-gradient(180deg, var(--navy-deep) 0%, #16284a 100%);
  color: var(--white);
  padding: clamp(56px, 9vw, 112px) 0 0;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 32px; }
.hero h1 { color: var(--white); }
.hero h1 .accent { color: var(--glow); }
.hero .lead { margin-top: 20px; max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 28px; font: var(--font-meta); color: rgba(255, 255, 255, 0.6); }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta svg { width: 14px; height: 14px; color: var(--glow); }
.hero-art { position: relative; align-self: end; }
.hero-art img {
  width: 100%;
  -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
  animation: breathe 7s ease-in-out infinite;
}
@keyframes breathe { 0%, 100% { transform: scale(1); filter: brightness(1); } 50% { transform: scale(1.03); filter: brightness(1.08); } }

.thread { position: absolute; left: 0; right: 0; bottom: 18%; height: 120px; z-index: -1; opacity: 0.55; pointer-events: none; }
.thread path { stroke-dasharray: 6 0; animation: drift 14s linear infinite; }
@keyframes drift { to { stroke-dashoffset: -400; } }

.hero-foot { height: clamp(48px, 7vw, 88px); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: left; }
  .hero-art { max-width: 520px; margin: 0 auto; }
}

/* Short page hero (inner pages) */
.page-hero { padding: clamp(48px, 8vw, 96px) 0 clamp(48px, 7vw, 80px); }
.page-hero .lead { margin-top: 18px; max-width: 60ch; }
.page-hero h1 { margin-top: 14px; max-width: 18ch; }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-paper { background: var(--paper); }
.section-white { background: var(--surface-card); }
.section-dark { background: var(--navy-deep); color: var(--white); }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 { margin-top: 12px; }
.section-head .lead { margin-top: 14px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow::before { display: none; }

/* Split: text + figure */
.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.split.reverse > :first-child { order: 2; }
.split h2 { margin-top: 12px; }
.split .lead { margin-top: 16px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split.reverse > :first-child { order: 0; } }

.figure {
  margin: 0; border-radius: var(--radius-2xl); overflow: hidden;
  background: var(--paper); border: 1px solid var(--border-default); box-shadow: var(--shadow-lg);
}
.figure img { width: 100%; }

/* Check list */
.checks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; font-size: var(--text-base); color: var(--text-body); }
.checks svg { flex: none; width: 22px; height: 22px; margin-top: 1px; color: var(--glow-strong); }
.on-dark .checks li { color: rgba(255, 255, 255, 0.85); }

/* ---------- Cards (DS Card) ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface-card); border: 1px solid var(--border-default);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-sm);
  padding: 28px;
  transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out), border-color var(--duration-base);
}
.card:hover { transform: translateY(var(--lift-y)); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card h3 { margin-top: 18px; }
.card p { margin-top: 8px; font-size: var(--text-sm); line-height: var(--leading-relaxed); color: var(--text-muted); }

.icon-tile {
  width: 48px; height: 48px; border-radius: var(--radius-lg);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--color-primary-soft); color: var(--blue-700);
}
.icon-tile svg { width: 24px; height: 24px; }
.icon-tile.warm { background: #fff4e0; color: #b45309; }
.icon-tile.ai { background: var(--status-ai-bg); color: var(--status-ai-fg); }

/* Glow-topped card (from "Built for teams that ship") */
.card-glow { position: relative; overflow: hidden; }
.card-glow::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, #f97362, var(--glow), #fcd34d);
}

/* ---------- Comparison table ---------- */
.compare {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--surface-card); border: 1px solid var(--border-default);
  border-radius: var(--radius-2xl); overflow: hidden; box-shadow: var(--shadow-md);
}
.compare th, .compare td { padding: 18px 24px; text-align: left; font-size: var(--text-base); border-bottom: 1px solid var(--border-subtle); }
.compare tr:last-child td { border-bottom: 0; }
.compare thead th { font: var(--weight-semibold) var(--text-xs)/1 var(--font-sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); background: var(--gray-50); }
.compare td:first-child { color: var(--text-muted); width: 45%; }
.compare td:last-child, .compare th:last-child { background: linear-gradient(90deg, #fffaf0, #fff4e0); }
.compare td:last-child { font-weight: 600; color: var(--text-strong); }
.compare thead th:last-child { color: #b45309; }
.compare .tick { display: inline-flex; vertical-align: -4px; margin-right: 10px; color: var(--glow-strong); }
.compare .tick svg { width: 20px; height: 20px; }
@media (max-width: 560px) { .compare th, .compare td { padding: 14px; font-size: var(--text-sm); } .compare .tick { display: none; } }

/* ---------- Stat strip (qualitative, no vanity numbers) ---------- */
.pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--border-default); border-radius: var(--radius-2xl); background: var(--surface-card); overflow: hidden; }
.pillar { padding: 24px; border-right: 1px solid var(--border-subtle); }
.pillar:last-child { border-right: 0; }
.pillar strong { display: block; font-size: var(--text-lg); color: var(--text-strong); letter-spacing: -0.01em; }
.pillar span { display: block; margin-top: 4px; font: var(--font-meta); color: var(--text-muted); }
@media (max-width: 900px) { .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pillar:nth-child(2) { border-right: 0; } .pillar:nth-child(-n+2) { border-bottom: 1px solid var(--border-subtle); } }
@media (max-width: 480px) { .pillars { grid-template-columns: 1fr; } .pillar { border-right: 0; border-bottom: 1px solid var(--border-subtle); } .pillar:last-child { border-bottom: 0; } }

/* ---------- Presentation "slides" (benefits page) ---------- */
.slide-nav {
  position: sticky; top: var(--header-h); z-index: 40;
  background: rgba(247, 245, 240, 0.9); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-default);
}
.slide-nav ol { list-style: none; margin: 0; padding: 10px 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.slide-nav ol::-webkit-scrollbar { display: none; }
.slide-nav a {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 7px 12px; border-radius: var(--radius-full);
  font: var(--weight-medium) var(--text-xs)/1 var(--font-sans); color: var(--text-muted);
  border: 1px solid transparent;
}
.slide-nav a:hover { text-decoration: none; color: var(--text-strong); background: var(--white); border-color: var(--border-default); }
.slide-nav a.is-active { color: var(--white); background: var(--navy); }
.slide-nav .num { font-family: var(--font-mono); opacity: 0.6; }

.slide { padding: clamp(56px, 8vw, 96px) 0; scroll-margin-top: calc(var(--header-h) + 52px); }
.slide:nth-of-type(even):not(.section-dark) { background: var(--surface-card); }
.slide .quote { font-size: var(--text-base); color: var(--text-muted); font-style: italic; }
.slide h2 { margin-top: 10px; }
.slide-num { font: var(--weight-medium) var(--text-xs)/1 var(--font-mono); color: var(--text-subtle); }

.callout {
  margin-top: 24px; padding: 16px 18px; border-radius: var(--radius-xl);
  background: #fff7e8; border: 1px solid #f6d9a8; color: #6b3f06;
  font-size: var(--text-sm); line-height: var(--leading-relaxed);
}
.callout strong { color: #4a2b03; }

/* Leverage (bargaining power) */
.leverage { counter-reset: lev; }
.lev-card { position: relative; padding-top: 56px; }
.lev-card::before {
  counter-increment: lev; content: counter(lev, decimal-leading-zero);
  position: absolute; top: 24px; left: 28px;
  font: var(--weight-semibold) var(--text-xs)/1 var(--font-mono); color: var(--glow);
}
.section-dark .card { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.1); box-shadow: none; }
.section-dark .card:hover { border-color: rgba(245, 176, 76, 0.45); background: rgba(255, 255, 255, 0.06); }
.section-dark .card h3 { margin-top: 0; }
.section-dark .card p { color: rgba(255, 255, 255, 0.68); }

/* ---------- Timeline (A day with Sophia) ---------- */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 22px; height: 2px; background: linear-gradient(90deg, transparent, var(--glow), transparent); }
.timeline li { position: relative; padding-top: 44px; }
.timeline li::before { content: ""; position: absolute; top: 15px; left: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--white); border: 3px solid var(--glow); box-shadow: 0 0 0 6px var(--glow-soft); }
.timeline time { font: var(--weight-bold) var(--text-2xl)/1 var(--font-sans); color: var(--text-strong); letter-spacing: -0.02em; }
.timeline .who { display: inline-block; margin-left: 8px; padding: 3px 8px; border-radius: var(--radius-full); font: var(--weight-semibold) 10px/1.4 var(--font-sans); letter-spacing: 0.06em; text-transform: uppercase; vertical-align: 4px; }
.who.sophia { background: var(--status-ai-bg); color: var(--status-ai-fg); }
.who.team { background: var(--status-success-bg); color: var(--status-success-fg); }
.timeline p { margin-top: 10px; font-size: var(--text-sm); color: var(--text-muted); line-height: var(--leading-relaxed); }
@media (max-width: 900px) {
  .timeline { grid-template-columns: 1fr; gap: 0; padding-left: 28px; }
  .timeline::before { left: 7px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; background: linear-gradient(180deg, var(--glow), rgba(245, 176, 76, 0.2)); }
  .timeline li { padding: 0 0 28px; }
  .timeline li::before { left: -28px; top: 4px; }
}

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; background: var(--navy-deep); color: var(--white); }
.cta-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 32px; }
.cta-grid h2 { color: var(--white); font-size: clamp(32px, 5vw, 52px); }
.cta-grid .checks { margin-top: 28px; }
.cta-grid .hero-actions { margin-top: 36px; }
.cta-art img { width: 100%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 25%); mask-image: linear-gradient(90deg, transparent, #000 25%); }
@media (max-width: 900px) { .cta-grid { grid-template-columns: 1fr; } .cta-art { max-width: 460px; margin-left: auto; } }
.cta-band .section { padding-bottom: 0; }

/* ---------- Try Sophia ---------- */
.try-wrap { position: relative; min-height: calc(100vh - var(--header-h) - 200px); display: grid; place-items: center; padding: clamp(48px, 8vw, 96px) 0; overflow: hidden; }
.try-wrap::before, .try-wrap::after {
  content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; filter: blur(80px); opacity: 0.18; z-index: 0;
}
.try-wrap::before { background: var(--blue-500); top: -160px; left: -140px; }
.try-wrap::after { background: var(--indigo-500); bottom: -200px; right: -120px; }
.try-card {
  position: relative; z-index: 1; width: 100%; max-width: 560px;
  background: var(--surface-card); border: 1px solid var(--border-default);
  border-radius: var(--radius-2xl); box-shadow: var(--shadow-xl); padding: clamp(24px, 5vw, 44px);
}
.try-card .logo-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.try-card h1 { font-size: var(--text-3xl); margin-top: 24px; }
.try-card > p { margin-top: 10px; color: var(--text-muted); font-size: var(--text-base); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-full); font: var(--weight-semibold) 11px/1.4 var(--font-sans); letter-spacing: 0.06em; text-transform: uppercase; }
.pill-live { background: var(--status-success-bg); color: var(--status-success-fg); }
.pill-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2); }

.steps { list-style: none; counter-reset: step; margin: 28px 0 0; padding: 0; display: grid; gap: 18px; }
.steps > li { counter-increment: step; display: grid; grid-template-columns: 28px 1fr; gap: 14px; align-items: start; }
.steps > li::before {
  content: counter(step); width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: var(--color-primary-soft); color: var(--blue-700);
  font: var(--weight-semibold) var(--text-xs)/1 var(--font-sans);
}
.steps .step-title { font: var(--font-label); color: var(--text-strong); padding-top: 4px; }
.steps .step-body { margin-top: 4px; font-size: var(--text-sm); color: var(--text-muted); }

.cred { margin-top: 12px; display: grid; gap: 8px; }
.cred-row {
  display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 10px;
  background: var(--surface-sunken); border: 1px solid transparent; border-radius: var(--radius-lg); padding: 6px 6px 6px 14px;
}
.cred-row .cred-label { font: var(--weight-medium) var(--text-xs)/1 var(--font-sans); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.cred-row code { font: var(--weight-medium) var(--text-base)/1.2 var(--font-mono); color: var(--text-strong); overflow-wrap: anywhere; }
.copy-btn {
  height: 34px; padding: 0 12px; border-radius: var(--radius-md); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-card); border: 1px solid var(--border-default); color: var(--text-body);
  font: var(--weight-medium) var(--text-xs)/1 var(--font-sans);
  transition: border-color var(--duration-fast), color var(--duration-fast);
}
.copy-btn:hover { border-color: var(--border-strong); color: var(--text-strong); }
.copy-btn svg { width: 14px; height: 14px; }
.copy-btn.is-copied { color: var(--status-success-fg); border-color: var(--emerald-400); }
@media (max-width: 420px) { .cred-row { grid-template-columns: 1fr auto; } .cred-row .cred-label { grid-column: 1 / -1; padding-top: 6px; } }

.launch { margin-top: 28px; }
.launch .btn { width: 100%; }
.launch-url { margin-top: 10px; text-align: center; font: var(--font-meta); color: var(--text-subtle); }
.launch-url code { font-family: var(--font-mono); color: var(--text-muted); }
.note {
  margin-top: 24px; padding: 12px 14px; border-radius: var(--radius-lg);
  background: var(--status-warning-bg); color: var(--amber-900);
  font-size: var(--text-xs); line-height: var(--leading-normal); display: flex; gap: 10px;
}
.note svg { flex: none; width: 16px; height: 16px; margin-top: 1px; color: var(--amber-600); }

/* ---------- Footer ---------- */
.site-footer { background: var(--gray-900); color: var(--gray-400); padding: 48px 0 32px; font-size: var(--text-sm); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 48px; align-items: flex-start; }
.footer-brand img { width: 92px; height: 28px; box-sizing: content-box; padding: 6px 10px; border-radius: var(--radius-md); background: var(--white); }
.footer-brand p { margin-top: 12px; max-width: 34ch; color: var(--gray-400); }
.footer-info { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-info li { display: flex; gap: 10px; align-items: center; }
.footer-info svg { width: 16px; height: 16px; color: var(--gray-500); flex: none; }
.footer-info a { color: var(--gray-200); }
.footer-bottom {
  margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--gray-800);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font: var(--font-meta);
}
.footer-bottom a, .link-button { color: var(--gray-200); }
.link-button { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-button:hover { color: var(--white); }

/* ---------- Privacy dialog ---------- */
dialog.policy {
  width: min(760px, calc(100vw - 32px)); max-height: min(86vh, 900px);
  padding: 0; border: 1px solid var(--border-default); border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl); background: var(--surface-card); color: var(--text-body);
  overflow: hidden;
}
dialog.policy[open] { display: flex; flex-direction: column; animation: rise var(--duration-slow) var(--ease-out); }
dialog.policy::backdrop { background: rgba(3, 7, 18, 0.5); backdrop-filter: blur(2px); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.policy-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 16px 24px; border-bottom: 1px solid var(--border-default); }
.policy-head strong { font: var(--font-title); color: var(--text-strong); }
.policy-close { width: 36px; height: 36px; border-radius: var(--radius-md); border: 0; background: transparent; color: var(--text-muted); cursor: pointer; display: grid; place-items: center; }
.policy-close:hover { background: var(--surface-sunken); color: var(--text-strong); }
.policy-close svg { width: 20px; height: 20px; }
.policy-body { overflow-y: auto; padding: 8px 24px 28px; }

/* Policy article (shared by dialog + privacy.html) */
.policy-article { font-size: var(--text-sm); line-height: var(--leading-relaxed); color: var(--text-body); }
.policy-article h1 { font-size: var(--text-3xl); }
.policy-article h2 { font-size: var(--text-lg); margin: 28px 0 8px; letter-spacing: -0.01em; }
.policy-article h3 { font-size: var(--text-sm); margin: 16px 0 4px; }
.policy-article p, .policy-article ul { margin: 8px 0; }
.policy-article ul { padding-left: 20px; }
.policy-article li { margin: 4px 0; }
.policy-article .meta { color: var(--text-muted); font: var(--font-meta); margin-top: 6px; }
.policy-article .template-note { margin: 16px 0; padding: 12px 14px; border-radius: var(--radius-lg); background: var(--status-info-bg); color: var(--blue-800); font-size: var(--text-xs); }
.policy-article table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: var(--text-xs); }
.policy-article th, .policy-article td { text-align: left; padding: 8px 10px; border: 1px solid var(--border-default); vertical-align: top; }
.policy-article th { background: var(--gray-50); color: var(--text-strong); font-weight: 600; }
.policy-table-wrap { overflow-x: auto; }
.policy-page { padding: clamp(40px, 6vw, 72px) 0; }
.policy-page .policy-article { max-width: 760px; margin: 0 auto; background: var(--surface-card); border: 1px solid var(--border-default); border-radius: var(--radius-2xl); padding: clamp(24px, 5vw, 48px); box-shadow: var(--shadow-sm); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(10px); transition: opacity var(--duration-slower) var(--ease-out), transform var(--duration-slower) var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
