/*
 * The coming-soon site’s one stylesheet (MP-86). Plain CSS, no build: the tokens are copied from
 * src/app/globals.css and the components from src/components, so the page looks like the app it
 * stands in for. Light by default, dark when the system asks for it; there is no switch, because
 * nothing here runs JavaScript.
 */

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

:root {
  color-scheme: light;
  --bg: #f8f6f1;
  --surface: #fffefb;
  --sunken: #eeeae2;
  --fg: #1c1b18;
  --muted: #5f5a52;
  --border: #e4dfd5;
  --control: #8a8478;
  --accent: #22409a;
  --accent-fg: #ffffff;
  --accent-soft: #e9edf7;
  --shadow: rgb(28 27 24 / 0.07);
  --inverse-bg: #22409a;
  --inverse-fg: #f8f6f1;
  --inverse-muted: #c8d0e8;
  --inverse-accent: #f8f6f1;

  --font-display: 'Fraunces', ui-serif, Georgia, serif;
  --font-sans:
    ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --radius-box: 0.75rem;
  --radius-check: 0.375rem;
  --shadow-raised: 0 1px 2px var(--shadow), 0 4px 16px var(--shadow);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0e0e0f;
    --surface: #1c1c1f;
    --sunken: #070708;
    --fg: #ececed;
    --muted: #a1a1a6;
    --border: #2a2a2e;
    --control: #6e6e74;
    --accent: #93aee8;
    --accent-fg: #0e0e0f;
    --accent-soft: #19213a;
    --shadow: rgb(0 0 0 / 0.5);
    --inverse-bg: #1c1c1f;
    --inverse-fg: #ececed;
    --inverse-muted: #a1a1a6;
    --inverse-accent: #93aee8;
  }
}

/* Reset */

*,
::before,
::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0 solid;
}

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

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

ol,
ul {
  list-style: none;
}

svg {
  display: block;
}

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

::selection {
  background-color: var(--accent-soft);
}

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

/* Type */

.display,
.title,
.hero,
.wordmark {
  font-family: var(--font-display);
  color: var(--fg);
}

.hero,
.display {
  font-size: 2.5rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 440;
}

.title {
  font-size: 1.625rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 480;
}

.small {
  font-size: 0.9375rem;
  line-height: 1.45;
}

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

.wordmark {
  font-weight: 600;
  text-decoration: none;
}

@media (min-width: 1024px) {
  .hero {
    font-size: 4.25rem;
    line-height: 1.04;
    letter-spacing: -0.025em;
    font-weight: 420;
  }

  h2.title {
    font-size: 2.5rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-weight: 440;
  }
}

/* The status where the buy button will be */

.soon {
  display: flex;
  max-width: 26rem;
  align-items: center;
  gap: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-box);
  background: var(--surface);
  padding: 1rem 1.25rem;
}

.soon-icon {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  place-items: center;
  border-radius: var(--radius-check);
  background: var(--accent-soft);
  color: var(--accent);
}

.soon-icon svg {
  width: 1.375rem;
  height: 1.375rem;
}

.soon p {
  font-family: var(--font-display);
  font-size: 1.375rem;
  line-height: 1.2;
  font-weight: 520;
}

/* Layout */

.container {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 640px) {
  .container {
    padding-inline: 2rem;
  }
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.narrow {
  max-width: 42rem;
  margin-inline: auto;
}

.section {
  padding-bottom: 4rem;
}

@media (min-width: 1024px) {
  .section {
    padding-bottom: 7rem;
  }
}

.split {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 1024px) {
  .split {
    grid-template-columns: 1.4fr 1fr;
    align-items: center;
    gap: 4rem;
  }
}

/* Header and footer */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: max(env(safe-area-inset-top), 1.25rem);
}

@media (min-width: 1024px) {
  .site-header {
    padding-top: 2rem;
  }
}

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding-top: 2rem;
  padding-bottom: max(env(safe-area-inset-bottom), 2rem);
  text-align: center;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-inline: -0.5rem;
}

.site-footer a:not(.wordmark) {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  padding-inline: 0.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
  text-underline-offset: 3px;
  text-decoration: none;
  transition: color 160ms;
}

.site-footer a:not(.wordmark):hover {
  color: var(--fg);
  text-decoration: underline;
}

@media (min-width: 1024px) {
  .site-footer {
    flex-direction: row;
    justify-content: space-between;
    gap: 2rem;
    text-align: left;
  }

  .site-footer nav {
    display: flex;
    align-items: center;
    gap: 2rem;
  }
}

/* Components */

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-box);
  background: var(--surface);
  box-shadow: var(--shadow-raised);
  padding: 1.25rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  padding: 0.125rem 0.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.tag svg {
  width: 0.875rem;
  height: 0.875rem;
}

.normal {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-left: 2px solid var(--accent);
  padding: 0.25rem 0 0.25rem 1.25rem;
}

.normal a,
.sources a {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* The private answers, drawn small */

.answers {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.answers-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.answer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  border-radius: var(--radius-box);
  background: var(--sunken);
  padding: 0.875rem;
}

.answer .tag {
  margin-top: auto;
}

.hidden-lines {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-block: 0.375rem;
}

.hidden-lines span {
  height: 0.625rem;
  border-radius: 999px;
  background: var(--border);
}

.middle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius-box);
  background: var(--accent-soft);
  padding: 1.25rem 1rem;
  text-align: center;
}

.week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.375rem;
}

.week li {
  display: flex;
  min-height: 4.5rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.125rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-box);
  background: var(--surface);
}

.week li span:first-child {
  color: var(--muted);
  font-size: 0.9375rem;
}

.week li span:last-child {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.week li.picked {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-fg);
}

.week li.picked span:first-child {
  color: var(--accent-fg);
}

/* The ninety days */

.band {
  border-block: 1px solid var(--border);
  background: var(--sunken);
  padding-block: 4rem;
  margin-bottom: 4rem;
}

@media (min-width: 1024px) {
  .band {
    padding-block: 6rem;
    margin-bottom: 7rem;
  }
}

.phases {
  display: flex;
  flex-direction: column;
}

.phases li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0 0 2rem 2rem;
}

.phases li:last-child {
  padding-bottom: 0;
}

/* The line down the left, and a ring at each phase. */
.phases li::before {
  content: '';
  position: absolute;
  top: 0.5rem;
  bottom: -0.5rem;
  left: 0.3125rem;
  width: 1px;
  background: var(--control);
}

.phases li:last-child::before {
  display: none;
}

.phases li::after {
  content: '';
  position: absolute;
  top: 0.375rem;
  left: 0;
  width: 0.6875rem;
  height: 0.6875rem;
  border: 2px solid var(--accent);
  border-radius: 999px;
  background: var(--sunken);
}

.phase-weeks {
  color: var(--accent);
  font-size: 0.9375rem;
  font-weight: 600;
}

.phases h3 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  line-height: 1.2;
  font-weight: 480;
}

/* Questions */

.faq {
  border-top: 1px solid var(--border);
}

.faq div {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  border-bottom: 1px solid var(--border);
  padding-block: 1.25rem;
}

.faq h3 {
  font-size: 1.0625rem;
  font-weight: 600;
}

/* The block that closes the page */

.closing {
  background: var(--inverse-bg);
  color: var(--inverse-fg);
  padding-block: 4rem;
  text-align: center;
}

.closing .stack {
  align-items: center;
}

.closing .hero {
  color: var(--inverse-accent);
}

.closing p {
  max-width: 36rem;
}

.closing .muted {
  color: var(--inverse-muted);
}

@media (min-width: 1024px) {
  .closing {
    padding-block: 6rem;
  }
}

/* The policies */

.legal {
  padding-block: 2rem 4rem;
}

.legal-grid {
  display: grid;
  gap: 2rem;
}

.legal-head {
  display: flex;
  max-width: 65ch;
  flex-direction: column;
  gap: 0.75rem;
}

.legal-toc {
  display: none;
}

@media (min-width: 1024px) {
  .legal {
    padding-block: 4rem 7rem;
  }

  .legal-grid {
    grid-template-columns: 14rem minmax(0, 1fr);
    column-gap: 5rem;
    row-gap: 3rem;
  }

  .legal-head,
  .prose {
    grid-column-start: 2;
  }

  .legal-toc {
    display: block;
    grid-row-start: 2;
  }

  .legal-toc div {
    position: sticky;
    top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
  }

  .legal-toc a {
    display: block;
    padding-block: 0.375rem;
    color: var(--muted);
    font-size: 0.9375rem;
    text-decoration: none;
    transition: color 160ms;
  }

  .legal-toc a:hover {
    color: var(--fg);
  }

  .prose {
    grid-row-start: 2;
  }
}

@media (min-width: 1280px) {
  .legal-grid {
    grid-template-columns: 16rem minmax(0, 1fr);
  }
}

.prose {
  max-width: 65ch;
}

.prose > :first-child {
  margin-top: 0;
}

.prose p {
  margin-block: 1rem;
  line-height: 1.65;
}

.prose h2 {
  margin: 2.5rem 0 0.75rem;
  scroll-margin-top: 2rem;
  font-family: var(--font-display);
  font-size: 1.625rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 480;
}

.prose h3 {
  margin: 2rem 0 0.5rem;
  font-size: 1.0625rem;
  font-weight: 600;
}

.prose ul {
  margin-block: 1rem;
  padding-left: 1.5rem;
  list-style: disc;
}

.prose li {
  margin-top: 0.5rem;
  padding-left: 0.25rem;
}

.prose a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose strong {
  font-weight: 600;
}

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

.opening {
  padding-block: 2rem 4rem;
}

@media (min-width: 1024px) {
  .opening {
    grid-template-columns: 1.15fr 1fr;
    padding-block: 4rem 7rem;
  }

  .opening figure {
    justify-self: end;
  }
}
