/* Lap Year: the one stylesheet for the site.
   Rules it follows (docs/10-design-rules.md): ink on paper, one accent,
   no cards, no shadows, no icons, no animation, everything left aligned.
   Spacing only from this scale: 4 8 12 16 24 32 48 64 96 128 px. */

/* ---------- Fonts, self-hosted in /fonts (latin characters only) ---------- */

@font-face {
  font-family: "Inter Tight";
  font-weight: 600;
  font-style: normal;
  font-display: swap; /* show text at once, swap the font in when it arrives */
  src: url("/fonts/inter-tight-600.woff2") format("woff2");
}

@font-face {
  font-family: "Inter Tight";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("/fonts/inter-tight-500.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("/fonts/inter-400.woff2") format("woff2");
}

/* ---------- Colours ---------- */

:root {
  --ink: #111111;    /* all text and lines */
  --paper: #ffffff;  /* background */
  --accent: #d9571f; /* the sun in the wordmark and the button, nowhere else */
}

/* ---------- Page ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%; /* stop phones from resizing text on rotate */
}

body {
  margin: 0;
  padding: 24px 20px; /* 20 px side margins on phones */
  min-height: 100svh; /* at least one screen tall, so the footer sits at the bottom */
  display: flex;
  flex-direction: column;
  font-family: "Inter", Arial, sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--paper);
}

/* ---------- Wordmark ---------- */

.wordmark {
  display: block;
  height: auto;
}

/* Each drawing has empty space to the left of the L. The negative margin
   pulls it back so the L lines up with the text below. */
.wordmark-small {
  width: 180px;
  margin-left: -9px;
}

.wordmark-full {
  display: none;
  width: 240px;
  margin-left: -11px;
}

/* ---------- Main column ---------- */

main {
  flex: 1; /* takes the free height, which pushes the footer down */
  max-width: 720px; /* reading width */
  padding: 48px 0 64px;
}

h1 {
  margin: 0 0 24px;
  font-family: "Inter Tight", Arial, sans-serif;
  font-weight: 600;
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.03em;
  text-wrap: balance; /* when a heading needs two lines, make them similar in length */
}

h1 span {
  white-space: nowrap; /* never break inside a sentence */
}

.lead {
  margin: 0 0 48px;
  max-width: 33em; /* keeps lines under 70 characters */
}

/* ---------- Waitlist form ---------- */

.field {
  max-width: 400px;
  margin-bottom: 16px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-family: "Inter Tight", Arial, sans-serif;
  font-weight: 500;
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

input {
  display: block;
  width: 100%;
  height: 48px; /* comfortable to tap */
  padding: 0 12px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: inherit;
  font-size: 17px; /* 16 px or more stops iPhones zooming in on focus */
  appearance: none;
}

#turnstile {
  max-width: 400px;
}

button {
  height: 48px;
  margin-top: 16px; /* room above the button when the spam check shows itself */
  padding: 0 24px;
  border: 0;
  border-radius: 0;
  background: var(--accent);
  color: var(--ink); /* ink on orange passes the AA contrast check; white does not */
  font-family: "Inter Tight", Arial, sans-serif;
  font-weight: 600;
  font-size: 17px;
  cursor: pointer;
}

button:hover {
  background: var(--ink);
  color: var(--paper);
}

/* A clear outline when moving through the form with the keyboard */
input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

button:disabled {
  cursor: default;
}

/* The answer after the form is sent. Plain ink text, no colour. */
.form-message {
  margin: 16px 0 0;
  max-width: 400px;
}

.note {
  margin: 16px 0 0;
  font-size: 15px;
}

/* Paragraphs on the confirmation pages */
.text {
  margin: 0 0 16px;
  max-width: 33em;
}

/* ---------- Footer ---------- */

footer {
  padding-top: 16px;
  border-top: 1px solid var(--ink); /* one hairline, like a rule on the sheet */
  font-size: 15px;
}

footer p {
  margin: 0;
}

a {
  color: inherit;
}

/* ---------- Wider screens ---------- */

/* From 480 px: the full wordmark with its ring, 240 px wide */
@media (min-width: 480px) {
  .wordmark-small {
    display: none;
  }

  .wordmark-full {
    display: block;
  }
}

/* From 720 px: sheet-like side margins and larger type */
@media (min-width: 720px) {
  body {
    padding: 48px 7vw 24px;
    font-size: 18px;
  }

  h1 {
    font-size: 64px;
  }
}
