/* ============================================================
   DripReader — landing styles
   Visual system: "Mist & Mineral" (calm pastel, paper + powder + mineral blue)
   Motion: transform/opacity only, full prefers-reduced-motion fallback
   ============================================================ */

:root {
  /* surfaces */
  --paper:    #F2F4F3;
  --paper-2:  #FBFCFC;
  --mist:     #E7EEF1;
  --powder:   #C9D8E4;
  --powder-2: #DCE7EE;

  /* ink */
  --ink:    #19262E;
  --ink-2:  #41545E;
  --slate:  #647580;
  --line:   rgba(25, 38, 46, .10);
  --line-2: rgba(25, 38, 46, .06);

  /* accent — mineral blue */
  --accent:      #3E7CA8;
  --accent-2:    #2C5E83;
  --accent-ink:  #1F4E72;
  --accent-soft: rgba(62, 124, 168, .12);
  --accent-glow: rgba(62, 124, 168, .22);

  /* shadows (low-contrast, mineral-tinted) */
  --sh-sm: 0 1px 2px rgba(25, 38, 46, .04), 0 3px 10px rgba(28, 72, 102, .05);
  --sh-md: 0 12px 30px rgba(28, 72, 102, .10);
  --sh-lg: 0 30px 70px rgba(28, 72, 102, .16);

  /* radii */
  --r:    14px;
  --r-lg: 22px;
  --r-pill: 999px;

  /* motion tokens */
  --t-fast: 180ms;
  --t-base: 320ms;
  --t-slow: 600ms;
  --t-reveal: 720ms;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
  --ease-gravity: cubic-bezier(.55, 0, 1, .45);

  --wrap: 1120px;
  --gut: clamp(20px, 5vw, 56px);

  /* fluid type scale */
  --fs-eyebrow: .8rem;
  --fs-body:   clamp(1rem, .96rem + .25vw, 1.12rem);
  --fs-lede:   clamp(1.12rem, 1.02rem + .6vw, 1.4rem);
  --fs-h3:     clamp(1.15rem, 1.05rem + .5vw, 1.4rem);
  --fs-h2:     clamp(1.9rem, 1.4rem + 2.3vw, 3rem);
  --fs-h1:     clamp(2.8rem, 1.9rem + 4.6vw, 5.4rem);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: "Karla", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { color: var(--ink); font-family: "Fraunces", Georgia, "Times New Roman", serif; font-weight: 600; line-height: 1.05; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
strong { color: var(--ink); font-weight: 700; }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r);
}
.skip-link:focus { left: 12px; }

:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- layout helpers ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gut); }
.wrap.narrow { max-width: 760px; }
.band { padding-block: clamp(64px, 9vw, 130px); position: relative; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gut);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.3) blur(10px);
  -webkit-backdrop-filter: saturate(1.3) blur(10px);
  border-bottom: 1px solid var(--line-2);
}
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); }
.brand-mark { color: var(--accent); }
.brand-name { font-family: "Fraunces", serif; font-weight: 600; font-size: 1.18rem; letter-spacing: -.01em; }
.head-cta {
  font-weight: 600; font-size: .92rem; color: var(--accent-ink);
  padding: 8px 16px; border-radius: var(--r-pill);
  border: 1px solid var(--accent-soft); background: var(--accent-soft);
  transition: background var(--t-fast) var(--ease-soft), transform var(--t-fast) var(--ease-soft);
}
.head-cta:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); transform: translateY(-1px); }

/* ---------- ambient drip field ---------- */
.drip-field { position: absolute; inset: 0; height: 120vh; max-height: 1100px; pointer-events: none; z-index: 0; overflow: hidden; }
.drop {
  position: absolute; top: -6%; left: var(--x);
  width: calc(7px * var(--s)); height: calc(7px * var(--s));
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 35% 30%, var(--powder), var(--accent-glow));
  opacity: 0; filter: blur(.2px);
  animation: dripfall 8s var(--ease-gravity) infinite;
  animation-delay: var(--d);
}
@keyframes dripfall {
  0%   { opacity: 0; transform: translateY(0) scaleY(.7); }
  8%   { opacity: .55; }
  70%  { opacity: .45; }
  100% { opacity: 0; transform: translateY(75vh) scaleY(1.15); }
}

/* ---------- hero ---------- */
.hero {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px);
  align-items: center;
  max-width: var(--wrap); margin: 0 auto;
  padding: clamp(40px, 7vw, 96px) var(--gut) clamp(56px, 8vw, 110px);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-eyebrow); font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent-ink); margin-bottom: 22px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero-title { font-size: var(--fs-h1); font-weight: 600; letter-spacing: -.025em; }
.word-drip { position: relative; color: var(--accent); font-style: italic; }
.word-drip .ripple {
  position: absolute; left: 50%; bottom: -.14em; width: .42em; height: .42em;
  border: 2px solid var(--accent); border-radius: 50%;
  transform: translate(-50%, 0) scale(.2); opacity: 0;
  animation: ripple 4.2s var(--ease-out) infinite;
}
@keyframes ripple {
  0%   { transform: translate(-50%, 0) scale(.2); opacity: .55; }
  60%  { transform: translate(-50%, 0) scale(1.5); opacity: 0; }
  100% { opacity: 0; }
}
.hero-sub { font-size: var(--fs-lede); color: var(--ink-2); max-width: 30ch; margin: 24px 0 30px; }

/* ---------- join card / form ---------- */
.join-card {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 20px; box-shadow: var(--sh-md);
  max-width: 460px;
}
.join-card.slim { box-shadow: var(--sh-sm); }
.join-form { margin: 0; }
.field { display: flex; gap: 10px; }
.field.stack { flex-direction: column; }
.field input[type="email"] {
  flex: 1; min-width: 0; padding: 14px 16px;
  border: 1.5px solid var(--line); border-radius: var(--r);
  background: var(--paper); color: var(--ink); font-size: 1rem;
  transition: border-color var(--t-fast) var(--ease-soft), box-shadow var(--t-fast) var(--ease-soft);
}
.field input::placeholder { color: var(--slate); }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field input[aria-invalid="true"] { border-color: #c0563f; box-shadow: 0 0 0 4px rgba(192,86,63,.12); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.btn-primary {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 22px; border: 0; border-radius: var(--r);
  background: var(--accent-2); color: #fff; font-weight: 700; white-space: nowrap; /* --accent-2 keeps white label at AA contrast */
  box-shadow: 0 6px 18px var(--accent-glow);
  transition: transform var(--t-fast) var(--ease-soft), background var(--t-fast) var(--ease-soft), box-shadow var(--t-fast) var(--ease-soft);
}
.btn-primary:hover { background: var(--accent-ink); transform: translateY(-1px); box-shadow: 0 10px 24px var(--accent-glow); }
.btn-primary:active { transform: translateY(0); }
.btn-primary[aria-busy="true"] { pointer-events: none; opacity: .85; }
.btn-primary[aria-busy="true"] .btn-label { opacity: 0; }
.btn-spinner {
  position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; opacity: 0;
  animation: spin .7s linear infinite;
}
.btn-primary[aria-busy="true"] .btn-spinner { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ripple burst injected by JS on submit */
.btn-ripple {
  position: absolute; border-radius: 50%; background: rgba(255,255,255,.6);
  transform: translate(-50%, -50%) scale(0); pointer-events: none;
  animation: btnripple .65s var(--ease-out) forwards;
}
@keyframes btnripple { to { transform: translate(-50%, -50%) scale(1); opacity: 0; } }

.form-note { font-size: .86rem; color: var(--slate); margin-top: 12px; }
.form-note.error { color: #b04a35; }
.turnstile-slot:not(:empty) { margin-top: 12px; }

/* ---------- confirmation ---------- */
.confirm { text-align: left; }
.confirm-badge {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: var(--accent);
  box-shadow: 0 8px 20px var(--accent-glow); margin-bottom: 14px;
}
.confirm-title { font-size: var(--fs-h3); margin-bottom: 4px; }
.confirm-pos { font-size: 1.05rem; color: var(--ink-2); margin-bottom: 10px; }
.confirm-pos strong { color: var(--accent-ink); }
.confirm-text { font-size: .94rem; color: var(--slate); margin-bottom: 16px; }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: var(--r-pill);
  border: 1.5px solid var(--line); background: var(--paper); color: var(--accent-ink);
  font-weight: 600; font-size: .88rem;
  transition: border-color var(--t-fast) var(--ease-soft), background var(--t-fast) var(--ease-soft), transform var(--t-fast) var(--ease-soft);
}
.btn-ghost:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.btn-ghost.copied { background: var(--accent); color: #fff; border-color: var(--accent); }

.pref { border-top: 1px solid var(--line-2); padding-top: 16px; }
.pref-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .9rem; font-weight: 600; color: var(--ink-2); margin-bottom: 12px; }
.pref-label output { font-family: "Fraunces", serif; font-size: 1.3rem; color: var(--accent-ink); font-weight: 600; }
.pref input[type="range"] { width: 100%; accent-color: var(--accent); }
.pref-scale { display: flex; justify-content: space-between; font-size: .76rem; color: var(--slate); margin-top: 6px; }

/* ---------- phone mockup ---------- */
.hero-visual { position: relative; display: grid; place-items: center; }
.phone {
  position: relative; z-index: 2;
  width: min(300px, 78vw); aspect-ratio: 300 / 610;
  background: linear-gradient(170deg, #20323b, #16242b);
  border-radius: 42px; padding: 12px;
  box-shadow: var(--sh-lg), inset 0 0 0 2px rgba(255,255,255,.05);
  animation: floaty 7s var(--ease-soft) infinite;
}
@keyframes floaty { 0%,100% { transform: translateY(0) rotate(-1.2deg); } 50% { transform: translateY(-12px) rotate(-1.2deg); } }
.phone-notch { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); width: 92px; height: 22px; background: #16242b; border-radius: var(--r-pill); z-index: 3; }
.phone-screen {
  position: relative; height: 100%; border-radius: 32px; overflow: hidden;
  background: radial-gradient(120% 80% at 50% -10%, #fff, var(--paper) 60%, var(--mist));
  padding: 38px 18px 20px; display: flex; flex-direction: column; gap: 16px;
}
.ps-top { display: flex; align-items: center; justify-content: space-between; }
.ps-app { font-family: "Fraunces", serif; font-weight: 600; color: var(--ink); font-size: 1.15rem; }
.ps-chip { font-size: .72rem; font-weight: 600; color: var(--accent-ink); background: var(--accent-soft); padding: 5px 10px; border-radius: var(--r-pill); }

.ring-wrap { position: relative; display: grid; place-items: center; margin: 6px auto 2px; width: 150px; height: 150px; }
.ring { width: 150px; height: 150px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; stroke-linecap: round; }
.ring-track { stroke: var(--powder-2); }
.ring-fill {
  stroke: var(--accent); stroke-dasharray: 326.7; stroke-dashoffset: 326.7;
  animation: ringfill 2.4s var(--ease-out) .3s forwards;
}
@keyframes ringfill { to { stroke-dashoffset: 98; } } /* ~70% filled */
.ring-center { position: absolute; text-align: center; }
.ring-num { display: block; font-family: "Fraunces", serif; font-size: 2.4rem; font-weight: 600; color: var(--ink); line-height: 1; }
.ring-cap { font-size: .72rem; color: var(--slate); }

.ps-cards { display: flex; flex-direction: column; gap: 9px; margin-top: 2px; }
.pcard {
  background: var(--paper-2); border: 1px solid var(--line-2); border-radius: 12px;
  padding: 11px 12px; display: flex; flex-direction: column; gap: 7px;
  opacity: 0; transform: translateY(10px);
  animation: cardup .55s var(--ease-out) forwards;
  animation-delay: calc(1s + var(--n) * .16s);
}
@keyframes cardup { to { opacity: 1; transform: none; } }
.pcard-bar { height: 7px; border-radius: 4px; background: var(--powder-2); width: 100%; }
.pcard-bar.short { width: 58%; background: var(--powder); }

.ps-streak {
  margin-top: auto; display: flex; align-items: center; gap: 7px;
  color: var(--accent-ink); font-size: .8rem; font-weight: 600;
  background: var(--accent-soft); padding: 8px 12px; border-radius: var(--r-pill);
}
.ps-streak svg { color: var(--accent); }
.ps-streak-soft { margin-left: auto; color: var(--slate); font-weight: 500; }
.phone-shadow { position: absolute; bottom: -6%; left: 50%; transform: translateX(-50%); width: 70%; height: 40px; background: radial-gradient(ellipse, rgba(28,72,102,.22), transparent 70%); filter: blur(6px); z-index: 1; }

/* ---------- bands / typography blocks ---------- */
.kicker { font-size: var(--fs-eyebrow); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 14px; }
.kicker.center, .band-title.center { text-align: center; }
.band-title { font-size: var(--fs-h2); margin-bottom: 22px; }
.band-title.center { margin-inline: auto; max-width: 18ch; }
.lede { font-size: var(--fs-lede); color: var(--ink-2); max-width: 60ch; }

.problem { background: linear-gradient(180deg, var(--paper), var(--mist)); }
.problem .lede { color: var(--ink-2); }

.solution { background: var(--paper); }
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.tick-list { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.tick-list li { position: relative; padding-left: 30px; color: var(--ink-2); }
.tick-list li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: 16px; height: 16px;
  border-radius: 50%; background: var(--accent-soft);
  box-shadow: inset 0 0 0 2px var(--accent);
}
.solution-visual { display: grid; place-items: center; }
.dial { width: min(320px, 100%); background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--sh-md); }
.dial-row { display: flex; align-items: baseline; justify-content: space-between; }
.dial-cap { font-size: .82rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--slate); }
.dial-val { font-family: "Fraunces", serif; font-size: 1.8rem; font-weight: 600; color: var(--accent-ink); }
.dial-val.mono { font-family: "Karla", monospace; letter-spacing: .02em; }
.dial-track { position: relative; height: 8px; border-radius: var(--r-pill); background: var(--powder-2); margin: 14px 0 22px; }
.dial-knob { position: absolute; top: 50%; left: 25%; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); transform: translate(-50%, -50%); box-shadow: 0 4px 12px var(--accent-glow); }
.dial-foot { font-size: .82rem; color: var(--slate); margin-top: 4px; text-align: right; }

/* how it works */
.how { background: linear-gradient(180deg, var(--mist), var(--paper)); }
.steps { list-style: none; padding: 0; margin: 44px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 3vw, 30px); counter-reset: step; }
.step { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px 26px; box-shadow: var(--sh-sm); }
.step-num { font-family: "Fraunces", serif; font-size: 1rem; font-weight: 600; color: var(--accent); letter-spacing: .1em; }
.step h3 { font-size: var(--fs-h3); margin: 12px 0 8px; }
.step p { color: var(--ink-2); font-size: .98rem; }

/* features */
.features { background: var(--paper); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.5vw, 26px); margin-top: 44px; }
.feature { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--sh-sm); transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out), border-color var(--t-base) var(--ease-out); }
.feature:hover { transform: translateY(-4px); box-shadow: var(--sh-md); border-color: var(--accent-soft); }
.f-icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--accent-soft); color: var(--accent-ink); margin-bottom: 16px; }
.feature h3 { font-size: 1.12rem; margin-bottom: 7px; }
.feature p { color: var(--ink-2); font-size: .95rem; }

/* calm philosophy */
.calm { background: linear-gradient(180deg, var(--paper), var(--mist)); text-align: center; }
.center-block { max-width: 760px; margin-inline: auto; }
.calm-title { font-size: var(--fs-h2); margin-bottom: 26px; }
.calm-pills { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 22px; }
.calm-pills span { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 10px 20px; font-weight: 600; color: var(--accent-ink); box-shadow: var(--sh-sm); }
.calm-foot { font-size: var(--fs-lede); color: var(--ink-2); }

/* founder */
.founder { background: var(--mist); }
.founder-text { font-size: var(--fs-lede); color: var(--ink-2); margin-top: 6px; }
.founder-text em { color: var(--ink); font-style: italic; }
.founder-sign { margin-top: 18px; font-family: "Fraunces", serif; font-style: italic; color: var(--slate); }
.founder-cta .join-card { max-width: none; }

/* footer */
.site-foot { background: var(--ink); color: #cdd8de; padding-block: 48px; }
.foot-grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.site-foot .brand-name { color: #fff; }
.foot-tag { color: #93a4ae; font-family: "Fraunces", serif; font-style: italic; margin-top: 4px; }
.foot-fine { font-size: .85rem; color: #8fa0aa; }
.foot-fine a { color: #cfe0ea; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- reveal-on-scroll ----------
   Hidden state is gated behind .js so visitors without JavaScript see all content. */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity var(--t-reveal) var(--ease-out), transform var(--t-reveal) var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: clamp(28px, 8vw, 56px); }
  .hero-copy { order: 1; }
  .hero-visual { order: 2; margin-top: 8px; }
  .hero-sub { max-width: none; }
  .split { grid-template-columns: 1fr; }
  .solution-visual { order: -1; }
  .steps { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .field { flex-direction: column; }
  .feature-grid { grid-template-columns: 1fr; }
  .head-cta { display: none; }
  .foot-grid { flex-direction: column; align-items: flex-start; }
}

/* ---------- reduced motion: settle everything to its final state ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .drip-field { display: none; }
  .phone { animation: none; transform: rotate(-1.2deg); }
  .ring-fill { stroke-dashoffset: 98; }
  .pcard { opacity: 1; transform: none; }
  .word-drip .ripple { display: none; }
}
