/*
 * Waitlist page in the "Blister" direction of the AI-Pilled Company setup page
 * (ai-pilled-company/design/README.md, "The setup page"). The page is the foil card,
 * the character speaks in a bone balloon, the one action is the capsule button.
 * Fonts: SIL Open Font License 1.1, licence texts in /fonts/.
 */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-display: swap; font-weight: 200 800; font-stretch: 75% 100%; src: url("/fonts/bricolage-grotesque-latin-wdth-wght.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-display: swap; font-weight: 400; src: url("/fonts/atkinson-hyperlegible-latin-400.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-display: swap; font-weight: 700; src: url("/fonts/atkinson-hyperlegible-latin-700.woff2") format("woff2"); }

:root {
  --surface: #C3C8CC; --paper: #F4F3EE;
  --ink: #15191D; --ink-2: #3C4349; --hairline: #5F676E;
  --accent: #E0892B; --accent-shade: #A8470A;
  --bone: #FBFAF6; --bone-shade: #DDD9CC;
  --r-cavity: 32px; --r-card: 40px;
  --s-2: 8px; --s-3: 16px; --s-4: 24px; --s-5: 32px; --s-6: 48px; --s-7: 64px;
  --font-display: "Bricolage Grotesque", Arial, sans-serif;
  --font-text: "Atkinson Hyperlegible", Arial, sans-serif;
  --t-s: 14px; --t-0: 18px; --t-1: 22px; --t-2: 28px; --t-display: 64px;
  --ease: cubic-bezier(.2,.8,.2,1);
  --char: 256px;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--t-0)/1.55 var(--font-text); font-synthesis: none; }
a { color: var(--ink); text-underline-offset: 4px; text-decoration-thickness: 2px; }
a:hover { text-decoration-thickness: 3px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.page { padding: var(--s-5) var(--s-5) var(--s-6); }
.card { max-width: 1120px; margin: 0 auto; background: var(--surface); border: 3px solid var(--ink); border-radius: var(--r-card); padding: var(--s-4) var(--s-6) var(--s-5); display: flex; flex-direction: column; min-height: calc(100vh - 80px); min-height: calc(100dvh - 80px); }

/* header: brand left, language pill right, a perforation line below */
.top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding-bottom: var(--s-3); border-bottom: 2px dashed var(--hairline); }
.brand { display: flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; }
.brand img { width: 36px; height: auto; }
.brand-name { font: 800 var(--t-1)/1 var(--font-display); font-stretch: 75%; letter-spacing: -0.02em; }
.lang { display: inline-flex; }
.lang > * { display: inline-grid; place-items: center; min-height: 44px; min-width: 56px; padding: 0 16px; border: 3px solid var(--ink); background: var(--bone); color: var(--ink); font: 400 16px/1 var(--font-text); text-decoration: none; }
.lang > :first-child { border-radius: 999px 0 0 999px; border-right-width: 0; }
.lang > :last-child { border-radius: 0 999px 999px 0; }
.lang [aria-current] { background: var(--ink); color: var(--bone); font-weight: 700; }
.lang a:hover { background: var(--bone-shade); }

/* the character speaks the headline; the form sits under the balloon */
.hero { display: grid; grid-template-columns: var(--char) minmax(0, 1fr); gap: var(--s-4) var(--s-5); align-items: start; align-content: center; flex: 1; padding: var(--s-7) 0 var(--s-6); }
.char { grid-row: 1 / span 2; width: var(--char); height: auto; margin-top: -24px; }
.balloon { position: relative; background: var(--bone); border: 3px solid var(--ink); border-radius: var(--r-cavity); padding: var(--s-5) var(--s-5) var(--s-5); box-shadow: inset 0 -6px 0 var(--bone-shade); }
.tail { position: absolute; overflow: visible; }
.tail-l { left: -38px; top: 96px; }
.tail-u { display: none; left: 40px; top: -38px; }
h1 { margin: 0; font: 800 var(--t-display)/0.98 var(--font-display); font-stretch: 75%; letter-spacing: -0.03em; text-wrap: balance; max-width: 16ch; }
.why { text-wrap: pretty; margin: var(--s-3) 0 0; font-size: var(--t-1); line-height: 1.4; color: var(--ink-2); max-width: 34em; }

.signup { display: grid; gap: 12px; max-width: 600px; padding-top: var(--s-2); }
.lbl { font-weight: 700; }
.input { width: 100%; height: 56px; padding: 0 24px; border: 3px solid var(--ink); border-radius: 999px; background: var(--paper); color: var(--ink); font: 400 var(--t-0)/1 var(--font-text); }
.input[aria-invalid] { border-style: dashed; }
/* the checkbox is drawn as a small capsule: empty, or amber half, seam, bone half */
.consent { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; margin: var(--s-2) 0; font-size: 16px; line-height: 1.5; }
.consent input { appearance: none; -webkit-appearance: none; margin: 2px 0 0; width: 44px; height: 26px; border: 3px solid var(--ink); border-radius: 999px; background: var(--bone); cursor: pointer; }
.consent input:checked { background: linear-gradient(90deg, var(--accent) 0 50%, var(--ink) 50% calc(50% + 3px), var(--bone) calc(50% + 3px)); }
.consent label { cursor: pointer; color: var(--ink-2); }
.consent a { color: var(--ink); font-weight: 700; }
.error { padding: 14px 24px; border: 3px dashed var(--ink); border-radius: 24px; background: var(--bone); font-weight: 700; }
.error p { margin: 0; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* the capsule: amber half with the verb, an ink seam, a bone half with a chevron */
.capsule { justify-self: start; display: inline-grid; grid-template-columns: 1fr 56px; min-width: 280px; height: 60px; padding: 0; margin-top: var(--s-2); border: 3px solid var(--ink); border-radius: 999px; overflow: hidden; background: var(--bone); color: var(--ink); cursor: pointer; font: 800 22px/1 var(--font-display); font-stretch: 75%; letter-spacing: -0.01em; transition: transform 120ms var(--ease), box-shadow 120ms var(--ease); }
.capsule .verb { display: flex; align-items: center; padding: 0 28px 0 32px; background: var(--accent); white-space: nowrap; }
.capsule .end { display: grid; place-items: center; border-left: 3px solid var(--ink); background: var(--bone); }
.capsule svg { transition: transform 160ms var(--ease); }
.capsule:hover { transform: translateY(-2px); box-shadow: 0 4px 0 var(--ink); }
.capsule:hover svg { transform: translateX(3px); }
.capsule:active { transform: none; box-shadow: none; }
.capsule:active .verb, .capsule:active .end { background: var(--accent-shade); color: var(--bone); }

.foot { display: flex; flex-wrap: wrap; gap: 0 var(--s-4); padding-top: var(--s-2); border-top: 2px dashed var(--hairline); font-size: 16px; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

@media (max-width: 860px) {
  :root { --char: 180px; }
  .page { padding: var(--s-3) var(--s-3) var(--s-5); }
  .card { padding: var(--s-3) var(--s-4) var(--s-4); }
  .hero { padding: var(--s-6) 0 var(--s-5); }
  h1 { font-size: 52px; }
  .tail-l { top: 64px; }
  .card { min-height: calc(100dvh - 48px); }
}
@media (max-width: 640px) {
  :root { --char: 150px; }
  .page { padding: 0; }
  .card { border-radius: 0; border-width: 0; min-height: 100dvh; padding: var(--s-3) var(--s-3) var(--s-4); }
  .hero { grid-template-columns: 1fr; gap: 40px var(--s-4); padding: var(--s-4) 0 var(--s-5); }
  .char { grid-row: auto; margin: 0 0 -8px 8px; }
  .balloon { padding: var(--s-4) 20px; }
  .tail-l { display: none; }
  .tail-u { display: block; }
  h1 { font-size: 44px; }
  .why { font-size: var(--t-0); }
  .signup { gap: 12px; }
  .capsule { width: 100%; min-width: 0; justify-self: stretch; }
  .brand-name { font-size: 20px; }
}
