/* cahaw.com: shared styles. Design system v1.2 (docs/design/DESIGN_SYSTEM.md):
   sand canvas, white cards, 2 px ink outlines, hard straight-down ink shadows, Fredoka + Nunito. */
:root {
  --ink: #14324B; --ink-soft: #4A6378; --sand: #FFF4EC; --sand-deep: #F9DED3;
  --roof: #FCFCF8; --roof-shade: #DDE6E8; --sea: #17B3C8; --sea-deep: #0B6E8A; --lagoon: #B9F0F2;
  --hibiscus: #FF6F6B; --flamingo: #F8A5C2; --banana: #FFD45C; --mint: #7FDDB8; --lilac: #BCA8F0;
  --sky: #8ECFF5; --peach: #FFB98A; --palm: #3FAF6E; --sky-tint: #E6F8F8; --hill: #B9E8C4; --foam: #5ED6E0;
  --display: 'Fredoka', 'Trebuchet MS', system-ui, sans-serif;
  --body: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--sand); color: var(--ink); font: 600 18px/1.55 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sea-deep); text-underline-offset: 2px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--sea-deep); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0; }
p { margin: 0; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-soft); }
.hidden { display: none !important; }

/* Top bar */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; }
.brand { display: inline-flex; align-items: center; gap: 12px; font: 500 28px/1 var(--display); color: var(--ink); text-decoration: none; }
.brand img, .brand svg { flex: none; border-radius: 14px; border: 2px solid var(--ink); }
.nav { display: flex; gap: 20px; font-weight: 800; font-size: 15px; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover { color: var(--sea-deep); }
@media (max-width: 640px) { .nav { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 22px;
  font: 600 18px/1.2 var(--display); text-decoration: none; color: #fff; background: var(--sea-deep);
  border: 2px solid var(--ink); border-radius: 16px; box-shadow: 0 4px 0 var(--ink); transition: transform .1s ease, box-shadow .1s ease; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn.light { color: var(--ink); background: var(--roof); }
.btn svg { width: 22px; height: 22px; flex: none; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.tag { display: inline-block; padding: 3px 10px; font: 600 14px/1.4 var(--display); letter-spacing: .4px;
  border: 2px solid var(--ink); border-radius: 999px; background: var(--banana); }
.tag.mint { background: var(--mint); }

/* Hero: the island scene behind the headline and the waitlist (wide), or under them (narrow) */
.hero { position: relative; background: var(--sky-tint); border-bottom: 2px solid var(--ink); overflow: hidden; }
.hero .bar { position: relative; z-index: 1; }
.hero > .wrap { width: 100%; }
.hero-in { position: relative; z-index: 1; padding-bottom: 8px; }
.hero h1 { font-size: clamp(44px, 6.4vw, 72px); font-weight: 600; line-height: 1; }
.hero .lead { font-size: 20px; line-height: 1.45; margin: 18px 0 26px; max-width: 27em; }
.scene { display: block; }
.scene img { width: 100%; }
@media (min-width: 1024px) {
  /* The scene fills the hero; the text sits centred in the sky above the water. */
  .hero { display: flex; flex-direction: column; min-height: clamp(560px, 45vw, 760px); }
  .scene { position: absolute; inset: 0; }
  .scene img { height: 100%; object-fit: cover; object-position: center bottom; }
  .hero-in { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-bottom: clamp(110px, 10vw, 170px); width: 100%; }
}
@media (max-width: 1023px) {
  .hero { display: flex; flex-direction: column; }
  .scene { order: 3; margin-top: 12px; }
}
@media (max-width: 760px) { .hero .lead { font-size: 18px; } }

/* Small bar: logo and waitlist once the hero form is out of view */
.sticky { position: fixed; top: 0; left: 0; right: 0; z-index: 10; background: var(--sky-tint); border-bottom: 2px solid var(--ink);
  transform: translateY(-110%); transition: transform .2s ease; }
.sticky.on { transform: none; }
.sticky-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 8px; padding-bottom: 8px; }
.small-brand { font-size: 22px; gap: 10px; }
.small-brand img { border-radius: 10px; }
.compact .wl { max-width: 440px; flex: 1; }
.compact .wl-row { flex-wrap: nowrap; }
.compact .wl input, .compact .wl .btn { min-height: 44px; padding-top: 8px; padding-bottom: 8px; }
.compact .wl-note { display: none; }
.compact .wl-note.bad { display: block; margin-top: 4px; }
.compact .wl-done { font-size: 16px; padding: 8px 14px; box-shadow: 0 3px 0 var(--ink); }
.compact .stores .btn { min-height: 44px; }
@media (max-width: 560px) { .small-brand { font-size: 0; gap: 0; } .compact .wl .btn { padding: 8px 14px; } }

/* Waitlist */
.wl { max-width: 520px; }
.wl-row { display: flex; gap: 10px; flex-wrap: wrap; }
.wl input { flex: 1 1 240px; min-width: 0; min-height: 52px; padding: 12px 16px; font: 600 17px/1.2 var(--body); color: var(--ink);
  background: #fff; border: 2px solid var(--ink); border-radius: 16px; box-shadow: inset 0 2px 0 var(--roof-shade); }
.wl input::placeholder { color: var(--ink-soft); }
.wl input:focus-visible { outline: 3px solid var(--sea-deep); outline-offset: 2px; }
.wl .btn { flex: 0 0 auto; cursor: pointer; }
.wl .btn:disabled { opacity: .7; cursor: default; }
.wl-note { font-size: 15px; color: var(--ink-soft); margin-top: 10px; }
.wl-note.bad { color: #B3261E; }
.wl-done { font: 600 20px/1.35 var(--display); background: var(--mint); border: 2px solid var(--ink); border-radius: 16px;
  box-shadow: 0 4px 0 var(--ink); padding: 14px 18px; max-width: 520px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Phone frame and share cards (real app renders) */
.phone { background: var(--ink); padding: 10px; border-radius: 40px; box-shadow: 0 8px 0 rgba(20,50,75,.9); }
.phone img { border-radius: 30px; background: var(--sand); }

/* Sections: every feature has the same kicker, h2, paragraph, list and fold-out */
section { padding: 80px 0; }
.kicker { font: 800 14px/1.2 var(--body); letter-spacing: .8px; text-transform: uppercase; color: var(--sea-deep); margin-bottom: 8px; }
h2 { font-size: clamp(30px, 3.4vw, 36px); }
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.feature + .feature { margin-top: 96px; }
.feature.flip .media { order: 2; }
.feature .media { display: flex; justify-content: center; }
.feature .media .phone { width: 280px; }
.feature p { margin-top: 14px; }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 34px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border: 2px solid var(--ink);
  border-radius: 6px; background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%2314324B' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.chips { list-style: none; padding: 0; margin: 20px 0 4px; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { background: var(--roof); border: 2px solid var(--ink); border-radius: 14px; box-shadow: 0 3px 0 var(--ink);
  padding: 8px 12px; font-size: 15px; line-height: 1.25; }
.chips b { display: block; font: 600 20px/1.1 var(--display); }
.more { margin-top: 22px; border-top: 2px dashed var(--roof-shade); padding-top: 14px; }
.more summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--sea-deep); }
.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: ""; width: 9px; height: 9px; border: solid currentColor; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-2px, -2px); transition: transform .15s ease; }
.more[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.more summary:focus-visible { outline: 3px solid var(--sea-deep); outline-offset: 3px; border-radius: 8px; }
.more ul { margin: 12px 0 0; padding-left: 22px; display: grid; gap: 6px; }
.more li::marker { color: var(--sea-deep); }
@media (max-width: 860px) {
  section { padding: 56px 0; }
  .feature { grid-template-columns: 1fr; gap: 28px; }
  .feature.flip .media { order: 0; }
  .feature + .feature { margin-top: 72px; }
  .feature .media .phone { width: 240px; }
}

/* Bands */
.band { background: var(--roof); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.band.sea { background: var(--lagoon); }

/* Closing call */
.cta { text-align: center; }
.cta h2 { font-size: clamp(34px, 4.4vw, 48px); }
.cta .stores { justify-content: center; margin-top: 24px; }
.cta .wl, .cta .wl-done { margin: 24px auto 0; text-align: left; }
.cta .wl-note { text-align: center; }

/* Footer */
footer { background: var(--ink); color: var(--roof); padding: 40px 0 48px; font-size: 15px; }
footer a { color: var(--lagoon); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; font-weight: 800; }
.foot .who { color: var(--roof-shade); margin-top: 12px; }
.foot .brand { color: var(--roof); }
.foot .brand img { border-color: var(--roof); }
.heart { color: var(--hibiscus); }

/* Invite and shared-workout pages (/j/<code>, /w/<code>) */
.link-page { max-width: 480px; margin: 0 auto; padding: 8px 16px 48px; }
.link-page h1 { font-size: 30px; }
.icard { background: var(--roof); border: 2px solid var(--ink); border-radius: 20px; box-shadow: 0 6px 0 var(--ink); overflow: hidden; margin-top: 14px; }
.icard .top { background: var(--sea); padding: 16px 18px; border-bottom: 2px solid var(--ink); }
.icard .top.lagoon { background: var(--lagoon); }
.icard .top h2 { font-size: 26px; margin-top: 6px; }
.icard .body { padding: 16px 18px 18px; }
.line { display: flex; gap: 10px; align-items: center; font-size: 17px; font-weight: 800; padding: 3px 0; }
.line svg { width: 20px; height: 20px; flex: none; }
.num { font: 600 52px/1 var(--display); margin-top: 10px; }
.num small { font-size: 26px; color: var(--ink-soft); font-weight: 600; margin-left: 4px; }
.strip { display: flex; gap: 3px; height: 22px; margin: 12px 0 4px; }
.strip span { border: 2px solid var(--ink); border-radius: 5px; background: linear-gradient(var(--roof) 55%, var(--c) 55%); }
.link-page .btn { width: 100%; margin-top: 20px; }
.link-page .get { margin-top: 24px; }
.link-page .wl .btn { width: auto; margin-top: 0; }
.link-page .stores { margin-top: 18px; }
.link-page .stores .btn { flex: 1; margin-top: 0; min-width: 0; }

/* Legal pages */
.doc { max-width: 760px; margin: 0 auto; padding: 16px 20px 64px; }
.doc h1 { font-size: clamp(34px, 5vw, 46px); margin: 8px 0 6px; }
.doc .updated { color: var(--ink-soft); font-size: 15px; margin-bottom: 26px; }
.doc h2 { font-size: 26px; margin: 40px 0 12px; scroll-margin-top: 16px; }
.doc h3 { font-size: 20px; margin: 26px 0 8px; }
.doc p { margin: 12px 0; }
.doc ul, .doc ol { padding-left: 22px; margin: 12px 0; }
.doc li { margin: 6px 0; }
.doc .table { overflow-x: auto; margin: 16px 0; border: 2px solid var(--ink); border-radius: 14px; background: var(--roof); }
.doc table { border-collapse: collapse; width: 100%; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1.5px solid var(--roof-shade); }
.doc th { font-family: var(--display); font-weight: 600; background: var(--sand-deep); }
.doc tr:last-child td { border-bottom: 0; }
.doc code { font-size: 15px; background: var(--roof); padding: 1px 5px; border-radius: 6px; }
.doc .intro-box { background: var(--roof); border: 2px solid var(--ink); border-radius: 16px; box-shadow: 0 4px 0 var(--ink); padding: 14px 18px; margin: 18px 0; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn, .sticky, .more summary::after { transition: none; } }
