/* sicinema.app. The same eight colour roles and three typefaces as the app
   (App/DesignSystem/Theme.swift), so the site and the app read as one thing. */

@font-face {
  font-family: "SI Display";
  src: url("/static/display.woff2") format("woff2");
  font-weight: 900;
  font-display: swap;
}
@font-face {
  font-family: "SI Readout";
  src: url("/static/mono.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "SI Serif";
  src: url("/static/serif.woff2") format("woff2");
  font-style: italic;
  font-display: swap;
}

:root {                       /* Paper: the default look */
  --ground: #e8e5dc;
  --panel: #d9d5ca;
  --panel-edge: #f3f0e8;
  --rule: #b4afa2;
  --dim: #6a665d;
  --ink: #0b0b0c;
  --signal: #e2330b;
  --on-signal: #f3f0e8;
  --glow: rgba(226, 51, 11, 0.42);       /* the Recently added button's breath */
  --scrim: rgba(11, 11, 12, 0.38);
  --device-shadow: 0 18px 44px rgba(11, 11, 12, 0.28);
  --display: "SI Display", "Arial Narrow", "Helvetica Neue", Impact, sans-serif;
  --readout: "SI Readout", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --serif: "SI Serif", "Iowan Old Style", Georgia, serif;
  --gutter: clamp(16px, 4vw, 40px);
  --tape: clamp(54px, 12vw, 156px);       /* the tagline band's letters */
  --tape-top: max(40px, 6.4vw);           /* room for its raised left end */
  --tape-drop: calc(4.4vw + 44px);        /* room for its low right end and the shadow */
  --play: clamp(56px, 40vw - 70px, 200px);  /* the big play button: it must clear the logo on a small phone */
  color-scheme: light;
}
:root[data-theme="void"] {    /* Void: the dark look, one tap away */
  --ground: #050506;
  --panel: #111113;
  --panel-edge: #1f2024;
  --rule: #2b2c31;
  --dim: #80828a;
  --ink: #dcdee2;
  --signal: #d6ff3a;
  --on-signal: #050506;
  --glow: rgba(214, 255, 58, 0.38);
  --scrim: rgba(0, 0, 0, 0.6);
  --device-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--ground); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

.wrap { max-width: 1120px; margin-inline: auto; padding-inline: var(--gutter); }

/* Machine text: small, mono, tracked out, uppercase. */
.readout {
  font: 500 11px/1.4 var(--readout);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}
.readout b { font-weight: 500; color: var(--ink); }
.readout .live { color: var(--signal); }

.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }

/* ---- top bar ---- */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 0;
}
.mark { font: 900 26px/1 var(--display); letter-spacing: 0.01em; text-decoration: none; }
.mark i { font: italic 400 0.62em/1 var(--serif); letter-spacing: 0; margin-left: 1px; }
.bar-right { display: flex; align-items: center; gap: 18px; }
.theme {
  display: inline-flex; border: 1px solid var(--rule); background: none; padding: 0; cursor: pointer;
  font: 500 10px/1 var(--readout); letter-spacing: 0.18em; color: var(--dim);
}
.theme span { padding: 7px 9px; }
:root[data-theme="void"] .theme .void,
:root:not([data-theme="void"]) .theme .paper { background: var(--ink); color: var(--ground); }
@media (max-width: 560px) { .bar .feed { display: none; } }

/* ---- the tagline: one band of tape across the page ----
   High on the left, down to the right. It sits in the flow, so the hero
   starts under it at every width; turning it moves nothing else. */
/* The band is wider than the page, so that its turned ends stay off screen.
   This frame cuts it off at the page's edges. Without it a phone lets the
   whole page slide sideways into the extra width. The frame is tall enough
   for the band's raised left end and its low right end; the hero slides up
   under the part that is only there for the low end. */
.tape-frame {
  position: relative; z-index: 1;        /* over the hero's halftone field */
  overflow: hidden; pointer-events: none;
  padding: var(--tape-top) 0 var(--tape-drop);
}
.tape {
  position: relative;
  width: 140vw; margin: 0 0 0 -20vw;
  padding: 0.17em 0 0.11em;
  background: var(--signal); color: var(--on-signal);
  font: 900 var(--tape)/1 var(--display); letter-spacing: 0.02em; white-space: nowrap;
  transform: rotate(5deg);
  box-shadow: 0 14px 30px rgba(11, 11, 12, 0.22);
}
.tape::before, .tape::after {            /* a hairline inside each edge, like printed tape */
  content: ""; position: absolute; left: 0; right: 0; height: 1px; background: var(--on-signal); opacity: 0.55;
}
.tape::before { top: 5px; }
.tape::after { bottom: 5px; }
/* The band runs like a ticker: two equal copies of the line, moved left by
   one copy's width, so the loop has no seam. Screen readers get the line
   once, from .aloud; the moving copies are hidden from them. */
.tape .aloud {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.tape .run { display: inline-flex; width: max-content; animation: ticker 48s linear infinite; }
.tape .loop { display: inline-flex; gap: 0.4em; padding-right: 0.4em; }
.tape .loop i { font-style: normal; }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .tape .run { animation: none; margin-left: 22vw; }   /* standing still: start where the screen starts */
}

/* ---- hero ---- */
.hero {
  position: relative; margin-top: calc(-1 * var(--tape-drop));
  padding-block: clamp(14px, 2.1vw, 28px) clamp(36px, 6vw, 72px);
}
.hero::before {            /* the halftone field, fading out to the left; it runs on up behind the band */
  content: ""; position: absolute;
  /* On a wide screen it runs a little past the column, never past the page's edge. */
  inset: calc(-1 * (var(--tape-top) + 1.28 * var(--tape))) calc(-1 * min(var(--gutter), max(0px, (100vw - 1120px) / 2))) 0 30%;
  background-image: radial-gradient(circle, var(--ink) 1.1px, transparent 1.7px);
  background-size: 9px 9px;
  opacity: 0.2;
  -webkit-mask-image: radial-gradient(120% 90% at 100% 20%, #000 0%, transparent 62%);
          mask-image: radial-gradient(120% 90% at 100% 20%, #000 0%, transparent 62%);
  pointer-events: none;
}
.hero > * { position: relative; }
.logo {
  margin: 0;
  font: 900 clamp(120px, 31vw, 360px)/0.8 var(--display);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.logo i { font: italic 400 0.34em/1 var(--serif); letter-spacing: 0; margin-left: 0.04em; }
.lede {
  margin: clamp(22px, 3vw, 36px) 0 0;
  max-width: 21ch;
  font: italic 400 clamp(26px, 4.4vw, 46px)/1.12 var(--serif);
}
/* The big play button, on the halftone field: one tap to a station that
   starts at once. The same disc as the player's own play button. */
.hero .play {
  position: absolute; right: var(--gutter); top: clamp(30px, 5.5vw, 74px);
  display: grid; place-items: center; width: var(--play); height: var(--play); border-radius: 50%;
  background: var(--signal); color: var(--on-signal); text-decoration: none;
  box-shadow: 0 10px 26px rgba(11, 11, 12, 0.24);
}
.hero .play svg { width: 44%; height: 44%; fill: currentColor; margin-left: 5%; }   /* a triangle sits left of where it looks centred */
.hero .play .readout { position: absolute; top: 100%; margin-top: 10px; white-space: nowrap; color: var(--ink); }

/* How to say the name, set like a dictionary entry. */
.say { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: clamp(18px, 2.6vw, 28px) 0 0; }
.say .word { font: 900 clamp(22px, 3vw, 30px)/1 var(--display); }
.say .sound { font: 500 12px/1 var(--readout); letter-spacing: 0.14em; color: var(--dim); }
.say .how { font: italic 400 clamp(18px, 2.2vw, 22px)/1.2 var(--serif); }

/* Split-flap line: one cell per letter, a seam across the middle. */
.flap-line { margin-top: clamp(28px, 4vw, 44px); }
.flap-line .readout { display: block; margin-bottom: 10px; }
.flaps { display: flex; flex-wrap: nowrap; gap: 2px; }
.flaps span {
  position: relative; flex: 0 0 auto;
  width: clamp(12px, 3.9vw, 34px); height: clamp(21px, 6.4vw, 54px);
  display: grid; place-items: center;
  background: var(--panel); border: 1px solid var(--panel-edge);
  font: 900 clamp(16px, 5vw, 44px)/1 var(--display);
  color: var(--ink);
}
.flaps span::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--ground);
}
.flaps span.on { color: var(--signal); }

.status { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; margin-top: clamp(26px, 4vw, 40px); }
.store { display: inline-flex; }       /* Apple's badge, as Apple draws it: no frame, no motion */
.store img { display: block; height: 40px; width: auto; }

/* ---- Recently added: a button that breathes, and the card it opens ----
   It shows only when we added songs the visitor has not seen. Nothing pops
   up by itself; the page works the same with it closed. */
.fresh {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font: 500 11px/1 var(--readout); letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink); background: var(--panel); border: 1px solid var(--signal);
  padding: 7px 11px 7px 9px; border-radius: 999px;
  animation: breathe 3.2s ease-in-out infinite;
}
.fresh[hidden] { display: none; }
.fresh .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); }
.fresh b { font-weight: 500; color: var(--signal); }
.fresh.seen { animation: none; border-color: var(--rule); }
.fresh.seen .dot { background: var(--dim); }
.fresh.seen b { color: var(--ink); }
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 0 var(--glow); }
  50% { box-shadow: 0 0 14px 3px var(--glow); }
}
@media (prefers-reduced-motion: reduce) {
  .fresh { animation: none; box-shadow: 0 0 10px 2px var(--glow); }
  .fresh.seen { box-shadow: none; }
}

.recent { position: fixed; inset: 0; z-index: 10; }
.recent[hidden] { display: none; }
.recent-scrim { position: absolute; inset: 0; background: var(--scrim); }
.recent-card {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(100%, 520px); max-height: 86vh; max-height: 86dvh;
  display: flex; flex-direction: column;
  background: var(--ground); color: var(--ink);
  border: 1px solid var(--rule); border-bottom: 0; border-radius: 22px 22px 0 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: var(--device-shadow);
  animation: rise 0.28s ease-out;
}
@keyframes rise { from { transform: translate(-50%, 24px); opacity: 0.4; } }
@media (prefers-reduced-motion: reduce) { .recent-card { animation: none; } }
.recent-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  padding: 16px 18px 12px; border-bottom: 1px solid var(--rule);
}
.recent-head h2 { margin: 4px 0 0; font: 900 30px/1 var(--display); }
.recent-close {
  flex: none; width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--rule); background: none; color: var(--ink); font: 500 16px/1 var(--readout);
}
.recent-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; overscroll-behavior: contain; }
.recent-list a {
  display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px;
  padding: 10px 18px; border-bottom: 1px solid var(--rule); text-decoration: none;
}
.recent-list a:hover { background: var(--panel); }
.recent-list .pic { width: 96px; aspect-ratio: 16 / 9; max-width: 100%; background: var(--panel); overflow: hidden; }
.recent-list .pic img { width: 100%; height: 100%; object-fit: cover; }
.recent-list .words { display: grid; gap: 3px; min-width: 0; }
.recent-list .top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.recent-list .t { font: 900 17px/1.1 var(--display); letter-spacing: 0.01em; overflow-wrap: anywhere; }
.recent-list .code { flex: none; font: 500 9px/1 var(--readout); letter-spacing: 0.14em; padding: 3px 5px; border: 1px solid var(--rule); color: var(--dim); }
.recent-list .who { font: 500 10px/1.3 var(--readout); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.recent-list .quip { font: italic 400 17px/1.2 var(--serif); }
.recent-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px 16px; }
.recent-all {
  font: 500 11px/1 var(--readout); letter-spacing: 0.18em; text-transform: uppercase; text-decoration: none;
  background: var(--signal); color: var(--on-signal); padding: 10px 12px;
}

/* ---- phones ---- */
.phones {
  display: flex; gap: clamp(14px, 3vw, 36px);
  padding: 10px var(--gutter) 8px; margin: 0 calc(-1 * var(--gutter));
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.phones::-webkit-scrollbar { display: none; }
.phone { flex: 0 0 auto; width: min(64vw, 300px); scroll-snap-align: center; margin: 0; }
/* A device frame that reads on black: a dark body, then a bright metal rim.
   Fixed colours on purpose: a phone looks the same on Paper and on Void. */
.phone img {
  width: 100%; border-radius: 38px;
  border: 7px solid #17181c;
  box-shadow: 0 0 0 1.5px #8b8e98, 0 0 0 3px #2a2b30, var(--device-shadow);
  background: #050506;
}
.phone figcaption, .car figcaption { margin-top: 12px; }
.car { flex: 0 0 auto; width: min(84vw, 420px); scroll-snap-align: center; margin: 0; align-self: center; }
.car img {
  width: 100%; border-radius: 22px;
  border: 6px solid #17181c;
  box-shadow: 0 0 0 1.5px #8b8e98, 0 0 0 3px #2a2b30, var(--device-shadow);
  background: #050506;
}
@media (min-width: 1000px) { .phones { justify-content: space-between; overflow: visible; } }

/* ---- sections ---- */
section { padding-block: clamp(44px, 7vw, 96px) 0; }
.head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 12px; }
h2 { margin: 0; font: 900 clamp(34px, 6vw, 64px)/0.95 var(--display); text-transform: uppercase; letter-spacing: 0.01em; }

/* Stations: the same five rows as the app's board. */
.stations { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.stations li {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px clamp(12px, 3vw, 28px);
  padding: clamp(14px, 2.4vw, 22px) 0 clamp(14px, 2.4vw, 22px) 14px;
  border-bottom: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
}
.stations .gate { font: 500 11px/1 var(--readout); letter-spacing: 0.18em; color: var(--dim); }
.stations .name { font: 900 clamp(26px, 5.4vw, 52px)/0.95 var(--display); }
.stations .blurb { grid-column: 2; font: italic 400 clamp(16px, 2.2vw, 20px)/1.25 var(--serif); color: var(--dim); }
.stations .code {
  grid-row: 1 / span 2; grid-column: 3;
  font: 500 11px/1 var(--readout); letter-spacing: 0.18em;
  background: var(--accent); color: #050506; padding: 7px 8px;
}

/* Why we built this */
.why { display: grid; gap: clamp(20px, 4vw, 56px); padding-top: clamp(28px, 4vw, 48px); }
.why p { margin: 0 0 1em; max-width: 62ch; }
.why p:first-of-type { font: italic 400 clamp(22px, 3vw, 30px)/1.25 var(--serif); }
@media (min-width: 860px) { .why { grid-template-columns: 1fr 1.5fr; align-items: start; } }

/* Three plain facts */
.facts { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.facts div { background: var(--ground); padding: clamp(18px, 3vw, 30px); }
.facts h3 { margin: 10px 0 8px; font: 900 clamp(24px, 3.4vw, 34px)/1 var(--display); text-transform: uppercase; }
.facts p { margin: 0; color: var(--dim); }
@media (min-width: 860px) { .facts { grid-template-columns: repeat(3, 1fr); } }

/* ---- footer ---- */
footer { padding-block: clamp(44px, 7vw, 96px) 48px; }
.vitakka { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 26px 0; }
.vitakka h2 { font-size: clamp(26px, 4.4vw, 40px); color: var(--signal); }
.vitakka p { margin: 6px 0 10px; font: italic 400 18px/1.3 var(--serif); color: var(--dim); }
/* The logo has no background of its own. Its dark lettering needs a light
   ground, so on Void it sits on a paper card. */
.vitakka img { flex: 0 0 auto; width: clamp(120px, 24vw, 180px); }
:root[data-theme="void"] .vitakka img { background: #e8e5dc; padding: 10px; }
/* The way to the text pages and to writing to us, on every page. */
.links { display: flex; flex-wrap: wrap; gap: 12px 24px; padding-top: 20px; }
.links a, .doc a { text-decoration-color: var(--signal); text-underline-offset: 4px; }
.small { display: grid; gap: 6px; padding-top: 18px; }

/* ---- text pages: privacy, support, terms ---- */
.doc { padding-block: clamp(28px, 5vw, 64px) 0; }
.doc h1 { margin: 12px 0 0; font: 900 clamp(64px, 15vw, 150px)/0.86 var(--display); text-transform: uppercase; letter-spacing: 0.005em; }
.doc .intro { margin: clamp(18px, 3vw, 30px) 0 0; max-width: 32ch; font: italic 400 clamp(22px, 3vw, 30px)/1.25 var(--serif); }
.doc h2 {
  margin: clamp(34px, 5vw, 52px) 0 12px; padding-top: 14px; border-top: 1px solid var(--rule);
  font-size: clamp(24px, 3.4vw, 34px); scroll-margin-top: 12px;
}
.doc p, .doc ul { max-width: 62ch; margin: 0 0 0.9em; }
.doc ul { padding-left: 1.15em; }
.doc li { margin: 0.35em 0; }
.doc li::marker { color: var(--signal); }
.doc a { text-decoration-thickness: 2px; overflow-wrap: anywhere; }

/* Station accents, straight from the app's catalog. */
.acx { --accent: #d6ff3a; }
.eup { --accent: #ff2e88; }
.irx { --accent: #ff5a1f; }
.dmr { --accent: #6a665d; }       /* the app's pale grey would vanish on paper */
.dmr .code { color: #f3f0e8; }
.lnf { --accent: #ffb000; }
:root[data-theme="void"] .dmr { --accent: #e9e4d8; }
:root[data-theme="void"] .dmr .code { color: #050506; }
