@font-face {
  font-family: Inter;
  src: url("/assets/inter.ttf") format("truetype");
  font-display: swap;
  font-weight: 100 900;
}

:root {
  color-scheme: dark;
  --ink: #181410;
  --paper: #f4f0e6;
  --muted: #d3c7b7;
  --gold: #fdb913;
  --line: #f4f0e637;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  font-family: Inter, Arial, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--ink); color: var(--paper); }
a { color: inherit; }
.text-link { text-underline-offset: .2em; }
.text-link:hover { color: var(--gold); }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }
p { line-height: 1.55; }
::selection { color: var(--ink); background: var(--gold); }

.wrap { width: min(100% - var(--gutter) * 2, 88rem); margin-inline: auto; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.landing {
  --night: #15110f;
  --monarch: 0;
  --entrance: 1;
  --focus: #fdb913;
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: clamp(5.5rem, 15svh, 8rem) var(--gutter) clamp(3rem, 9svh, 5rem);
  overflow: clip;
  background: var(--night);
  color: var(--paper);
  text-align: center;
}

.landing-waves, .landing::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.landing-waves {
  background:
    radial-gradient(ellipse 78% 47% at 86% 130%, #f06e1477 12%, #f06e1400 100%),
    radial-gradient(ellipse 100% 44% at -15% 101%, #602b14 35%, transparent 76%),
    radial-gradient(ellipse 82% 36% at 96% 87%, #93421777 20%, #5d2d1577 56%, transparent 88%),
    radial-gradient(ellipse 98% 56% at 45% 120%, #763617, #241713 65%, var(--night) 100%);
}

.landing::after {
  content: "";
  background:
    radial-gradient(ellipse 62% 34% at 50% 51%, #120d0ac4, transparent 100%),
    linear-gradient(180deg, #15110fa6, #15110f45 31%, transparent 46%, #15110f24 67%, #15110f48);
}

.gradient-waves-container { position: relative; width: 100%; height: 100%; overflow: hidden; }
.gradient-waves-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.landing-waves .gradient-waves-canvas { filter: saturate(1.3); }

.landing-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: clamp(1.25rem, 4vw, 3rem) var(--gutter);
}

.landing-logo {
  display: block;
  width: clamp(11.75rem, 18vw, 14rem);
  height: auto;
  margin-inline: auto;
  opacity: .95;
}

.landing-footer { margin-top: clamp(2.125rem, 5.5svh, 3rem); }

.motion-control {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid #fff3e455;
  border-radius: 50%;
  color: var(--paper);
  background: #15110f88;
  cursor: pointer;
  transition: background-color .25s cubic-bezier(.22, 1, .36, 1);
}

.motion-control[hidden], .motion-control .play-icon,
.motion-control[data-paused="true"] .pause-icon { display: none; }
.motion-control[data-paused="true"] .play-icon { display: block; }
.motion-control svg { width: 1.25rem; height: 1.25rem; }
.motion-control:hover { background-color: #38281f; }
.motion-control:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }

.language-switch {
  position: relative;
  width: max-content;
  color: var(--paper);
}
.masthead .language-switch { margin-inline-start: auto; }
.language-switch summary {
  display: flex;
  align-items: center;
  gap: .45rem;
  min-height: 2.75rem;
  padding-inline: .75rem;
  border: 1px solid #fff3e455;
  border-radius: 999px;
  background: #15110f88;
  list-style: none;
  font-size: .75rem;
  font-weight: 650;
  cursor: pointer;
}
.language-switch summary::-webkit-details-marker { display: none; }
.language-switch summary:hover, .language-switch[open] summary { background: #38281f; }
.language-switch summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.language-options {
  position: absolute;
  inset: calc(100% + .5rem) auto auto 0;
  min-width: 10.25rem;
  margin: 0;
  padding: .25rem;
  list-style: none;
  text-align: start;
  border: 1px solid #fff3e435;
  border-radius: .75rem;
  background: #221814;
  box-shadow: 0 12px 35px #0e090780;
}
.masthead .language-options { inset-inline: auto 0; }
.language-options a {
  display: flex;
  align-items: center;
  gap: .6rem;
  min-height: 2.75rem;
  padding: .45rem .65rem;
  border-radius: .5rem;
  font-size: .875rem;
  text-decoration: none;
}
.language-options a:hover, .language-options a:focus-visible { background: #38281f; }
.language-options a[aria-current="true"] { color: #ffd09c; background: #38281f; }
.language-code { min-width: 1.35rem; opacity: .8; font-size: .75rem; font-weight: 650; }

.landing-content { width: min(100%, 78rem); }

.wordmark {
  display: grid;
  grid-template-columns: 36.51% 1fr;
  align-items: center;
  width: min(100%, 45rem);
  margin-inline: auto;
  perspective: 700px;
  filter: drop-shadow(0 3px 20px #160e0a50);
}

.wordmark img { display: block; width: 100%; height: auto; }
.wordmark-solaris { transform-origin: 50% 100%; }
.landing[data-motion="ready"] .wordmark-solaris {
  opacity: calc(.5 + .5 * var(--entrance));
  transform: translateY(calc(-25px * (1 - var(--entrance)))) rotateX(calc(-65deg * (1 - var(--entrance))));
}

.chapters {
  display: grid;
  align-items: center;
  aspect-ratio: 153.5 / 33;
  grid-template-rows: repeat(2, minmax(0, 1fr));
}
.chapters img { width: 50%; }
.landing[data-motion="ready"] .chapters { grid-template-rows: 1fr; overflow: clip; perspective: 20rem; }
.landing[data-motion="ready"] .chapters img { grid-area: 1 / 1; width: 100%; }
.landing[data-motion="ready"] .chapter-cycling {
  opacity: calc(max(0, 1 - 1.6 * var(--monarch)) * var(--entrance));
  transform: translateY(calc(-65% * var(--monarch))) rotateX(calc(60deg * var(--monarch)));
}
.landing[data-motion="ready"] .chapter-monarch {
  opacity: max(0, calc((var(--monarch) - .375) * 1.6));
  transform: translateY(calc(65% * (1 - var(--monarch)))) rotateX(calc(-60deg * (1 - var(--monarch))));
}

.signup {
  width: min(100%, 27rem);
  margin: clamp(1.5rem, 5svh, 2.75rem) auto 0;
}

.signup h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 610;
  letter-spacing: -.018em;
  line-height: 1.75rem;
  text-wrap: balance;
}

.signup p { margin: 0; color: #f2dac4; }
.signup-form { margin-block: .75rem .5rem; }
.signup-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .25rem;
  padding: .25rem;
  border: 1px solid #e6b38d7a;
  border-radius: .75rem;
  background: #201612ee;
  text-align: start;
}

.signup-row input, .specular-button {
  min-height: 2.75rem;
  border: 0;
  border-radius: .5rem;
  font: inherit;
  font-size: .875rem;
  line-height: 1.25rem;
  opacity: 1;
}

.signup-row input { min-width: 0; padding-inline: .75rem; color: var(--paper); background: transparent; }
.signup-row input::placeholder { color: #edd4bf; opacity: 1; }
.specular-slot { display: inline-grid; }
.specular-button {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .5rem .875rem;
  border: 1px solid #f4f0e655;
  border-radius: var(--sb-radius, 9px);
  color: var(--sb-text-color, var(--paper));
  background: color-mix(in srgb, var(--sb-tint, var(--paper)) calc(var(--sb-tint-opacity, .075) * 100%), #241b16);
  box-shadow: inset 0 1px 6px #f4f0e610, 0 0 6px #f4f0e60b;
  font-weight: 690;
  text-decoration: none;
  white-space: nowrap;
}
.specular-button:not(:disabled) { cursor: pointer; }
.specular-button:disabled { cursor: default; }
.specular-button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.specular-button__label { position: relative; z-index: 2; }
.specular-button__light {
  position: absolute;
  inset: -24px;
  z-index: 1;
  display: block;
  width: calc(100% + 48px);
  height: calc(100% + 48px);
  pointer-events: none;
}
.signup-form[aria-busy="true"] .specular-button { cursor: progress; color: transparent; }
.signup-form[aria-busy="true"] .specular-button::after {
  content: "";
  position: absolute;
  width: 1rem;
  height: 1rem;
  border: 2px solid #f4f0e65c;
  border-top-color: var(--paper);
  border-radius: 50%;
  animation: signup-spin 800ms linear infinite;
}
@keyframes signup-spin { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) {
  .signup-form[aria-busy="true"] .specular-button::after { animation: none; }
}
.signup .signup-status:not(:empty) { margin-top: .5rem; font-size: .75rem; line-height: 1rem; }
.signup-status[data-state="sent"]::before { content: "✓" / ""; margin-inline-end: .4em; color: var(--gold); }
.signup-challenge { display: grid; justify-items: center; }
.signup-challenge:not(:empty) { margin-top: .5rem; }
.signup .text-link { font-size: .75rem; line-height: 1rem; color: #f2dac4; }
.signup .text-link:hover { color: var(--gold); }

.masthead { display: flex; align-items: center; min-height: 6rem; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; }
.brand img { display: block; width: clamp(7rem, 12vw, 10.125rem); height: auto; }
.document { max-width: 44rem; padding-block: 2rem 5rem; }
.document h1 { margin: 1.65rem 0; color: var(--gold); font-size: clamp(2.4rem, 6vw, 4.5rem); line-height: 1; letter-spacing: -.06em; overflow-wrap: anywhere; }
.document h2 { margin: 2rem 0 .5rem; font-size: 1.15rem; }
.document p { margin-top: .5rem; color: var(--muted); overflow-wrap: anywhere; }

@media (max-width: 680px) {
  .landing { padding-block: 5.25rem 2.5rem; }
  .landing::after {
    background:
      radial-gradient(ellipse 95% 31% at 50% 52%, #120d0ac7, transparent 100%),
      linear-gradient(180deg, #15110f96, #15110f40 31%, transparent 46%, #15110f36 69%, #15110f55);
  }
  .masthead { min-height: 4.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .solar-intro, .motion-control { display: none !important; }
  .landing[data-motion="ready"] .wordmark-solaris,
  .landing[data-motion="ready"] .chapters img { opacity: 1; transform: none; }
  .landing[data-motion="ready"] .chapters { grid-template-rows: repeat(2, minmax(0, 1fr)); }
  .landing[data-motion="ready"] .chapters img { grid-area: auto; width: 50%; }
}

@media (forced-colors: active) {
  .landing-waves, .landing::after { display: none; }
}

.solar-pair {
  --sun-size: clamp(5.375rem, 13vw, 9.75rem);
  position: relative;
  top: calc(-1 * clamp(1.25rem, 3.8svh, 2.25rem));
  isolation: isolate;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  margin: 0 auto clamp(3.125rem, 9.5svh, 5.5rem);
}

.solar-symbol { display: block; position: relative; }
.solar-symbol img {
  display: block;
  width: var(--sun-size);
  height: auto;
  filter: drop-shadow(0 0 .85rem var(--sun-halo));
}
.solar-symbol--cycling {
  --travel: max(-18vw, -16rem);
  --turn: -20deg;
  --sun-halo: #fdb91328;
}
.solar-symbol--monarch {
  --travel: min(18vw, 16rem);
  --turn: 22deg;
  --sun-halo: #fd5d1330;
  margin-inline-start: calc(var(--sun-size) * -.11);
}

.solar-pair::before, .solar-pair::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  inset: -62% -40%;
}
.solar-pair::before {
  background:
    radial-gradient(ellipse at 36% 51%, #ffb84e54, transparent 56%),
    radial-gradient(ellipse at 64% 50%, #f06e1459, transparent 56%);
  mask-image: radial-gradient(ellipse closest-side, #000 38%, transparent 100%);
  opacity: .42;
}

.solar-pair::after {
  inset: -55% -45%;
  background: conic-gradient(from 6deg,
    transparent 0deg, #ffdb9a68 16deg, transparent 21deg,
    transparent 47deg, #ffd78b91 52deg, transparent 56deg,
    transparent 109deg, #fc963c75 119deg, transparent 127deg,
    transparent 215deg, #ffbb696d 221deg, transparent 227deg,
    transparent 275deg, #ffdb9a85 283deg, transparent 291deg,
    transparent 331deg, #fff2bd5e 339deg, transparent 347deg);
  mask-image: radial-gradient(ellipse, transparent 19%, #000 39%, transparent 69%);
  opacity: .065;
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  html:not([data-solar-intro]) .solar-symbol img {
    transition: transform 480ms cubic-bezier(.22, 1, .36, 1);
  }
  html:not([data-solar-intro]) .solar-symbol:hover img {
    transform: translateY(-3px) rotate(calc(var(--turn) * .27));
  }
}

.solar-intro { display: none; }
html[data-solar-intro] .solar-intro {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  background: #090706;
  color: var(--paper);
}

.intro-skip {
  position: absolute;
  inset: auto var(--gutter) max(1.25rem, env(safe-area-inset-bottom)) auto;
  min-height: 2.75rem;
  padding: .5rem .75rem;
  border: 0;
  border-radius: .25rem;
  background: #15110f;
  color: var(--paper);
  font: inherit;
  font-size: .75rem;
  cursor: pointer;
}
.intro-skip:hover { background: #38281f; }
.intro-skip:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

html[data-solar-intro="pending"] .solar-pair { visibility: hidden; }
html[data-solar-intro] .solar-pair { z-index: 3; }

@media (prefers-reduced-motion: no-preference) {
  html[data-solar-intro="pending"] .landing-copy { opacity: 0; }
  html:is([data-solar-intro="playing"], [data-solar-intro="revealing"]) {
    .solar-intro { animation: intro-fade 1880ms cubic-bezier(.32,.11,.32,1) 1210ms both; }
    .solar-pair { animation: intro-lift 2150ms cubic-bezier(.32,.08,.23,1) both; }
    .solar-symbol { animation: intro-sun 1320ms cubic-bezier(.22,1,.36,1) both; }
    .solar-pair::before { animation: intro-halo 1940ms cubic-bezier(.32,.08,.24,1) 1060ms both; }
    .solar-pair::after { animation: intro-rays 1850ms cubic-bezier(.32,.08,.24,1) 1160ms both; }
    .landing-copy { animation: intro-copy 890ms cubic-bezier(.22,1,.36,1) 1980ms both; }
  }
}

@keyframes intro-sun {
  0% { opacity: 0; transform: translate3d(var(--travel), 9%, 0) rotate(var(--turn)) scale(.79); }
  24% { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
@keyframes intro-lift {
  0%, 60% { transform: translate3d(0, var(--intro-offset), 0) scale(1.52); }
  100% { transform: none; }
}
@keyframes intro-halo {
  0% { opacity: 0; transform: scale(.58); }
  52% { opacity: .71; transform: scale(1.44); }
  100% { opacity: .42; transform: none; }
}
@keyframes intro-rays {
  0% { opacity: 0; transform: scale(.72) rotate(-5deg); }
  50% { opacity: .17; transform: scale(1.25); }
  100% { opacity: .065; transform: none; }
}
@keyframes intro-fade {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes intro-copy {
  from { opacity: 0; transform: translateY(1.125rem); }
  to { opacity: 1; transform: none; }
}
