/* waitlist.css — the waitlist drawer on the home page (index.html, with
   css/style.css), the application (apply/), the privacy page and the press
   kit (brand/), which load it alone. Its base rules (body, links) apply only
   to those standalone pages, so the home page's own stay as they are. */

:root {
  --clay: #b87758;
  --clay-deep: #8f5a42;
  --ink: #1b1613;
  --ink-soft: #3b332f;
  --paper: #eceae5;
  --paper-warm: #f0ede7;
  --hairline: rgba(27, 22, 19, 0.14);
  --tint: rgba(196, 221, 184, 0.42);       /* M.SOS's green */
  --tint-edge: rgba(104, 146, 90, 0.34);
  --home: rgba(184, 202, 224, 0.52);       /* Fiscal Sponsorship's blue */
  --home-edge: rgba(84, 116, 158, 0.32);
  --bar-h: 52px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + 16px); }

body:not([data-page="waitlist"]) {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 19px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* The site's paper grain (the waitlist keeps style.css's own, above its
   canvas) */
body:not([data-page="waitlist"])::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* Links: on the standalone pages, and within the waitlist (:where keeps
   these weaker than any class, such as .wl-button) */
:where(body:not([data-page="waitlist"])) a,
:where(.wl-content, .wl-panel) a { color: var(--clay-deep); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--clay-deep);
  outline-offset: 3px;
}
[hidden] { display: none !important; }

/* ── Header ───────────────────────────────────────────────────────────── */
.wl-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--bar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: rgba(236, 234, 229, 0.92);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--hairline);
}
.wl-mark {
  font-family: "Cormorant SC", serif;
  font-weight: 500;
  font-size: 20px;
  letter-spacing: 0.24em;
  text-transform: lowercase;
  color: var(--ink);
  text-decoration: none;
}
.wl-bar-join {
  font-family: "Cormorant SC", serif;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  text-decoration: none;
  color: var(--paper);
  background: var(--clay-deep);
  border-radius: 999px;
  padding: 7px 16px 8px;
}

/* ── Signup ───────────────────────────────────────────────────────────── */
.wl-signup { max-width: 34em; }
.wl-label {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
  color: var(--ink-soft);
}
.wl-row { display: flex; flex-direction: column; gap: 8px; }
.wl-input {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  font: inherit;
  font-size: 18px;               /* at least 16px, so iOS does not zoom */
  color: var(--ink);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(27, 22, 19, 0.28);
  border-radius: 10px;
}
.wl-input[aria-invalid="true"] { border-color: #a3402a; box-shadow: 0 0 0 1px #a3402a; }
.wl-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: 19px;
  color: var(--paper);
  background: var(--clay-deep);   /* 4.7:1 against the paper text */
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.wl-button:hover { background: #7b4c37; }
.wl-button[disabled] { opacity: 0.7; cursor: progress; }
.wl-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.wl-error { margin: 6px 0 0; font-size: 17px; color: #a3402a; min-height: 0; }
.wl-error:empty { display: none; }
.wl-micro { margin: 8px 0 0; font-size: 15.5px; line-height: 1.45; color: var(--ink-soft); }
.wl-onlist { margin: 0; font-size: 19px; color: var(--ink-soft); }

/* ── The qualifier, in the form's place ───────────────────────────────── */
.wl-panel {
  padding: 18px 18px 20px;
  background: var(--paper-warm);
  border: 1px solid var(--hairline);
  border-radius: 14px;
}
.wl-panel-title, .wl-next-title {
  margin: 0 0 12px;
  font-weight: 500;
  font-size: 24px;
  line-height: 1.2;
}
.wl-panel-title:focus { outline: none; }
.wl-step { border: 0; margin: 0; padding: 0; }
.wl-step legend { padding: 0; margin-bottom: 10px; font-size: 20px; line-height: 1.3; }
.wl-count {
  display: block;
  font-family: "Cormorant SC", serif;
  font-size: 14px;
  letter-spacing: 0.14em;
  color: var(--clay-deep);
}
.wl-choices { display: flex; flex-direction: column; gap: 8px; }
.wl-choices button {
  min-height: 48px;
  padding: 10px 14px;
  font: inherit;
  font-size: 18px;
  text-align: left;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(27, 22, 19, 0.2);
  border-radius: 10px;
  cursor: pointer;
}
.wl-choices button:hover { border-color: var(--clay-deep); background: #fff; }
.wl-skip {
  margin-top: 10px;
  padding: 6px 0;
  font: inherit;
  font-size: 16px;
  color: var(--ink-soft);
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.wl-next-steps { margin: 0 0 14px; padding-left: 1.3em; }
.wl-next-steps li { margin-bottom: 4px; }
.wl-explore { margin: 0 0 14px; }
.wl-next-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin: 0; }
.wl-call { font-size: 18px; }

/* ── The waitlist's content, below the hero ──────────────────────────── */
/* The drawer: on the home page's 3D view it rises over the cosmos when
   swiped (body.footer-open, js/main.js), scrolls on its own, and ends with
   the site's footer. Its paper carries the site's grain itself, since the
   page's grain lies beneath it. */
.wl-drawer {
  position: fixed;
  inset: 0;
  z-index: 25;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.055'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  box-shadow: 0 -12px 40px rgba(27, 22, 19, 0.08);
  outline: none;
  transform: translateY(100%);
  visibility: hidden;
  transition: transform 0.75s cubic-bezier(0.65, 0.05, 0.25, 1), visibility 0s linear 0.75s;
}
body.footer-open .wl-drawer {
  transform: none;
  visibility: visible;
  transition: transform 0.75s cubic-bezier(0.65, 0.05, 0.25, 1), visibility 0s;
}
.wl-content { position: relative; padding: 0 20px; }
/* The rotating noun and the full stop after it never part at a line end */
.wl-nw { white-space: nowrap; }
.wl-h1-2 { display: block; }
.wl-sec {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
  padding: 64px 0 8px;
}
.wl-sec--lead { padding-top: 72px; }
.wl-h1 {
  margin: 0 0 12px;
  font-weight: 600;
  font-size: clamp(28px, 7.4vw, 54px);
  line-height: 1.06;
  text-wrap: balance;
}
.wl-for { font-style: italic; font-weight: 500; color: var(--clay-deep); }
.wl-sub {
  margin: 0 0 22px;
  font-size: 21px;
  line-height: 1.4;
  font-style: italic;
  color: var(--ink-soft);
}
.wl-signup { max-width: 34em; }
.wl-h2 {
  margin: 0 0 18px;
  font-weight: 600;
  font-size: clamp(26px, 5.6vw, 36px);
  line-height: 1.12;
  text-wrap: balance;
}

/* Short statements: a bold claim, then a few plain words */
.wl-says { list-style: none; margin: 0; padding: 0; }
.wl-says li {
  padding: 14px 0 13px;
  border-top: 1px solid var(--hairline);
  line-height: 1.35;
}
.wl-says li:last-child { border-bottom: 1px solid var(--hairline); }
.wl-says strong { display: block; font-weight: 700; font-size: 24px; }
.wl-says span { display: block; margin-top: 2px; font-size: 18px; color: var(--ink-soft); }

/* Plain answers: a one-word question, then the answer */
.wl-qa { margin: 0; }
.wl-qa > div {
  display: grid;
  grid-template-columns: 7.2em 1fr;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--hairline);
}
.wl-qa > div:last-child { border-bottom: 1px solid var(--hairline); }
.wl-qa dt { font-weight: 700; font-size: 21px; line-height: 1.3; }
.wl-qa dd { margin: 0; font-size: 18px; line-height: 1.45; color: var(--ink-soft); }
@media (max-width: 559px) {
  .wl-qa > div { grid-template-columns: 1fr; gap: 2px; }
}

.wl-sec--close { padding-bottom: 24px; }
.wl-h2--leap { font-style: italic; font-weight: 500; }
/* The signature's ink starts a fifth of the way into its image: pulled back
   by that much, it lines up with the words above and below it */
.wl-sig { display: block; width: 260px; max-width: none; height: auto; margin: 6px 0 4px calc(260px * -0.204); }
.wl-sig-name { margin: 0 0 26px; font-size: 17px; color: var(--ink-soft); }

/* ── The rotating noun in the headline (as on the fiscal sponsorship page).
   Its box is as wide as its widest word (js/waitlist.js), so turning over
   never moves a word to another line. */
.wl-rotor {
  position: relative;
  display: inline-block;
  height: 1.2em;
  line-height: 1.2em;
  vertical-align: -0.23em;
  overflow: hidden;
  white-space: nowrap;
  font-style: italic;
  font-weight: 500;
  color: var(--clay-deep);
}
.wl-rotor-word {
  position: absolute;
  left: 0;
  top: 0;
  padding-right: 0.06em; /* the italic's overhang */
  opacity: 0;
  transform: translateY(105%);
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
}
.wl-rotor-word.is-on { position: relative; opacity: 1; transform: none; }
.wl-rotor-word.is-out { opacity: 0; transform: translateY(-105%); }

/* ── Thought bubbles: lines from the founder's letter ─────────────────────
   Each is a cloud with a trail of two rounds. On phones the clouds sit
   between the statements (only those without .wl-wide), trailing down; on
   wide screens they float in the margins at --y, trailing in toward the
   text. They arrive as a thought does: the far round, the near one, then
   the cloud swelling out of the trail, its words last (begin.js adds .is-in);
   then cloud and trail drift, each at its own pace. */
.wl-bubble {
  position: relative;
  width: fit-content;
  max-width: 86%;
  margin: 26px 0 40px;
}
.wl-bubble--r { margin-left: auto; }
.wl-cloud {
  position: relative;
  padding: 15px 21px 13px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(27, 22, 19, 0.09);
  border-radius: 28px;
  box-shadow: 0 12px 34px rgba(27, 22, 19, 0.06), 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  transition: box-shadow 0.5s ease, translate 0.5s ease;
}
.wl-bubble:hover .wl-cloud { box-shadow: 0 18px 44px rgba(27, 22, 19, 0.1), 0 1px 0 rgba(255, 255, 255, 0.7) inset; }
.wl-cloud p { margin: 0; font-style: italic; font-size: 19px; line-height: 1.38; color: var(--ink); }
.wl-letter-link {
  display: inline-block;
  margin-top: 7px;
  font-family: "Cormorant SC", serif;
  font-size: 13.5px;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  color: var(--clay-deep);
  text-decoration: none;
  border-bottom: 1px solid rgba(143, 90, 66, 0.35);
  transition: border-color 0.3s ease, color 0.3s ease;
}
.wl-letter-link:hover { color: var(--ink); border-color: var(--ink); }

/* The trail */
.wl-dot {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(27, 22, 19, 0.09);
  box-shadow: 0 4px 12px rgba(27, 22, 19, 0.05);
}
.wl-dot--near { width: 15px; height: 15px; bottom: -19px; }
.wl-dot--far  { width: 8px;  height: 8px;  bottom: -33px; }
.wl-bubble--l .wl-dot--near { right: 30px; }
.wl-bubble--l .wl-dot--far  { right: 19px; }
.wl-bubble--r .wl-dot--near { left: 30px; }
.wl-bubble--r .wl-dot--far  { left: 19px; }
.wl-bubble--l .wl-cloud { transform-origin: 85% 110%; }
.wl-bubble--r .wl-cloud { transform-origin: 15% 110%; }
.wl-wide { display: none; }

/* Arrival, only when begin.js is there to bring them in */
html.wl-js .wl-dot { opacity: 0; transform: scale(0); transition: opacity 0.3s ease, transform 0.55s cubic-bezier(0.34, 1.7, 0.6, 1); }
html.wl-js .wl-dot--near { transition-delay: 0.14s; }
html.wl-js .wl-cloud { opacity: 0; transform: scale(0.55); filter: blur(8px); transition: opacity 0.5s ease 0.28s, transform 0.85s cubic-bezier(0.34, 1.32, 0.6, 1) 0.28s, filter 0.7s ease 0.28s, box-shadow 0.5s ease; }
html.wl-js .wl-cloud > * { opacity: 0; translate: 0 6px; transition: opacity 0.6s ease 0.62s, translate 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.62s; }
html.wl-js .wl-cloud > a { transition-delay: 0.78s, 0.78s; }
html.wl-js .wl-bubble.is-in .wl-dot,
html.wl-js .wl-bubble.is-in .wl-cloud { opacity: 1; transform: none; filter: none; }
html.wl-js .wl-bubble.is-in .wl-cloud > * { opacity: 1; translate: none; }

/* Afterwards, a slow drift: the cloud sways, the trail follows a little behind */
.wl-bubble.is-in .wl-cloud { animation: wl-drift 8s ease-in-out 1.4s infinite alternate; }
.wl-bubble.is-in .wl-dot--near { animation: wl-drift-dot 8s ease-in-out 1.7s infinite alternate; }
.wl-bubble.is-in .wl-dot--far { animation: wl-drift-dot 8s ease-in-out 2s infinite alternate; }
.wl-bubble:nth-of-type(2n).is-in .wl-cloud { animation-duration: 10s; animation-delay: 1.1s; }
@keyframes wl-drift {
  from { translate: 0 0; rotate: 0deg; }
  50% { translate: 2px -6px; rotate: -0.5deg; }
  to { translate: -2px 4px; rotate: 0.4deg; }
}
@keyframes wl-drift-dot {
  from { translate: 0 0; }
  to { translate: 0 -4px; }
}

@media (min-width: 1240px) {
  .wl-bubble {
    position: absolute;
    top: var(--y, 0px);
    width: 244px;
    max-width: none;
    margin: 0;
  }
  .wl-bubble--l { right: calc(100% + 66px); }
  .wl-bubble--r { left: calc(100% + 66px); margin-left: 0; }
  /* In the margins, the trail points in toward the text */
  .wl-dot--near { bottom: 22px; }
  .wl-dot--far  { bottom: 12px; }
  .wl-bubble--l .wl-dot--near { right: -21px; }
  .wl-bubble--l .wl-dot--far  { right: -36px; }
  .wl-bubble--r .wl-dot--near { left: -21px; }
  .wl-bubble--r .wl-dot--far  { left: -36px; }
  .wl-bubble--l .wl-cloud { transform-origin: 108% 80%; }
  .wl-bubble--r .wl-cloud { transform-origin: -8% 80%; }
  .wl-wide { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  html.wl-js .wl-dot, html.wl-js .wl-cloud, html.wl-js .wl-cloud > * {
    opacity: 1; transform: none; filter: none; translate: none; transition: none;
  }
  .wl-bubble.is-in .wl-cloud, .wl-bubble.is-in .wl-dot { animation: none !important; }
}

/* ── Footer ───────────────────────────────────────────────────────────── */
.wl-foot {
  margin-top: 40px;
  padding: 26px 20px 34px;
  border-top: 1px solid var(--hairline);
  text-align: center;
  font-size: 16px;
  color: var(--ink-soft);
}
.wl-foot p { margin: 0 0 6px; }
.wl-brandline { font-style: italic; font-size: 18px; }

/* ── The application ──────────────────────────────────────────────────── */
.wl-apply { max-width: 640px; margin: 0 auto; padding: 22px 20px 0; }
.wl-h1--apply { font-size: clamp(30px, 6vw, 44px); }
.wl-as { margin: 0 0 10px; color: var(--ink-soft); }
.wl-as span { color: var(--ink); }
.wl-apply .wl-h2 { margin-top: 30px; font-size: 23px; }
.wl-field { border: 0; margin: 0 0 18px; padding: 0; }
.wl-field > label, .wl-field > legend { display: block; margin-bottom: 6px; padding: 0; font-size: 19px; font-weight: 500; }
.wl-n {
  display: inline-block;
  min-width: 1.4em;
  font-family: "Cormorant SC", serif;
  color: var(--clay-deep);
}
.wl-opt { font-size: 15px; font-weight: 400; color: var(--ink-soft); margin-left: 6px; }
.wl-hint { margin: -2px 0 6px; font-size: 16px; color: var(--ink-soft); }
.wl-text { min-height: 0; resize: vertical; line-height: 1.45; }
select.wl-input { appearance: auto; }
.wl-radios { display: grid; gap: 4px; }
.wl-radios label, .wl-consent { display: flex; gap: 10px; align-items: flex-start; min-height: 40px; padding: 6px 0; font-size: 18px; }
.wl-radios input, .wl-consent input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--clay-deep); flex: none; }
.wl-actions { margin: 18px 0 0; }
.wl-applied { padding: 20px 0 10px; }
.wl-applied h2:focus { outline: none; }

/* ── The privacy page ─────────────────────────────────────────────────── */
.wl-doc { max-width: 680px; margin: 0 auto; padding: 22px 20px 0; }
.wl-doc h2 { font-weight: 500; font-size: 24px; margin: 30px 0 8px; }
.wl-doc p, .wl-doc li { color: var(--ink-soft); }
.wl-doc ul { padding-left: 1.2em; }

/* ── Wider screens ────────────────────────────────────────────────────── */
@media (min-width: 560px) {
  .wl-row { flex-direction: row; }
  .wl-row .wl-input { flex: 1; }
  .wl-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .wl-next-actions { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 18px; }
}
@media (min-width: 960px) {
  .wl-bar { padding: 0 40px; }
  .wl-content { padding: 0 40px; }
  .wl-sec { padding-top: 88px; }
  .wl-sec--lead { padding-top: 104px; }
}

/* ── The press kit (brand/index.html) ─────────────────────────────────── */
.wl-doc.pk { max-width: 1080px; }
.pk-group { margin-top: 40px; }
.pk-group h2 { margin-bottom: 2px; }
.pk-group > p { margin: 0 0 16px; }
.pk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.pk-card { margin: 0; }
.pk-card--sq { max-width: 260px; }
.pk-img { display: block; border: 1px solid var(--hairline); border-radius: 10px; overflow: hidden; background: #eceae5; }
.pk-img img { display: block; width: 100%; height: auto; }
.pk-card figcaption { margin-top: 8px; font-size: 16px; line-height: 1.4; color: var(--ink-soft); }
.pk-card strong { color: var(--ink); font-weight: 600; margin-right: 6px; }
.pk-dl { display: block; font-size: 15px; }
