/* ============================================================
   bebe — software studio. Design tokens + base styles.
   ============================================================ */

:root {
  /* canvas */
  --bg: #0a0a0d;
  --bg-2: #0e0e12;
  --surface: #141419;
  --surface-2: #1a1a21;
  --line: rgba(245, 243, 239, 0.09);
  --line-strong: rgba(245, 243, 239, 0.16);

  /* ink */
  --text: #f4f1ec;
  --text-dim: rgba(244, 241, 236, 0.62);
  --text-faint: rgba(244, 241, 236, 0.38);

  /* signature ember (bebe's own accent) */
  --accent: #ff7a45;
  --accent-2: #ffb15c;
  --accent-soft: rgba(255, 122, 69, 0.14);
  --accent-line: rgba(255, 122, 69, 0.32);

  /* functional live signal */
  --mint: #5fe3b3;
  --mint-soft: rgba(95, 227, 179, 0.13);

  /* product brand accents (for project cards) */
  --arqi-amber: #ffa51e;
  --arqi-blue: #2ba8ff;

  /* type */
  --font-head: "Space Grotesk", "Segoe UI", sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* rhythm */
  --maxw: 1240px;
  --pad: clamp(20px, 5vw, 72px);
  --radius: 18px;
  --radius-lg: 26px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; overflow-x: clip; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-head);
  font-weight: 400;
  line-height: 1.5;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #1a0a04; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ambient page background — subtle grain + glow, premium not blueprint */
.bg-fx {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
}
.bg-fx .glow {
  position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.5;
}
.bg-fx .glow.a { width: 620px; height: 620px; top: -200px; right: -120px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 68%); opacity: 0.22; }
.bg-fx .glow.b { width: 520px; height: 520px; bottom: 8%; left: -180px;
  background: radial-gradient(circle, var(--arqi-blue) 0%, transparent 70%); opacity: 0.10; }
.bg-fx .grain {
  position: absolute; inset: 0; opacity: 0.04; mix-blend-mode: overlay;
  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.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* layout */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); position: relative; z-index: 1; }
.eyebrow {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-faint); display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow .tick { width: 22px; height: 1px; background: var(--accent-line); }

.serif-em { font-family: var(--font-serif); font-style: italic; font-weight: 400; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px;
  padding: 13px 22px; border-radius: 999px; transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s, background .2s, border-color .2s;
  white-space: nowrap;
}
.btn .arrow { transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-primary {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: #2a0f04; box-shadow: 0 10px 30px -8px var(--accent-line), inset 0 1px 0 rgba(255,255,255,.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -8px var(--accent-line), inset 0 1px 0 rgba(255,255,255,.4); }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--text); background: rgba(255,255,255,0.02); }
.btn-ghost:hover { border-color: var(--accent-line); background: var(--accent-soft); transform: translateY(-2px); }

/* status chips */
.chip {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 7px; font-weight: 500;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; }
.chip.live { color: var(--mint); background: var(--mint-soft); border: 1px solid rgba(95,227,179,.25); }
.chip.live .dot { background: var(--mint); box-shadow: 0 0 0 3px rgba(95,227,179,.2); animation: pulse 2s infinite; }
.chip.build { color: var(--accent-2); background: var(--accent-soft); border: 1px solid var(--accent-line); }
.chip.build .dot { background: var(--accent); }
.chip.commission { color: var(--text-dim); background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.chip.commission .dot { background: var(--text-faint); }
@keyframes pulse { 0%,100%{ opacity:1 } 50%{ opacity:.4 } }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
.reveal[data-d="4"] { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  * { animation: none !important; }
}

/* section heading */
.section { padding: clamp(80px, 11vw, 150px) 0; position: relative; }
.sec-head { max-width: 760px; }
.sec-head h2 {
  font-size: clamp(34px, 5.2vw, 60px); line-height: 1.04; letter-spacing: -0.025em; font-weight: 600; margin-top: 18px;
}
.sec-head p { color: var(--text-dim); font-size: clamp(16px, 1.4vw, 19px); margin-top: 20px; max-width: 620px; }

#root { position: relative; z-index: 1; }

/* ============================================================
   Dark canvas tone variants (CSS-only, no inline vars)
   ============================================================ */
[data-bg-tone="warm"] { --bg: #0d0a09; --bg-2: #120e0c; }
[data-bg-tone="cool"] { --bg: #080a0e; --bg-2: #0b0e14; }
/* ink (default) stays in :root */

/* ============================================================
   Light theme — must come AFTER bg-tone so it always wins.
   All --bg / --bg-2 overrides are CSS-only (no inline styles).
   ============================================================ */
[data-theme="light"] {
  --bg: #fafaf8;
  --bg-2: #f0ede8;
  --surface: #ffffff;
  --surface-2: #f5f2ed;
  --line: rgba(30, 24, 18, 0.10);
  --line-strong: rgba(30, 24, 18, 0.18);
  --text: #1c1813;
  --text-dim: rgba(28, 24, 19, 0.62);
  --text-faint: rgba(28, 24, 19, 0.38);
  /* accent, mint, arqi-* stay identical */
}

[data-theme="light"] body { background: #fafaf8; color: #1c1813; }

[data-theme="light"] .bg-fx .glow.a { opacity: 0.10; }
[data-theme="light"] .bg-fx .glow.b { opacity: 0.05; }
[data-theme="light"] .bg-fx .grain  { opacity: 0.02; mix-blend-mode: multiply; }

