/* Busy Beaver landing page. Colours, type and shapes are the app's (design/source): green, yellow, ink,
   Archivo wide and heavy, 2.5px ink outlines, hard offset shadows. Don't restyle one without the other. */

@font-face {
  font-family: Archivo;
  src: url(/fonts/archivo-latin.woff2) format("woff2");
  font-weight: 400 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --green: #12B05A;
  --green-deep: #087A3E;
  --yellow: #FFDD33;
  --ink: #111410;
  --muted: #4A5146;
  --soft: #F1F5EA;
  --line: #E3E8DC;
  --white: #FFFFFF;
  --edge: 2.5px solid var(--ink);
  --pad: clamp(20px, 5vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 17px/1.45 Archivo, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--green-deep); text-underline-offset: 3px; }
a:hover { color: #05592D; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--pad); }
.wrap.narrow { max-width: 760px; }
.wrap.center { text-align: center; }

.display {
  font-weight: 900;
  font-stretch: 125%;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 0.95;
  font-size: clamp(30px, 6.4vw, 52px);
  text-wrap: balance;
}
.eyebrow {
  display: block;
  font-weight: 800;
  font-stretch: 112%;
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- hero ---------- */
.hero {
  background: var(--green);
  border-bottom: var(--edge);
  padding: max(16px, env(safe-area-inset-top)) 0 clamp(36px, 7vw, 72px);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-weight: 900; font-stretch: 125%; font-size: clamp(15px, 4.2vw, 18px); text-transform: uppercase; letter-spacing: -0.01em;
  white-space: nowrap;
}
.bar-link { flex: none; color: var(--ink); font-weight: 700; font-size: 15px; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
.bar-link:hover { color: var(--ink); text-decoration-thickness: 2.5px; }

.hero-grid { display: grid; gap: clamp(24px, 5vw, 56px); margin-top: clamp(20px, 5vw, 56px); align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr); } }

.chip {
  display: inline-block;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 5px 10px;
  font-weight: 800; font-stretch: 112%; font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase;
  transform: rotate(-2deg);
  box-shadow: 2px 2px 0 var(--ink);
}
h1 {
  margin-top: 18px;
  font-weight: 900; font-stretch: 125%; text-transform: uppercase;
  letter-spacing: -0.025em; line-height: 0.92;
  font-size: clamp(38px, 10.4vw, 76px);
  text-wrap: balance;
}
.lede { margin-top: 18px; font-size: clamp(18px, 2.2vw, 22px); line-height: 1.35; font-weight: 500; max-width: 30em; }

/* ---------- the sign-up card ---------- */
.card {
  background: var(--white);
  border: var(--edge);
  border-radius: 24px;
  box-shadow: 6px 6px 0 var(--ink);
  padding: clamp(18px, 4vw, 26px);
}
.join { scroll-margin-top: 16px; }

.sides { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 2px solid var(--ink); border-radius: 14px; overflow: hidden; margin-bottom: 18px; background: var(--soft); }
.sides button {
  min-height: 46px; padding: 8px 6px; border: 0; background: transparent; cursor: pointer;
  font-weight: 700; font-size: 15px; color: var(--muted);
}
.sides button + button { border-left: 2px solid var(--ink); }
.sides button[aria-checked="true"] { background: var(--yellow); color: var(--ink); }

#email, .where, .words {
  display: block; width: 100%;
  margin-top: 8px;
  min-height: 54px; padding: 12px 14px;
  background: var(--soft);
  border: 2px solid var(--ink); border-radius: 14px;
  font-size: 17px; font-weight: 500;
  appearance: none; -webkit-appearance: none;
}
#email::placeholder, .words::placeholder { color: #747B70; }
#email:focus, .where:focus, .words:focus { outline: 3px solid var(--green); outline-offset: 2px; background: var(--white); }
.where { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10'%3E%3Cpath d='m1.5 1.5 6.5 6.5 6.5-6.5' fill='none' stroke='%23111410' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 44px; }
.words { min-height: 108px; resize: vertical; line-height: 1.4; }
.off { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.go {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 58px; margin-top: 14px; padding: 12px 20px;
  background: var(--green); color: var(--ink);
  border: var(--edge); border-radius: 22px;
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 900; font-stretch: 125%; font-size: 17px; text-transform: uppercase; letter-spacing: 0.01em;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.go:hover { color: var(--ink); transform: translate(1px, 1px); box-shadow: 3px 3px 0 var(--ink); }
.go:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.go[disabled] { opacity: 0.6; cursor: progress; }
.go.small { width: auto; min-height: 50px; margin-top: 0; padding: 10px 26px; font-size: 15px; border-radius: 18px; }
.go.dark { background: var(--ink); color: var(--white); box-shadow: 4px 4px 0 var(--white); max-width: 320px; }
.go.dark:hover { color: var(--white); box-shadow: 3px 3px 0 var(--white); }
.go.light { background: var(--yellow); display: inline-flex; width: auto; min-width: 240px; margin-top: 22px; }

.fine { margin-top: 12px; font-size: 13.5px; line-height: 1.4; color: var(--muted); }
.fine a { color: var(--muted); }
.form-msg { margin-top: 10px; font-size: 14.5px; font-weight: 700; color: #B3261E; }
.form-msg:empty { display: none; }

.in { display: flex; align-items: center; gap: 8px; font-weight: 800; font-stretch: 112%; font-size: 20px; }
.ask-lead, .done-body { margin-top: 6px; color: var(--muted); font-size: 15.5px; }
.progress { height: 8px; margin: 16px 0 14px; background: var(--soft); border: 1.5px solid var(--ink); border-radius: 6px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--green); transition: width 0.25s ease; }
.q { margin-top: 6px; font-weight: 800; font-stretch: 108%; font-size: 21px; line-height: 1.2; text-wrap: balance; outline: 0; }
.q-note { margin-top: 4px; font-size: 14px; color: var(--muted); }
.q-note:empty { display: none; }
#opts { display: grid; gap: 8px; margin-top: 14px; }
.opt {
  display: flex; align-items: center; gap: 10px; width: 100%;
  min-height: 50px; padding: 10px 14px;
  background: var(--soft); border: 2px solid var(--ink); border-radius: 14px;
  font-weight: 600; font-size: 16px; text-align: left; cursor: pointer;
}
.opt::before { content: ""; flex: none; width: 20px; height: 20px; border: 2px solid var(--ink); border-radius: 50%; background: var(--white); }
.opt.any::before { border-radius: 6px; }
.opt[aria-pressed="true"], .opt[aria-checked="true"] { background: var(--yellow); }
.opt[aria-pressed="true"]::before, .opt[aria-checked="true"]::before {
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m4.5 10.4 3.4 3.4 7.2-7.6' fill='none' stroke='%23111410' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.ask-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.skip, .link { background: none; border: 0; padding: 0; min-height: 44px; cursor: pointer; font-weight: 700; font-size: 15px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.link { font-weight: 500; font-size: 13.5px; min-height: 32px; }
#share-box { margin-top: 20px; padding-top: 18px; border-top: 1.5px solid var(--line); }
#share-box .go { margin-top: 10px; }
.other {
  display: block; width: 100%; margin-top: 14px; min-height: 50px; padding: 10px 14px;
  background: var(--white); border: 2px solid var(--ink); border-radius: 14px;
  font-weight: 700; font-size: 15.5px; cursor: pointer; text-align: center;
}
.other:hover { background: var(--soft); }

/* ---------- sections ---------- */
.band { padding: clamp(48px, 9vw, 96px) 0; }
.band.soft { background: var(--soft); border-top: var(--edge); border-bottom: var(--edge); }
.band.sun { background: var(--yellow); border-bottom: var(--edge); }
.band.green { background: var(--green); border-top: var(--edge); }
.two { display: grid; gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (min-width: 860px) { .two { grid-template-columns: 1fr 1fr; } }

.steps { display: grid; gap: 14px; margin-top: 26px; }
.steps li { display: flex; align-items: center; gap: 14px; font-weight: 700; font-size: clamp(18px, 2.4vw, 21px); line-height: 1.25; }
.num {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px;
  background: var(--yellow); border: 2px solid var(--ink); border-radius: 50%;
  font-weight: 900; font-stretch: 125%; font-size: 17px;
}

.ping { justify-self: center; width: 100%; max-width: 420px; }
.ping-card {
  background: var(--white); border: var(--edge); border-radius: 22px; box-shadow: 5px 5px 0 var(--ink);
  padding: 16px; transform: rotate(1.5deg);
}
.ping-top { display: flex; align-items: center; gap: 8px; font-weight: 800; font-stretch: 112%; font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.ping-title { margin-top: 10px; font-weight: 800; font-size: 19px; }
.ping-body { margin-top: 2px; font-size: 16px; color: var(--muted); }
.ping-actions { display: grid; gap: 8px; margin-top: 14px; }
.ping-actions span { display: block; padding: 11px 12px; border: 2px solid var(--ink); border-radius: 14px; text-align: center; font-weight: 700; font-size: 15.5px; }
.ping-actions .yes { background: var(--green); }
.ping-actions .no { background: var(--soft); color: var(--muted); }
.ping figcaption { margin-top: 18px; text-align: center; font-size: 14.5px; color: var(--muted); }

.facts { display: grid; gap: 14px; margin-top: 26px; }
.sun .facts { margin-top: 0; }
.facts li { position: relative; padding-left: 38px; font-size: clamp(17px, 2.1vw, 19px); line-height: 1.4; color: var(--muted); }
.sun .facts li { color: var(--ink); }
.facts li b { color: var(--ink); font-weight: 800; }
.facts li::before {
  content: ""; position: absolute; left: 0; top: 1px; width: 24px; height: 24px;
  border: 2px solid var(--ink); border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m4.5 10.4 3.4 3.4 7.2-7.6' fill='none' stroke='%23111410' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
@media (min-width: 860px) { .soft .facts { grid-template-columns: 1fr 1fr; gap: 18px 48px; } }
.sun .eyebrow { color: var(--ink); margin-bottom: 10px; }
.sun .go { margin-top: 24px; }

details { border: var(--edge); border-radius: 16px; background: var(--white); margin-top: 12px; }
details:first-of-type { margin-top: 26px; }
summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 56px; padding: 12px 18px; cursor: pointer; list-style: none;
  font-weight: 800; font-stretch: 108%; font-size: 17.5px;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; flex: none; font-weight: 900; font-size: 24px; line-height: 1; }
details[open] summary::after { content: "–"; }
details[open] { box-shadow: 4px 4px 0 var(--ink); }
details p { padding: 0 18px 18px; color: var(--muted); }

.last { padding-bottom: clamp(56px, 10vw, 104px); }
.foot { background: var(--ink); color: #C9D0C3; padding: 28px 0 max(28px, env(safe-area-inset-bottom)); font-size: 14px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.foot a { color: var(--white); }

/* ---------- plain pages (privacy, not found) ---------- */
.plain { max-width: 720px; margin: 0 auto; padding: 28px var(--pad) 72px; }
.plain .brand { margin-bottom: 36px; }
.plain h1 { font-size: clamp(32px, 7vw, 48px); margin-top: 0; }
.plain h2 { font-weight: 800; font-stretch: 108%; font-size: 20px; margin-top: 30px; }
.plain p, .plain li { margin-top: 10px; color: var(--muted); }
.plain ul { list-style: disc; padding-left: 22px; }
.plain .draft { background: var(--yellow); border: 2px solid var(--ink); border-radius: 12px; padding: 10px 14px; color: var(--ink); font-weight: 600; font-size: 15px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .go, .progress span { transition: none; }
}
