/* ──────────────────────────────────────────────────────────────
   Airspeed Originals — "Big work. Little stories."
   Page styles for the story-card cassette player.

   Layered on the Airspeed design system tokens. This page runs a
   scoped, warmer accent palette (sunrise orange + amber, mint deck)
   derived from the reference photo, in place of the editorial pink
   dot — it is the one playful surface in the brand.
   ────────────────────────────────────────────────────────────── */

:root {
  /* Scoped accent palette for this page */
  --sc-paper:        #FAFAF7;
  --sc-ink:          #0E0E0C;
  --sc-muted:        #5B5B54;
  --sc-hairline:     #E7E5DE;
  --sc-surface:      #FFFFFF;

  --sc-orange:       #E8641F;
  --sc-orange-dark:  #d4581a;
  --sc-amber:        #FFC267;
  --sc-amber-dark:   #f0b055;

  /* Cassette deck */
  --sc-deck-top:     #CFE7DA;
  --sc-deck-bottom:  #BEDCCB;
  --sc-slot:         #22221E;
  --sc-screen:       #17170F;
  --sc-screen-dim:   #8a815f;
  --sc-screen-track: #33301f;

  --sc-card-brand:   #b7b3a6;

  /* Card title colour. As designed, each card's title is painted in
     its own story accent. Note that the lighter accents (#FFC267,
     #8FC7DE, #A8D8C1) fall well below AA on the white card — set this
     to `var(--sc-ink)` if the page needs to pass contrast. */
  --sc-card-title:   var(--card-accent, var(--sc-ink));

  --sc-ease:         cubic-bezier(0.2, 0, 0, 1);
  --font-hand:       'Shantell Sans', 'Comic Sans MS', cursive;
}

/* ---------------------------------------------------------------
   Reset-ish
   --------------------------------------------------------------- */
html, body { margin: 0; padding: 0; background: var(--sc-paper); }
* { box-sizing: border-box; }

a { color: var(--sc-ink); }
a:hover { color: var(--sc-orange); }
::selection { background: var(--sc-amber); color: var(--sc-ink); }

[hidden] { display: none !important; }

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

/* ---------------------------------------------------------------
   Page frame
   --------------------------------------------------------------- */
.page {
  min-height: 100vh;
  background: var(--sc-paper);
  font-family: var(--font-sans);
  color: var(--sc-ink);
  position: relative;
  overflow-x: hidden;
}

/* Fine paper grain over the whole page */
.page__noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

.shell {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 24px 40px;
}

/* The recurring 7px brand dot */
.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--sc-orange);
  display: inline-block;
  flex: 0 0 auto;
}

.eyebrow {
  font-family: var(--font-mono);
  font-weight: var(--fw-medium);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sc-muted);
}

/* ---------------------------------------------------------------
   Hero
   --------------------------------------------------------------- */
.hero { text-align: center; margin: 0 auto; max-width: 620px; }
.hero__title {
  font-family: var(--font-sans);
  font-weight: var(--fw-medium);
  font-size: clamp(32px, 5.4vw, 52px);
  letter-spacing: -0.022em;
  line-height: 1.05;
  margin: 0;
}
.hero__sub {
  font-size: clamp(15px, 2.2vw, 18px);
  line-height: 1.45;
  color: var(--sc-muted);
  margin: 10px 0 0;
  text-wrap: pretty;
}

/* ---------------------------------------------------------------
   The player
   --------------------------------------------------------------- */
.player-section { display: flex; justify-content: center; margin-top: 52px; }

.player { position: relative; width: min(340px, 86vw); }

/* Cartridge sticking out of the top of the deck — click to eject */
.eject {
  position: absolute;
  left: 50%; top: -40px;
  transform: translateX(-50%);
  width: 54%; height: 62px;
  border: none;
  cursor: pointer;
  background: var(--card-accent, var(--sc-orange));
  border-radius: 10px 10px 0 0;
  box-shadow: 0 1px 2px rgba(14, 14, 12, 0.06);
  z-index: 0;
  animation: as-insert 320ms var(--sc-ease);
  padding: 8px 12px 30px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.eject:focus-visible { outline: 3px solid var(--sc-ink); outline-offset: 2px; }
.eject__title {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 12px;
  line-height: 1.15;
  color: var(--card-ink, var(--sc-ink));
  text-align: center;
}

.deck {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, var(--sc-deck-top), var(--sc-deck-bottom));
  border-radius: 34px;
  padding: 20px 22px 26px;
  box-shadow:
    0 10px 30px -8px rgba(14, 14, 12, 0.18),
    inset 0 2px 0 rgba(255, 255, 255, 0.55),
    inset 0 -6px 12px rgba(14, 14, 12, 0.08);
}

.deck__slot {
  width: 58%; height: 12px;
  margin: 0 auto;
  background: var(--sc-slot);
  border-radius: 7px;
  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* --- the little glowing screen --- */
.screen {
  margin-top: 18px;
  background: var(--sc-screen);
  border-radius: 16px;
  padding: 14px 16px;
  min-height: 96px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.7), 0 1px 0 rgba(255, 255, 255, 0.4);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.face {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: as-bob 3.2s ease-in-out infinite;
}
.face__eyes { display: flex; gap: 14px; }
.face__eye {
  width: 9px; height: 9px;
  background: var(--sc-amber);
  border-radius: 2px;
  animation: as-blink 4s infinite;
  box-shadow: 0 0 8px rgba(255, 194, 103, 0.6);
}
.face__mouth {
  width: 18px; height: 8px;
  border: 2px solid var(--sc-amber);
  border-top: none;
  border-radius: 0 0 10px 10px;
}
.face__hint {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--sc-screen-dim);
  text-transform: uppercase;
}

.now {
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: as-fadein 400ms ease-out;
}
.now__title {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: 0.06em;
  color: var(--sc-amber);
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(255, 194, 103, 0.45);
}
.now__row { display: flex; align-items: center; gap: 10px; }
.now__glyph { font-family: var(--font-mono); font-size: 12px; color: var(--sc-orange); }
.now__track {
  flex: 1;
  height: 5px;
  background: var(--sc-screen-track);
  border-radius: 3px;
  overflow: hidden;
}
.now__fill {
  height: 100%;
  background: var(--sc-amber);
  border-radius: 3px;
  width: 0%;
  transition: width 300ms linear;
}
.now__time { font-family: var(--font-mono); font-size: 11px; color: var(--sc-amber); }

.now__state { display: flex; align-items: flex-end; gap: 3px; height: 12px; }
.eq {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 12px;
}
.eq__bar { width: 4px; height: 12px; transform-origin: bottom; }
.eq__bar--1 { background: var(--sc-orange); animation: as-eq1 0.7s ease-in-out infinite; }
.eq__bar--2 { background: var(--sc-amber);  animation: as-eq2 0.9s ease-in-out infinite; }
.eq__bar--3 { background: var(--sc-orange); animation: as-eq3 0.6s ease-in-out infinite; }
.now__label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--sc-screen-dim);
}
.eq .now__label { margin-left: 6px; }

/* --- speaker grille + knobs --- */
.deck__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding: 0 6px;
}
.grille { display: grid; grid-template-columns: repeat(6, 7px); gap: 7px; }
.grille span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(14, 14, 12, 0.28);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

.deck__buttons { display: flex; align-items: center; gap: 16px; }

.knob {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: var(--sc-orange);
  box-shadow:
    0 4px 8px rgba(14, 14, 12, 0.3),
    inset 0 2px 3px rgba(255, 255, 255, 0.4),
    inset 0 -3px 5px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}
.knob:hover { filter: brightness(1.06); }
.knob:active { transform: translateY(1px); }
.knob:focus-visible { outline: 3px solid var(--sc-ink); outline-offset: 3px; }
.knob__label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: var(--fw-medium);
  color: var(--sc-paper);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

.knob--play {
  width: 58px; height: 58px;
  background: var(--sc-amber);
  box-shadow:
    0 5px 10px rgba(14, 14, 12, 0.3),
    inset 0 2px 3px rgba(255, 255, 255, 0.5),
    inset 0 -3px 6px rgba(0, 0, 0, 0.2);
}
.knob--play:hover { filter: brightness(1.05); }
.knob__glyph { font-size: 17px; color: var(--sc-ink); }

.deck__brand {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 12px;
}
.deck__brand-dot { width: 5px; height: 5px; opacity: 0.7; }
.deck__brand-name {
  font-family: var(--font-sans);
  font-weight: var(--fw-medium);
  font-size: 12px;
  letter-spacing: -0.02em;
  color: rgba(14, 14, 12, 0.42);
}
.deck__brand-label {
  font-family: var(--font-mono);
  font-weight: var(--fw-medium);
  font-size: 9px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(14, 14, 12, 0.32);
}

.player__shadow {
  position: absolute;
  left: 12%; right: 12%; bottom: -10px;
  height: 18px;
  background: radial-gradient(ellipse at center, rgba(14, 14, 12, 0.18), transparent 70%);
  z-index: 0;
}

/* ---------------------------------------------------------------
   Transcript
   --------------------------------------------------------------- */
.transcript-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  min-height: 26px;
}
.transcript-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sc-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 4px 8px;
}
.transcript-toggle:hover { color: var(--sc-orange); }
.transcript-toggle:focus-visible { outline: 2px solid var(--sc-ink); outline-offset: 2px; }

/* The sound toggle rides along in the bar. No underline is what marks it as
   the quieter of the two — dimming it with opacity dropped 11px text to
   3.65:1, under the 4.5:1 it needs. */
.transcript-toggle[data-sound-toggle] {
  text-decoration: none;
}

.transcript {
  max-width: 560px;
  margin: 10px auto 0;
  background: var(--sc-surface);
  border: 1px solid var(--sc-hairline);
  border-radius: 14px;
  padding: 24px 28px;
  box-shadow: 0 1px 2px rgba(14, 14, 12, 0.06);
  animation: as-fadein 300ms ease-out;
}
.transcript__head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.transcript__text {
  font-size: 15px;
  line-height: 1.65;
  margin: 0;
  color: var(--sc-ink);
  text-wrap: pretty;
}

/* ---------------------------------------------------------------
   Story cards
   --------------------------------------------------------------- */
.cards { margin-top: 26px; }
.cards__eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}

.rail {
  display: flex;
  gap: 18px;
  justify-content: flex-start;
  overflow-x: auto;
  padding: 20px 24px 30px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.rail__inner { margin: 0 auto; display: flex; gap: 18px; }

/* The fan: cards tilt like a hand held out to you. Layout comes from the
   rail's data-layout, so a narrow viewport can flatten it (see below)
   without JS having to know. */
.rail__inner[data-layout="fan"] .card { --card-rot: var(--fan-rot, 0deg); --card-lift: var(--fan-lift, 0px); }
.rail__inner[data-layout="fan"] .card:nth-child(5n+1) { --fan-rot: -6deg; --fan-lift:  6px; }
.rail__inner[data-layout="fan"] .card:nth-child(5n+2) { --fan-rot:  3deg; --fan-lift: -4px; }
.rail__inner[data-layout="fan"] .card:nth-child(5n+3) { --fan-rot: -2deg; --fan-lift:  2px; }
.rail__inner[data-layout="fan"] .card:nth-child(5n+4) { --fan-rot:  5deg; --fan-lift: -6px; }
.rail__inner[data-layout="fan"] .card:nth-child(5n+5) { --fan-rot: -4deg; --fan-lift:  4px; }

.card {
  position: relative;
  flex: 0 0 auto;
  width: 176px;
  background: var(--sc-surface);
  border: 1px solid var(--sc-hairline);
  border-radius: 14px;
  padding: 10px 10px 14px;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 8px 24px -10px rgba(14, 14, 12, 0.10);
  transform: rotate(var(--card-rot, 0deg)) translateY(var(--card-lift, 0px));
  opacity: var(--card-dim, 1);
  transition: transform 250ms var(--sc-ease), box-shadow 250ms, opacity 300ms;
}
.card:hover,
.card:focus-visible {
  transform: translateY(-12px) rotate(0deg) scale(1.03);
  box-shadow: 0 14px 34px -8px rgba(14, 14, 12, 0.22);
  z-index: 2;
}
.card:focus-visible { outline: 3px solid var(--sc-ink); outline-offset: 3px; }

.card__art {
  height: 108px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--card-soft, var(--sc-hairline));
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card__art img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Placeholder shown until real artwork is dropped into `art` */
.card__art--empty {
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  text-align: center;
}
.card__art-glyph { opacity: 0.45; color: var(--card-accent, var(--sc-ink)); }
.card__art-hint {
  font-family: var(--font-mono);
  font-size: 8px;
  line-height: 1.35;
  letter-spacing: 0.05em;
  color: rgba(14, 14, 12, 0.45);
  text-transform: uppercase;
}

.card__title {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  color: var(--sc-card-title);
  margin: 12px 2px 6px;
  min-height: 38px;
}
.card__sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--sc-muted);
  margin: 0 2px;
  line-height: 1.5;
}
.card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 2px 0;
}
.card__brand { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.06em; color: var(--sc-card-brand); }
.card__duration { font-family: var(--font-mono); font-size: 9.5px; color: var(--sc-muted); }

.card__badge {
  position: absolute;
  top: 8px; right: 8px;
  background: var(--sc-ink);
  color: var(--sc-paper);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  padding: 3px 7px;
  border-radius: 999px;
}

/* The card that flies into the slot */
.flying-card {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border: 1px solid var(--sc-hairline);
  border-radius: 12px;
  box-shadow: 0 14px 34px -8px rgba(14, 14, 12, 0.25);
}
.flying-card span {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  text-align: center;
}

/* ---------------------------------------------------------------
   Footer
   --------------------------------------------------------------- */
.site-footer { text-align: center; margin-top: 56px; padding-bottom: 12px; }
.site-footer__credit {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--sc-muted);
  margin: 0;
}
.site-footer__cta { margin: 14px 0 0; }
.site-footer__cta a {
  font-size: 14px;
  font-weight: var(--fw-medium);
  letter-spacing: -0.01em;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------------------------------------------------------------
   Motion
   --------------------------------------------------------------- */
@keyframes as-blink  { 0%, 90%, 100% { transform: scaleY(1); } 94% { transform: scaleY(0.08); } }
@keyframes as-bob    { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes as-eq1    { 0%, 100% { transform: scaleY(0.35); } 50% { transform: scaleY(1); } }
@keyframes as-eq2    { 0%, 100% { transform: scaleY(0.9); } 45% { transform: scaleY(0.3); } }
@keyframes as-eq3    { 0%, 100% { transform: scaleY(0.5); } 60% { transform: scaleY(1); } }
@keyframes as-insert { from { transform: translate(-50%, 46px); } to { transform: translate(-50%, 0); } }
@keyframes as-fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------------
   Short screens — compact the deck so the card rail stays in view
   --------------------------------------------------------------- */
@media (max-height: 760px) {
  .shell { padding-top: 24px; }
  .hero__title { font-size: clamp(28px, 4.4vw, 42px); }
  .hero__sub { font-size: clamp(14px, 2vw, 17px); margin-top: 8px; }
  .player-section { margin-top: 48px; }
  .player { width: min(310px, 86vw); }
  .deck { border-radius: 28px; padding: 16px 18px 20px; }
  .screen { margin-top: 14px; min-height: 84px; }
  .deck__controls { margin-top: 16px; }
  .deck__brand { margin-top: 10px; }
  .transcript-bar { margin-top: 10px; }
  .cards { margin-top: 20px; }
  .rail { padding: 16px 24px 26px; }
}

/* ---------------------------------------------------------------
   Narrow screens — the fan flattens into a plain rail
   --------------------------------------------------------------- */
@media (max-width: 560px) {
  .shell { padding: 24px 16px 32px; }
  .rail { padding: 20px 16px 28px; }
  .rail__inner { margin: 0; }
  .rail__inner[data-layout="fan"] .card { --card-rot: 0deg; --card-lift: 0px; }
}
