:root {
  --bg: #060608;
  --fg: #f3f0ea;
  --muted: #a39d93;
  --line: rgba(255, 255, 255, 0.09);
  --sun: #ffb35c;
  --sun-hot: #ffe6c4;

  /* Where the eclipse sits in the viewport */
  --sun-size: min(52vmin, 540px);
  --sun-x: 76%;
  --sun-y: 34%;

  color-scheme: dark;
}

/* Narrow screens: the eclipse sits between the header and the headline. */
@media (max-width: 900px) {
  :root {
    --sun-size: min(70vw, 420px);
    --sun-x: 64%;
    --sun-y: calc(var(--sun-size) / 2 + 104px);
  }
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--fg);
  font: 1.0625rem/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Background: an eclipsed sun, the orbits around it, and a little film grain. */

.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(circle at var(--sun-x) var(--sun-y), rgba(255, 150, 60, 0.12), transparent 60vmax),
    var(--bg);
}

.sky::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.orbits {
  position: absolute;
  left: var(--sun-x);
  top: var(--sun-y);
}

.orbits span {
  position: absolute;
  width: calc(var(--sun-size) * var(--k));
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbits span:nth-child(1) { --k: 1.6; }
.orbits span:nth-child(2) { --k: 2.25; }
.orbits span:nth-child(3) { --k: 3.05; }
.orbits span:nth-child(4) { --k: 4; }

.planet { animation: orbit 140s linear infinite; }

.planet::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: var(--sun-hot);
  box-shadow: 0 0 12px 3px rgba(255, 179, 92, 0.55);
}

.sun {
  position: absolute;
  width: var(--sun-size);
  aspect-ratio: 1;
  left: calc(var(--sun-x) - var(--sun-size) / 2);
  top: calc(var(--sun-y) - var(--sun-size) / 2);
}

.sun > div {
  position: absolute;
  border-radius: 50%;
}

/* Coronal streamers: two interfering sets of rays, faded out with distance. */
.rays {
  inset: -85%;
  background:
    repeating-conic-gradient(from 0deg, rgba(255, 226, 186, 0.2) 0deg, transparent 1.6deg 5.4deg, rgba(255, 226, 186, 0.2) 7deg),
    repeating-conic-gradient(from 3deg, rgba(255, 190, 120, 0.14) 0deg, transparent 2.5deg 9.5deg, rgba(255, 190, 120, 0.14) 12deg);
  -webkit-mask-image: radial-gradient(circle closest-side, transparent 36%, #000 37.5%, rgba(0, 0, 0, 0.3) 58%, transparent 92%);
  mask-image: radial-gradient(circle closest-side, transparent 36%, #000 37.5%, rgba(0, 0, 0, 0.3) 58%, transparent 92%);
  animation: spin 360s linear infinite;
  will-change: transform;
}

/* Inner corona: brightest at the edge of the moon, falling off quickly. */
.corona {
  inset: -55%;
  background: radial-gradient(
    circle closest-side,
    transparent 46.5%,
    rgba(255, 240, 215, 0.95) 47.6%,
    rgba(255, 200, 130, 0.5) 50.5%,
    rgba(255, 160, 80, 0.18) 58%,
    rgba(255, 130, 60, 0.06) 72%,
    transparent 100%
  );
}

.moon {
  inset: 0;
  background: radial-gradient(circle at 38% 34%, #111014, #040405 72%);
  box-shadow:
    0 0 0 1px rgba(255, 220, 180, 0.6),
    0 0 22px 4px rgba(255, 196, 130, 0.5),
    0 0 80px 16px rgba(255, 150, 70, 0.2);
}

/* The "diamond ring": the last bead of sunlight at the edge of the moon. */
.moon::after {
  content: "";
  position: absolute;
  left: 14.3%;
  top: 85.7%;
  width: 2.2%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
  box-shadow:
    0 0 10px 4px #fff,
    0 0 50px 18px rgba(255, 225, 185, 0.75),
    0 0 160px 50px rgba(255, 170, 90, 0.3);
  animation: glint 7s ease-in-out infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes orbit {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes glint { 50% { opacity: 0.75; } }

@media (prefers-reduced-motion: reduce) {
  .rays, .planet, .moon::after { animation: none; }
}

/* Layout */

.wrap {
  max-width: 64rem;
  margin: 0 auto;
  padding-inline: 1.5rem;
}

header.site .wrap {
  display: flex;
  align-items: center;
  padding-block: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--fg);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

a { color: var(--sun); }

a:focus-visible {
  outline: 2px solid var(--sun);
  outline-offset: 3px;
  border-radius: 4px;
}

.hero {
  max-width: 36rem;
  padding-block: clamp(5rem, 16vh, 10rem) clamp(4rem, 12vh, 7rem);
}

@media (max-width: 900px) {
  .hero { padding-top: calc(var(--sun-size) + 72px); }
}

h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.5rem, 6.4vw, 4.6rem);
  font-weight: 650;
  line-height: 1.02;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, #fff 20%, #f5e3cb 65%, #e8b27a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 1.2rem;
}

.button {
  display: inline-block;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  background: var(--fg);
  color: #0b0a0c;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: box-shadow 0.25s, background 0.25s;
}

.button:hover {
  background: #fff;
  box-shadow: 0 0 0 5px rgba(255, 179, 92, 0.16), 0 0 40px rgba(255, 179, 92, 0.35);
}

section + section { margin-top: 4.5rem; }

h2 {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h3 {
  margin: 0.75rem 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

p { margin: 0 0 1rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1rem;
}

.card {
  padding: 1.5rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  backdrop-filter: blur(16px) saturate(120%);
}

.card p { color: #cfc9bf; }

.card > :last-child { margin-bottom: 0; }

.tag {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border: 1px solid rgba(255, 179, 92, 0.35);
  border-radius: 999px;
  background: rgba(255, 179, 92, 0.08);
  color: var(--sun);
  font-size: 0.75rem;
  font-weight: 600;
}

dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.6rem 2rem;
  margin: 0;
}

dt { color: var(--muted); }

dd {
  margin: 0;
  overflow-wrap: anywhere;
}

footer.site {
  margin-top: 6rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

footer.site .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 2rem;
}

footer.site .brand {
  color: var(--muted);
  font-weight: 400;
}

footer.site a { color: var(--muted); }
