@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 300 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --night: #081624;   /* sky */
  --sea: #0b2034;     /* water, below the horizon */
  --foam: #eef3f8;    /* text */
  --mist: #a9bccd;    /* quieter text */
  --brass: #f2b33d;   /* the lamp and its beam */
  --gutter: clamp(1rem, 5vw, 4rem);
  /* Where the lamp sits; the beam turns around it. */
  --tower-x: 78vw;
  --tower-size: clamp(7rem, 16vw, 13rem);
  --horizon: 74vh;
}

* { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

body {
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: var(--gutter);
  background: var(--night);
  color: var(--foam);
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.55;
  overflow-x: hidden;
}

/* The scene: sky, sea, the lighthouse and its beam. Behind everything, never in the way. */
.night {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(to bottom, #050f1a 0%, var(--night) 55%, #0d2740 var(--horizon), var(--sea) var(--horizon), #06121e 100%);
}

.horizon {
  position: absolute;
  left: 0; right: 0;
  top: var(--horizon);
  height: 1px;
  background: linear-gradient(to right, transparent, rgb(169 188 205 / 35%) 30%, rgb(169 188 205 / 35%) 70%, transparent);
}

.tower {
  position: absolute;
  left: calc(var(--tower-x) - var(--tower-size) / 2);
  top: calc(var(--horizon) - var(--tower-size) * 0.84);
  width: var(--tower-size);
  height: var(--tower-size);
  perspective: 900px;
}

.lighthouse { position: absolute; inset: 0; width: 100%; height: 100%; }

/* The lamp is at (32, 18.75) in the drawing's 64-unit box. */
.beam, .glow {
  position: absolute;
  left: 50%;
  top: 29.3%;
}

/* One long wedge of light, swung round the lamp in 3D: long and faint to either side, a flash as it faces you. */
.beam {
  width: 150vw;
  height: 34vh;
  margin-top: -17vh;
  transform-origin: 0 50%;
  background: linear-gradient(to right, rgb(242 179 61 / 55%), rgb(242 179 61 / 14%) 35%, transparent 80%);
  clip-path: polygon(0 48%, 100% 0, 100% 100%, 0 52%);
  animation: sweep 9s linear infinite;
  mix-blend-mode: screen;
}

.glow {
  width: calc(var(--tower-size) * 0.9);
  height: calc(var(--tower-size) * 0.9);
  margin: calc(var(--tower-size) * -0.45) 0 0 calc(var(--tower-size) * -0.45);
  border-radius: 50%;
  background: radial-gradient(circle, rgb(242 179 61 / 70%), rgb(242 179 61 / 0%) 65%);
  animation: flash 9s linear infinite;
}

@keyframes sweep {
  from { transform: rotateY(0deg); }
  to { transform: rotateY(360deg); }
}

/* Brightest when the beam points at you (a quarter turn in), dim when it points away. */
@keyframes flash {
  0%, 100% { opacity: 0.35; }
  25% { opacity: 1; transform: scale(1.6); }
  50%, 75% { opacity: 0.2; }
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-stretch: 85%;
  letter-spacing: 0.01em;
}

main {
  align-self: center;
  max-width: 40rem;
  padding-bottom: 12vh;
}

h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(2.75rem, 8vw, 6.5rem);
  font-weight: 700;
  font-stretch: 75%;
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.lede {
  margin: 0 0 1.25rem;
  max-width: 34rem;
  color: var(--mist);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
}

.status {
  margin: 0;
  color: var(--brass);
  font-weight: 500;
}

footer {
  color: var(--mist);
  font-size: 0.875rem;
}

/* Phones: the lighthouse moves to the middle of the horizon, under the words. */
@media (max-width: 40rem) {
  :root { --tower-x: 72vw; --horizon: 80vh; --tower-size: 6.5rem; }
  main { padding-bottom: 22vh; }
}

@media (prefers-reduced-motion: reduce) {
  .beam { animation: none; transform: rotateY(160deg); }
  .glow { animation: none; opacity: 0.5; }
}
