/* The hills pages: B's sky, planes and field, the line on the field, the foot. */
:root {
  --sky: var(--paper);
  --on-sky: var(--ink);
  --field: var(--ink);
  --on-field: var(--paper);
  --on-field-quiet: #A9AAA2;
}
/* After dark the front plane turns to the logo's white face. */
:root[data-field='white'] {
  --field: var(--paper);
  --on-field: var(--ink);
  --on-field-quiet: #5E6058;
}

body { background: var(--sky); transition: none; }
.ground { display: none; }

.hills {
  position: fixed;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}
.hills .field { fill: var(--field); transition: fill 1.2s var(--ease-out); }

.glass {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1;
  pointer-events: none;
  color: var(--on-sky);
  transition: color 0.8s var(--ease-out);
}
.glass.over { z-index: 4; }
.glass.on-field { color: var(--on-field); }
.glass svg { position: absolute; overflow: visible; display: block; }
.glass .ring { fill: none; stroke: currentColor; }
.glass .handle, .glass .glint { fill: currentColor; }
.glass .moon { fill: var(--paper); }

.field-stage {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: var(--field-top, 66vh);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(14px, 3svh, 40px) 16px max(18px, env(safe-area-inset-bottom));
  color: var(--on-field);
  transition: color 1.2s var(--ease-out);
  pointer-events: none;
}
.field-stage > * { pointer-events: auto; }
.say {
  flex: 1;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 0;
  margin: 0;
  font-size: clamp(40px, 6.4vw, 104px);
}
.say .line { display: block; overflow: visible; height: auto; max-width: 100%; }
.line .letter {
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 34;
  stroke-opacity: 0;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-bottom: 6px;
}
.foot a {
  display: inline-flex;
  align-items: center;
  color: var(--on-field-quiet);
  text-decoration: none;
  border-radius: 4px;
  transition: color 0.35s var(--ease-out);
}
.foot a:hover, .foot a:focus-visible { color: var(--on-field); }
.foot a:focus-visible { outline: 1.5px solid currentColor; outline-offset: 3px; }
.foot .social { display: flex; gap: 6px; }
.foot .icon { padding: 8px; transition: color 0.35s var(--ease-out), transform 0.35s var(--ease-out); }
.foot .icon:hover { transform: translateY(-1px); }
.foot .icon svg { width: 22px; height: 22px; fill: currentColor; display: block; }
.foot .icon .wash { opacity: 0; transition: opacity 0.3s ease; }
.foot .icon:hover .wash, .foot .icon:focus-visible .wash { opacity: 0.22; }
@media (prefers-reduced-motion: reduce) { .foot .icon:hover { transform: none; } }
.foot .project {
  gap: 0.32em;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.foot .wordmark { height: 0.98em; width: auto; overflow: visible; fill: currentColor; position: relative; top: 0.02em; }
.foot .wordmark circle { fill: none; stroke: currentColor; }

/* B3: today's path of the sun, and the glass you can take. */
.track {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  color: var(--on-sky);
}
.track path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 0 9;
  opacity: 0.38;
}
.glass .hit { fill: transparent; pointer-events: all; cursor: grab; touch-action: none; }
.glass.held .hit { cursor: grabbing; }

/* B2's line as live text: one phrase at a time. */
@font-face {
  /* The City of Berkeley's typeface is ITC Rennie Mackintosh; this is Megrim (Daniel
     Johnson, OFL), the closest free face, always set in capitals as that face is. */
  font-family: 'City';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('/assets/fonts/megrim-latin-400-normal.woff2') format('woff2');
}
.say.text {
  position: relative;
  display: block;
  flex: 1;
  align-content: center;
  text-align: center;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.05em;
  white-space: normal;
  text-wrap: balance;
  /* Letters rise one by one, split apart, then join up again at rest. Kerning and ligatures
     only exist when they're joined, so with them on, every letter nudged as it landed.
     Off, split and whole set the same, to the pixel. */
  font-kerning: none;
  font-variant-ligatures: none;
  font-feature-settings: "kern" 0, "liga" 0, "calt" 0;
}
.say.text .line { display: block; }
/* Each word clips only above and below, so letters can come up into it. */
.say.text .slot {
  position: relative;
  display: inline-block;
  vertical-align: top;
  clip-path: inset(-0.2em -4em -0.3em -4em);
}
/* The box reaches past the ascenders and the tails of g and y, so no clip cuts them. */
.say.text .w { display: inline-block; padding: 0.16em 0 0.26em; margin: -0.16em 0 -0.26em; white-space: nowrap; }
/* A word in the City's own letters. */
/* Letters of a City line, each in its own colour, sitting as one word. */
.say.text .ch { display: inline-block; }
.say.text .city {
  font-family: 'City', serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.86em;
  -webkit-text-stroke: 0.07em currentColor;
}
/* A whole line in the City's letters stands a little taller than one word of them. */
.say.text .city-line .city { font-size: 1em; }
/* A City capital drawn over the letter it stands for; the letter waits underneath. */
.say.text .ghosted { color: transparent; }
.say.text .ghost {
  position: absolute;
  left: 50%;
  bottom: 0.08em;
  transform: translateX(-50%);
  color: var(--on-field);
  font-family: 'City', serif;
  font-weight: 400;
  font-size: 0.78em;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  -webkit-text-stroke: 0.08em currentColor;
  pointer-events: none;
}
