/* freq.show by LoveHz. One stylesheet for every page. */

:root {
  --bg: #050505;
  --fg: rgba(255, 255, 255, 0.77); /* words and lit links: white at 77%, never full white */
  --dim: #7a7a7a;          /* dark grey links, white on hover */
  --line: rgba(255, 255, 255, 0.16);
  --gutter: clamp(16px, 2.2vw, 32px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* The purple gradient for special links. */
  --grain-grad: linear-gradient(100deg, #b8a4ff 0%, #7b4dff 28%, #d36bff 52%, #5a2bd9 76%, #b8a4ff 100%);
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', system-ui, sans-serif;
  font-variation-settings: 'opsz' 32; /* Inter Display */
  font-feature-settings: 'ss01', 'cv11';
  letter-spacing: -0.015em;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, video, canvas { display: block; }
::selection { background: #7b4dff; color: #fff; }

/* Links: dark grey, white on hover. */
.link { color: var(--dim); transition: color 0.35s var(--ease); }
.link:hover, .link:focus-visible, .link[aria-current='page'] { color: var(--fg); }
:focus-visible { outline: 1px solid var(--fg); outline-offset: 4px; border-radius: 4px; }

/* A special link: on hover the words fill with a moving, grainy purple gradient. */
.special { position: relative; color: var(--dim); transition: color 0.35s var(--ease); }
.special .fill {
  background-image: var(--noise), var(--grain-grad);
  background-size: 160px 160px, 300% 100%;
  background-blend-mode: soft-light, normal;
  -webkit-background-clip: text; background-clip: text;
}
.special:hover, .special:focus-visible { color: transparent; }
.special:hover .fill, .special:focus-visible .fill { animation: grain-drift 7s linear infinite; }
.special .arrow { display: inline-block; transition: transform 0.5s var(--ease); }
.special:hover .arrow { transform: translateX(6px); }
/* The gradient slides slowly while the grain steps, so it shimmers like film. */
@keyframes grain-drift {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 1600px 960px, 300% 0; }
}

/* Header: mark left, links centred, name right. */
/* Going from page to page the picture runs on as one shot (see sand/space.js), and the header holds still across the cut. */
@view-transition { navigation: auto; }
::view-transition-group(root) { animation-duration: 0.18s; }
.top {
  view-transition-name: top;
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: var(--gutter);
  pointer-events: none;
}
.top > * { pointer-events: auto; }
.mark { width: 44px; height: 44px; justify-self: start; }
.mark img { width: 100%; height: 100%; }
.nav { display: flex; gap: clamp(34px, 3.6vw, 56px); font-size: 10px; font-weight: 400; letter-spacing: 0.2em; text-transform: uppercase; }
.nav .link { color: #6b6b6b; text-shadow: 0 0 10px #000, 0 0 3px #000, 0 0 1px #000; } /* quieter than other links, with a dark halo so they read over the sand */
.nav .link:hover, .nav .link:focus-visible, .nav .link[aria-current='page'] { color: var(--fg); }
.word { justify-self: end; font-size: clamp(22px, 2vw, 30px); font-weight: 500; letter-spacing: -0.03em; color: var(--fg); }
.word small { display: block; font-size: 12px; font-weight: 400; letter-spacing: 0; color: var(--dim); text-align: right; margin-top: 2px; }

/* With a mouse, the pointer is a small white disc (from /sand/cursor.js), the same on every page. */
.own-cursor, .own-cursor * { cursor: none !important; }
.cursor { position: fixed; left: 0; top: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; mix-blend-mode: difference; pointer-events: none; z-index: 30; opacity: 0; transition: scale 0.1s ease-out, opacity 0.3s; }
.cursor.on { opacity: 1; }
.cursor.over { scale: 1.3; }
.cursor.down { scale: 0.88; }
.cursor.over.down { scale: 1.15; }

/* Pills, like Contact and Newsletter. */
.pill {
  display: inline-flex; align-items: center; height: 40px; padding: 0 20px;
  border: 1px solid currentColor; border-radius: 999px;
  font-size: 17px; font-weight: 500; color: var(--dim);
  transition: color 0.35s var(--ease), background-color 0.35s var(--ease);
}
.pill:hover, .pill:focus-visible { color: var(--fg); }

.grain::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 5;
  background-image: var(--noise); background-size: 160px; opacity: 0.07; mix-blend-mode: overlay;
}

@media (max-width: 720px) {
  .top { grid-template-columns: auto 1fr auto; gap: 12px; }
  .nav { justify-self: center; gap: 26px; }
  .mark { width: 34px; height: 34px; }
  .word { font-size: 20px; }
  .word small { display: none; }
  .top.bare { grid-template-columns: 1fr auto 1fr; } /* home: no name, so the links sit dead centre */
  .pill { height: 36px; padding: 0 16px; font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
}

/* ---------- Inner pages ---------- */
.page main { position: relative; z-index: 2; }
.prose { max-width: 720px; padding: 0 var(--gutter); margin: 0 auto; }
.prose p { font-size: clamp(20px, 2vw, 26px); line-height: 1.35; font-weight: 400; color: #d8d8d8; margin: 0 0 1em; }
.eyebrow { font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--dim); margin: 0 0 12px; }
h1, h2 { font-weight: 500; letter-spacing: -0.04em; margin: 0; }

/* About: the sand turning in the middle, the words small in the bottom left corner. */
body:has(#sand) { height: 100svh; overflow: hidden; }
#sand { position: fixed; left: 50%; top: 50%; z-index: 1; transform: translate(-50%, -50%); width: min(84svh, 92vw); height: min(84svh, 92vw); pointer-events: none; mix-blend-mode: screen; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.side { position: fixed; left: var(--gutter); bottom: calc(var(--gutter) + env(safe-area-inset-bottom)); z-index: 3; max-width: min(30ch, calc(100vw - 2 * var(--gutter))); opacity: 0; transform: translateY(6px); transition: opacity 2.4s var(--ease) 0.8s, transform 2.4s var(--ease) 0.8s; }
body.ready .side { opacity: 1; transform: none; }
/* The same size as the credit in the corner of the Experience. */
.side p { margin: 0; font-size: 11px; line-height: 1.5; color: var(--dim); }
.side .note { margin-bottom: 10px; letter-spacing: 0.16em; text-transform: uppercase; white-space: nowrap; }
/* Hz with a capital H and a small z, not HZ. */
.hz { letter-spacing: 0.02em; }
.hz span { text-transform: none; font-size: 0.86em; }
.side .who { margin-top: 6px; color: var(--fg); font-weight: 500; letter-spacing: 0.02em; }
.side .pill { margin-top: 14px; height: 28px; padding: 0 12px; font-size: 11px; font-weight: 400; }
@media (prefers-reduced-motion: reduce) { .side { transition-duration: 0.01s; transform: none; } }

/* Tour */
.tour { padding: calc(var(--gutter) * 2 + 120px) var(--gutter) var(--gutter); max-width: 1100px; margin: 0 auto; }
.tour h1 { font-size: clamp(48px, 8vw, 120px); line-height: 0.95; margin-bottom: 48px; }
.dates { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.dates li { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 16px; align-items: center; padding: 24px 0; border-bottom: 1px solid var(--line); font-size: clamp(18px, 1.8vw, 24px); }
.dates .when { color: var(--dim); }
@media (max-width: 720px) {
  .dates li { grid-template-columns: 1fr auto; }
  .dates .when { grid-column: 1 / -1; order: 3; font-size: 15px; }
}
@media (max-width: 720px) {
  .hint { top: 24%; } /* clear of the figures, which sit close together on a phone */
  .names p { font-size: 10px; letter-spacing: 0.12em; }
}

/* The sound button: a speaker with waves while sound is on, crossed out while it is off. */
.spk { display: block; overflow: visible; }
.spk .on { display: none; }
[aria-pressed="true"] .spk .on { display: inline; }
[aria-pressed="true"] .spk .off { display: none; }
