@font-face {
  font-family: "Archivo";
  src: url("assets/fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

/* The two skies. Everything on the page is drawn from these tokens. */
:root,
:root[data-time="day"] {
  --bg: #9fd8f4;
  --ink: #0a1b2b;
  --disc: #ffe14d;
  color-scheme: light;
}
:root[data-time="night"] {
  --bg: #0e1030;
  --ink: #f4efe4;
  --disc: #f4efe4;
  color-scheme: dark;
}

:root {
  --gutter: clamp(16px, 2.4vw, 36px);
  --fade: 700ms ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Archivo", "Arial Narrow", Arial, sans-serif;
  font-size: clamp(1.0625rem, 0.98rem + 0.3vw, 1.25rem);
  line-height: 1.4;
  overflow-x: clip;
  transition: background-color var(--fade), color var(--fade);
}

a { color: inherit; }
ul { list-style: none; }
img { display: block; width: 100%; height: auto; }

:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }

/* Top bar */

.top {
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px var(--gutter);
  font-weight: 600;
}
.top nav { display: flex; gap: clamp(14px, 2vw, 28px); }
.top nav a { text-decoration: none; padding: 6px 0; }
.top nav a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.sky { display: flex; gap: 4px; }
.sky button {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 11px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.sky button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.sky i { width: 12px; height: 12px; background: currentColor; border-radius: 50%; }
.sky [data-set="night"] i { background: none; box-shadow: inset -4px 1px 0 0 currentColor; }

/* Hero */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  min-height: 100svh;
  padding: 92px var(--gutter) var(--gutter);
  overflow: hidden;
}

.lede {
  position: relative;
  z-index: 2;
  max-width: 17em;
  text-wrap: balance;
  font-size: clamp(1.5rem, 1.1rem + 1.7vw, 2.75rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.012em;
}

/* One disc plays both the sun and the moon. */
.disc {
  --size: min(58vmin, 560px);
  --move: 1.3s cubic-bezier(.5, 0, .2, 1);
  position: absolute;
  z-index: 0;
  top: 10%;
  right: 7%;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: var(--disc);
  transition: top var(--move), right var(--move), transform var(--move),
              background-color var(--fade);
}
.disc::after {
  content: "";
  position: absolute;
  inset: -2%;
  border-radius: 50%;
  background: var(--bg);
  transform: translate(120%, -30%);
  opacity: 0;
  transition: transform var(--move), opacity 300ms ease, background-color var(--fade);
}
[data-time="night"] .disc { top: 13%; right: 7%; transform: scale(.5); }
[data-time="night"] .disc::after { transform: translate(26%, -12%); opacity: 1; }

.mark {
  position: relative;
  z-index: 1;
  display: block;
  white-space: nowrap;
  font-size: 19.6vw;
  font-weight: 800;
  font-stretch: 75%;
  line-height: .78;
  transform-origin: left bottom;
}
.word { display: inline-block; }
.word b { display: inline-block; font-weight: inherit; letter-spacing: -0.022em; }

/* Sections */

.block {
  padding: clamp(28px, 4vw, 56px) var(--gutter) clamp(56px, 9vw, 130px);
  border-top: 3px solid var(--ink);
  transition: border-color var(--fade);
}

.head {
  margin-bottom: clamp(24px, 4vw, 56px);
  font-size: clamp(3.5rem, 13vw, 12rem);
  font-weight: 800;
  font-stretch: 75%;
  line-height: .85;
  letter-spacing: -0.02em;
}

.game {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 5fr);
  gap: clamp(20px, 3vw, 48px);
  align-items: end;
}
.shot {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--ink);
}
.shot img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  transition: opacity 600ms ease, transform 900ms cubic-bezier(.2, .7, .2, 1);
}
.shot:hover img { transform: scale(1.025); }

.about h3 { width: min(100%, 420px); margin-bottom: 1em; }
/* The logo's own colours vanish on the day sky, so it gets a dark plate. */
[data-time="day"] .about h3 {
  padding: 16px 18px;
  background: var(--ink);
}
.about p { max-width: 32em; }
.fine { margin-top: .8em; font-weight: 600; }
.go {
  display: inline-block;
  margin-top: 1.2em;
  padding: .6em .85em;
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
  transition: background-color var(--fade), color var(--fade), padding 200ms ease;
}
.go:hover { padding-right: 1.6em; }

.ways > div {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 6fr);
  gap: 12px clamp(20px, 3vw, 48px);
  padding: clamp(18px, 2.4vw, 32px) 0;
  border-top: 1px solid var(--ink);
}
.ways dt {
  font-size: clamp(1.75rem, 1.2rem + 2.3vw, 3.5rem);
  font-weight: 700;
  font-stretch: 88%;
  line-height: 1;
  letter-spacing: -0.015em;
}
.ways dd { max-width: 34em; padding-top: .25em; }

/* Contact, the one place the page flips */

.end {
  padding: clamp(40px, 7vw, 96px) var(--gutter) 20px;
  background: var(--ink);
  color: var(--bg);
  transition: background-color var(--fade), color var(--fade);
}
.say {
  margin-bottom: 1em;
  font-size: clamp(1.25rem, 1rem + 1vw, 2rem);
  font-weight: 500;
  line-height: 1.15;
}
.mail {
  display: block;
  white-space: nowrap;
  font-size: 9.6vw;
  font-weight: 800;
  font-stretch: 75%;
  line-height: 1;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.mail span { display: inline-block; }
.mail:hover span {
  text-decoration: underline;
  text-decoration-thickness: .06em;
  text-underline-offset: .1em;
}

.legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: clamp(40px, 7vw, 96px);
  font-size: .875rem;
}
.links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.links a { padding: 4px 0; }

/* Phone and small tablet */

@media (max-width: 899px) {
  .game { grid-template-columns: minmax(0, 1fr); }
  .ways > div { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .sky span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .sky button { padding: 0 10px; }

  .mark { white-space: normal; }
  .word { display: block; width: max-content; }
  .word + .word { margin-top: .05em; }

  .disc { --size: 66vmin; top: 30%; right: -10%; }
  [data-time="night"] .disc { top: 28%; right: 2%; transform: scale(.55); }
}

@media (max-width: 379px) {
  .top { gap: 8px; }
  .top nav { gap: 12px; font-size: .9375rem; }
  .sky { gap: 0; }
  .sky button { padding: 0 7px; }
}

/* Phone on its side: the sky is short, so the disc has to be too. */
@media (max-height: 500px) {
  .disc { --size: 40vmin; top: 22%; right: 5%; }
  [data-time="night"] .disc { top: 18%; right: 5%; transform: scale(.7); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 1ms !important; }
}
