/* ==========================================================================
   Susanna — meetsusanna.com
   Palette is taken verbatim from the app (app-expo/src/theme/colors.js) so the
   site and the product are the same object. Mobile-first throughout: every
   base rule targets the phone, and the only media queries widen it.
   ========================================================================== */

:root {
  --cream:      #f7f3eb;
  --cream-warm: #f1ede5;
  --ink:        #14201b;
  --dark:       #26433a;
  --clay:       #c98466;
  --clay-text:  #9b563f;
  --green:      #2f5244;
  --sage:       #8ea493;
  --muted:      #5f6f65;
  --line:       #e4dfd4;
  --surface:    #ffffff;
  --button:     #253f36;

  --shadow-sm: 0 1px 2px rgba(20, 32, 27, .04), 0 6px 18px rgba(20, 32, 27, .05);
  --shadow-md: 0 2px 6px rgba(20, 32, 27, .05), 0 18px 46px rgba(20, 32, 27, .09);

  --sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --gutter: 20px;
  --maxw: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --cream:      #131e19;
    --cream-warm: #1a2822;
    --ink:        #f0ece2;
    --dark:       #26433a;
    --clay-text:  #e0a184;
    --green:      #a8c4b4;
    --muted:      #a3b3a8;
    --line:       #2c4037;
    --surface:    #1b2a24;
    --button:     #dfeae1;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .22), 0 6px 18px rgba(0, 0, 0, .2);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, .26), 0 18px 46px rgba(0, 0, 0, .3);
  }
}

/* --- reset ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* `clip`, not `hidden`. Both contain the hero glow, but `hidden` turns the
     body into a scroll container, and a sticky header inside a scroll
     container stops sticking to the viewport. `clip` does not create one. */
  overflow-x: clip;
}

h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -.03em; line-height: 1.06; }
p { margin: 0; }
img { max-width: 100%; height: auto; display: block; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--cream);
  padding: 12px 18px; border-radius: 0 0 10px 0; font-size: 15px;
}
.skip:focus { left: 0; }

:focus-visible { outline: 3px solid var(--clay); outline-offset: 3px; border-radius: 8px; }

/* The mark is dark ink; lift it so it reads on the dark ground. */
@media (prefers-color-scheme: dark) {
  .nav-brand img, .footer-mark { filter: brightness(0) invert(1) opacity(.92); }
}

/* --- nav ------------------------------------------------------------
   The bar sits on its own ground so the header reads as a separate piece
   of furniture rather than floating on the hero, and it starts the same
   white/cream alternation the sections below continue. */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
  transition: box-shadow .2s ease;
}
/* Only once the page has actually moved under it — a bar that casts a shadow
   while sitting flush at the top looks detached for no reason. */
.topbar.stuck {
  box-shadow: 0 6px 22px rgba(20, 32, 27, .08);
}
@media (prefers-color-scheme: dark) {
  .topbar.stuck { box-shadow: 0 6px 22px rgba(0, 0, 0, .34); }
}
@media (prefers-reduced-motion: reduce) { .topbar { transition: none; } }

/* A sticky bar covers whatever an anchor scrolls to, so every target keeps
   its own height clear underneath it. */
[id] { scroll-margin-top: 84px; }
.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav-brand img { width: 118px; }
.nav-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--button);
  color: var(--cream);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform .12s ease, opacity .16s ease;
}
@media (prefers-color-scheme: dark) { .nav-cta { color: #131e19; } }
.nav-cta:hover { opacity: .9; }
.nav-cta:active { transform: scale(.97); }

/* --- hero ----------------------------------------------------------- */
.hero {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 52px var(--gutter) 64px;
  text-align: center;
}

/* Soft brand wash behind the headline — the app's orb gradient, diffused. */
.glow {
  position: absolute;
  top: -140px; left: 50%;
  /* Never wider than the screen, so the clipping above is a safety net rather
     than the only thing preventing a sideways scrollbar. */
  width: min(780px, 100vw); height: 620px;
  transform: translateX(-50%);
  background:
    radial-gradient(closest-side, rgba(142, 164, 147, .38), transparent 70%),
    radial-gradient(closest-side, rgba(201, 132, 102, .22), transparent 72%);
  background-position: 30% 30%, 74% 62%;
  background-repeat: no-repeat;
  background-size: 70% 70%, 62% 62%;
  filter: blur(46px);
  pointer-events: none;
  z-index: 0;
}
@media (prefers-color-scheme: dark) { .glow { opacity: .5; } }

.hero > *:not(.glow) { position: relative; z-index: 1; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 18px 7px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  margin-bottom: 26px;
}

/* Susanna herself, breathing — a quiet sign of something live rather than a
   static logo. The ring is a separate pseudo-element so the portrait itself
   never blurs or moves out of its circle. */
.badge-avatar {
  position: relative;
  display: block;
  width: 34px; height: 34px;
  flex: 0 0 34px;
}
.badge-avatar img {
  width: 100%; height: 100%;
  border-radius: 50%;
  position: relative;
  z-index: 1;
  animation: breathe 3.4s ease-in-out infinite;
}
.badge-avatar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--clay);
  animation: pulse-ring 3.4s ease-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}
@keyframes pulse-ring {
  0%   { transform: scale(1);    opacity: .55; }
  70%  { transform: scale(1.55); opacity: 0; }
  100% { transform: scale(1.55); opacity: 0; }
}

.badge-text {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--green);
}

h1 {
  font-size: clamp(2.65rem, 11.5vw, 5.2rem);
  margin-bottom: 20px;
}
h1 em { font-style: normal; color: var(--green); }

.lede {
  font-size: clamp(1.05rem, 4.2vw, 1.28rem);
  line-height: 1.55;
  color: var(--muted);
  max-width: 30em;
  margin: 0 auto;
  font-weight: 500;
}

/* --- waitlist form -------------------------------------------------- */
.form-wrap {
  margin: 34px auto 0;
  max-width: 720px;
}

/* One rail on desktop, stacked on a phone — the inputs and the button sit
   inside a single rounded shell rather than looking like three loose parts. */
.row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
}
.field { flex: 1; min-width: 0; }

.field input {
  width: 100%;
  /* 16px minimum — anything smaller makes iOS Safari zoom on focus. */
  font-size: 16px;
  font-family: inherit;
  font-weight: 500;
  color: var(--ink);
  background: var(--cream-warm);
  border: 1.5px solid transparent;
  border-radius: 13px;
  padding: 15px 17px;
  min-height: 56px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
/* In this inline layout the placeholder is the only *visible* label (the real
   <label> is there for screen readers), so it carries meaning and has to clear
   AA rather than being a whisper. Full opacity, no fading. */
.field input::placeholder { color: var(--muted); opacity: 1; }
.field input:hover { border-color: var(--sage); }
.field input:focus {
  outline: none;
  border-color: var(--clay);
  box-shadow: 0 0 0 3.5px rgba(201, 132, 102, .2);
}
.field input[aria-invalid="true"] {
  border-color: #d15145;
  box-shadow: 0 0 0 3.5px rgba(209, 81, 69, .15);
}

#submit {
  flex: 0 0 auto;
  min-height: 56px;
  padding: 0 26px;
  border: 0;
  border-radius: 13px;
  background: var(--button);
  color: var(--cream);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity .16s ease, transform .12s ease;
}
@media (prefers-color-scheme: dark) { #submit { color: #131e19; } }
#submit:hover { opacity: .9; }
#submit:active { transform: scale(.985); }
#submit[disabled] { cursor: default; opacity: .75; }
#submit .arrow { font-size: 17px; line-height: 1; }
#submit.loading .arrow { display: none; }

#submit .spinner {
  display: none;
  width: 16px; height: 16px;
  border: 2.2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .62s linear infinite;
}
#submit.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.error { font-size: 13.5px; color: #c1443a; margin-top: 10px; font-weight: 500; }
@media (prefers-color-scheme: dark) { .error { color: #f0938a; } }

.fineprint { font-size: 13px; line-height: 1.55; color: var(--muted); margin-top: 14px; }

.formstatus { font-size: 13.5px; color: #c1443a; margin-top: 12px; }
/* The same slot carries the "still working" note, which is not a failure. */
.formstatus.waiting { color: var(--muted); }
.formstatus:empty { display: none; }

/* --- success -------------------------------------------------------- */
.success {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 34px 26px;
  box-shadow: var(--shadow-md);
}
.success:focus { outline: none; }
.tick {
  width: 54px; height: 54px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(142, 164, 147, .22);
  color: var(--green);
  display: grid; place-items: center;
}
.tick svg { width: 26px; height: 26px; }
.success h2 { font-size: 1.6rem; margin-bottom: 10px; }
.success p { color: var(--muted); font-size: 15.5px; line-height: 1.6; }

/* --- bands ----------------------------------------------------------
   Sections alternate ground so the page reads as distinct blocks rather
   than one continuous scroll: cream hero, white, cream, white. */
.band { padding: 60px var(--gutter); }
.band-white { background: var(--surface); border-block: 1px solid var(--line); }
.inner { max-width: var(--maxw); margin: 0 auto; text-align: center; }

.kicker {
  font-size: 11.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--clay-text);
  font-weight: 700;
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(1.95rem, 8vw, 3rem);
  margin-bottom: 38px;
}

.cards {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: 14px;
  text-align: left;
}
.card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px 24px;
  transition: transform .2s ease, box-shadow .2s ease;
}
@media (hover: hover) {
  .card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
}
.card-icon {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--clay-text);
  margin-bottom: 16px;
}
.card-icon svg { width: 21px; height: 21px; }
.card h3 { font-size: 1.22rem; margin-bottom: 9px; letter-spacing: -.02em; }
.card p { font-size: 15px; line-height: 1.6; color: var(--muted); }

/* --- quote ---------------------------------------------------------- */
.quote-section { padding-top: 66px; padding-bottom: 66px; }
.quote { max-width: 820px; margin: 0 auto; text-align: center; border: 0; padding: 0; }
.quote p {
  font-size: clamp(1.55rem, 6.6vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.03em;
  margin-bottom: 18px;
}
.quote footer { font-size: 14px; color: var(--muted); font-weight: 500; }
.quote-dash {
  display: inline-block;
  width: 22px; height: 2px;
  background: var(--clay);
  vertical-align: middle;
  margin-right: 8px;
}

/* --- closing -------------------------------------------------------- */
.closing-band { padding-top: 56px; padding-bottom: 56px; }
.closing {
  background: var(--dark);
  color: #f7f3eb;
  max-width: calc(var(--maxw) - 2 * var(--gutter));
  margin: 0 auto;
  border-radius: 28px;
  padding: 48px 26px;
  text-align: center;
}
.closing h2 { font-size: clamp(1.8rem, 7.4vw, 2.7rem); margin-bottom: 12px; }
.closing p { color: rgba(247, 243, 235, .74); font-size: 15.5px; max-width: 30em; margin: 0 auto 26px; }

.closing-cta, .btn-dark {
  display: inline-flex;
  align-items: center; justify-content: center;
  min-height: 56px;
  padding: 0 32px;
  border-radius: 14px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  transition: transform .12s ease, opacity .16s ease;
}
.closing-cta { background: #f7f3eb; color: var(--dark); }
.closing-cta:hover, .btn-dark:hover { opacity: .92; }
.closing-cta:active, .btn-dark:active { transform: scale(.985); }

/* Dark pill for use on the cream ground, where .closing-cta would vanish. */
.cta-row { margin-top: 28px; }
.btn-dark { background: var(--button); color: var(--cream); }
@media (prefers-color-scheme: dark) { .btn-dark { color: #131e19; } }

/* --- footer --------------------------------------------------------- */
.footer {
  padding: 46px var(--gutter) calc(env(safe-area-inset-bottom) + 44px);
  max-width: var(--maxw);
  margin: 0 auto;
  text-align: center;
}
.footer-mark { width: 118px; margin: 0 auto 26px; }

/* Icon-only links. Each is a 48px target with its name on the element for
   screen readers and as a tooltip, since there is no visible label. */
.social {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}
.social a {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--green);
  transition: color .16s ease, transform .14s ease, border-color .16s ease;
}
.social a:hover {
  color: var(--clay-text);
  border-color: var(--clay);
  transform: translateY(-2px);
}
.social svg { width: 20px; height: 20px; }

/* The 404 keeps a plain text link in the footer. */
.footer-links { display: grid; justify-content: center; margin-bottom: 20px; }
.footer-links a { color: var(--ink); font-size: 15px; min-height: 44px; display: inline-flex; align-items: center; }

.copyright { font-size: 13px; color: var(--muted); }

/* --- entrance animation --------------------------------------------- */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s cubic-bezier(.22,.7,.3,1); }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.in { opacity: 1; transform: none; transition: none; }
  #submit .spinner { animation: none; }
  .card:hover { transform: none; }
  /* A pulsing avatar is decoration; for anyone who asked for less motion it
     simply sits still. */
  .badge-avatar img, .badge-avatar::after { animation: none; }
  .badge-avatar::after { opacity: .4; }
}

/* ==========================================================================
   Wider screens
   ========================================================================== */
@media (min-width: 660px) {
  :root { --gutter: 32px; }

  /* The whole point of the reference layout: one rail, not a stack. */
  .row { flex-direction: row; align-items: center; border-radius: 22px; }
  .cards { grid-template-columns: 1fr 1fr; gap: 18px; }
  .card { padding: 30px 28px; }
  .hero { padding: 56px var(--gutter) 76px; }
  .social { gap: 14px; }
}

@media (min-width: 900px) {
  body { font-size: 17.5px; }
  .nav { padding: 18px var(--gutter); }
  .nav-brand img { width: 138px; }

  .hero { padding: 76px var(--gutter) 92px; }
  .band { padding: 92px var(--gutter); }
  .quote-section { padding-top: 92px; padding-bottom: 92px; }
  .closing-band { padding-top: 76px; padding-bottom: 76px; }
  .closing { padding: 66px 40px; }
  .cards { grid-template-columns: repeat(4, 1fr); }
}
