/* ===========================================================================
   hueve — shared base (design tokens, reset, type, buttons, helpers)
   Source of truth: k3lab1014/hueve constants/theme.ts
   Dark-base photographic UI. Warm amber accent. No gradients-as-decoration,
   no emoji, no rounded-corner-left-border cards. Editorial / film vocabulary.
   =========================================================================== */

:root {
  /* ---- surfaces (theme.ts dark) ---- */
  --bg:        #0E0E10;
  --bg-2:      #121216;   /* alternating section ground */
  --surface:   #16161A;
  --elevated:  #24242B;
  --text:      #F2F2F4;
  --text-soft: #C5C5CC;
  --text-mute: #9A9AA4;
  --text-dim:  #6A6A72;

  /* ---- accent (warm amber / gold) ---- */
  --accent:      #E0A458;
  --accent-deep: #C98A3E;
  --accent-soft: rgba(224,164,88,0.16);
  --on-accent:   #15120C;

  --danger:  #E5544B;
  --success: #4ECB71;

  --divider:       rgba(255,255,255,0.08);
  --divider-strong:rgba(255,255,255,0.16);
  --hair:          rgba(255,255,255,0.06);

  /* ---- the 12 pigments (engine/pigments.ts) ---- */
  --p-ember:    #C98A5E;
  --p-vellum:   #D9CBB8;
  --p-aurum:    #D6A53A;
  --p-cedar:    #6E7A4B;
  --p-porto:    #C8B6C0;
  --p-nocturne: #5C6E86;
  --p-halcyon:  #CBB87A;
  --p-reverie:  #8A6FB0;
  --p-lumen:    #D24E3A;
  --p-marlow:   #2E6E72;
  --p-sahara:   #C98A3E;
  --p-quartz:   #E8E8EC;

  /* ---- spacing / radius (theme.ts) ---- */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-pill: 999px;

  /* ---- type ---- */
  --serif: 'Zen Old Mincho', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --sans:  'Zen Kaku Gothic New', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', system-ui, sans-serif;
  --mono:  'DM Mono', ui-monospace, 'SFMono-Regular', monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  text-wrap: pretty;
}

::selection { background: rgba(224,164,88,0.28); color: #fff; }

/* ---- type roles ---- */
.serif { font-family: var(--serif); font-weight: 500; }
.mono  { font-family: var(--mono); }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}

.wordmark {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: lowercase;
}

/* film-stock style latin label */
.stock {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-weight: 500;
}

/* ---- layout helpers ---- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
@media (min-width: 900px) { .wrap { padding: 0 48px; } }

.hair { height: 1px; background: var(--divider); width: 100%; border: 0; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 24px;
  border-radius: var(--r-pill);
  font-family: var(--sans);
  font-size: 14px; font-weight: 500; letter-spacing: 0.02em;
  text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: transform .25s cubic-bezier(.2,.7,.3,1), background .25s ease,
              color .25s ease, border-color .25s ease, opacity .25s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn-primary:hover { transform: translateY(-1px); background: #ECB46A; }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--divider-strong); }
.btn-ghost:hover { border-color: var(--text-soft); background: rgba(255,255,255,0.03); }

/* ---- pill / chip ---- */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 13px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--divider);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  color: var(--text-mute);
}

/* ---- reveal-on-scroll ----
   IMPORTANT: base state is fully VISIBLE. Earlier this hid content with
   opacity:0 and revealed via a CSS transition — but transitions don't
   advance while the preview iframe is backgrounded, leaving the page black.
   Content is now always visible; .in is a no-op kept for JS compatibility. */
.reveal { opacity: 1; transform: none; }
.reveal.in { opacity: 1; transform: none; }

/* ---- film grain texture (used over color fields & photos) ---- */
.grain::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.5; mix-blend-mode: overlay;
}

/* phone frame is defined in hueve-core.jsx via inline styles */
