@font-face {
  font-family: "Young Serif";
  src: url("/fonts/young-serif-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/atkinson-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/atkinson-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/fonts/atkinson-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Evening palette */
  --dusk: #1c2442;
  --twilight: #27335c;
  --lamp: #f5b841;
  --glow: #ffe2a1;
  --porch: #f2eadb;
  --slate: #b3bad3;
  /* Daylight palette for reading pages */
  --day: #eef1f6;
  --paper: #ffffff;
  --ink: #1c2442;
  --ink-soft: #4a5478;
  --rule: #d5dae6;
  --lamp-deep: #8a5a00;

  --serif: "Young Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 34rem;
}

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

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--lamp);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 16px;
  top: 16px;
  background: var(--porch);
  color: var(--dusk);
  padding: 8px 12px;
  z-index: 10;
}

/* ---------- Shared header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 68rem;
  margin: 0 auto;
  padding: 20px 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.375rem;
  letter-spacing: 0.005em;
}

.brand svg {
  width: 34px;
  height: 34px;
  flex: none;
}

.nav {
  display: flex;
  gap: 20px;
  font-size: 0.975rem;
}

.nav a {
  text-decoration: none;
  white-space: nowrap;
}
.nav a:hover {
  text-decoration: underline;
}

/* ---------- Home (evening) ---------- */

.evening {
  background: var(--dusk);
  color: var(--porch);
}

.evening .nav a {
  color: var(--slate);
}
.evening .nav a:hover {
  color: var(--porch);
}

.hero {
  max-width: 68rem;
  margin: 0 auto;
  padding: 40px 24px 72px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 32px;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3rem, 8vw, 5.75rem);
  line-height: 1;
  letter-spacing: -0.015em;
  margin: 0 0 24px;
}

.hero h1 span {
  display: block;
}

.hero p.lede {
  font-size: 1.25rem;
  line-height: 1.5;
  max-width: 30rem;
  margin: 0 0 32px;
  color: var(--porch);
}

.button {
  display: inline-block;
  font: 700 1.0625rem/1 var(--sans);
  padding: 16px 24px;
  border-radius: 999px;
  text-decoration: none;
  background: var(--lamp);
  color: var(--dusk);
}
.button:hover {
  background: var(--glow);
}

.lamp-stage {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  max-width: 420px;
  width: 100%;
  justify-self: center;
}

.lamp-stage .halo {
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  background: radial-gradient(circle closest-side at 50% 56%, rgba(255, 214, 128, 0.5) 0%, rgba(245, 184, 65, 0.22) 38%, rgba(245, 184, 65, 0.07) 68%, rgba(245, 184, 65, 0) 100%);
  opacity: 1;
}

.lamp-stage svg {
  position: relative;
  width: 78%;
  height: auto;
}

.lamp-stage .arc {
  stroke: var(--lamp);
}

/* One moment: the light comes on when the page loads. */
@media (prefers-reduced-motion: no-preference) {
  .lamp-stage .halo {
    animation: halo-on 1.4s ease-out 1.1s both;
  }
  .lamp-stage .glass {
    animation: glass-on 0.5s ease-out 0.2s both;
  }
  .lamp-stage .arc {
    animation: arc-on 0.45s ease-out both;
  }
  .lamp-stage .arc-1 { animation-delay: 0.55s; }
  .lamp-stage .arc-2 { animation-delay: 0.8s; }
  .lamp-stage .arc-3 { animation-delay: 1.05s; }
}

@keyframes halo-on {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes glass-on {
  from { fill: #5b6487; }
  to { fill: var(--lamp); }
}
@keyframes arc-on {
  from { stroke: #3d4873; }
  to { stroke: var(--lamp); }
}

/* Status card: what a friend sees */

.preview {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 24px 88px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 48px;
  align-items: center;
}

.status {
  background: var(--twilight);
  border: 1px solid rgba(245, 184, 65, 0.35);
  border-radius: 22px;
  padding: 24px;
  max-width: 360px;
  width: 100%;
  justify-self: center;
  box-shadow: 0 0 0 10px rgba(39, 51, 92, 0.45);
}

.status .who {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.status .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--lamp);
  box-shadow: 0 0 12px 3px rgba(245, 184, 65, 0.6);
  flex: none;
}

.status .name {
  font-family: var(--serif);
  font-size: 1.375rem;
  line-height: 1.2;
}

.status .note {
  margin: 0 0 20px;
  color: var(--slate);
}

.status .actions {
  display: flex;
  gap: 10px;
}

.status .actions span {
  flex: 1;
  text-align: center;
  font-weight: 700;
  padding: 12px 10px;
  border-radius: 12px;
  background: rgba(242, 234, 219, 0.08);
  color: var(--porch);
}

.status .actions span.primary {
  background: var(--lamp);
  color: var(--dusk);
}

.steps h2,
.promises h2,
.pilot h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.15;
  margin: 0 0 20px;
}

.steps ol {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  max-width: var(--measure);
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 4px 12px;
  padding: 14px 0;
  border-top: 1px solid rgba(179, 186, 211, 0.22);
}

.steps li::before {
  content: counter(step);
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--lamp);
  grid-row: span 2;
}

.steps li strong {
  font-size: 1.125rem;
}

.steps li span {
  color: var(--slate);
}

/* Promises: the pledge, on a lighter band */

.promises {
  background: var(--twilight);
}

.promises .inner {
  max-width: 68rem;
  margin: 0 auto;
  padding: 72px 24px;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 48px;
}

.promises .intro p {
  color: var(--slate);
  max-width: 24rem;
  margin: 0;
}

.promises ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.promises li {
  padding: 18px 0;
  border-bottom: 1px solid rgba(179, 186, 211, 0.22);
}
.promises li:first-child {
  padding-top: 0;
}

.promises li b {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.25;
  color: var(--porch);
}

.promises li span {
  color: var(--slate);
}

.pilot {
  max-width: 68rem;
  margin: 0 auto;
  padding: 80px 24px;
}

.pilot p {
  max-width: var(--measure);
  font-size: 1.125rem;
  color: var(--porch);
  margin: 0 0 28px;
}

.site-footer {
  border-top: 1px solid rgba(179, 186, 211, 0.22);
}

.site-footer .inner {
  max-width: 68rem;
  margin: 0 auto;
  padding: 28px 24px 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  font-size: 0.95rem;
  color: var(--slate);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.site-footer a {
  color: var(--slate);
}
.site-footer a:hover {
  color: var(--porch);
}

.get-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 7vw, 4rem);
  line-height: 1.05;
  margin: 0 0 24px;
}

/* Get-the-app QR, shown in every footer */

.get-app {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
}

.get-app img {
  width: 96px;
  height: 96px;
  border-radius: 10px;
  flex: none;
}

.get-app span {
  display: block;
  max-width: 13rem;
  line-height: 1.4;
}

.get-app b {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.25rem;
  color: var(--porch);
}

.daylight .get-app b {
  color: var(--ink);
}

.site-footer .footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
  justify-content: center;
}

/* ---------- Reading pages (daylight) ---------- */

.daylight {
  background: var(--day);
  color: var(--ink);
}

.daylight .nav a {
  color: var(--ink-soft);
}
.daylight .nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
}

.daylight .site-footer {
  border-top-color: var(--rule);
}
.daylight .site-footer .inner,
.daylight .site-footer a {
  color: var(--ink-soft);
}
.daylight .site-footer a:hover {
  color: var(--ink);
}

.doc {
  max-width: 44rem;
  margin: 0 auto;
  padding: 24px 24px 72px;
}

.doc h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.25rem, 6vw, 3.25rem);
  line-height: 1.1;
  margin: 16px 0 8px;
}

.doc .updated {
  color: var(--ink-soft);
  margin: 0 0 32px;
}

.doc h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 40px 0 10px;
}

.doc h3 {
  font-size: 1.0625rem;
  margin: 24px 0 4px;
}

.doc p,
.doc li {
  max-width: var(--measure);
}

.doc ul {
  padding-left: 1.2em;
}

.doc li {
  margin: 6px 0;
}

.doc a {
  color: var(--ink);
  text-decoration-color: var(--lamp-deep);
}

.pledge {
  background: var(--dusk);
  color: var(--porch);
  border-radius: 18px;
  padding: 24px 24px 20px;
  margin: 0 0 8px;
}

.pledge p {
  margin: 0 0 12px;
  color: var(--slate);
}

.pledge ol {
  margin: 0;
  padding-left: 1.4em;
}

.pledge li {
  margin: 6px 0;
}

.pledge li::marker {
  color: var(--lamp);
  font-family: var(--serif);
}

/* ---------- Small screens ---------- */

@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 16px;
    padding-bottom: 48px;
  }
  .lamp-stage {
    order: -1;
    max-width: 240px;
  }
  .preview {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-bottom: 64px;
  }
  .promises .inner {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 56px 24px;
  }
  .pilot {
    padding: 56px 24px;
  }
  .nav {
    gap: 14px;
  }
  .nav .nav-how {
    display: none;
  }
}

@media (max-width: 760px) {
  .site-footer .footer-links {
    align-items: flex-start;
  }
}
