:root {
  --night: #070a18;
  --ink: #f4efe6;
  --ink-2: rgba(244, 239, 230, 0.76);
  --ink-3: rgba(244, 239, 230, 0.5);
  --line: rgba(244, 239, 230, 0.32);
  --serif: "Instrument Serif", "Iowan Old Style", "Times New Roman", serif;
  --sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(20px, 4.4vw, 64px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--night);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--night);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: rgba(244, 239, 230, 0.9); color: var(--night); }

a { color: inherit; text-decoration: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- the world ---------- */

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100lvh;
  height: 100vh;
  display: block;
  z-index: 0;
}

@supports (height: 100lvh) {
  #scene { height: 100lvh; }
}

.no-gl body {
  background:
    radial-gradient(60% 30% at 50% 66%, rgba(214, 140, 105, 0.45), transparent 70%),
    linear-gradient(180deg, #090f26 0%, #2b2c4c 52%, #57536f 65.6%, #0c0e1c 66%, #020308 100%);
  background-attachment: fixed;
}

/* a whisper of shade at the top and bottom so type always sits on calm ground */
.veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(3, 5, 14, 0.42) 0%, rgba(3, 5, 14, 0) 26%),
    linear-gradient(0deg, rgba(3, 5, 14, 0.38) 0%, rgba(3, 5, 14, 0) 22%);
}

/* ---------- bar ---------- */

.bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(20px, 3.2vw, 36px) var(--gutter);
  pointer-events: none;
}

.bar > * { pointer-events: auto; }

.mark { display: inline-flex; padding: 6px 0; }
.mark svg { height: 13px; width: auto; fill: var(--ink); display: block; }

.bar-link,
.cta {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.bar-link {
  position: relative;
  padding: 8px 0;
  color: var(--ink);
}

.bar-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0.35);
  transform-origin: right;
  opacity: 0.6;
  transition: transform 0.6s var(--ease), opacity 0.6s var(--ease);
}

.bar-link:hover::after,
.bar-link:focus-visible::after { transform: scaleX(1); opacity: 1; transform-origin: left; }

/* ---------- panels ---------- */

main { position: relative; z-index: 2; }

.panel {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  padding: 0 var(--gutter);
}

.copy { position: relative; }

.display {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.1rem, 8.6vw, 9.4rem);
  line-height: 0.9;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

.display .line { display: block; }
.display em { font-style: italic; letter-spacing: -0.01em; }

.lede {
  margin: clamp(1.25rem, 2.6vw, 2.1rem) 0 0;
  font-size: clamp(1rem, 1.2vw, 1.2rem);
  line-height: 1.5;
  color: var(--ink-2);
  letter-spacing: 0.005em;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.eyebrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--line);
}

.statement {
  margin: clamp(1rem, 1.8vw, 1.5rem) 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.85rem, 3.05vw, 3.25rem);
  line-height: 1.07;
  letter-spacing: -0.006em;
  text-wrap: pretty;
}

.body {
  margin: clamp(1.1rem, 2vw, 1.6rem) 0 0;
  max-width: 27rem;
  font-size: clamp(1rem, 1.1vw, 1.125rem);
  font-weight: 300;
  line-height: 1.6;
  color: var(--ink-2);
}

/* hero */
.hero .copy {
  align-self: start;
  justify-self: center;
  text-align: center;
  padding-top: clamp(118px, 17vh, 210px);
}

.cue {
  position: absolute;
  left: 50%;
  bottom: clamp(22px, 4vh, 40px);
  width: 1px;
  height: 52px;
  overflow: hidden;
  background: rgba(244, 239, 230, 0.16);
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 1.2s var(--ease) 1.6s;
}

.cue span {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, var(--ink) 50%, transparent);
  animation: cue 2.6s var(--ease) infinite;
}

@keyframes cue {
  from { transform: translateY(-100%); }
  to { transform: translateY(100%); }
}

.hero.is-in .cue { opacity: 0.8; }

/* who */
.who .copy {
  align-self: center;
  justify-self: start;
  max-width: 31rem;
  margin-top: -6vh;
}

/* what */
.what .copy {
  align-self: center;
  justify-self: end;
  max-width: 30rem;
  margin-top: -6vh;
}

/* close: a vertical stack in the dark band between the eclipse and its reflection.
   The wordmark stands just above the horizon (the canvas is 100lvh, so the horizon
   is at 50lvh) and the rest hangs below it, so the horizon line runs through the gap. */
.close .copy {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 50vh auto auto 1fr;
  grid-template-rows: 50lvh auto auto 1fr;
  grid-template-areas: "mark" "tag" "cta" ".";
  align-items: start;
  justify-items: center;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  text-align: center;
}

.wordmark {
  grid-area: mark;
  align-self: end;
  display: block;
  width: min(30vw, 460px, 52vh);
  height: auto;
  margin-bottom: clamp(16px, 2.2vh, 22px);
  fill: var(--ink);
  overflow: visible;
}

.tagline {
  grid-area: tag;
  margin: clamp(16px, 2.2vh, 22px) 0 0;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.1vw, 2.2rem);
  line-height: 1.1;
  white-space: nowrap;
}

.cta {
  grid-area: cta;
  margin-top: clamp(1.1rem, 2.8vh, 1.6rem);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 15px 22px 15px 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(7, 10, 24, 0.18);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease), border-color 0.5s var(--ease);
}

.cta svg {
  width: 16px; height: 16px;
  fill: none; stroke: currentColor; stroke-width: 1.4;
  transition: transform 0.5s var(--ease);
}

.cta:hover,
.cta:focus-visible { background: var(--ink); color: var(--night); border-color: var(--ink); }
.cta:hover svg,
.cta:focus-visible svg { transform: translateX(3px); }

a:focus-visible { outline: 1px solid var(--ink); outline-offset: 6px; }
.cta:focus-visible { outline-offset: 4px; }

.foot {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(18px, 3vh, 30px);
  display: flex;
  justify-content: flex-start;
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- reveals ---------- */

/* reveals only hide content once JS is known to be running */
.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  filter: blur(10px);
  transition:
    opacity 1.3s var(--ease),
    transform 1.7s var(--ease),
    filter 1.3s var(--ease);
  transition-delay: 0s;
  will-change: opacity, transform, filter;
}

.js .is-in [data-reveal] {
  opacity: 1;
  transform: none;
  filter: blur(0);
  transition-delay: var(--d, 0s);
}

/* the headline rises line by line */
.js .display[data-reveal] { opacity: 1; transform: none; filter: none; }
.js .display .line {
  opacity: 0;
  transform: translate3d(0, 0.32em, 0);
  filter: blur(12px);
  transition: opacity 1.4s var(--ease), transform 1.9s var(--ease), filter 1.4s var(--ease);
}
.js .is-in .display .line { opacity: 1; transform: none; filter: blur(0); }
.js .is-in .display .line:nth-child(2) { transition-delay: 0.16s; }

/* the wordmark opens from the centre like a horizon */
.js .wordmark[data-reveal] {
  transform: none;
  filter: none;
  clip-path: inset(0 50% 0 50%);
  transition: opacity 0.9s var(--ease), clip-path 2.2s var(--ease);
}
.js .is-in .wordmark[data-reveal] { clip-path: inset(0 -2% 0 -2%); }

/* debug/static mode: everything at its end state, no motion */
.static [data-reveal],
.static .display .line,
.static .cue { transition: none !important; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal], .js .display .line {
    transform: none !important;
    filter: none !important;
    transition: opacity 0.8s linear !important;
  }
  .js .wordmark[data-reveal] { clip-path: none !important; }
  .cue span { animation: none; }
}

/* ---------- narrow / portrait ---------- */

@media (max-aspect-ratio: 17/20), (max-width: 760px) {
  .display { font-size: clamp(2.9rem, 13.2vw, 5.6rem); line-height: 0.92; }
  .hero .copy { padding-top: clamp(104px, 15svh, 160px); }
  .lede { max-width: 20rem; margin-left: auto; margin-right: auto; }

  .who .copy,
  .what .copy {
    align-self: end;
    justify-self: stretch;
    max-width: 34rem;
    margin-top: 0;
    padding-bottom: clamp(56px, 11svh, 120px);
  }

  .statement { font-size: clamp(1.7rem, 7.4vw, 2.6rem); line-height: 1.08; }

}

/* tall screens: same stack, sized for a phone */
@media (max-aspect-ratio: 17/20) {
  .wordmark { width: min(70vw, 400px); margin-bottom: 18px; }
  .tagline { margin-top: 18px; font-size: clamp(1.5rem, 6.4vw, 2.2rem); }
  .cta { margin-top: clamp(1.1rem, 2.6svh, 1.5rem); }
  .foot { justify-content: center; }
}

@media (max-width: 420px) {
  .mark svg { height: 12px; }
  .bar-link { font-size: 0.66rem; }
}
