/* Nocturne Labs — night to first light
   The page is one sky: deep night at the top, through indigo and violet, ending in dusk pink. */

:root {
  --night-0: #050916;
  --night-1: #0a1230;
  --night-2: #111c49;
  --night-3: #1c2c69;
  --violet: #473e8e;
  --plum: #7c4c8f;
  --pink: #a8527f;

  --moon: #f6f0dc;
  --text: #f4f5fc;
  --text-soft: #c5cbe8;
  --text-late: #f6f1fa;
  --accent: #8fcdf8;
  --accent-late: #ffe3c2;
  --rule: rgba(238, 241, 251, .18);
  --rule-late: rgba(255, 255, 255, .3);
  --ink: #0b1a44;

  --display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--night-0);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 2px; }

.skip {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--moon); color: var(--ink);
  padding: .6rem 1rem; border-radius: 999px; z-index: 10;
}
.skip:focus { top: 1rem; }

.wrap {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

/* ---------- the sky ---------- */

.night {
  position: relative;
  background: linear-gradient(to bottom,
    var(--night-0) 0%, var(--night-1) 12%, var(--night-2) 26%, var(--night-3) 42%,
    var(--violet) 60%, var(--plum) 80%, var(--pink) 100%);
}

.stars {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 22%, transparent 55%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 22%, transparent 55%);
}

/* a few stars twinkle, slowly; positions and timing are set in script.js */
.twinkle {
  position: absolute;
  width: 2px; height: 2px; border-radius: 50%;
  background: #fff;
  pointer-events: none;
  animation: twinkle 5s ease-in-out infinite alternate;
}
@keyframes twinkle {
  from { opacity: .15; }
  to   { opacity: .95; }
}

main, .foot, .top { position: relative; }

/* ---------- type ---------- */

h1, h2 {
  font-family: var(--display);
  font-weight: 300;
  margin: 0;
  text-wrap: balance;
}
h3 { font-family: var(--body); font-size: 1rem; font-weight: 600; margin: 0; }

p { margin: 0 0 1.15em; }
.prose > p:last-child { margin-bottom: 0; }

.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.55; max-width: 34em; }

/* section name is the big line, its description the small one */
.area-name {
  font-size: clamp(2.9rem, 7.5vw, 5rem); line-height: 1;
  letter-spacing: -0.025em;
}
.tagline {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem); line-height: 1.4; font-weight: 500;
  margin: .9rem 0 0; max-width: 20em;
  color: var(--accent);
}

/* ---------- nav ---------- */

.top {
  display: flex; justify-content: flex-end;
  padding-block: 1.25rem;
  position: absolute; left: 0; right: 0; top: 0; z-index: 2;
}
.top nav { display: flex; gap: clamp(.9rem, 3vw, 2rem); }
.top nav a {
  text-decoration: none; color: var(--text-soft);
  font-size: .95rem; padding-block: .5rem;
}
.top nav a:hover { color: var(--text); }

/* ---------- hero ---------- */

section { padding-block: clamp(3.65rem, 6.7vw, 5.35rem); }

.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding-block: 6rem 4rem;
}
.hero-inner {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  animation: arrive 1.4s cubic-bezier(.2, .7, .2, 1) both;
}
.hero-logo img { width: clamp(10.5rem, 38vw, 16rem); }
.hero .actions { margin-top: clamp(2.5rem, 6vh, 3.5rem); justify-content: center; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin: 2.25rem 0 0; }

.button {
  display: inline-block; text-decoration: none; font-weight: 600;
  background: var(--moon); color: var(--ink);
  padding: .9rem 1.6rem; border-radius: 999px;
  transition: background-color .2s;
}
.button:hover { background: #fff; }

@keyframes arrive {
  from { opacity: 0; transform: translateY(1.5rem); }
  to   { opacity: 1; transform: none; }
}

/* ---------- sections ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: start;
}
.prose { max-width: 36rem; color: var(--text-soft); }
.prose > p:first-child { color: var(--text); }
.closing { margin-top: 2rem; color: var(--text); }
.prose .actions { margin-top: 1.75rem; }

.points { margin: 2.5rem 0 0; }
.points > div { padding-block: 1.25rem; border-top: 1px solid var(--rule); }
.points dt { color: var(--text); font-weight: 600; }
.points dd { margin: .3rem 0 0; }

.apps { list-style: none; margin: 2.5rem 0 0; padding: 0; }
.apps li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .15rem 1.5rem;
  padding-block: 1.25rem;
  border-top: 1px solid var(--rule);
}
.app-name { font-family: var(--display); font-size: 1.6rem; line-height: 1.2; color: var(--text); }
.app-what { grid-column: 1; }
.app-status { grid-column: 2; grid-row: 1; align-self: center; font-size: .875rem; color: var(--accent-late); white-space: nowrap; }

.steps { list-style: none; margin: 2.5rem 0 0; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); column-gap: .5rem;
  padding-block: 1.2rem;
  border-top: 1px solid var(--rule);
}
.steps li::before {
  content: counter(step);
  font-family: var(--display); font-size: 1.5rem; line-height: 1.1; color: var(--accent-late);
  grid-row: 1 / span 2;
}
.steps h3 { color: var(--text); }
.steps p { margin: .25rem 0 0; grid-column: 2; }

/* lower half of the page sits on violet and pink: lift the text a step */
.late .prose, .late .lede, .late address, .late .legal { color: var(--text-late); }
.late .tagline { color: var(--accent-late); }
.late .points > div, .late .apps li, .late .steps li { border-top-color: var(--rule-late); }

.contact .lede { margin-top: 1.75rem; }
.mail {
  display: inline-block; margin-top: 1rem;
  font-family: var(--display); font-weight: 300;
  font-size: clamp(1.15rem, 4vw, 2.5rem); line-height: 1.2;
  color: #fff;
  text-decoration-thickness: 1px; text-underline-offset: .18em;
  overflow-wrap: anywhere;
}
.mail:hover { color: var(--accent-late); }

/* ---------- footer ---------- */

.foot { padding-block: 0 2.5rem; font-size: .95rem; }
.foot-grid {
  display: grid; grid-template-columns: auto minmax(0, 1fr);
  gap: 1.5rem 2.5rem; align-items: center;
  border-top: 1px solid var(--rule-late);
  padding-top: 2.5rem;
}
.foot-logo { width: 5.25rem; filter: brightness(0) invert(1); opacity: .92; }
.foot address { font-style: normal; line-height: 1.7; }
.foot address strong { color: #fff; font-weight: 600; }
.foot a { text-underline-offset: .2em; }
.legal { grid-column: 1 / -1; margin: 0; font-size: .875rem; }

/* ---------- small screens ---------- */

@media (max-width: 52rem) {
  .split { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .top { justify-content: center; }
  .top nav a { font-size: .9rem; }
}

@media (max-width: 26rem) {
  .apps li { grid-template-columns: minmax(0, 1fr); }
  .app-status { grid-column: 1; grid-row: auto; margin-top: .35rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-inner { animation: none; }
  .twinkle { animation: none; opacity: .6; }
  .button { transition: none; }
}
