/* ============================================================
   Quillode — landing
   Aesthetic: candlelit reading room / illuminated manuscript.
   Midnight navy base + warm candle-gold + quill teal, parchment
   for the "in-app" moments. Display: Fraunces. Body: EB Garamond.
   ============================================================ */

:root {
  --ink:        #081726;   /* deep midnight (emblem core)        */
  --ink-2:      #0c2236;   /* raised navy panel                  */
  --ink-3:      #103049;   /* hairlines / borders on dark        */
  --candle:     #e7a23c;   /* gold flame (the "ode")             */
  --candle-hi:  #f6cd80;   /* lit highlight                      */
  --teal:       #5cc4cb;   /* quill teal                         */
  --teal-deep:  #2c8b92;
  --parchment:  #f2e7cd;   /* warm page                          */
  --parch-2:    #e9dcbd;
  --sepia:      #3c2e1f;   /* ink on parchment                   */
  --sepia-soft: #6c5740;
  --cream:      #efe6d6;   /* light text on dark                 */
  --muted:      #9bb0c4;   /* secondary text on dark             */
  --muted-2:    #6f879c;

  --display: "Fraunces", Georgia, serif;
  --body:    "EB Garamond", Georgia, serif;

  --maxw: 1140px;
  --r: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 19px;
  line-height: 1.65;
  color: var(--cream);
  background:
    radial-gradient(120% 80% at 50% 120%, rgba(231,162,60,0.16) 0%, rgba(231,162,60,0) 55%),
    radial-gradient(90% 60% at 80% -10%, rgba(92,196,203,0.10) 0%, rgba(92,196,203,0) 50%),
    linear-gradient(180deg, #06121e 0%, var(--ink) 30%, #061320 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* film grain overlay for atmosphere */
.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.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

img { max-width: 100%; display: block; }

.eyebrow {
  font-family: var(--body);
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.72rem;
  color: var(--teal);
  margin: 0 0 1.1rem;
  font-weight: 500;
}
.eyebrow--dark { color: var(--teal-deep); }

/* ---------- NAV ---------- */
.nav {
  position: relative; z-index: 3;
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.6rem 1.5rem;
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--cream); }
.brand__mark { width: 38px; height: 38px; filter: drop-shadow(0 2px 10px rgba(0,0,0,0.5)); }
.brand__word { font-family: var(--display); font-weight: 600; font-size: 1.4rem; letter-spacing: 0.01em; color: var(--teal); }
.brand__word em { font-style: normal; color: var(--candle); }
.nav__cta {
  font-size: 0.95rem; letter-spacing: 0.02em; text-decoration: none;
  color: var(--cream); padding: 0.5rem 1.1rem; border: 1px solid var(--ink-3);
  border-radius: 999px; transition: border-color .25s, color .25s, background .25s;
}
.nav__cta:hover { border-color: var(--candle); color: var(--candle-hi); }
.nav__links { display: flex; gap: 1.6rem; margin-left: auto; margin-right: 1.4rem; }
.nav__links a {
  font-size: 0.95rem; letter-spacing: 0.02em; text-decoration: none;
  color: var(--muted); transition: color .25s;
}
.nav__links a:hover { color: var(--candle-hi); }
@media (max-width: 620px) { .nav__links { display: none; } }

/* ---------- HERO ---------- */
.hero { position: relative; z-index: 2; padding: 4.5rem 1.5rem 5rem; }
.hero__inner { max-width: 880px; margin: 0 auto; text-align: center; }
.hero__glow {
  position: absolute; left: 50%; top: 35%; translate: -50% 0;
  width: min(820px, 95vw); height: 540px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(231,162,60,0.22), rgba(231,162,60,0.06) 55%, transparent 72%);
  filter: blur(6px);
  animation: breathe 7s ease-in-out infinite;
}
@keyframes breathe { 0%,100%{ opacity:.75; transform:scale(1);} 50%{ opacity:1; transform:scale(1.05);} }

.hero__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.7rem, 7vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0 0 1.5rem;
}
.hero__title span { display: block; }
.hero__title--accent {
  font-style: italic; font-weight: 500;
  background: linear-gradient(100deg, var(--candle-hi), var(--candle) 55%, var(--teal));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__lede {
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  color: var(--muted); max-width: 620px; margin: 0 auto 2rem;
}
.hero__lede em { color: var(--cream); font-style: italic; }

/* animated equalizer bars (the audio motif) */
.hero__bars {
  display: flex; align-items: flex-end; justify-content: center; gap: 5px;
  height: 46px; margin: 0 auto 2.4rem; width: max-content;
}
.hero__bars span {
  width: 5px; border-radius: 3px;
  background: linear-gradient(180deg, var(--teal), var(--teal-deep));
  animation: eq 1.4s ease-in-out infinite;
  height: 30%;
}
.hero__bars span:nth-child(odd){ background: linear-gradient(180deg, var(--candle-hi), var(--candle)); }
.hero__bars span:nth-child(1){animation-delay:-.2s}.hero__bars span:nth-child(2){animation-delay:-.9s}
.hero__bars span:nth-child(3){animation-delay:-.5s}.hero__bars span:nth-child(4){animation-delay:-1.1s}
.hero__bars span:nth-child(5){animation-delay:-.3s}.hero__bars span:nth-child(6){animation-delay:-.7s}
.hero__bars span:nth-child(7){animation-delay:-1.0s}.hero__bars span:nth-child(8){animation-delay:-.4s}
.hero__bars span:nth-child(9){animation-delay:-.8s}.hero__bars span:nth-child(10){animation-delay:-.15s}
.hero__bars span:nth-child(11){animation-delay:-.6s}.hero__bars span:nth-child(12){animation-delay:-1.2s}
.hero__bars span:nth-child(13){animation-delay:-.35s}.hero__bars span:nth-child(14){animation-delay:-.95s}
.hero__bars span:nth-child(15){animation-delay:-.55s}
@keyframes eq { 0%,100%{ height:22%;} 50%{ height:96%;} }

.hero__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.3rem; }
.hero__note { font-size: 0.95rem; color: var(--muted-2); margin: 0; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block; font-family: var(--body); font-size: 1.05rem;
  letter-spacing: 0.01em; text-decoration: none; cursor: pointer;
  padding: 0.85rem 1.7rem; border-radius: 999px; border: 1px solid transparent;
  transition: transform .2s ease, box-shadow .25s ease, background .25s, color .25s;
}
.btn--primary {
  color: #2a1c08; font-weight: 500;
  background: linear-gradient(135deg, var(--candle-hi), var(--candle));
  box-shadow: 0 8px 30px rgba(231,162,60,0.32), inset 0 1px 0 rgba(255,255,255,0.4);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(231,162,60,0.45), inset 0 1px 0 rgba(255,255,255,0.5); }
.btn--ghost { color: var(--cream); border-color: var(--ink-3); background: rgba(255,255,255,0.02); }
.btn--ghost:hover { border-color: var(--teal); color: var(--teal); transform: translateY(-2px); }
.btn--block { width: 100%; margin-top: 0.5rem; }

/* ---------- PILLARS ---------- */
.pillars {
  position: relative; z-index: 2; max-width: var(--maxw); margin: 1rem auto 2rem;
  padding: 2rem 1.5rem; display: grid; gap: 1.4rem;
  grid-template-columns: repeat(3, 1fr);
}
.pillar {
  border: 1px solid var(--ink-3); border-radius: var(--r);
  padding: 1.8rem 1.6rem; background: linear-gradient(180deg, rgba(12,34,54,0.6), rgba(8,23,38,0.3));
  transition: border-color .3s, transform .3s;
}
.pillar:hover { border-color: rgba(231,162,60,0.4); transform: translateY(-3px); }
.pillar__num {
  font-family: var(--display); font-style: italic; font-size: 1.5rem;
  color: var(--candle); display: inline-block; margin-bottom: 0.6rem;
  border-bottom: 1px solid var(--ink-3); padding-bottom: 0.2rem;
}
.pillar h3 { font-family: var(--display); font-weight: 500; font-size: 1.45rem; margin: 0.2rem 0 0.6rem; color: var(--cream); }
.pillar p { margin: 0; color: var(--muted); font-size: 1.02rem; }
.pillar em { color: var(--teal); font-style: italic; }

/* ---------- SHOWCASE ---------- */
.showcase {
  position: relative; z-index: 2; max-width: var(--maxw); margin: 3rem auto;
  padding: 3rem 1.5rem; display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem; align-items: center;
}
.showcase__copy h2 {
  font-family: var(--display); font-weight: 400; font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 1rem;
}
.showcase__copy > p { color: var(--muted); margin: 0 0 1.5rem; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.7rem; }
.checklist li { position: relative; padding-left: 1.7rem; color: var(--cream); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 0.6em;
  width: 9px; height: 9px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--candle-hi), var(--candle));
  box-shadow: 0 0 12px rgba(231,162,60,0.6);
}
.showcase__device { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; }
.device {
  border-radius: 30px; padding: 10px;
  background: linear-gradient(160deg, #15324a, #081726);
  border: 1px solid var(--ink-3);
  box-shadow: 0 30px 70px rgba(0,0,0,0.55), 0 0 60px rgba(231,162,60,0.12);
  max-width: 300px;
}
.device img { border-radius: 22px; }
.showcase__device figcaption { font-style: italic; color: var(--muted-2); font-size: 0.95rem; }

/* ---------- TIERS ---------- */
.tiers {
  position: relative; z-index: 2; max-width: var(--maxw); margin: 2rem auto;
  padding: 3rem 1.5rem;
}
.tiers__head { text-align: center; max-width: 640px; margin: 0 auto 2.6rem; }
.tiers__head h2 {
  font-family: var(--display); font-weight: 400; font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.1; letter-spacing: -0.01em; margin: 0 0 1rem;
}
.tiers__sub { color: var(--muted); margin: 0; }
.tiers__grid {
  display: grid; gap: 1.4rem;
  grid-template-columns: repeat(4, 1fr);
}
.tier {
  border: 1px solid var(--ink-3); border-radius: var(--r);
  padding: 1.7rem 1.5rem;
  background: linear-gradient(180deg, rgba(12,34,54,0.6), rgba(8,23,38,0.3));
  transition: border-color .3s, transform .3s;
  display: flex; flex-direction: column;
}
.tier:hover { border-color: rgba(92,196,203,0.4); transform: translateY(-3px); }
.tier--feature {
  border-color: rgba(231,162,60,0.45);
  background: linear-gradient(180deg, rgba(231,162,60,0.10), rgba(8,23,38,0.4));
  box-shadow: 0 0 40px rgba(231,162,60,0.10);
}
.tier--feature:hover { border-color: rgba(231,162,60,0.7); }
.tier__tag {
  font-family: var(--body); text-transform: uppercase; letter-spacing: 0.22em;
  font-size: 0.66rem; font-weight: 500; color: var(--teal);
  margin: 0 0 0.7rem;
}
.tier__tag--gold { color: var(--candle); }
.tier h3 {
  font-family: var(--display); font-weight: 500; font-size: 1.3rem;
  line-height: 1.2; margin: 0 0 0.6rem; color: var(--cream);
}
.tier p { margin: 0; color: var(--muted); font-size: 0.98rem; }
.tiers__fine {
  text-align: center; margin: 2.4rem 0 0; font-style: italic;
  color: var(--muted-2); font-size: 0.95rem;
}
@media (max-width: 980px) { .tiers__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .tiers__grid { grid-template-columns: 1fr; } }

/* ---------- WAITLIST ---------- */
.waitlist { position: relative; z-index: 2; padding: 3rem 1.5rem 4rem; }
.waitlist__card {
  max-width: 720px; margin: 0 auto; border-radius: 22px; overflow: hidden;
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(255,255,255,0.5), rgba(255,255,255,0) 40%),
    linear-gradient(180deg, var(--parchment), var(--parch-2));
  color: var(--sepia);
  box-shadow: 0 40px 90px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.6);
  border: 1px solid rgba(108,87,64,0.25);
  padding: clamp(1.8rem, 4vw, 3rem);
}
.waitlist__head { text-align: center; margin-bottom: 1.8rem; }
.waitlist__head h2 {
  font-family: var(--display); font-weight: 500; font-size: clamp(2rem, 5vw, 2.9rem);
  margin: 0 0 0.6rem; color: var(--sepia); letter-spacing: -0.01em;
}
.waitlist__sub { color: var(--sepia-soft); max-width: 480px; margin: 0 auto; }

.form { display: grid; gap: 1.5rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field { display: grid; gap: 0.6rem; border: 0; padding: 0; margin: 0; }
.field > label, .field legend {
  font-family: var(--body); font-weight: 500; font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 0.16em; color: var(--sepia-soft);
  padding: 0;
}
.req { color: #b4541f; }
.opt { text-transform: none; letter-spacing: 0; font-style: italic; opacity: 0.6; font-size: 0.8rem; }

.form input[type="email"], .form input[type="text"] {
  font-family: var(--body); font-size: 1.1rem; color: var(--sepia);
  background: rgba(255,255,255,0.55); border: 1px solid rgba(108,87,64,0.35);
  border-radius: 10px; padding: 0.8rem 1rem; width: 100%;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.form input::placeholder { color: rgba(108,87,64,0.55); }
.form input:focus {
  outline: none; border-color: var(--candle);
  background: #fff; box-shadow: 0 0 0 4px rgba(231,162,60,0.18);
}

/* selectable chips */
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: inline-block; padding: 0.5rem 1rem; border-radius: 999px;
  border: 1px solid rgba(108,87,64,0.4); background: rgba(255,255,255,0.4);
  font-size: 0.98rem; color: var(--sepia); transition: all .18s ease; user-select: none;
}
.chip:hover span { border-color: var(--teal-deep); }
.chip input:checked + span {
  background: linear-gradient(135deg, var(--candle-hi), var(--candle));
  border-color: var(--candle); color: #2a1c08; font-weight: 500;
  box-shadow: 0 4px 14px rgba(231,162,60,0.3);
}
.chip input:focus-visible + span { outline: 2px solid var(--teal-deep); outline-offset: 2px; }

.form__fine { font-size: 0.85rem; color: var(--sepia-soft); text-align: center; margin: 0; }
.form__status { text-align: center; margin: 0; min-height: 1.2em; font-weight: 500; }
.form__status.is-error { color: #a23b1a; }

/* success state */
.waitlist__done { text-align: center; padding: 1.5rem 0; }
.waitlist__done h3 { font-family: var(--display); font-weight: 500; font-size: 2rem; margin: 1rem 0 0.5rem; color: var(--sepia); }
.waitlist__done p { color: var(--sepia-soft); max-width: 420px; margin: 0 auto; }
.flame {
  width: 18px; height: 28px; margin: 0 auto; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 50% 70%, #fff6d8, var(--candle-hi) 35%, var(--candle) 70%, #b4541f);
  box-shadow: 0 0 26px rgba(231,162,60,0.8); transform-origin: 50% 90%;
  animation: flicker 1.6s ease-in-out infinite;
}
@keyframes flicker {
  0%,100%{ transform: rotate(-2deg) scaleY(1); opacity:1; }
  25%{ transform: rotate(2deg) scaleY(1.06); }
  50%{ transform: rotate(-1deg) scaleY(0.96); opacity:.9; }
  75%{ transform: rotate(1.5deg) scaleY(1.04); }
}

/* ---------- FOOTER ---------- */
.foot {
  position: relative; z-index: 2; text-align: center;
  padding: 3rem 1.5rem 3.5rem; border-top: 1px solid var(--ink-3); margin-top: 2rem;
}
.foot__brand { display: inline-flex; align-items: center; gap: 0.5rem; margin-bottom: 0.6rem; }
.foot__brand img { width: 30px; height: 30px; }
.foot__brand span { font-family: var(--display); font-weight: 600; font-size: 1.2rem; color: var(--teal); }
.foot__brand em { font-style: normal; color: var(--candle); }
.foot__tag { font-family: var(--display); font-style: italic; font-size: 1.2rem; color: var(--cream); margin: 0 0 0.8rem; }
.foot__fine { font-size: 0.85rem; color: var(--muted-2); margin: 0; }

/* ---------- reveal on load ---------- */
.reveal { opacity: 0; transform: translateY(16px); animation: rise 0.8s cubic-bezier(0.2,0.7,0.2,1) forwards; animation-delay: var(--d, 0ms); }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .pillars { grid-template-columns: 1fr; }
  .showcase { grid-template-columns: 1fr; gap: 2rem; }
  .showcase__device { order: -1; }
}
@media (max-width: 480px) {
  body { font-size: 18px; }
  .nav { padding: 1.2rem 1.1rem; }
  .hero { padding-top: 2.5rem; }
}

/* ---------- accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
