/* Frizzle — marketing site
   Layout: a worksheet. Cream paper, one left-aligned column, hard ink offset
   shadows like a screen-printed handout, the chalk doing the talking. */

:root {
  --cream: #faf2db;
  --cream-deep: #f1e5c4;
  --cream-shadow: #e8d9b3;
  --ink: #211c19;
  --ink-soft: rgba(33, 28, 25, 0.72);
  --ink-faint: rgba(33, 28, 25, 0.45);
  --board: #2e5e4f;
  --board-deep: #1f4538;
  --yellow: #fac74f;
  --yellow-deep: #e09e1f;
  --red: #e3572e;
  --teal: #40a6b5;
  --grape: #7a4a94;
  --chalk: #fff7e8;
  --chalk-yellow: #ffe37a;
  --chalk-pink: #ffb3c7;
  --chalk-blue: #99d4ff;

  --display: "Fredoka", "Arial Rounded MT Bold", "Helvetica Neue", sans-serif;
  --body: "Nunito", "Avenir Next Rounded", "Helvetica Neue", sans-serif;
  --mono: "SF Mono", Menlo, Consolas, monospace;

  --measure: 62ch;
  --radius: 18px;
  --shadow-offset: 5px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: clamp(2.6rem, 6.2vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3rem); }
h3 { font-size: 1.35rem; line-height: 1.2; }
p { margin: 0; max-width: var(--measure); }
.lede { font-size: 1.25rem; line-height: 1.5; color: var(--ink-soft); }
.small { font-size: 0.95rem; color: var(--ink-faint); }

.wrap {
  width: min(1160px, 100% - 2rem);
  margin-inline: auto;
}

/* ---------- buttons: screen-printed, hard offset shadow (the app's FrizzleButtonStyle) */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--display); font-weight: 600; font-size: 1.05rem;
  color: var(--ink); background: var(--yellow);
  border: 2px solid var(--ink); border-radius: 14px;
  padding: 0.8rem 1.3rem; text-decoration: none;
  box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--ink);
  transition: transform 0.08s ease-out, box-shadow 0.08s ease-out;
  cursor: pointer;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(var(--shadow-offset), var(--shadow-offset)); box-shadow: 0 0 0 var(--ink); }
.btn.quiet { background: var(--cream); }
.btn svg { width: 1.15em; height: 1.15em; }

/* ---------- header */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--cream) 88%, white);
  backdrop-filter: blur(10px);
  border-bottom: 1.5px solid var(--cream-shadow);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.7rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 1.35rem; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.top nav { display: flex; gap: 1.4rem; align-items: center; }
.top nav a { text-decoration: none; font-weight: 700; font-size: 0.98rem; color: var(--ink-soft); }
.top nav a:hover { color: var(--ink); }
.top nav .btn { padding: 0.5rem 0.9rem; font-size: 0.95rem; box-shadow: 3px 3px 0 var(--ink); }
@media (max-width: 760px) { .top nav a:not(.btn) { display: none; } }

/* ---------- hero */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) 2rem; }
.hero .wrap { display: grid; gap: 2rem; }
.hero-copy { display: grid; gap: 1.2rem; max-width: 760px; }
.hero-copy h1 { max-width: 14ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }
.hero-note { font-size: 0.95rem; color: var(--ink-faint); font-weight: 600; }
.keycap {
  display: inline-block; font-family: var(--display); font-weight: 600;
  border: 2px solid var(--ink); border-radius: 8px; padding: 0 0.45em; margin: 0 0.1em;
  background: white; box-shadow: 0 2.5px 0 var(--ink); line-height: 1.45; font-size: 0.92em;
}

/* the live demo */
.demo {
  position: relative;
  margin-top: 0.6rem;
}
.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1440 / 900;
  border-radius: 18px;
  overflow: hidden;
  background: #1a1b1e;
  box-shadow: 8px 10px 0 var(--ink), 0 30px 60px -20px rgba(33, 28, 25, 0.35);
  border: 2px solid var(--ink);
}
.stage img.screen { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.35s ease; }
.stage img.screen.on { opacity: 1; }
.stage svg.chalk { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.stage .halo { fill: none; stroke: var(--chalk); stroke-width: 1.8; opacity: 0; }
.stage .stub { position: absolute; left: 0; top: 0; width: 46px; height: 46px; pointer-events: none; opacity: 0; transition: opacity 0.2s; transform: translate(-13px, -32px); }
.stage .stub.on { opacity: 1; }
.tag {
  position: absolute; left: 0; top: 0;
  font-family: var(--body); font-weight: 700; font-size: clamp(0.72rem, 1.15vw, 1.05rem);
  color: var(--chalk); background: rgba(31, 69, 56, 0.9);
  border: 1.5px solid rgba(255, 247, 232, 0.55); border-radius: 9px;
  padding: 0.25em 0.6em; white-space: nowrap;
  transform: translate(-50%, -50%) rotate(-1.5deg) scale(0.6); opacity: 0;
  transition: opacity 0.2s ease, transform 0.22s cubic-bezier(.2,1.4,.5,1);
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.tag.on { opacity: 1; transform: translate(-50%, -50%) rotate(-1.5deg) scale(1); }
.tag.yellow { color: var(--chalk-yellow); border-color: rgba(255,227,122,0.55); }
.tag.pink { color: var(--chalk-pink); border-color: rgba(255,179,199,0.55); }
.tag.blue { color: var(--chalk-blue); border-color: rgba(153,212,255,0.55); }
.tag.white { color: var(--chalk); }
.tag.heard { transform: translate(0, 0) rotate(0) scale(0.7); border-radius: 9px; }
.tag.heard.on { transform: translate(0, 0) rotate(0) scale(1); }
.caption-bar {
  position: absolute; left: 50%; bottom: 7%;
  transform: translate(-50%, 8px); opacity: 0;
  max-width: min(680px, 86%);
  display: flex; gap: 0.7em; align-items: baseline;
  color: var(--chalk); background: rgba(31, 69, 56, 0.9);
  border: 2px solid rgba(224, 158, 31, 0.8); border-radius: 14px;
  padding: 0.55em 0.95em; font-size: clamp(0.78rem, 1.3vw, 1.1rem); font-weight: 700; line-height: 1.35;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}
.caption-bar.on { opacity: 1; transform: translate(-50%, 0); }
.caption-bar .n { font-family: var(--mono); font-size: 0.72em; color: var(--chalk-yellow); flex: none; }
.demo-controls { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 1.1rem; align-items: center; }
.chip {
  font-family: var(--display); font-weight: 600; font-size: 0.95rem;
  border: 2px solid var(--ink); background: var(--cream); color: var(--ink);
  border-radius: 999px; padding: 0.35rem 0.9rem; cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink); transition: transform .08s, box-shadow .08s, background .15s;
}
.chip[aria-pressed="true"] { background: var(--yellow); }
.chip:active { transform: translate(3px,3px); box-shadow: 0 0 0 var(--ink); }
.demo-controls .small { margin-left: auto; }
@media (max-width: 640px) { .demo-controls .small { margin-left: 0; width: 100%; } }

/* ---------- sections */
section { padding-block: clamp(3rem, 7vw, 6rem); }
section + section { border-top: 1.5px solid var(--cream-shadow); }
.section-head { display: grid; gap: 1rem; margin-bottom: clamp(1.6rem, 3vw, 2.6rem); max-width: 760px; }

/* film */
.film-frame {
  position: relative; border-radius: 18px; overflow: hidden;
  border: 2px solid var(--ink); background: var(--board-deep);
  box-shadow: 8px 10px 0 var(--ink);
}
.film-frame video { width: 100%; aspect-ratio: 16/9; background: var(--board-deep); }

/* steps (a real sequence) */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.step { display: grid; gap: 0.7rem; align-content: start; }
.step .glyph {
  width: 76px; height: 76px; display: grid; place-items: center;
  background: var(--board); border: 2px solid var(--ink); border-radius: 18px;
  box-shadow: 4px 4px 0 var(--ink); color: var(--chalk);
}
.step .glyph svg { width: 44px; height: 44px; }
.step .num { font-family: var(--display); font-weight: 600; color: var(--red); font-size: 1rem; }
.step p { color: var(--ink-soft); font-size: 1.05rem; }

/* feature rows: screen + copy */
.feature { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.feature.flip { grid-template-columns: 0.85fr 1.15fr; }
.feature.flip .shot { order: 2; }
@media (max-width: 900px) { .feature, .feature.flip { grid-template-columns: 1fr; } .feature.flip .shot { order: 0; } }
.feature .copy { display: grid; gap: 1rem; }
.feature .copy p { color: var(--ink-soft); font-size: 1.1rem; }
.shot {
  position: relative; border-radius: 16px; overflow: hidden;
  border: 2px solid var(--ink); box-shadow: 8px 10px 0 var(--ink);
  background: #1a1b1e;
}
.shot img { width: 100%; height: auto; }
.asked {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 700; color: var(--board-deep); background: var(--cream-deep);
  border: 2px solid var(--board); border-radius: 12px; padding: 0.4rem 0.8rem;
  width: fit-content; max-width: 100%;
}
.asked .mic { width: 18px; height: 18px; color: var(--red); flex: none; }
.asked q { quotes: "“" "”"; }
.followups { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.followups span {
  font-weight: 700; font-size: 0.95rem; color: var(--ink);
  background: white; border: 2px solid var(--ink); border-radius: 999px; padding: 0.3rem 0.8rem;
  box-shadow: 3px 3px 0 var(--ink);
}

/* facts grid (privacy, voice) */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
@media (max-width: 820px) { .facts { grid-template-columns: 1fr; } }
.fact { display: grid; gap: 0.6rem; padding: 1.4rem; background: white; border: 2px solid var(--ink); border-radius: 18px; box-shadow: 5px 5px 0 var(--ink); }
.fact p { color: var(--ink-soft); font-size: 1.02rem; }
.fact .mark { width: 40px; height: 40px; color: var(--board); }

/* chalkboard section (voice) */
.board-section { background: var(--board); color: var(--chalk); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.board-section h2 { color: var(--chalk-yellow); }
.board-section p { color: rgba(255, 247, 232, 0.85); }
.board-section .voices { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 1rem; }
.board-section .voices span { border: 1.5px solid rgba(255,247,232,0.5); color: var(--chalk); border-radius: 999px; padding: 0.3rem 0.8rem; font-weight: 700; font-size: 0.95rem; }
.board-section .voices span.default { background: var(--chalk-yellow); color: var(--board-deep); border-color: var(--chalk-yellow); }
.spoken { display: grid; gap: 0.5rem; margin-top: 1.4rem; max-width: 560px; }
.spoken .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: center; padding: 0.6rem 0; border-top: 1px dashed rgba(255,247,232,0.3); }
.spoken .row:last-child { border-bottom: 1px dashed rgba(255,247,232,0.3); }
.spoken .w { font-family: var(--mono); font-size: 1rem; color: var(--chalk); }
.spoken .s { font-family: var(--body); font-weight: 700; color: var(--chalk-yellow); }

/* pricing */
.price { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; align-items: stretch; }
@media (max-width: 820px) { .price { grid-template-columns: 1fr; } }
.card {
  position: relative; display: grid; gap: 0.8rem; align-content: start;
  padding: clamp(1.4rem, 3vw, 2.2rem); background: white; border: 2px solid var(--ink); border-radius: 22px;
  box-shadow: 6px 7px 0 var(--ink);
}
.card.yellow { background: var(--yellow); }
.card .big { font-family: var(--display); font-weight: 600; font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1; }
.card ul { margin: 0; padding-left: 1.2rem; color: var(--ink-soft); display: grid; gap: 0.35rem; }
.card .sticker {
  position: absolute; top: -14px; right: 18px; transform: rotate(3deg);
  font-family: var(--display); font-weight: 600; font-size: 0.9rem;
  background: var(--red); color: var(--cream); border: 2px solid var(--ink); border-radius: 999px; padding: 0.2rem 0.7rem;
}

/* faq */
.faq { display: grid; gap: 0.6rem; max-width: 800px; }
.faq details { border: 2px solid var(--ink); border-radius: 14px; background: white; padding: 0.2rem 1rem; }
.faq summary { cursor: pointer; font-family: var(--display); font-weight: 600; font-size: 1.1rem; padding: 0.7rem 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--red); transition: transform 0.15s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 0.9rem; color: var(--ink-soft); max-width: none; }

/* footer */
footer { padding-block: 2.5rem 3.5rem; border-top: 2px solid var(--ink); background: var(--cream-deep); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: center; }
footer nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }
footer a { text-decoration: none; font-weight: 700; color: var(--ink-soft); }
footer a:hover { color: var(--ink); }

/* halftone accent (the app's HalftoneDots), used once */
.halftone {
  position: absolute; right: 0; top: 0; width: 220px; height: 140px; pointer-events: none;
  background-image: radial-gradient(var(--ink) 1.4px, transparent 1.6px);
  background-size: 11px 11px;
  -webkit-mask-image: radial-gradient(closest-side at 100% 0%, black, transparent);
  mask-image: radial-gradient(closest-side at 100% 0%, black, transparent);
  opacity: 0.35;
}

@media (prefers-reduced-motion: reduce) {
  .btn, .chip, .tag, .caption-bar, .stage img.screen { transition: none; }
}

/* The foot's download button before the download is open: there, and plainly not a link. */
.btn[aria-disabled="true"] { opacity: 0.6; cursor: default; pointer-events: none; }

/* ---------- Legal pages (privacy.html, terms.html, refunds.html) ----------
   The same worksheet, set for reading: one column, a measure a line can be
   followed across, the short version on a slip of paper at the top. */
.legal-top { border-bottom: 2px solid var(--ink); background: var(--cream); }
.legal-top .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: 1rem; }
.legal-top a.back { font-weight: 700; color: var(--ink-soft); text-decoration: none; }
.legal-top a.back:hover { color: var(--ink); }
.legal { max-width: 46rem; margin: 0 auto; padding: 3.5rem 1.25rem 5rem; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.legal .dated { color: var(--ink-soft); margin: 0.6rem 0 2rem; }
.legal h2 { font-size: 1.55rem; margin: 2.6rem 0 0.7rem; scroll-margin-top: 1rem; }
.legal h3 { font-size: 1.15rem; margin: 1.6rem 0 0.4rem; line-height: 1.25; }
.legal p, .legal li { max-width: 68ch; }
.legal p { margin: 0 0 0.9rem; }
.legal ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.legal li { margin-bottom: 0.4rem; }
.legal a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.legal a:hover { color: var(--board); }
.legal .short { background: white; border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--ink); padding: 1.2rem 1.4rem 0.6rem; margin-bottom: 2.4rem; }
.legal .short h2 { margin-top: 0; font-size: 1.25rem; }
.legal .scroll { overflow-x: auto; margin: 0 0 1.2rem; }
.legal table { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: 0.95rem; background: white; }
.legal th, .legal td { border: 2px solid var(--ink); padding: 0.55rem 0.75rem; text-align: left; vertical-align: top; }
.legal th { font-family: var(--display); font-weight: 600; background: var(--cream-deep); }
.legal .blank { background: var(--yellow); border-radius: 4px; padding: 0 0.25em; font-weight: 700; }
footer .legal-links { flex-basis: 100%; font-size: 0.95rem; }
/* On a phone a three-column table needs sideways scrolling to read. Each row becomes a
   slip instead: who or what in the heading face, the rest beneath it. */
@media (max-width: 640px) {
  .legal .scroll { overflow-x: visible; }
  .legal table { min-width: 0; background: none; font-size: 1rem; }
  .legal thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .legal table, .legal tbody, .legal tr, .legal td { display: block; }
  .legal tr { background: white; border: 2px solid var(--ink); border-radius: 12px; padding: 0.55rem 0.8rem; margin-bottom: 0.6rem; }
  .legal td { border: 0; padding: 0.1rem 0; }
  .legal td:first-child { font-family: var(--display); font-weight: 600; }
  .legal td + td { color: var(--ink-soft); }
}
