/* ============================================================
   Curator — product page
   Palette mirrors assets/palletes/{sweet,light}.json (Curator's runtime palettes)
   Light theme is default; dark via [data-theme="dark"].
   ============================================================ */

:root {
  /* light palette — website-warm divergence from assets/palletes/light.json
     Approved per CLAUDE.md ("better UX") and recorded in
     docs/issues/2664-website-curator-palette-source-of-truth.md.
     The canonical Curator light.json stays pure-white; the website
     uses these warmer beige tones because the customer-facing
     surface is read at length and warmer tones are easier on the
     eye than pure #ffffff. */
  --bg:          #fbf9f5;
  --surface:     #f3efe8;
  --surface-2:  #ebe6dc;
  --border:      #d9d2c4;
  --text:        #2a2520;
  --text-muted:  #6b6358;
  --accent:      #0a4a8f;
  --accent-soft: #f1e7d8;
  --overlay:     rgba(15, 13, 10, 0.85);
  --error:       #b3271f;
  --ok:          #2a6b3c;
  --warn:        #a05f0c;

  --font-body:   -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, system-ui, sans-serif;
  --font-mono:   "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

  --max-content: 1080px;
  --radius:      6px;
  --radius-lg:   12px;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 64px;
  --space-6: 96px;
}

[data-theme="dark"] {
  /* dark palette — assets/palletes/sweet.json (canonical, no divergence) */
  --bg:          #1e1e2e;
  --surface:     #222235;
  --surface-2:  #1b1b2a;
  --border:      #2a2a3e;
  --text:        #ffffff;
  --text-muted:  #8e8eab;
  --accent:      #ec89cb;
  --accent-soft: #3a2a40;
  --overlay:     rgba(8, 6, 14, 0.85);
  --error:       #f60055;
  --ok:          #4ade80;
  --warn:        #f69154;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.25s ease, color 0.25s ease;
}

a {
  text-decoration: none;
  text-decoration-thickness: 0;
  text-underline-offset: 3px;
  transition: text-decoration-thickness 0.18s ease, color 0.15s ease;
}
a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* ---------- Card / button responsive polish ---------- */

.card,
.vendor-chip,
.tab-visual,
.hero-visual,
.scene-visual {
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.2s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.2s ease;
}
.tab-visual,
.hero-visual,
.scene-visual { cursor: zoom-in; }
.tab-visual:hover,
.hero-visual:hover,
.scene-visual:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 50px -16px color-mix(in srgb, var(--text) 22%, transparent);
}
.card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 60%, var(--border));
  box-shadow: 0 10px 30px -12px color-mix(in srgb, var(--text) 14%, transparent);
}

/* ---------- Tab panel cross-fade ---------- */

.tab-panel {
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}
.tab-panel.active {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- Input focus halo ---------- */

.form input[type=email]:focus,
.form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
  background: var(--overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}
.lightbox img {
  max-width: 100%;
  max-height: 92vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.55);
  transform: scale(0.96);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.lightbox.open img {
  transform: scale(1);
  opacity: 1;
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.92);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.lightbox-close:hover {
  background: rgba(0, 0, 0, 0.55);
  border-color: rgba(255, 255, 255, 0.55);
}
.lightbox-hint {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.lightbox.open .lightbox-hint { opacity: 1; }

body.no-scroll { overflow: hidden; }

img, video { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: var(--space-2); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: var(--space-2); }
h3 { font-size: 1.1rem; margin-bottom: var(--space-1); }
h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); }

p { margin-bottom: var(--space-2); }

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--surface);
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid var(--border);
}

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

section { padding: var(--space-5) 0; }
section + section { padding-top: 0; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.lede {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 60ch;
  margin-bottom: var(--space-3);
}

/* ---------- Skip / a11y ---------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  padding: var(--space-2);
  background: var(--accent);
  color: #fff;
  z-index: 999;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { top: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; gap: var(--space-2);
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; }
.brand:hover { text-decoration: none; color: var(--accent); }
.brand-mark { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; }
.brand-light { display: block; }
.brand-dark  { display: none; }
[data-theme="dark"] .brand-light { display: none; }
[data-theme="dark"] .brand-dark  { display: block; }
.brand-text { font-size: 1.05rem; letter-spacing: -0.01em; }

.header-actions { display: flex; align-items: center; gap: var(--space-1); }

.lang-switch {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.lang-switch a {
  padding: 7px 10px;
  color: var(--text-muted);
  border-right: 1px solid var(--border);
}
.lang-switch a:last-child { border-right: none; }
.lang-switch a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.lang-switch a.active { color: var(--accent); background: var(--accent-soft); font-weight: 600; }

.icon-button {
  width: 34px; height: 34px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color 0.15s, background 0.15s;
}
.icon-button:hover { border-color: var(--accent); }
.icon-button svg { width: 16px; height: 16px; }

/* ---------- Hero ---------- */

.hero { padding-top: var(--space-5); }

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 56ch;
  margin-bottom: var(--space-3);
}

.hero-visual {
  margin-top: var(--space-4);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 10px 40px -10px color-mix(in srgb, var(--text) 18%, transparent);
}
.hero-visual img { width: 100%; display: block; }

/* ---------- Buttons + forms ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; height: 42px; padding: 0 20px;
  border-radius: var(--radius);
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  transition: filter 0.15s, transform 0.05s;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; color: #fff; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

.form {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
}

.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row > label { font-size: 0.85rem; color: var(--text-muted); }
.form input[type=email],
.form textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
}
.form input[type=email]:focus,
.form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }

.intent-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
.intent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.intent:hover { border-color: var(--accent); }
.intent input[type=radio] { margin-top: 3px; accent-color: var(--accent); }
.intent .intent-label { font-size: 0.92rem; color: var(--text); }

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.consent input[type=checkbox] { margin-top: 3px; accent-color: var(--accent); }
.consent a { color: var(--accent); text-decoration: underline; }

.form-success {
  border: 1px solid var(--ok);
  background: color-mix(in srgb, var(--ok) 12%, transparent);
  padding: var(--space-2);
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--text);
}
.form-error {
  color: var(--error);
  font-size: 0.85rem;
}

/* ---------- Tab switcher ---------- */

.tabs { margin-top: var(--space-3); }

.tab-list {
  display: flex; gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-3);
  overflow-x: auto;
}
.tab-button {
  flex: 0 0 auto;
  padding: 12px 18px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 500;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.tab-button:hover { color: var(--text); }
.tab-button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.tab-visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: var(--space-2);
}
.tab-visual img { width: 100%; display: block; }

.tab-caption {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 65ch;
}
.tab-caption strong { color: var(--text); }

.placeholder {
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(
    45deg,
    var(--surface),
    var(--surface) 10px,
    var(--surface-2) 10px,
    var(--surface-2) 20px
  );
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-align: center;
  padding: var(--space-3);
}
.placeholder-16x10 { aspect-ratio: 16 / 10; }

/* ---------- Standards ---------- */

.standards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-3);
}
.standards-col h4 { margin-bottom: var(--space-2); color: var(--accent); }

.standards-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.standards-list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: baseline;
  padding: 6px 0;
  font-size: 0.95rem;
}

.badge {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  font-size: 11px; font-weight: 600;
  cursor: help;
}
.badge.ok { background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok); border: 1px solid color-mix(in srgb, var(--ok) 50%, transparent); }
.badge.pending { background: color-mix(in srgb, var(--warn) 20%, transparent); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 50%, transparent); }

.standard-name { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text); }
.standard-scope { color: var(--text-muted); font-size: 0.85rem; }

/* ---------- Vendor row ---------- */

.vendor-row {
  display: flex; flex-wrap: wrap;
  gap: 8px;
  margin-top: var(--space-2);
}
.vendor-chip {
  padding: 7px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--text);
}
.vendor-note { margin-top: var(--space-2); font-size: 0.85rem; color: var(--text-muted); max-width: 65ch; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-3) 0;
  margin-top: var(--space-5);
  color: var(--text-muted);
  font-size: 0.85rem;
}
.site-footer .container {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: var(--space-2);
}

/* ---------- Prose (privacy page) ---------- */

.prose { max-width: 65ch; }
.prose h1 { margin-bottom: var(--space-3); }
.prose h2 { margin-top: var(--space-3); margin-bottom: var(--space-2); font-size: 1.2rem; color: var(--accent); }
.prose ul { margin-left: var(--space-3); margin-bottom: var(--space-2); }
.prose li { margin-bottom: 6px; }

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
  .site-header .container { height: auto; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
  .header-actions { gap: 4px; }
  .lang-switch a { padding: 6px 8px; }
  h1 { font-size: 1.9rem; }
}
