/* ============================================================
   kamio — landing page
   Tokens mirror the real Sanctuary design system
   (src/styles/tokens.css + companion-ui-mockup.html)
   ============================================================ */

:root {
  /* ── Backgrounds — warm browns, not near-black ── */
  --bg-0: #1c150d;          /* deepest frame */
  --bg-1: #2c2218;          /* primary */
  --bg-2: #34281a;          /* mid */
  --bg-3: #43331f;          /* warm lift */
  --bg-secondary: #3a2e22;
  --bg-tertiary: #4a3c2e;
  --bg-elevated: #544536;

  /* ── Text ── */
  --cream: #f0e6d6;
  --cream-2: #c4b49a;
  --cream-3: #b8a98f;
  --cream-4: rgba(255, 220, 160, 0.10);

  /* ── Accent — gold + copper ── */
  --accent: #e8a850;
  --accent-hi: #f0b860;
  --accent-deep: #c07840;       /* copper */
  --accent-soft: rgba(232, 168, 80, 0.16);
  --green: #80cc80;
  --glow: linear-gradient(180deg, var(--accent), var(--accent-deep));

  /* ── Glassy panels ── */
  --panel: rgba(44, 34, 24, 0.74);
  --panel-2: var(--bg-secondary);
  --panel-border: rgba(255, 220, 160, 0.18);
  --panel-border-2: rgba(255, 220, 160, 0.10);

  /* ── Radii — tight, matching the app ── */
  --radius-pill: 999px;
  --radius-btn: 8px;
  --radius-xl: 16px;
  --radius-lg: 12px;
  --radius-md: 10px;
  --radius-sm: 6px;

  --shadow-soft: 0 12px 40px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 70px -20px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 6px 22px rgba(232, 168, 80, 0.40);

  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --font: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --maxw: 1180px;
  --nav-h: 74px;
}

* { box-sizing: border-box; }

/* [hidden] must win over component display rules (.capture/.capture-done) */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--cream);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Skip link (a11y) ------------------------------------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: #2c2218;
  font-weight: 800;
  padding: 10px 16px;
  border-radius: var(--radius-btn);
}
.skip-link:focus { left: 12px; top: 12px; }

/* Ambient warm room-light glow behind everything */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(120% 80% at 72% 6%, rgba(255, 200, 120, 0.16) 0%, transparent 50%),
    radial-gradient(90% 70% at 6% 100%, rgba(192, 120, 64, 0.14) 0%, transparent 55%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg-1) 50%, var(--bg-0) 100%);
}
.page-grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  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'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Typography ------------------------------------------------- */
h1, h2, h3 {
  font-family: var(--font);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffd98f, var(--accent));
  box-shadow: 0 0 10px rgba(232, 168, 80, 0.8);
}

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}
.wrap { width: 100%; }

/* Buttons ---------------------------------------------------- */
.btn {
  font-family: var(--font);
  font-weight: 800;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-btn);
  transition: transform 0.2s var(--spring), box-shadow 0.25s ease, background 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-glow {
  background: var(--glow);
  color: #2c2218;
  padding: 14px 26px;
  font-size: 16px;
  box-shadow: var(--shadow-glow);
}
.btn-glow:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 10px 30px rgba(232, 168, 80, 0.5); }

.btn-ghost {
  background: var(--panel);
  color: var(--cream);
  padding: 13px 22px;
  font-size: 15px;
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(12px);
}
.btn-ghost:hover { background: var(--bg-elevated); border-color: var(--accent); }

/* Visible focus for keyboard users --------------------------- */
a:focus-visible, .btn:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent-hi);
  outline-offset: 3px;
}

/* glassy card ------------------------------------------------ */
.glass {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* presence pill (Wren — here with you) ----------------------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--panel-border-2);
  border-radius: var(--radius-btn);
  padding: 8px 16px 8px 12px;
  backdrop-filter: blur(12px);
}
.status-pill .dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffd98f, var(--accent));
  box-shadow: 0 0 10px rgba(232, 168, 80, 0.8);
  animation: breathe 3.4s ease-in-out infinite;
}
.status-pill .who { font-weight: 800; font-size: 14px; line-height: 1.2; white-space: nowrap; }
.status-pill .sub { font-size: 12px; color: var(--cream-3); line-height: 1.2; white-space: nowrap; }
@keyframes breathe {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.82); }
}

/* glow chip (currency) --------------------------------------- */
.glow-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 800;
  color: var(--accent);
  background: var(--panel);
  border: 1px solid var(--panel-border-2);
  border-radius: var(--radius-btn);
  padding: 7px 14px;
  font-size: 14px;
  backdrop-filter: blur(12px);
}

/* reveal-on-scroll ------------------------------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s var(--spring); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .status-pill .dot { animation: none; }
}
