/*
 * earshotmusic.app: the public homepage and the privacy page (PITCHY-112).
 *
 * Plain static files served by the web container's nginx for the earshotmusic.app host. Nothing here
 * is copied by hand: deploy/Dockerfile adds v2's tokens (apps/web/src/v2/tokens.css; both pages set
 * data-v2-theme="dark", the listening booth after hours, whatever the phone's setting), the dark
 * wordmark (design/v2/brand/assets/), the favicon and touch icon (apps/web/public/icons/) and
 * Parkinsans from the app's own package.
 *
 * The page copy lives in the HTML, not in the app's en.ts: that rule is for the React app (decisions,
 * 2026-12-03). The real marketing copy is PITCHY-174.
 */
@font-face {
  font-family: "Parkinsans";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("/fonts/parkinsans-latin-wght-normal.woff2") format("woff2");
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  font-family: "Parkinsans", system-ui, sans-serif;
  font-size: var(--v2-text-body);
  line-height: var(--v2-leading-body);
  color: var(--v2-ink);
  /* Window light falling from the top left onto the page, as in the app. */
  background:
    radial-gradient(130% 75% at 12% -12%, var(--v2-sky), transparent 62%) no-repeat,
    var(--v2-page);
  -webkit-font-smoothing: antialiased;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

::selection {
  background: var(--v2-action-soft);
  color: var(--v2-ink);
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--v2-line);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: text-decoration-color var(--v2-dur-release) var(--v2-ease-out);
  /* The phone's own tap flash, tinted orange: the default grey barely shows on the dark page. */
  -webkit-tap-highlight-color: rgb(233 96 30 / 0.22);
}
@media (hover: hover) and (pointer: fine) {
  a:hover {
    text-decoration-color: var(--v2-action);
  }
}
a:focus-visible {
  outline: 2px solid var(--v2-action);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* ---------------------------------------------------------------- the cutout and the record */
/*
 * The page is a surface with a round hole cut in it (PITCHY-196, Kobi's idea): the felt lies under the
 * hole, the record travels in between the two, hidden under the surface, and settles on the felt like a
 * jukebox loading a disc. The hole is the button's own clip (border-radius + overflow), so whatever
 * isn't in the hole stays under the page. Layers, bottom to top: felt (the button's background), the
 * carrier (the record's shadow, the turning disc, the rings, the light on it), the rim (the cut edge).
 *
 * Motion is transform and opacity only. The disc turns (home.js, WAAPI) and the light on it stays put, as
 * on a real turntable; the print on the label is what shows the turn.
 */
.well {
  --size: 280px;
  position: relative;
  flex: none;
  display: block;
  width: var(--size);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  color: inherit;
  background: radial-gradient(var(--v2-mat-dot) 1px, transparent 1.3px) 0 0 / 5px 5px, var(--v2-mat);
  -webkit-tap-highlight-color: transparent;
  /* The finger turns the record, so the page mustn't scroll or zoom under it. */
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none; /* a long hold is a held record, not a callout */
}
.well:focus-visible {
  outline: 2px solid var(--v2-action);
  outline-offset: 6px;
}
/* The cut edge: the surface's lip shades the felt under its upper left (the window light comes from there),
   and the far wall, facing the light, shows a thin lit line. Drawn above everything in the hole. */
.well__rim {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: 50%;
  pointer-events: none;
  box-shadow:
    inset calc(var(--size) / 28) calc(var(--size) / 22) calc(var(--size) / 16) rgb(0 0 0 / 0.55),
    inset calc(var(--size) / -140) calc(var(--size) / -140) 0 rgb(255 214 170 / 0.14);
}
.carrier {
  position: absolute;
  inset: 10%;
  display: block;
  transition: scale var(--v2-dur-move) var(--v2-ease-out);
}
/* No words invite a touch (Kobi: an easter egg). On a pointer that can hover, the record lifts a hair
   off the felt under it, the one quiet hint that it can be picked up. */
@media (hover: hover) and (pointer: fine) {
  .well:hover .carrier {
    scale: 1.012;
  }
}
/* Under a finger or a press it sinks a hair into the felt: the hand is felt at once, even with the record
   at rest or under reduced motion. Not a hint: it answers a touch already made. */
.well:active .carrier {
  scale: 0.992;
}
/* The record's shadow, a soft round patch on the felt: its own layer, so settling moves it with a
   transform instead of repainting a box-shadow. */
.carrier__shadow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--v2-shadow-record) 62%, transparent 100%);
  transform: translate(8%, 10%) scale(1.06);
}
.disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, var(--v2-vinyl-groove) 0 1.5px, var(--v2-vinyl) 1.5px 3.5px);
  display: grid;
  place-items: center;
}
.disc__label {
  width: 40%;
  height: 40%;
  overflow: visible;
}
.disc__paper {
  fill: var(--v2-action);
}
/* The spindle hole shows the felt through the label, as on the app icon. */
.disc__hole {
  fill: var(--v2-mat);
}
/* The label's print, a shade darker than the paper: "earshot" at the top, the side opposite it. It is
   also what shows the record turning (Kobi chose the word on the label, 2026-12-03). */
.disc__print {
  font: 700 9.5px "Parkinsans", system-ui, sans-serif;
  letter-spacing: 0.04em;
  text-rendering: geometricPrecision; /* even spacing along the curve at this small size */
  fill: rgb(27 16 6 / 0.42);
}
.disc__side {
  font-size: 7.5px;
  letter-spacing: 0.08em;
}
.carrier__sheen {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background: conic-gradient(from 20deg, transparent 0 8%, rgb(255 255 255 / 0.1) 14%, transparent 22% 58%, rgb(255 255 255 / 0.07) 64%, transparent 72%);
}
/* Rings: a groove lighting up and travelling out across the felt, always round the spindle. home.js adds
   one per beat of the music and removes it when its animation ends. Sized to the hole, centred on the record. */
.rings {
  position: absolute;
  inset: -12.5%;
  pointer-events: none;
}
/* Warm light, not orange (orange is for actions): a lit groove with a soft glow either side of it. */
.ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgb(255 222 186 / 0.85);
  box-shadow:
    0 0 14px rgb(255 190 130 / 0.35),
    inset 0 0 14px rgb(255 190 130 / 0.3);
  opacity: 0;
}

/* ---------------------------------------------------------------- the window light */
/*
 * A shaft of window light falls from the top left across the page and through the headline, and the dust
 * drifts in it (Kobi, 2026-12-03: the light moves, the words stay). The shaft is a long soft band, blended
 * onto whatever it crosses, so the letters inside it glow a warmer cream and the page under it lifts a
 * little. It wanders very slowly, like afternoon sun; the dust travels with it. Both use the individual
 * `translate` property, so the drift stays on the compositor. Nothing moves with reduced motion.
 */
.shaft,
.dust {
  position: fixed;
  z-index: 2;
  left: var(--shaft-x, 50%);
  top: var(--shaft-y, 58%);
  width: var(--shaft-w, 64vw);
  height: 160vmax; /* long enough to cross any screen at its angle, with the drift; no longer */
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(-34deg);
  animation: shaft-drift 46s cubic-bezier(0.37, 0, 0.63, 1) infinite alternate;
}
.shaft {
  /* Colour dodge, opaque: black changes nothing, and a dark warm tone barely touches the dark page but makes
     light things (the words) catch the light where the shaft crosses them. The haze itself is on .dust. */
  --l: var(--light, 1);
  background: linear-gradient(
    90deg,
    #000 0%,
    rgb(calc(14 * var(--l)) calc(10 * var(--l)) calc(6 * var(--l))) 24%,
    rgb(calc(36 * var(--l)) calc(26 * var(--l)) calc(15 * var(--l))) 50%,
    rgb(calc(14 * var(--l)) calc(10 * var(--l)) calc(6 * var(--l))) 76%,
    #000 100%
  );
  mix-blend-mode: color-dodge;
}
.dust {
  background: linear-gradient(90deg, transparent, rgb(255 204 150 / calc(0.07 * var(--light, 1))) 50%, transparent);
  overflow: hidden;
  -webkit-mask: linear-gradient(90deg, transparent, #000 30% 70%, transparent), linear-gradient(transparent 5%, #000 30% 70%, transparent 95%);
  -webkit-mask-composite: source-in;
  mask: linear-gradient(90deg, transparent, #000 30% 70%, transparent), linear-gradient(transparent 5%, #000 30% 70%, transparent 95%);
  mask-composite: intersect;
}
@keyframes shaft-drift {
  from { translate: -4vw 0; }
  to { translate: 4vw 0; }
}
.speck {
  position: absolute;
  width: var(--s, 3px);
  height: var(--s, 3px);
  border-radius: 50%;
  background: rgb(255 226 190 / 0.8);
  opacity: 0;
  animation: speck var(--t, 30s) linear var(--delay, 0s) infinite;
}
/* Specks float along the shaft (its own downward direction) and a little across it. */
@keyframes speck {
  0% { transform: translate(0, 0); opacity: 0; }
  15% { opacity: var(--o, 0.5); }
  50% { transform: translate(var(--dx, 20px), var(--dy, 80px)); }
  85% { opacity: var(--o, 0.5); }
  100% { transform: translate(calc(var(--dx, 20px) * -0.4), calc(var(--dy, 80px) * 2)); opacity: 0; }
}
html.is-hidden :is(.speck, .shaft, .dust) {
  animation-play-state: paused;
}

/* ---------------------------------------------------------------- the homepage */
/*
 * One loud thing at a time: the headline is the largest type, the record in its cutout is the picture,
 * and the wordmark signs the page from the top like a shop sign, small. "Coming soon" is a status.
 */
html {
  overflow-x: clip;
}
.top {
  position: relative;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: var(--v2-space-6) var(--v2-space-5) 0;
  display: flex;
  justify-content: center;
}
.top__mark {
  width: 112px;
}
.hero {
  position: relative;
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: var(--v2-space-6) var(--v2-space-5) var(--v2-space-4);
  display: grid;
  grid-template-areas:
    "deck"
    "words";
  align-content: center;
  justify-items: center;
  gap: var(--v2-space-7);
  text-align: center;
}
.hero__deck {
  grid-area: deck;
}
.hero__deck .well {
  --size: min(72vw, 300px, 40svh);
}
.hero__words {
  grid-area: words;
  max-width: 22rem;
}
.hero__line {
  margin: 0;
  /* Larger than v2's display step, which is sized for app screens: here it carries the page. */
  font-size: clamp(2.5rem, 11.5vw, 3rem);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.w {
  display: inline-block;
}
.hero__what {
  margin: var(--v2-space-3) 0 0;
  font-size: var(--v2-text-lead);
  line-height: var(--v2-leading-lead);
  font-weight: 500;
  color: var(--v2-muted);
}
/* A small lamp, as on the app's ON AIR card, not yet lit through: the shop isn't open. */
.hero__soon {
  margin: var(--v2-space-4) 0 0;
  display: inline-flex;
  align-items: center;
  gap: var(--v2-space-2);
  font-size: var(--v2-text-small);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--v2-ink);
}
.hero__soon::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
  background: var(--v2-action);
  box-shadow: 0 0 0 3px var(--v2-action-soft);
}

/* ---------------------------------------------------------------- the entrance */
/*
 * One orchestrated moment, on every visit (Kobi, 2026-12-03). The record is the lead and moves like a
 * machine (Kobi: "as if placed by a robot arm"; drawn as a carriage under the page, no arm): it slides in
 * from the right at an even pace, stops dead, waits a beat, then lowers onto the felt and starts to turn.
 * The words land in rhythm while it travels (Know it when, a rest, you hear it) and the lamp warms as the
 * record lands. Text is readable from the first frame: only its movement waits. Values are Kobi's tuning
 * on the prototype (2026-12-03); each is a custom property the drawer can still change.
 */
:root {
  --enter-travel: 760ms;
  --enter-beat: 120ms;
  --enter-settle: 280ms;
  --enter-words: 280ms;
  --enter-word-dur: 460ms;
  /* A machine's move: even speed with short, soft ends (easings.net's ease-in-out sine). */
  --enter-ease: cubic-bezier(0.37, 0, 0.63, 1);
  --enter-land: calc(var(--enter-travel) + var(--enter-beat));
}
.enter .carrier {
  animation:
    carrier-in var(--enter-travel) var(--enter-ease) both,
    carrier-settle var(--enter-settle) var(--v2-ease-out) var(--enter-land) forwards;
}
.enter .carrier__shadow {
  animation: shadow-settle var(--enter-settle) var(--v2-ease-out) var(--enter-land) both;
}
.enter .w {
  animation: word-in var(--enter-word-dur) var(--v2-ease-out) calc(var(--enter-words) + var(--d, 0ms)) both;
}
.enter .hero__what {
  --rise: 6px;
  animation: word-in var(--enter-word-dur) var(--v2-ease-out) calc(var(--enter-words) + 875ms) both; /* one step after the last word, so it reads in order */
}
.enter .hero__soon::before {
  animation: lamp-warm 600ms var(--v2-ease-out) var(--enter-land) both;
}
/* Travel: from fully under the page, right of the hole (the disc is 80% of the hole, so 115% of its own
   width clears the hole's edge), lifted a little off the felt. */
@keyframes carrier-in {
  from { transform: translateX(115%) scale(1.03); }
  to { transform: translateX(0) scale(1.03); }
}
@keyframes carrier-settle {
  from { transform: scale(1.03); }
  to { transform: scale(1); }
}
/* Lifted, the shadow is wider and further off; on the felt it tightens under the record. */
@keyframes shadow-settle {
  from { transform: translate(13%, 16%) scale(1.12); opacity: 0.7; }
  to { transform: translate(8%, 10%) scale(1.06); opacity: 1; }
}
@keyframes word-in {
  from { transform: translateY(var(--rise, 10px)); opacity: 0.85; }
  to { transform: none; opacity: 1; }
}
@keyframes lamp-warm {
  from { opacity: 0.35; transform: scale(0.75); }
  to { opacity: 1; transform: none; }
}

/* Reduced motion: the final state at once. No travel, no drift, no dust, no idle turn and no side
   change (home.js); the rings glow in place, and the music still plays. */
@media (prefers-reduced-motion: reduce) {
  .enter .carrier,
  .enter .carrier__shadow,
  .enter .w,
  .enter .hero__what,
  .enter .hero__soon::before,
  .shaft {
    animation: none;
  }
  .dust {
    display: none;
  }
}

/* A tablet held upright: still one column, but sized for the room it has, not a phone's. */
@media (min-width: 600px) and (max-width: 879px) {
  .hero__line {
    font-size: 3.75rem;
  }
  .hero__words {
    max-width: 30rem;
  }
  .hero__what {
    font-size: var(--v2-text-title);
  }
  .hero__deck .well {
    --size: min(56vw, 400px, 42svh);
  }
}

/* A wide screen: the words on the left, the record on the right, the wordmark at the top left; the
   shaft of light crosses the headline. */
@media (min-width: 880px) {
  :root {
    --shaft-x: 30%;
    --shaft-y: 46%;
    --shaft-w: 34vw;
  }
  .top {
    justify-content: flex-start;
    padding: var(--v2-space-7) var(--v2-space-8) 0;
  }
  .top__mark {
    width: 136px;
  }
  .hero {
    grid-template-areas: "words deck";
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    justify-items: start;
    column-gap: var(--v2-space-8);
    padding: var(--v2-space-6) var(--v2-space-8);
    text-align: left;
  }
  .hero__words {
    max-width: 34rem;
  }
  .hero__line {
    font-size: clamp(3.25rem, 5.4vw, 4.75rem);
    line-height: 1;
  }
  .hero__what {
    margin-top: var(--v2-space-5);
    font-size: var(--v2-text-title);
  }
  .hero__soon {
    margin-top: var(--v2-space-6);
  }
  .hero__deck .well {
    --size: min(38vw, 440px, 62svh);
  }
}

/* ---------------------------------------------------------------- the privacy page */
.doc__top {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: var(--v2-space-6) var(--v2-space-5) 0;
}
/* As small as the homepage's sign, so it doesn't compete with the page's title. */
.doc__home {
  display: inline-block;
  width: 112px;
  border-radius: 6px;
  /* A 44px-tall target on a phone, without moving anything. */
  padding-block: 9px;
  margin-block: -9px;
}
@media (min-width: 880px) {
  .doc__home {
    width: 120px;
  }
}
.doc__body {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: var(--v2-space-7) var(--v2-space-5) var(--v2-space-8);
  /* The email address may break at very large text sizes rather than push the page sideways. */
  overflow-wrap: break-word;
}
/* A link inside the text needs an underline you can see, not just the page's faint line colour. */
.doc__body a {
  text-decoration-color: var(--v2-muted);
}
.doc__body > * {
  max-width: 65ch;
}
.doc h1 {
  margin: 0;
  font-size: var(--v2-text-display);
  line-height: var(--v2-leading-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.doc__meta {
  margin: var(--v2-space-2) 0 var(--v2-space-6);
  font-size: var(--v2-text-small);
  color: var(--v2-muted);
}
.doc h2 {
  margin: var(--v2-space-7) 0 var(--v2-space-2);
  font-size: var(--v2-text-title);
  line-height: var(--v2-leading-title);
  font-weight: 650;
  letter-spacing: -0.01em;
}
.doc p,
.doc li {
  font-size: var(--v2-text-lead);
  line-height: 1.55;
}
.doc p {
  margin: 0 0 var(--v2-space-3);
}
.doc ul {
  margin: 0 0 var(--v2-space-3);
  padding-left: 1.2em;
}
.doc li + li {
  margin-top: var(--v2-space-2);
}
.doc strong {
  font-weight: 650;
}

/* ---------------------------------------------------------------- the footer, on both pages */
.foot {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: var(--v2-space-4) var(--v2-space-5) var(--v2-space-6);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: var(--v2-space-2) var(--v2-space-5);
  font-size: var(--v2-text-small);
  color: var(--v2-muted);
}
/* Each item wraps whole, so "© 2026 Earshot" never breaks in half at large text sizes. */
.foot > * {
  white-space: nowrap;
}
.foot a {
  color: var(--v2-ink);
  font-weight: 600;
  /* A 44px-tall target on a phone; the negative margin keeps the visible spacing. */
  padding: var(--v2-space-3) var(--v2-space-2);
  margin: 0 calc(-1 * var(--v2-space-2));
}
.doc .foot {
  max-width: 720px;
  justify-content: flex-start;
}
@media (min-width: 880px) {
  .home .foot {
    justify-content: flex-start;
    padding-left: var(--v2-space-8);
    padding-right: var(--v2-space-8);
  }
}

/* ---------------------------------------------------------------- high contrast and print */
/* Forced colours drop backgrounds: keep the record, the lamp and the pale wordmark as drawn, on their own dark. */
@media (forced-colors: active) {
  .well,
  .hero__soon::before {
    forced-color-adjust: none;
  }
  .top__mark,
  .doc__home img {
    forced-color-adjust: none;
    background: #1e1813;
    padding: 6px 10px;
    border-radius: 6px;
  }
}

/* Printed or saved as a PDF (the privacy page, mostly): black on white, without the header and footer. */
@media print {
  html[data-v2-theme] {
    color-scheme: light;
    --v2-page: #fff;
    --v2-ink: #000;
    --v2-muted: #444;
    --v2-line: #999;
  }
  body {
    background: none;
    min-height: 0;
  }
  .doc__top,
  .foot {
    display: none;
  }
  .doc h2 {
    break-after: avoid;
  }
}
