/* =========================================================================
   ReadLume — Coming Soon
   Direction: dark editorial / literary luxury
   Palette sourced from the app theme (app_theme.dart):
     charcoal #1E1E1E · parchment #E5D1B8 · espresso #4E342E
   Type: Fraunces (literary serif display) + Outfit (UI / body)
   ========================================================================= */

:root {
  /* ---- Color tokens ---- */
  --c-bg:            #1a1916;   /* deepened charcoal for a richer reading-room base */
  --c-bg-raise:      #24221e;   /* raised surface (form, cards) */
  --c-bg-raise-2:    #2c2a25;
  --c-ink:           #efe2cd;   /* primary text — warm parchment */
  --c-ink-soft:      #c9b9a0;   /* secondary text */
  --c-ink-mute:      #8f8472;   /* muted / helper text */
  --c-parchment:     #e5d1b8;   /* signature accent */
  --c-parchment-hi:  #f3e6d2;   /* accent hover / highlight */
  --c-espresso:      #4e342e;   /* depth accent */
  --c-rosegold:      #d4937a;   /* brand rose-gold (from the logo) */
  --c-rosegold-hi:   #ecc1ad;   /* rose-gold highlight */
  --c-rosegold-deep: #9a5a41;   /* rose-gold shadow */
  --c-line:          rgba(229, 209, 184, 0.14);
  --c-line-strong:   rgba(229, 209, 184, 0.28);
  --c-danger:        #e0907f;
  --c-success:       #a9c9a0;

  /* ---- Type scale (fluid) ---- */
  --text-eyebrow:  clamp(0.72rem, 0.68rem + 0.2vw, 0.8rem);
  --text-body:     clamp(1rem, 0.96rem + 0.25vw, 1.125rem);
  --text-lede:     clamp(1.05rem, 0.98rem + 0.5vw, 1.3rem);
  --text-h2:       clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem);
  --text-title:    clamp(2.9rem, 1.7rem + 5.6vw, 6.2rem);

  /* ---- Spacing rhythm (8pt) ---- */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4rem;
  --space-7: 6rem;

  /* ---- Radius / shadow / motion ---- */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-soft: 0 18px 50px -24px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 0 1px var(--c-line), 0 24px 60px -30px rgba(0, 0, 0, 0.85);

  --dur-fast: 160ms;
  --dur-mid: 280ms;
  --dur-slow: 520ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --container: 64rem;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--text-body);
  line-height: 1.6;
  font-weight: 300;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; font-weight: 500; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--c-parchment);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =========================================================================
   Atmosphere
   ========================================================================= */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  will-change: transform, opacity;
}

/* The "lume" — a warm light pooling at the top, like a reading lamp. */
.glow--primary {
  top: -22vh;
  left: 50%;
  width: min(95vw, 60rem);
  height: min(95vw, 60rem);
  transform: translateX(-50%);
  background: radial-gradient(
    circle at center,
    rgba(229, 209, 184, 0.34) 0%,
    rgba(204, 150, 92, 0.16) 38%,
    rgba(78, 52, 46, 0) 68%
  );
  animation: breathe 11s var(--ease-out) infinite;
}

.glow--secondary {
  bottom: -28vh;
  right: -10vw;
  width: min(80vw, 42rem);
  height: min(80vw, 42rem);
  background: radial-gradient(
    circle at center,
    rgba(78, 52, 46, 0.5) 0%,
    rgba(78, 52, 46, 0) 70%
  );
  opacity: 0.6;
  animation: drift 17s ease-in-out infinite;
}

.grain {
  position: absolute;
  inset: -200%;
  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' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.04;
  mix-blend-mode: overlay;
}

.vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    120% 90% at 50% 0%,
    transparent 45%,
    rgba(0, 0, 0, 0.4) 100%
  );
}

@keyframes breathe {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.5; }
  50%      { transform: translateX(-50%) scale(1.08); opacity: 0.68; }
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(-4%, -3%); }
}

/* =========================================================================
   Layout shell
   ========================================================================= */
.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: var(--container);
  margin-inline: auto;
  padding: clamp(1.25rem, 1rem + 2vw, 2.5rem)
           clamp(1.25rem, 0.5rem + 4vw, 3rem)
           clamp(1.5rem, 1rem + 2vw, 2.5rem);
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  transition: opacity var(--dur-fast) var(--ease-out);
}
.wordmark:hover { opacity: 0.88; }

.wordmark__logo {
  height: clamp(58px, 6.5vw, 82px);
  width: auto;
  display: block;
  filter: drop-shadow(0 3px 16px rgba(212, 147, 122, 0.32));
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--c-line-strong);
  border-radius: var(--radius-pill);
  font-size: var(--text-eyebrow);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-ink-soft);
  background: rgba(229, 209, 184, 0.04);
  backdrop-filter: blur(6px);
}

.badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-parchment);
  box-shadow: 0 0 0 0 rgba(229, 209, 184, 0.6);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(229, 209, 184, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(229, 209, 184, 0); }
  100% { box-shadow: 0 0 0 0 rgba(229, 209, 184, 0); }
}

/* =========================================================================
   Hero
   ========================================================================= */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(2.5rem, 1.5rem + 6vw, 5.5rem);
  max-width: 46rem;
}

.hero__eyebrow {
  font-size: var(--text-eyebrow);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-parchment);
  margin-bottom: var(--space-3);
}

.hero__title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: var(--text-title);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-3);
  font-optical-sizing: auto;
}

.hero__title em {
  font-style: italic;
  font-weight: 500;
  color: var(--c-parchment);
  /* a warm metallic sheen on the emphasis line */
  background: linear-gradient(100deg, var(--c-parchment-hi) 0%, var(--c-rosegold-hi) 55%, var(--c-rosegold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__lede {
  font-size: var(--text-lede);
  color: var(--c-ink-soft);
  line-height: 1.6;
  max-width: 38ch;
  margin-bottom: var(--space-4);
}

/* The wedge — the moat statement, set as an editorial pull-line */
.hero__wedge {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  max-width: 42ch;
  margin-bottom: var(--space-5);
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-size: clamp(1rem, 0.95rem + 0.4vw, 1.2rem);
  line-height: 1.45;
  color: var(--c-ink);
}

.hero__wedge-mark {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 0.5em;
  border-radius: 50%;
  background: var(--c-rosegold);
  box-shadow: 0 0 12px 1px rgba(212, 147, 122, 0.6);
}

/* =========================================================================
   Waitlist form
   ========================================================================= */
.waitlist {
  margin-bottom: var(--space-6);
}

.waitlist__heading {
  font-family: "Fraunces", Georgia, serif;
  font-size: var(--text-h2);
  font-weight: 500;
  margin-bottom: var(--space-3);
  color: var(--c-ink);
}

.waitlist__form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  max-width: 34rem;
}

.field {
  flex: 1 1 16rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field__label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-ink-mute);
  padding-left: 0.15rem;
}

.field__input {
  width: 100%;
  min-height: 52px;
  padding: 0.85rem 1.1rem;
  font: inherit;
  font-weight: 400;
  color: var(--c-ink);
  background: var(--c-bg-raise);
  border: 1px solid var(--c-line-strong);
  border-radius: var(--radius-md);
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
}
.field__input::placeholder { color: var(--c-ink-mute); }
.field__input:hover { border-color: var(--c-line-strong); background: var(--c-bg-raise-2); }
.field__input:focus-visible {
  outline: none;
  border-color: var(--c-parchment);
  box-shadow: 0 0 0 3px rgba(229, 209, 184, 0.18);
  background: var(--c-bg-raise-2);
}
.field__input[aria-invalid="true"] {
  border-color: var(--c-danger);
  box-shadow: 0 0 0 3px rgba(224, 144, 127, 0.16);
}

/* ---------- Button ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 52px;
  padding: 0.85rem 1.6rem;
  font: inherit;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  align-self: flex-end;
  transition: transform var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              opacity var(--dur-fast) var(--ease-out);
}

.btn--primary {
  flex: 0 0 auto;
  color: #1f1b16;
  background: linear-gradient(180deg, var(--c-parchment-hi), var(--c-parchment));
  box-shadow: 0 10px 30px -12px rgba(229, 209, 184, 0.5);
}
.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 38px -14px rgba(229, 209, 184, 0.6);
  background: linear-gradient(180deg, #fbf0de, var(--c-parchment-hi));
}
.btn--primary:active { transform: translateY(0); }

.btn[disabled] { cursor: progress; opacity: 0.75; }

.btn__spinner {
  display: none;
  width: 17px;
  height: 17px;
  border: 2px solid rgba(31, 27, 22, 0.35);
  border-top-color: #1f1b16;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn.is-loading .btn__spinner { display: inline-block; }
.btn.is-loading .btn__label { opacity: 0.55; }

@keyframes spin { to { transform: rotate(360deg); } }

.waitlist__helper {
  margin-top: var(--space-2);
  font-size: 0.85rem;
  color: var(--c-ink-mute);
}

.waitlist__trust {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--c-ink-soft);
}

.store-note {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.8rem;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--c-ink-mute);
}
.store-note svg { color: var(--c-rosegold); flex: 0 0 auto; }

.waitlist__status {
  margin-top: 0.6rem;
  font-size: 0.92rem;
  font-weight: 400;
  min-height: 1.3em;
}
.waitlist__status.is-error   { color: var(--c-danger); }
.waitlist__status.is-success { color: var(--c-success); }

/* =========================================================================
   Features
   ========================================================================= */
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--c-line);
  max-width: 40rem;
}

.feature {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.feature__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  color: var(--c-parchment);
  background: rgba(229, 209, 184, 0.07);
  border: 1px solid var(--c-line);
}

.feature__title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--c-ink);
  margin-bottom: 0.15rem;
}

.feature__text {
  font-size: 0.92rem;
  color: var(--c-ink-mute);
  line-height: 1.5;
}

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding-top: var(--space-4);
  margin-top: var(--space-4);
  border-top: 1px solid var(--c-line);
  font-size: 0.85rem;
  color: var(--c-ink-mute);
}

.site-footer__links {
  display: flex;
  gap: var(--space-3);
}
.site-footer__links a {
  color: var(--c-ink-soft);
  transition: color var(--dur-fast) var(--ease-out);
}
.site-footer__links a:hover { color: var(--c-parchment); }

/* =========================================================================
   Entrance reveal
   ========================================================================= */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: reveal-up var(--dur-slow) var(--ease-out) forwards;
  animation-delay: var(--delay, 0ms);
}

@keyframes reveal-up {
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media (min-width: 600px) {
  .features {
    grid-template-columns: 1fr 1fr;
    column-gap: var(--space-4);
    row-gap: var(--space-3);
  }
}

/* =========================================================================
   Reduced motion — disable all decorative + entrance motion
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .glow { animation: none; }
}
