/* Gaspard pre-launch site. Self-hosted fonts only; no third-party requests. */

@font-face {
  font-family: "Fraunces Variable";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/fraunces-latin-opsz-normal.woff2") format("woff2");
}

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

:root {
  --cream: #fcf5df;
  --ink: #000000;
  --navy: #255b7f;
  --navy-deep: #1b4561;
  --gold: #efbd44;
  --muted: rgba(0, 0, 0, 0.66);
  --hairline: rgba(0, 0, 0, 0.16);
  --error: #8f2a1c;
  --paper: #fffdf5;
  --pedal: #b3261e; /* stage only: the pedal line of the future animation */

  --font-display: "Fraunces Variable", ui-serif, Georgia, "Times New Roman", serif;
  --font-body: "Inter Variable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: 16px;
  --measure: 40rem;
  --page: 72rem;

  /* The highlighted bar inside the score viewBox (4.2 0 739.99 312.89): x 412.34 to 726.19,
     top 44.5. Fractions of the viewBox, so overlays follow the score at any width. */
  --bar-left: 55.16%;
  --bar-right: 97.57%;
  --bar-top: 14.22%;
}

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

a {
  color: var(--navy);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(37, 91, 127, 0.4);
  text-underline-offset: 0.22em;
  transition: text-decoration-color 160ms ease;
}

a:hover {
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}

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

.page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

main {
  flex: 1 0 auto;
}

.masthead {
  display: flex;
  align-items: center;
  padding: 28px 0 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  border-radius: 8px;
}

.brand:hover {
  text-decoration: none;
}

.mark {
  width: 40px;
  height: auto;
  flex: none;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
}

/* ---------- Landing ---------- */

.lp {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 96px);
}

.lp-copy {
  width: 100%;
  max-width: var(--measure);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lp-title,
.notice-title,
.prose-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 450;
  font-variation-settings: "opsz" 144;
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-wrap: balance;
}

.lp-title {
  font-size: clamp(40px, 7vw, 76px);
}

.lp-sub {
  margin: 20px 0 32px;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.5;
  color: var(--muted);
  text-wrap: balance;
}

.note {
  margin: 0;
  color: var(--muted);
}

/* ---------- Join form ---------- */

.join {
  width: 100%;
  max-width: 30rem;
  margin: 0;
}

.field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 5px 5px 22px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
}

.field:focus-within {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}

.field input {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 10px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  -webkit-appearance: none;
  appearance: none;
}

.field input::placeholder {
  color: rgba(0, 0, 0, 0.45);
}

.field input:focus {
  outline: none;
}

.field input[aria-invalid="true"] {
  color: var(--error);
}

.button {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin: 0;
  padding: 0 22px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 550;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--ink);
  transition:
    background-color 160ms ease,
    color 160ms ease,
    box-shadow 120ms ease,
    transform 120ms ease;
}

.button:hover {
  background: var(--navy-deep);
}

.button:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--ink);
}

.button:disabled {
  cursor: progress;
  opacity: 0.6;
}

.field .button {
  border-color: var(--navy);
  box-shadow: none;
}

.field .button:active {
  transform: none;
}

.button-quiet {
  background: var(--paper);
  color: var(--navy);
}

.button-quiet:hover {
  background: var(--cream);
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.55;
  text-align: left;
  color: var(--muted);
  cursor: pointer;
}


.consent input {
  flex: none;
  display: grid;
  place-content: center;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  background: var(--paper);
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.consent input::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 1px;
  background: var(--navy);
  transform: scale(0);
  transition: transform 120ms ease;
}

.consent input:checked {
  border-color: var(--navy);
}

.consent input:checked::after {
  transform: scale(1);
}

.fineprint {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.error {
  margin: 14px 0 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--error);
}

/* ---------- States ---------- */

.state:focus {
  outline: none;
}

.state-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 450;
  font-variation-settings: "opsz" 72;
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.tester {
  margin-top: 28px;
}

.state-note {
  margin: 28px 0 0;
  font-size: 17px;
  color: var(--navy);
}

/* ---------- Score stage ---------- */

.stage {
  position: relative;
  width: 100%;
  max-width: 60rem;
  margin: clamp(48px, 7vw, 80px) 0 0;
  padding: clamp(48px, 5vw, 60px) clamp(16px, 4vw, 40px) 20px;
  border: 1.5px solid var(--ink);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 6px 0 var(--ink);
}

.stage-score {
  position: relative;
}

.score {
  display: block;
  width: 100%;
  height: auto;
}

/* The question, anchored over the highlighted bar; its tail touches the top of the highlight. */
.bubble {
  position: absolute;
  left: calc((var(--bar-left) + var(--bar-right)) / 2);
  bottom: calc(100% - var(--bar-top) + 10px);
  z-index: 1;
  margin: 0;
  padding: 10px 16px;
  border-radius: 16px;
  background: var(--navy);
  color: #fff;
  font-size: clamp(13px, 1.6vw, 16px);
  font-weight: 550;
  line-height: 1.3;
  white-space: nowrap;
  transform: translateX(-50%);
}

.bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border-radius: 2px;
  background: var(--navy);
  transform: rotate(45deg);
}


/* ---------- Short pages (confirm, unsubscribe, 404) ---------- */

.notice {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(64px, 12vw, 144px) 0 clamp(72px, 12vw, 160px);
  text-align: center;
}

.notice-title {
  font-size: clamp(36px, 5.5vw, 56px);
  line-height: 1.06;
}

.notice-line {
  margin: 18px 0 0;
  font-size: clamp(17px, 2vw, 19px);
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
}

.notice .tester,
.notice-action {
  margin-top: 32px;
}

/* ---------- Prose (privacy) ---------- */

.prose-page {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(56px, 10vw, 120px) 0 clamp(64px, 10vw, 120px);
}

.prose-title {
  font-size: clamp(36px, 5.5vw, 56px);
  line-height: 1.06;
}

.lede {
  font-size: 19px;
  line-height: 1.6;
  text-wrap: pretty;
}

.prose h2 {
  margin: 44px 0 10px;
  font-family: var(--font-display);
  font-weight: 450;
  font-variation-settings: "opsz" 48;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.prose p,
.prose ul {
  margin: 0 0 16px;
}

.prose .lede {
  margin: 28px 0 8px;
}

.prose ul {
  padding-left: 0;
  list-style: none;
}

.prose li {
  position: relative;
  margin-bottom: 8px;
  padding-left: 24px;
}

.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 12px;
  height: 2px;
  background: var(--gold);
}

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

.colophon {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 24px 0 32px;
  border-top: 1px solid var(--hairline);
  font-size: 14px;
  color: var(--muted);
}

.colophon-mark {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.colophon nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.colophon a {
  color: var(--muted);
}

.colophon a:hover {
  color: var(--navy);
}

/* ---------- Utilities ---------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Phones ---------- */

@media (max-width: 560px) {
  .masthead {
    padding-top: 20px;
  }

  .mark {
    width: 34px;
  }

  .wordmark {
    font-size: 22px;
  }

  /* Two pills: the address, then the button. The focus ring moves to the address. */
  .field {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .field:focus-within {
    outline: none;
  }

  .field input {
    padding: 13px 20px;
    border: 1.5px solid var(--ink);
    border-radius: 999px;
    background: var(--paper);
  }

  .field input:focus {
    outline: 2px solid var(--navy);
    outline-offset: 3px;
  }

  .field .button {
    width: 100%;
    min-height: 50px;
    border-color: var(--ink);
    box-shadow: 0 3px 0 var(--ink);
  }

  .field .button:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 var(--ink);
  }

  .button {
    white-space: normal;
  }

  /* Only the highlighted bar: the score is widened and shifted so x 409 to 730.5 of the
     viewBox (its two barlines) fills the card, and the bubble sits in the empty space above. */
  .stage {
    padding: 20px 18px 16px;
    border-radius: 20px;
  }

  .stage-score {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .score {
    --crop-start: 0.547; /* (409 - 4.2) / 739.99 */
    --crop-width: 0.4345; /* (730.5 - 409) / 739.99 */
    width: calc(100% / var(--crop-width));
    max-width: none;
    margin-left: calc(-100% * var(--crop-start) / var(--crop-width));
  }

  .bubble {
    position: relative;
    left: auto;
    bottom: auto;
    order: -1;
    align-self: center;
    /* Overlap the score down to the top of the highlight: 14.22% of the score's height,
       which is 0.9731 of the card's inner width once widened. */
    margin: 0 0 calc(-13.84% + 10px);
    font-size: 14px;
    transform: none;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .button:active {
    transform: none;
  }
}

/* "Send it again" on the joined screen */
.resend { margin: 6px 0 0; }
.link-button { padding: 0; border: 0; background: none; font: inherit; font-size: 14px; color: var(--navy); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-button:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.link-button:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
