*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* The canvas behind the document. body's cream only propagates here while html
     has no background of its own, and on a phone that leaves overscroll past the
     end of the page painting the browser's default WHITE below the dark footer.
     Painting html in the footer's ink kills that band outright. */
  background-color: var(--ink);
}

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--on-paper);
  font-family: var(--font-text);
  font-size: var(--t-base);
  line-height: 1.65;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 72, "WONK" 0, "opsz" 120;
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.03em;
  text-wrap: balance;
  margin: 0;
}

h1 { font-size: var(--t-5xl); }
h2 { font-size: var(--t-4xl); }
h3 { font-size: var(--t-xl); font-variation-settings: "SOFT" 72, "opsz" 30; line-height: 1.2; }

p { margin: 0 0 var(--s-3); max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

a { color: var(--coral-ink); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { text-decoration-thickness: 2px; }

/* Browser surfaces themed from the palette rather than left at defaults */
::selection { background: var(--apricot); color: var(--ink); }

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

html {
  scrollbar-color: var(--violet) var(--paper-2);
  scrollbar-width: thin;
  caret-color: var(--coral-ink);
}
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--paper-2); }
::-webkit-scrollbar-thumb {
  background: var(--violet);
  border: 3px solid var(--paper-2);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }

.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--s-3);
  top: -4rem;
  z-index: 100;
  background: var(--ink);
  color: var(--on-ink);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--radius);
  transition: top 200ms var(--ease-out);
}
.skip-link:focus { top: var(--s-3); }

/* ---- the bulb rule: the identity element, drawn in CSS ---- */
.bulbs {
  --bulb: 13px;
  --gap: 27px;
  --lit: var(--gold-lit);
  --dim: var(--gold);
  height: var(--bulb);
  background-image: radial-gradient(
    circle at center,
    var(--lit) 0 26%,
    var(--dim) 30% 46%,
    transparent 52%
  );
  background-size: var(--gap) var(--gap);
  background-position: center;
  background-repeat: repeat-x;
  border: 0;
  margin: 0;
}

.bulbs--ink { --lit: var(--gold-lit); --dim: #8A6220; }

.bulbs--rail {
  width: 100%;
  filter: drop-shadow(0 0 7px rgba(242, 200, 107, 0.65));
}

@media (prefers-reduced-motion: no-preference) {
  .js .bulbs--warm {
    --warm: 0%;
    -webkit-mask-image: linear-gradient(90deg, #000 0 var(--warm), transparent var(--warm));
    mask-image: linear-gradient(90deg, #000 0 var(--warm), transparent var(--warm));
    transition: --warm 900ms var(--ease-out);
  }
  .js .bulbs--warm.is-lit { --warm: 100%; }
}

@property --warm {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 100%;
}
