:root {
  --white: #ffffff;
  --blue: #1e4fa0;
  --blue-deep: #143a7a;
  --ink: #0f2147;
  --ice: #eef3fa;
  --muted: #4b5a78;

  --display: "Unbounded", system-ui, sans-serif;
  --body: "Golos Text", system-ui, sans-serif;

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

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

html { scroll-behavior: smooth; }

[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--display);
  line-height: 1.1;
  margin: 0;
}

p { margin: 0 0 1em; }

a { color: inherit; }

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

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--white);
  padding: .5rem 1rem;
  z-index: 10;
}
.skip:focus { left: 1rem; }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ice);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 4.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  margin-right: auto;
}

.brand-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: .95rem;
}

.flag-mark {
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  width: 2rem;
  height: 1.35rem;
  border: 1px solid #c9d4e6;
}
.flag-mark i { background: var(--white); }
.flag-mark i:nth-child(2) { background: var(--blue); }

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-size: 1rem;
}
.nav a { text-decoration: none; }
.nav a:hover { color: var(--blue); }

.nav .nav-cta {
  background: var(--blue);
  color: var(--white);
  padding: .5rem 1rem;
}
.nav .nav-cta:hover { background: var(--blue-deep); color: var(--white); }

.lang {
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
  color: var(--muted);
}

/* Buttons */

.btn {
  display: inline-block;
  font-family: var(--body);
  font-weight: 600;
  font-size: 1.05rem;
  padding: .95rem 1.6rem;
  text-decoration: none;
  background: transparent;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color .15s, color .15s;
}

.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-deep); }

.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); }

.btn-light { background: var(--white); color: var(--blue); }
.btn-light:hover { background: var(--ice); }

.btn-outline-light { border-color: var(--white); color: var(--white); }
.btn-outline-light:hover { background: var(--white); color: var(--blue); }

/* Hero: the white-blue-white flag as the layout */

.band { display: flex; align-items: center; }
.band-top, .band-bottom { min-height: 26vh; }
.band-mid { min-height: 26vh; background: var(--blue); color: var(--white); }

.band-top { align-items: flex-end; padding: 3rem 0 2.5rem; }
.band-mid { padding: 2.5rem 0; }
.band-bottom { align-items: flex-start; padding: 2.5rem 0 3rem; }

.band .wrap { width: 100%; }

.hero h1 {
  /* Sized so each sentence fits on one line, down to phone widths. */
  font-size: clamp(1.5rem, 6.5vw, 5rem);
  font-weight: 800;
  letter-spacing: -.02em;
}

.hero h1 span { display: block; white-space: nowrap; }

.hero-lead {
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  line-height: 1.4;
  max-width: 38ch;
  margin: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (prefers-reduced-motion: no-preference) {
  .band-mid {
    transform-origin: left center;
    animation: unfurl .9s cubic-bezier(.2, .7, .2, 1) both;
  }
  .band-mid .hero-lead { animation: appear .5s .6s both; }

  @keyframes unfurl { from { transform: scaleX(0); } }
  @keyframes appear { from { opacity: 0; } }
}

/* Sections */

.section { padding: clamp(4rem, 9vw, 7rem) 0; }

.section h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -.01em;
}

.section h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: .5rem;
}

/* About */

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

.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
}

.about-intro {
  font-size: 1.3rem;
  line-height: 1.5;
  max-width: 40ch;
  margin-bottom: 3rem;
}

.beliefs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 3rem;
}

.beliefs li {
  border-left: 4px solid var(--blue);
  padding-left: 1.25rem;
}
.beliefs p { color: var(--muted); margin: 0; }

/* Work */

.work { background: var(--ice); }

.work h2 { margin-bottom: 3rem; }

.work-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: #d6e0ef;
  border: 2px solid #d6e0ef;
}

.work-item {
  background: var(--white);
  padding: 2rem 2rem 1.5rem;
}
.work-item p { color: var(--muted); max-width: 46ch; }

/* Actions: timeline grouped by year */

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

.actions-intro {
  font-size: 1.25rem;
  max-width: 44ch;
  color: var(--muted);
  margin-bottom: 3.5rem;
}

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

.year-group {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  padding: 2.5rem 0;
  border-top: 4px solid var(--blue);
}

.year-group .year {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -.02em;
  align-self: start;
  position: sticky;
  top: 5.5rem;
}

.year-actions {
  list-style: none;
  margin: 0;
  padding: 0;
}

.action {
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid #d6e0ef;
}
.action:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }

.action-meta {
  font-size: 1rem;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: .35rem;
}

.action-title {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 .5rem;
}

.action-text { color: var(--muted); max-width: 52ch; margin-bottom: .5rem; }

.action-link { font-weight: 600; color: var(--blue); }

/* Join */

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

.join-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.join h2 { margin-bottom: 1.5rem; }
.join p { max-width: 42ch; }

.note {
  font-size: 1rem;
  color: var(--muted);
  border-left: 4px solid var(--blue);
  padding-left: 1rem;
}

.join-form {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.join-form label {
  font-weight: 600;
  font-size: 1rem;
}

.optional { font-weight: 400; color: var(--muted); }

.join-form input {
  font: inherit;
  padding: .8rem 1rem;
  border: 2px solid #c9d4e6;
  background: var(--white);
  color: var(--ink);
  margin-bottom: 1rem;
}
.join-form input:focus-visible { outline: none; border-color: var(--blue); }

.join-form .btn { align-self: flex-start; margin-top: .5rem; }

/* Support */

.support { background: var(--blue); color: var(--white); }

.support-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.support p { font-size: 1.25rem; max-width: 40ch; }

.support-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.support :focus-visible { outline-color: var(--white); }

/* Footer */

.site-footer {
  padding: 3rem 0;
  font-size: .95rem;
  color: var(--muted);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}

.site-footer p { margin: 0 0 .35rem; }
.site-footer a { margin-right: 1rem; }
.footer-name { font-family: var(--display); font-weight: 700; color: var(--ink); }

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

/* Text pages (privacy notice) */

.prose { max-width: 46rem; }

.prose h1 {
  font-size: clamp(1.25rem, 6vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 1rem;
}

.prose h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 2.75rem 0 1rem;
}

.prose-lead { font-size: 1.3rem; line-height: 1.5; }
.prose-date { color: var(--muted); font-size: 1rem; }

.prose ul { padding-left: 1.25rem; margin: 0 0 1em; }
.prose li { margin-bottom: .5rem; }
.prose a { color: var(--blue); }

/* Placeholders that must be filled in before publishing. */
.prose mark { background: #fff1a8; color: var(--ink); padding: 0 .15em; }

/* Return of the Names: landing callout */

.memory-callout {
  background: var(--ink);
  color: var(--white);
  padding: 3.5rem 0;
}

.memory-callout-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: start;
}

.memory-callout h2 {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 700;
}

.memory-callout p { max-width: 48ch; margin-bottom: 1.5rem; }
.memory-callout :focus-visible,
.memory-hero :focus-visible { outline-color: var(--white); }

/* Return of the Names: page */

.memory-hero {
  background: var(--ink);
  color: var(--white);
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}

.memory-hero h1 {
  font-size: clamp(2.4rem, 6.5vw, 5rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 1.5rem;
}

.memory-lead {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  line-height: 1.5;
  max-width: 46ch;
  margin: 0;
}

.memory-choice {
  background: #000;
  color: var(--white);
  padding: 1.75rem 0;
}

.memory-choice-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.memory-choice p { margin: 0; font-size: 1.15rem; max-width: 48ch; }
.memory-choice :focus-visible { outline-color: var(--white); }

.memory-steps .note { margin-top: 3rem; max-width: 60ch; }

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}

.steps li { counter-increment: step; }

.steps li::before {
  content: counter(step);
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 2.5rem;
  line-height: 1;
  color: var(--blue);
  margin-bottom: 1rem;
}

.steps p { color: var(--muted); }
.steps a { color: var(--blue); }

.recorder-section h2 { margin-bottom: 2rem; }

.reading-form {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 3rem;
  align-items: start;
}

.screen {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
}

.screen video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--ink);
}

#rec-live { transform: scaleX(-1); }

.screen-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  color: #9fb0cf;
}

.countdown {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(4rem, 14vw, 9rem);
  background: rgba(15, 33, 71, .45);
}

.rec-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .75rem;
  background: rgba(15, 33, 71, .8);
  font-weight: 600;
  font-size: .95rem;
  font-variant-numeric: tabular-nums;
}

.rec-dot {
  width: .7rem;
  height: .7rem;
  border-radius: 50%;
  background: #e5484d;
}

@media (prefers-reduced-motion: no-preference) {
  .rec-dot { animation: blink 1.2s steps(2, start) infinite; }
  @keyframes blink { to { visibility: hidden; } }
}

.recorder-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.25rem;
}

.upload-alt {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  font-size: 1rem;
}
.upload-alt label { font-weight: 600; }

.rec-status { margin-top: 1rem; font-size: 1rem; color: var(--muted); }
.rec-status.is-error { color: #b42318; font-weight: 600; }

.reading-fields {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.reading-fields label { font-weight: 600; font-size: 1rem; }

.reading-fields input[type="text"],
.reading-fields input[type="email"],
.reading-fields textarea {
  font: inherit;
  padding: .8rem 1rem;
  border: 2px solid #c9d4e6;
  background: var(--white);
  color: var(--ink);
  margin-bottom: 1rem;
  resize: vertical;
}
.reading-fields input:focus-visible,
.reading-fields textarea:focus-visible { outline: none; border-color: var(--blue); }

.reading-fields .check {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  font-weight: 500;
  margin-bottom: 1rem;
}
.check input { width: 1.25rem; height: 1.25rem; margin-top: .2rem; accent-color: var(--blue); flex: none; }

.reading-fields .btn { align-self: flex-start; margin-top: .5rem; }
.reading-fields .btn:disabled { opacity: .6; cursor: progress; }

.reading-fields progress { width: 100%; height: .75rem; margin-top: 1rem; accent-color: var(--blue); }

.reading-done {
  border-left: 4px solid var(--blue);
  padding: 1rem 0 1rem 1.5rem;
  max-width: 40rem;
}
.reading-done h3 { font-size: 1.5rem; margin-bottom: 1rem; }
.reading-done:focus { outline: none; }

.reading-id { font-variant-numeric: tabular-nums; color: var(--muted); }
.prompter .reading-id { color: #a8b0bd; }
.check a { color: inherit; }

/* Return of the Names: reading from the screen */

.prompter-page { background: #000; color: var(--white); }

.prompter {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 1rem var(--gutter) 1.5rem;
}

.prompter :focus-visible { outline-color: var(--white); }

.prompter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 2.5rem;
}

.prompter-back { color: #a8b0bd; font-size: 1rem; }

.prompter .rec-badge { position: static; background: none; padding: 0; }

.prompter-intro {
  margin: auto 0;
  max-width: 40rem;
  padding: 2rem 0;
}

.prompter-intro h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 1.5rem;
}

.prompter-intro p { font-size: 1.2rem; max-width: 46ch; }
.prompter-tip { color: #a8b0bd; }
.prompter-intro .btn { margin-top: 1rem; }

/* Names sit at the top of the screen, close to the camera, so the reader's eyes stay near the lens. */
.prompter-stage {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: clamp(1rem, 4vh, 3rem);
}

.prompter-names {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 6vh, 4rem);
  max-width: 60rem;
}

.prompter-names p { margin: 0; }

.prompter-name {
  font-size: clamp(1.75rem, 4.5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: .5rem !important;
}

.prompter-meta {
  font-size: clamp(1.15rem, 2.2vw, 1.75rem);
  color: #c4cad4;
  line-height: 1.4;
}

.prompter-self {
  position: absolute;
  right: 0;
  bottom: 0;
  width: clamp(8rem, 22vw, 16rem);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transform: scaleX(-1);
  background: #111827;
}

.prompter-playback {
  width: 100%;
  max-height: 60vh;
  background: #000;
}

.prompter .countdown { background: rgba(0, 0, 0, .55); }

.prompter-footer { padding-top: 1.5rem; }

.prompter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.prompter-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
  max-width: 44rem;
}

.prompter-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.prompter-form label > span:first-child { display: block; font-weight: 600; font-size: 1rem; margin-bottom: .35rem; }
.prompter-form .optional { color: #a8b0bd; }

.prompter-form input[type="text"],
.prompter-form input[type="email"] {
  width: 100%;
  font: inherit;
  padding: .7rem .9rem;
  background: #0d0d0d;
  color: var(--white);
  border: 2px solid #3a3f47;
}
.prompter-form input:focus-visible { outline: none; border-color: var(--white); }

.prompter-form .check { display: flex; gap: .75rem; align-items: flex-start; }
.prompter-form .btn { align-self: flex-start; }
.prompter-form .btn:disabled { opacity: .6; cursor: progress; }
.prompter-form progress { width: 100%; height: .75rem; accent-color: var(--white); }

.prompter-status { margin: 1rem 0 0; color: #a8b0bd; font-size: 1rem; }
.prompter-status.is-error { color: #ff8a80; font-weight: 600; }

.prompter-done { margin: auto 0; max-width: 40rem; }
.prompter-done h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); margin-bottom: 1rem; }
.prompter-done p { font-size: 1.2rem; color: #c4cad4; }
.prompter-done:focus { outline: none; }

@media (max-width: 600px) {
  .prompter-form-row { grid-template-columns: 1fr; }
  .prompter-self { position: static; align-self: flex-end; margin-top: 1.5rem; }
}

/* Responsive */

@media (max-width: 860px) {
  .nav { display: none; }
  .about-grid,
  .join-grid,
  .support-grid,
  .memory-callout-grid,
  .reading-form { grid-template-columns: 1fr; gap: 2rem; }
  .steps { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 600px) {
  .beliefs,
  .work-list { grid-template-columns: 1fr; }
  .year-group { grid-template-columns: 1fr; gap: 1.5rem; }
  .year-group .year { position: static; }
  .band-top, .band-mid, .band-bottom { min-height: auto; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .memory-hero h1 { font-size: 9.5vw; }
}
