/* =====================================================================
   InboxQuiet — minimal single-screen theme
   "Ember / Quiet Hours": warm near-black + a coral-rose→gold ember accent,
   derived from the brand logo. One screen, no chrome. Living, quiet motion.
   ===================================================================== */

/* Self-hosted Geist (variable) — no third-party request, privacy-consistent */
@font-face {
  font-family: "Geist";
  src: url("./assets/geist-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg:          oklch(13% 0.008 40);
  --surface-1:   oklch(16.5% 0.011 38);
  --line:        oklch(27% 0.014 38);
  --line-strong: oklch(35% 0.016 38);

  --ink:       oklch(96% 0.012 50);
  --ink-soft:  oklch(78% 0.014 48);
  --ink-faint: oklch(62% 0.014 46);

  --accent:        oklch(72% 0.165 33);
  --accent-strong: oklch(78% 0.155 40);
  --accent-2:      oklch(83% 0.13 68);   /* gold, from the logo flap */
  --accent-wash:   oklch(72% 0.165 33 / 0.10);
  --accent-line:   oklch(72% 0.165 33 / 0.26);
  --accent-glow:   oklch(72% 0.165 33 / 0.36);

  --radius: 12px;
  --radius-pill: 999px;
  --maxw-prose: 700px;

  --font: "Geist", "Geist Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;

  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-sine: cubic-bezier(0.45, 0, 0.55, 1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-weight: 350;
  letter-spacing: 0.004em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* ===================================================================
   Living background — warm ember mesh + fine grain (continuous motion)
   =================================================================== */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(96px);
  opacity: 0.5;
  mix-blend-mode: screen;
  will-change: transform;
}
.aurora-a {   /* coral-rose */
  width: 56vw; height: 56vw;
  top: -16vw; left: -10vw;
  background: radial-gradient(circle at 50% 50%, oklch(70% 0.18 33 / 0.55), transparent 66%);
  animation: drift-a 34s var(--ease-in-out-sine) infinite alternate;
}
.aurora-b {   /* gold */
  width: 46vw; height: 46vw;
  top: 4vh; right: -14vw;
  background: radial-gradient(circle at 50% 50%, oklch(80% 0.14 68 / 0.42), transparent 66%);
  animation: drift-b 42s var(--ease-in-out-sine) infinite alternate;
}
.aurora-c {   /* deep ember */
  width: 64vw; height: 64vw;
  bottom: -30vw; left: 18vw;
  background: radial-gradient(circle at 50% 50%, oklch(58% 0.17 22 / 0.44), transparent 68%);
  animation: drift-c 50s var(--ease-in-out-sine) infinite alternate;
}
@keyframes drift-a {
  from { transform: translate3d(0,0,0) scale(1); }
  to   { transform: translate3d(8vw, 6vh, 0) scale(1.14); }
}
@keyframes drift-b {
  from { transform: translate3d(0,0,0) scale(1.06); }
  to   { transform: translate3d(-7vw, 8vh, 0) scale(0.94); }
}
@keyframes drift-c {
  from { transform: translate3d(0,0,0) scale(0.95); }
  to   { transform: translate3d(-6vw, -7vh, 0) scale(1.12); }
}
.grain {
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  opacity: 0.04;
  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");
  animation: grain-shift 7s steps(6) infinite;
}
@keyframes grain-shift {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -3%); }
  60%  { transform: translate(-2%, -2%); }
  80%  { transform: translate(3%, 1%); }
  100% { transform: translate(0, 0); }
}

/* ===================================================================
   The single centered stage
   =================================================================== */
.stage {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 24px;
  gap: 0;
}

.logo {
  width: clamp(84px, 15vw, 112px);
  height: clamp(84px, 15vw, 112px);
  border-radius: 24px;
  box-shadow:
    0 0 0 1px oklch(100% 0 0 / 0.05),
    0 26px 80px -22px var(--accent-glow),
    0 10px 34px -18px oklch(0% 0 0 / 0.6);
  animation: float 7s var(--ease-in-out-sine) infinite alternate;
}
@keyframes float {
  from { transform: translateY(-5px); }
  to   { transform: translateY(7px); }
}

.wordmark {
  margin: 26px 0 0;
  font-size: clamp(15px, 2vw, 17px);
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-left: 0.34em;   /* optical: balance the trailing tracking */
}

h1.headline {
  margin: 18px 0 0;
  font-size: clamp(40px, 7.4vw, 84px);
  line-height: 1.03;
  letter-spacing: -0.034em;
  font-weight: 600;
  max-width: 15ch;
  text-wrap: balance;
}
h1.headline .accent {
  background: linear-gradient(96deg, var(--accent) 0%, var(--accent-2) 50%, var(--accent) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sheen 9s ease-in-out infinite;
}
@keyframes sheen {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

p.tagline {
  margin: 26px 0 0;
  font-size: clamp(17px, 2.1vw, 20px);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 50ch;
  text-wrap: pretty;
}

.cta {
  margin-top: 38px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 50px;
  padding: 0 24px;
  font-size: var(--text-md, 17px);
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink);
  background: oklch(20% 0.014 36 / 0.45);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.28s var(--ease-out-quint), border-color 0.24s var(--ease-out-quint),
              background 0.24s var(--ease-out-quint), box-shadow 0.32s var(--ease-out-quint);
}
.cta:hover {
  transform: translateY(-2px);
  border-color: var(--accent-line);
  background: var(--surface-1);
  box-shadow: 0 16px 40px -18px var(--accent-glow);
}
.cta:active { transform: translateY(0); }
.cta .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px 1px var(--accent-glow);
  animation: pulse-dot 3.4s var(--ease-out-quint) infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 oklch(72% 0.165 33 / 0.5); }
  50%      { box-shadow: 0 0 0 7px oklch(72% 0.165 33 / 0); }
}

/* ultra-subtle legal links — not a footer bar, just a quiet line */
.mini {
  position: relative;
  z-index: 2;
  margin-top: clamp(48px, 9vh, 96px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 16px;
  font-size: 13px;
  color: var(--ink-faint);
}
.mini a { color: var(--ink-faint); transition: color 0.2s var(--ease-out-quint); }
.mini a:hover { color: var(--ink-soft); }
.mini .sep { opacity: 0.5; }

/* ===================================================================
   Entrance — staggered fade-rise (gated on html.js so it ships visible)
   =================================================================== */
html.js .enter {
  opacity: 0;
  transform: translateY(16px);
  animation: enter-in 0.9s var(--ease-out-expo) both;
  animation-delay: calc(var(--d, 0) * 1ms);
}
@keyframes enter-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* ===================================================================
   Prose (privacy / terms) — minimal chrome, just a quiet home mark
   =================================================================== */
.home-mark {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 17px;
  color: var(--ink);
}
.home-mark img { width: 26px; height: 26px; border-radius: 7px; }

.prose-page {
  position: relative;
  z-index: 2;
  padding: clamp(48px, 8vw, 88px) 24px clamp(64px, 8vw, 96px);
}
.prose { max-width: var(--maxw-prose); margin: 0 auto; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--accent-strong);
  background: var(--accent-wash);
  border: 1px solid var(--accent-line);
  padding: 7px 14px 7px 12px;
  border-radius: var(--radius-pill);
  margin: 22px 0 18px;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 3.4s var(--ease-out-quint) infinite;
}
.prose h1 {
  margin: 0 0 10px;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.028em;
  font-weight: 600;
}
.prose .updated { margin: 0 0 40px; color: var(--ink-faint); font-size: 14px; }
.prose h2 {
  margin: 40px 0 12px;
  font-size: clamp(20px, 3vw, 25px);
  letter-spacing: -0.018em;
  font-weight: 600;
  color: var(--ink);
}
.prose p, .prose li { color: var(--ink-soft); font-size: 17px; line-height: 1.7; text-wrap: pretty; }
.prose p { margin: 0 0 16px; }
.prose ul { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin: 0 0 8px; }
.prose a.inline {
  color: var(--accent-strong);
  border-bottom: 1px solid var(--accent-line);
  transition: border-color 0.2s var(--ease-out-quint);
}
.prose a.inline:hover { border-bottom-color: var(--accent); }
.prose strong { color: var(--ink); font-weight: 500; }
.prose .back { display: inline-block; margin-top: 40px; font-size: 14px; color: var(--ink-faint); }
.prose .back:hover { color: var(--ink-soft); }

/* ===================================================================
   Focus
   =================================================================== */
a:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius);
}

/* ===================================================================
   Reduced motion
   =================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }
  .enter { opacity: 1; transform: none; }
  .aurora, .grain, .logo, .headline .accent { animation: none !important; }
}
