/* The apex page before launch. An editorial layout: a 12-column shell with
   hairline rules, a large headline beside the sign-up panel, the serif
   wordmark and the orange accent. Everything works without script. Values
   are copied from apps/web/src/app.css. */

@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
}

:root {
  --ink: #1c1917;
  --muted: #57534e;
  --paper: #f6f4ef;
  --surface: #ffffff;
  --line: #d9d4cb;
  --line-strong: #a8a29e;
  --strip: #1c1710;
  --accent: #d9530f;
  --accent-dark: #b6440a;
  --accent-darker: #9b3a08;
  --font-sans:
    'Inter Variable', 'Segoe UI', ui-sans-serif, system-ui, -apple-system, Roboto, sans-serif;
  --font-serif: Georgia, 'Times New Roman', ui-serif, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

:where(a, button, input, textarea):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Main fills the space between header and band, content centred in it,
   so the page fits one screen without scrolling where the screen allows. */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.shell {
  width: 100%;
  max-width: 76rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (width >= 40rem) {
  .shell {
    padding: 0 2rem;
  }
}

.wordmark {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

/* Header: the wordmark and the opening season, over a hairline. */
.bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}

.bar .wordmark {
  font-size: 1.75rem;
  line-height: 1;
}

/* Hero: the headline and a few lines on the left, the sign-up on the right. */
.hero {
  display: grid;
  gap: 2.5rem 1.5rem;
  padding-block: 2.5rem;
}

@media (width >= 64rem) {
  .hero {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: end;
    padding-block: 3rem;
  }

  .hero > :first-child {
    grid-column: 1 / span 7;
    padding-right: 3rem;
  }

  .hero > .panel {
    grid-column: 8 / span 5;
  }
}

/* The opening month over the headline, with the storefront's
   current-page underline. */
.eyebrow {
  display: inline-block;
  margin-bottom: 1.75rem;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid var(--accent);
  font-size: 0.9375rem;
  color: var(--muted);
}

h1 {
  font-size: clamp(3rem, 8.5vw, 6.25rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.hello {
  margin-top: 1.25rem;
  color: var(--muted);
}

.hello a {
  color: var(--accent-dark);
}

.hello a:hover {
  color: var(--accent-darker);
}

.dot {
  color: var(--accent);
}

/* The hero settles in once on load: headline, text, then the panel. */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.75rem);
  }
}

.hero .eyebrow,
.hero h1,
.hero .lead,
.hero .hello,
.hero .panel {
  animation: rise 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero .lead {
  animation-delay: 120ms;
}

.hero .hello {
  animation-delay: 180ms;
}

.hero .panel {
  animation-delay: 240ms;
}

.lead {
  margin-top: 2rem;
  max-width: 32rem;
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--muted);
}

svg {
  width: 1rem;
  height: 1rem;
  flex: none;
}

/* The sign-up panel on paper, like a card left on the counter. */
.panel {
  background: var(--paper);
  border-radius: 4px;
  padding: 1.5rem;
  scroll-margin-top: 1.5rem;
}

@media (width >= 40rem) {
  .panel {
    padding: 2.25rem;
  }
}

.panel h2 {
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.panel form {
  display: grid;
  gap: 0.5rem;
}

fieldset {
  margin: 0 0 1.25rem;
  padding: 0;
  border: 0;
}

legend,
.panel label[for] {
  padding: 0;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted);
}

/* The choices read as options, not buttons: stacked rows, each with a
   radio mark that fills with the accent when chosen. */
.choices {
  display: grid;
  gap: 0.5rem;
}

.choices label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3rem;
  padding: 0 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  cursor: pointer;
  transition:
    border-color 120ms,
    box-shadow 120ms;
}

.choices label:hover {
  border-color: var(--ink);
}

.choices input {
  appearance: none;
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  transition:
    border-color 120ms,
    box-shadow 120ms;
}

.choices input:checked {
  border-color: var(--accent-dark);
  box-shadow: inset 0 0 0 3.5px var(--surface);
  background: var(--accent-dark);
}

.choices label:has(input:checked) {
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}

.choices input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

input[type='email'],
textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  transition: border-color 120ms;
}

input[type='email']:hover,
textarea:hover {
  border-color: var(--ink);
}

input[type='email']:focus,
textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}

textarea {
  resize: vertical;
}

.panel button[type='submit'],
.question button {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3rem;
  margin-top: 0.75rem;
  padding: 0 1.5rem;
  border: 0;
  border-radius: 4px;
  background: var(--accent-dark);
  color: var(--surface);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 120ms;
}

.panel button[type='submit']:hover,
.question button:hover {
  background: var(--accent-darker);
}

.hint {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--muted);
}

/* A plain band of the storefront's dark strip closes the page. */
.band {
  flex: none;
  height: 3rem;
  background: var(--strip);
}

/* Rendered pages: thank-you, answer and errors. One narrow column. */
.message {
  max-width: 38rem;
  padding: 3rem 0 5rem;
}

.message h1 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
}

.message h1 span {
  display: block;
  color: var(--muted);
}

.message > p {
  margin-top: 1.5rem;
  font-size: 1.125rem;
  color: var(--muted);
}

.question {
  display: grid;
  gap: 0.5rem;
  margin-top: 2.5rem;
}

.question label {
  font-size: 1.125rem;
  line-height: 1.45;
  margin-bottom: 0.5rem;
}

.question .hint {
  margin-top: 0.25rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.trap {
  position: absolute;
  left: -100vw;
  width: 1px;
  height: 1px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
    animation: none !important;
  }
}

/* Short laptop screens: tighten the hero so the band still shows. */
@media (width >= 64rem) and (height < 50rem) {
  .hero {
    padding-block: 1.5rem;
  }

  .panel h2 {
    margin-bottom: 1rem;
  }

  fieldset {
    margin-bottom: 0.75rem;
  }
}
