/* Budis waiting-list page. Colours, type and shapes follow DESIGN.md: cream paper, one teal voice,
   amber only as a garnish, Nunito 600–900, nothing smaller than 18px, 20px corners on controls.
   Text sizes are in rem (1rem = 16px at the browser default) so a larger browser font size scales
   the page; the phone preview is in rem too, so it grows with the text and never clips. */

@font-face {
  font-family: "Nunito";
  src: url("fonts/nunito-subset.woff2") format("woff2");
  font-weight: 600 900;
  unicode-range: U+0020-007E, U+00A0, U+00AB, U+00B7, U+00BB, U+00C4, U+00C9, U+00D6, U+00DC, U+00DF, U+00E4, U+00E9, U+00F6, U+00FC, U+0104-0105, U+010C-010D, U+0116-0119, U+012E-012F, U+0160-0161, U+016A-016B, U+0172-0173, U+017D-017E, U+0401, U+0410-044F, U+0451, U+2013-2014, U+2018-2019, U+201C, U+201E, U+2022, U+2026, U+20AC, U+2116, U+2192;
  font-display: swap;
}

:root {
  --teal: #0F5257;
  --teal-dark: #0A3D41;
  --amber: #F2B544;
  --honey: #FCE7B8;
  --honey-ink: #3D2C00;
  --mist: #CFE6E3;
  --cream: #F6F4EF;
  --white: #FFFFFF;
  --resting: #F1EFE9;
  --ink: #14302F;
  --slate: #4A5A59;
  --edge: #7A8786;
  --line: #D9DEDD;
  --red: #B3261E;
  --brick: #9A3A1E; /* "Likely a scam" only, always with the warning mark; 7.0:1 with white */
  --radius: 20px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-xl: 28px;
  --gutter: 24px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1); /* strong ease-out: fast start, soft landing */
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.45;
  overflow-wrap: break-word;
  hyphens: none;
  caret-color: var(--teal);
}
::selection { background: var(--mist); color: var(--ink); }
p, li, summary, label, legend { text-wrap: pretty; }

h1, h2, h3 { margin: 0; line-height: 1.15; color: var(--ink); }
h2 { font-size: clamp(1.875rem, 4vw, 2.5rem); font-weight: 900; }
h3 { font-size: 1.5rem; font-weight: 800; }
p { margin: 0; }
a { color: var(--teal); font-weight: 800; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: 800px; }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  background: var(--teal); color: var(--white); padding: 16px 20px; border-radius: var(--r-sm);
}
.skip:focus { top: 16px; }

/* Header ---------------------------------------------------------------------------------------- */

.top { padding: 20px 0; }
.top-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--teal); text-decoration: none; font-size: 1.75rem; font-weight: 900;
  min-height: 56px;
}
.langs { display: flex; gap: 8px; margin-left: auto; }
.langs button, .langs a {
  min-width: 56px; min-height: 56px; padding: 0 12px;
  font: inherit; font-size: 1.125rem; font-weight: 800;
  background: transparent; color: var(--teal);
  border: 2px solid var(--edge); border-radius: var(--r-sm); cursor: pointer;
}
/* The home page switch is three links (one per language page); j.html and the error pages draw buttons. */
.langs a { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.langs button[aria-pressed="true"], .langs a[aria-current="page"] { background: var(--teal); border-color: var(--teal); color: var(--white); }

/* Hero ------------------------------------------------------------------------------------------ */

.hero { padding: 24px 0 64px; }
.hero-grid { display: grid; gap: 48px; align-items: start; }
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 64px; }
  .hero-preview { position: sticky; top: 24px; }
}

.soon {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 16px;
  font-size: 1.125rem; font-weight: 800; color: var(--teal);
}
.soon::before { content: ""; flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--amber); }
h1 { font-size: clamp(3rem, 7vw, 4.75rem); font-weight: 900; color: var(--teal); letter-spacing: -0.01em; }
.lead { margin-top: 16px; font-size: clamp(1.25rem, 2.2vw, 1.5rem); max-width: 34ch; }

/* Signup form ----------------------------------------------------------------------------------- */

.signup {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 2px solid var(--line); /* a divider, not a card: the fields are the only layer here */
  max-width: 560px;
}
.signup-title { font-size: 1.5rem; font-weight: 900; }
form { display: grid; gap: 16px; }

.who { border: 0; margin: 0; padding: 0; min-width: 0; }
.who legend { padding: 0; margin-bottom: 12px; font-weight: 800; }
.optional { color: var(--slate); font-weight: 600; }
.who-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 12px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 60px; padding: 12px 16px;
  border: 2px solid var(--edge); border-radius: var(--radius);
  font-weight: 800; color: var(--teal); background: var(--cream);
}
.choice span { transition: transform 160ms var(--ease-out); }
.choice:active span { transform: scale(0.97); }
.choice input:checked + span { background: var(--teal); border-color: var(--teal); color: var(--white); }
.choice input:focus-visible + span { outline: 3px solid var(--teal); outline-offset: 3px; }

.field { display: grid; gap: 4px; }
.field label { font-weight: 800; }
.field input {
  width: 100%; min-height: 60px; padding: 12px 16px;
  font: inherit; font-size: 1.25rem; color: var(--ink);
  background: var(--white); border: 2px solid var(--edge); border-radius: var(--radius);
}
.field input::placeholder { color: var(--slate); opacity: 1; }
.field input[aria-invalid="true"] { border-color: var(--red); }
.field textarea {
  width: 100%; min-height: 140px; padding: 12px 16px; resize: vertical;
  font: inherit; font-size: 1.25rem; color: var(--ink);
  background: var(--white); border: 2px solid var(--edge); border-radius: var(--radius);
}
.field textarea[aria-invalid="true"] { border-color: var(--red); }
.hint { font-size: 1.125rem; color: var(--slate); margin-top: -4px; }

.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.consent { display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; font-size: 1.125rem; cursor: pointer; }
.consent input { width: 28px; height: 28px; margin: 2px 0 0; accent-color: var(--teal); cursor: pointer; }
.consent.invalid span { color: var(--red); }

.error {
  color: var(--red); font-size: 1.125rem; font-weight: 700;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
}
/* Eases in instead of popping, so the form shifting down reads as cause and effect. No shake. */
@starting-style { .error { opacity: 0; transform: translateY(-4px); } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 64px; padding: 16px 24px;
  font: inherit; font-size: 1.25rem; font-weight: 800; text-decoration: none;
  border-radius: var(--radius); border: 2px solid transparent; cursor: pointer;
  transition: transform 160ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn-primary { width: 100%; background: var(--teal); color: var(--white); }
/* Hover only where there is a real pointer: on touch it would stick after a tap. */
@media (hover: hover) and (pointer: fine) {
  .btn-primary { transition: transform 160ms var(--ease-out), background-color 150ms var(--ease-out); }
  .btn-primary:hover { background: var(--teal-dark); }
}
.btn-primary[aria-busy="true"] { cursor: progress; }
.btn-primary[aria-busy="true"]::after {
  content: ""; width: 24px; height: 24px; border-radius: 50%;
  border: 3px solid rgb(255 255 255 / 0.4); border-top-color: var(--white);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-light { background: var(--white); color: var(--teal); }

.fineprint { font-size: 1.125rem; color: var(--slate); text-align: center; }

/* The one rare moment on the page: the thank-you settles in instead of swapping. The dog stays still. */
.done {
  display: grid; justify-items: start; gap: 12px;
  transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out);
}
@starting-style {
  .done { opacity: 0; transform: translateY(8px) scale(0.97); }
}
.done:focus { outline: none; }
.done h2 { font-size: 1.875rem; color: var(--teal); }
.done-already { color: var(--slate); }

/* Phone preview --------------------------------------------------------------------------------- */

.hero-preview { display: grid; justify-items: center; gap: 20px; }
.hero-preview > * { min-width: 0; }

/* The phone is an illustration (role="img" with one description); its size is in rem and its height
   follows its content, so a longer language or a larger browser font never clips a line. */
.phone {
  width: min(21.25rem, 100%);
  min-height: 40rem;
  padding: 12px;
  background: var(--ink);
  border-radius: var(--r-xl);
  box-shadow: 0 30px 60px -30px rgb(20 48 47 / 0.55);
}
.phone-screen {
  position: relative; min-height: calc(40rem - 24px);
  background: var(--cream); border-radius: var(--r-md);
  padding: 16px;
  font-size: 1rem; line-height: 1.35;
}
.phone-status { display: flex; justify-content: space-between; font-size: 1rem; font-weight: 800; color: var(--ink); padding: 0 8px 12px; }
.phone-icons { width: 42px; height: 12px; border-radius: var(--r-sm); background: linear-gradient(90deg, var(--ink) 0 60%, transparent 60% 70%, var(--ink) 70%); }

.screen { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; overflow-wrap: anywhere; animation: fade 0.25s ease-out; }
.screen[hidden] { display: none; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) {
  .screen { animation: none; }
  /* Entrances keep a short fade but drop the movement. */
  .done, .error { transition: opacity 200ms ease-out; }
  @starting-style { .done, .error { transform: none; } }
}

.app-head { display: flex; justify-content: flex-end; align-items: center; min-height: 40px; }
.gear { width: 24px; height: 24px; border-radius: 50%; border: 4px solid var(--teal); }
.app-title { font-size: 1.5rem; font-weight: 900; margin-top: 4px; }
.app-section { font-size: 1.125rem; font-weight: 900; margin-top: 4px; }

.banner-ok { display: flex; align-items: center; gap: 12px; background: var(--teal); color: var(--white); border-radius: var(--r-sm); padding: 16px; font-size: 1.25rem; font-weight: 800; }
/* The app's dog (DESIGN.md, mascot), at the preview's scale: a soft disc in a pale tint of its mood,
   cream on teal. It settles once when its screen opens and then holds still. */
.mascot { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--cream); }
.mascot-scam { background: #F6DDD4; }
.mascot-dog { width: 70%; height: 70%; }
/* The settle replays whenever a screen is shown (its panel leaves display: none). Each part starts
   a little off its pose and eases into it without overshoot; the pose itself is in the SVG. */
.mascot-dog [class^="settle"] { transform-box: view-box; animation: 0.8s cubic-bezier(0.4, 0, 0.2, 1) both; }
.mascot-dog .settle-ear-l { transform-origin: 74px 86px; }
.mascot-dog .settle-ear-r { transform-origin: 126px 86px; }
.mascot-dog .settle-eye { transform-origin: 0 0; }
.mascot-watch .settle-ear-l { animation-name: ears-up-l; }
.mascot-watch .settle-ear-r { animation-name: ears-up-r; }
.mascot-scam .settle-ear-l { animation-name: alert-l; }
.mascot-scam .settle-ear-r { animation-name: alert-r; }
.mascot-scam .settle-eye { animation-name: alert-eye; }
.mascot-scam .settle-lift { animation-name: alert-lift; }
@keyframes ears-up-l { from { transform: rotate(-10deg); } }
@keyframes ears-up-r { from { transform: rotate(10deg); } }
@keyframes alert-l { from { transform: rotate(-4deg); } }
@keyframes alert-r { from { transform: rotate(4deg); } }
@keyframes alert-eye { from { transform: scale(1, 1.82); } }
@keyframes alert-lift { from { transform: translateY(3px); } }
/* Waits until the preview is on screen, so the first settle isn't spent unseen. */
.hero-preview:not(.seen) .mascot-dog [class^="settle"] { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .mascot-dog [class^="settle"] { animation: none; } }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  display: grid; align-content: start; gap: 4px; min-height: 104px;
  background: var(--white); border: 2px solid var(--edge); border-radius: var(--r-sm); padding: 12px;
}
.tile b { color: var(--teal); font-weight: 800; font-size: 1rem; line-height: 1.2; }
.tile small { color: var(--slate); font-size: 1rem; font-weight: 600; }

.sms { background: var(--white); border: 2px solid var(--line); border-radius: var(--r-sm); padding: 12px; display: grid; gap: 4px; }
.sms small { color: var(--slate); font-size: 1rem; font-weight: 700; }
.verdict-scam { display: flex; align-items: center; gap: 12px; background: var(--brick); color: var(--white); border-radius: var(--r-sm); padding: 16px; font-size: 1.25rem; font-weight: 900; }
.verdict-scam > svg { flex: none; width: 28px; height: 28px; fill: currentColor; }
.app-list { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.app-list li::marker { color: var(--amber); }
.app-btn { background: var(--teal); color: var(--white); border-radius: var(--r-sm); padding: 16px; text-align: center; font-weight: 800; margin-top: 4px; }
.app-btn-secondary { background: var(--cream); color: var(--teal); border: 2px solid var(--teal); }

.call-number { font-size: 1.75rem; font-weight: 900; text-align: center; margin: 16px 0 8px; letter-spacing: 0.01em; }
.caution { background: var(--honey); color: var(--honey-ink); border-radius: var(--r-sm); padding: 16px; display: grid; gap: 4px; }
.caution b { font-size: 1.125rem; font-weight: 900; }
.call-actions { display: flex; justify-content: space-around; margin-top: 64px; }
.call-btn { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; }
.call-btn svg { width: 32px; height: 32px; fill: var(--white); }
.call-no { background: var(--red); }
.call-no svg { transform: rotate(135deg); }
.call-yes { background: var(--teal); }

.answer { display: flex; gap: 12px; align-items: center; background: var(--mist); border-radius: var(--r-sm); padding: 16px; }
.answer b { display: block; font-weight: 900; color: var(--teal-dark); }
.answer small { color: var(--slate); font-size: 1rem; }
.initial { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--teal); color: var(--white); display: grid; place-items: center; font-weight: 900; }

.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tabs button {
  min-height: 56px; padding: 0 16px;
  font: inherit; font-size: 1.125rem; font-weight: 800;
  color: var(--teal); background: var(--white);
  border: 2px solid var(--edge); border-radius: var(--r-md); cursor: pointer;
  transition: transform 160ms var(--ease-out);
}
.tabs button:active { transform: scale(0.97); }
.tabs button[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: var(--white); }
.preview-note { font-size: 1.125rem; color: var(--slate); text-align: center; max-width: 36ch; }

/* Sections -------------------------------------------------------------------------------------- */

section h2 { margin-bottom: 24px; }
/* Rhythm: a calm 64, one generous 96 for the family moment, then tighter 48s for the promises and FAQ. */
.features, .privacy { padding: 64px 0; }
.promises, .faq { padding: 48px 0; }
.features { background: var(--white); }

/* Four items: one, two or four per row, never three and a lone one. */
.cards, .prom-grid { display: grid; gap: 20px; }
@media (min-width: 640px) { .cards, .prom-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .cards, .prom-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { background: var(--cream); border-radius: var(--radius); padding: 24px; display: grid; gap: 12px; align-content: start; }
.card h3 { color: var(--teal); }

/* The family-ask moment: full bleed teal, the dog beside the heading, the two cards stacked on the right. */
.family { background: var(--teal); padding: 96px 0; }
.family h2 { color: var(--white); margin: 0; }
.family-intro { display: grid; justify-items: start; gap: 24px; margin-bottom: 32px; }
.family-dog { background: var(--cream); border-radius: var(--radius); padding: 12px 16px; box-sizing: content-box; }
@media (min-width: 960px) {
  .family-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: center; }
  .family-intro { margin-bottom: 0; }
  .family .aud-grid { grid-template-columns: 1fr; }
}
.aud-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.aud { background: var(--white); border: 2px solid var(--line); border-radius: var(--radius); padding: 24px; }
.dots { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.dots li { display: grid; grid-template-columns: 12px 1fr; gap: 12px; }
.dots li::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--amber); margin-top: 0.5em; }

.promises { background: var(--mist); }
.prom-grid { gap: 24px; }
.prom { display: grid; gap: 8px; align-content: start; }
.prom h3 { color: var(--teal-dark); }

.faq details { background: var(--white); border: 2px solid var(--edge); border-radius: var(--radius); margin-bottom: 8px; }
.faq summary {
  list-style: none; cursor: pointer; min-height: 64px; padding: 16px 56px 16px 24px;
  font-weight: 800; color: var(--teal); position: relative; border-radius: var(--radius);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 24px; top: 50%; width: 12px; height: 12px;
  border-right: 3px solid var(--teal); border-bottom: 3px solid var(--teal);
  transform: translateY(-70%) rotate(45deg);
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq details p { padding: 0 24px 16px; }
.faq details p:not(:last-child) { padding-bottom: 8px; }

.cta-band { background: var(--teal); color: var(--white); padding: 48px 0; }
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.cta-band a:focus-visible, .cta-band button:focus-visible { outline-color: var(--white); }
.cta-inner div { flex: 1 1 320px; }
.cta-inner h2 { color: var(--white); margin: 0 0 4px; font-size: 1.75rem; }
.cta-inner img { background: var(--cream); border-radius: var(--radius); padding: 8px 12px; box-sizing: content-box; }

.privacy p { max-width: 62ch; }

.foot { padding: 32px 0 48px; border-top: 2px solid var(--line); font-size: 1.125rem; color: var(--slate); }
.foot-inner { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.foot-legal { font-size: 1.125rem; }
.foot-links { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 0 24px; font-weight: 700; }
.foot-links a { display: inline-flex; align-items: center; min-height: 56px; }

/* Unsubscribe page ------------------------------------------------------------------------------ */

.leave { padding-top: 24px; padding-bottom: 64px; }
.leave .signup { display: grid; gap: 20px; max-width: none; }
.leave-title { font-size: clamp(1.875rem, 4vw, 2.5rem); font-weight: 900; color: var(--teal); }
.leave-title:focus { outline: none; }
.leave-home { width: 100%; border-color: var(--teal); }
/* The invite page (j.html): the code big enough to copy by eye, then three short steps. */
.invite-code { font-size: clamp(2.5rem, 9vw, 3.5rem); font-weight: 900; letter-spacing: 0.12em; color: var(--teal); }
.invite-code:empty { display: none; }
.invite-steps { margin: 0; padding-left: 1.4em; display: grid; gap: 12px; font-size: inherit; }
.invite-steps:empty { display: none; }
/* The error pages (404.html, klaida.html): a way to reach us under the way home. */
.contact { margin-top: 24px; }
.contact h2 { font-size: 1.5rem; color: var(--teal); }
.contact form { display: grid; gap: 20px; }
.contact .hint { margin-top: 0; }
