/* morrismp3 landing — full-bleed editorial.
   Structure: full-bleed by construction. Bands are `width: 100%` inside a shell
   with no max-width; the reading measure lives in `.band__inner`. No 100vw, no
   calc(50% - 50vw), no overflow-x: hidden — the scrollbar bug cannot exist
   because the viewport is never measured to derive a width. */

:root {
  /* surfaces -40% (factor 0.6 sRGB). Tinta intacta a proposito: bajarla 40%
     deja --dim en 2.73:1 y los acentos en 3.3:1, ambos por debajo de AA.
     Sobre esta base el contraste sube: text 16.31:1, dim 6.61:1, teal/gold 8.58:1 */
  --base: #0a0519;
  --surface: #0e081c;
  --surface-deep: #07040e;
  --line: #161025;
  --accent: #00c099;
  --gold: #e69a1e;
  --text: #eae6f2;
  --dim: #9a8fb0;

  --vinyl-size: 260px;
  --arm-room: 92px;

  --measure: 62ch;
  --gutter: 22px;
  --band-gap: 96px;

  /* Legibility, not branding. The site is self-hosted end to end ("nada de
     nubes de terceros"), so pulling a webfont would contradict that and add a
     third-party round trip. Instead: a stack that names the genuinely
     readable faces first and degrades to the next one the OS already has.

     Body: humanist sans, wide apertures, real x-height. `Liberation Sans` and
     `Cantarell` are named because on bare Linux fontconfig hands back
     `DejaVu Sans`, which is legible but very wide and heavy at body size.
     Mono: kept for kickers and figures only, never for prose. */
  --sans: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system,
    "Helvetica Neue", "Liberation Sans", "Noto Sans", Cantarell, "DejaVu Sans", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", "Cascadia Mono",
    "Liberation Mono", "DejaVu Sans Mono", Consolas, monospace;

  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  font-family: var(--sans);
  /* 17px: 16px es el minimo nominal pero ahi se nota el astizado; 17 da
     mas altura de x y mejor separacion entre letras */
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--surface-deep);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.muted { color: var(--dim); }

/* ── bands ─────────────────────────────────────────────────
   .band fills its parent. .band__inner owns the measure. */

.band { width: 100%; }
.band--base { background: var(--base); }
.band--surface { background: var(--surface); }
.band--deep { background: var(--surface-deep); }

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

/* the hero band is the one place that runs tight: the vinyl already carries
   the visual weight, so a full band gap underneath it reads as dead space */
.band--lead .band__inner { padding-bottom: 56px; }

.band__inner--wide { max-width: 1320px; }
.band__inner--measure { max-width: 780px; }

/* ── editorial type ─────────────────────────────────────── */

.kicker {
  display: block;
  font-family: var(--mono);
  /* 0.7rem era ilegible: en mayusculas con tracking el tamano efectivo cae */
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.kicker--gold { color: var(--gold); }

.display {
  font-size: clamp(2.6rem, 8.5vw, 5.4rem);
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  text-wrap: balance;
}
.display em {
  font-style: normal;
  color: var(--gold);
  text-shadow: 0 0 30px rgba(230, 154, 30, 0.35);
}

.section-title {
  font-size: clamp(1.5rem, 3.6vw, 2.3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.lede {
  font-size: clamp(1.05rem, 2.1vw, 1.3rem);
  line-height: 1.5;
  color: var(--dim);
  max-width: 46ch;
}
.lede strong { color: var(--text); font-weight: 600; }

.body {
  color: var(--dim);
  max-width: var(--measure);
  text-wrap: pretty;
}
.body strong { color: var(--text); font-weight: 600; }

.pull {
  font-size: clamp(1.3rem, 3.2vw, 2rem);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.015em;
  max-width: 26ch;
  margin-top: 40px;
  padding-left: 20px;
  border-left: 3px solid var(--gold);
}

/* ── nav ─────────────────────────────────────────────────── */

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  align-items: center;
  margin-bottom: 56px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.nav a {
  color: var(--dim);
  padding: 3px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.nav a:hover { color: var(--accent); text-decoration: none; border-bottom-color: var(--gold); }
.nav .nav-brand { color: var(--text); font-weight: 600; margin-right: auto; }

/* ── hero ────────────────────────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 56px;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 34px;
}
.hero__version {
  font-family: var(--mono);
  font-size: 0.84rem;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

/* ── vinyl ─────────────────────────────────────────────────
   One element per transformation. The spin and the wobble are both rotate();
   two rotate() in a single declaration fight over the same value and stall, so
   each gets its own element and the browser composes them.

   Proportions follow a real 12" record (302mm): the label is ~33% of the
   diameter (4") and the spindle hole ~2.4% (7.24mm). */

.vinyl {
  position: relative;
  width: calc(var(--vinyl-size) + var(--arm-room));
  height: var(--vinyl-size);
  flex-shrink: 0;
  /* ponytail: the arm arc is bounded to --arm-room so the parked position
     stays inside the box; a wider sweep needs a bigger --arm-room. */
}

.vinyl-platter {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--vinyl-size);
  height: var(--vinyl-size);
  /* platter rim + the shadow the record casts on it */
  border-radius: 50%;
  box-shadow:
    0 0 0 4px #0c0618,
    0 0 0 5px rgba(255, 255, 255, 0.035),
    0 34px 60px rgba(0, 0, 0, 0.72);
  animation: vinyl-wobble 20s ease-in-out infinite;
}

.vinyl-disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  /* clips the arc sheen to the record edge; without it the overlay paints a
     rectangle past the disc */
  overflow: hidden;
  background:
    /* grooves: thin light-on-dark rings, concentric (never conic).
       0.045 alpha is the -40% of the previous 0.075 */
    repeating-radial-gradient(circle at 50% 50%,
      rgba(255, 255, 255, 0.045) 0 1px, rgba(0, 0, 0, 0) 1px 4px),
    /* vinyl body */
    radial-gradient(circle at 50% 50%, #160e22 0%, #0e081a 62%, #06030e 100%);
  animation: vinyl-spin 5.5s linear infinite;
}

/* Arc sheen. On a real record the grooves reflect anisotropically along the
   groove tangent, so the highlight is an ELLIPSE hugging the upper-rear arc —
   not a band sliding side to side. Built as a radial-gradient with different
   x/y radii, oversized so it can travel, clipped by overflow:hidden above.
   ponytail: the arc is a fixed reflection of the room, not a highlight derived
   per-pixel from the grooves. Ceiling: CSS cannot. Upgrade: SVG mask on the
   groove pattern. */
.vinyl-disc::before {
  content: "";
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  background:
    radial-gradient(ellipse 62% 22% at 50% 30%,
      rgba(255, 255, 255, 0.26) 0%, rgba(255, 255, 255, 0.08) 45%, rgba(255, 255, 255, 0) 72%);
  animation: vinyl-arc 11s ease-in-out infinite;
}

/* gold label + spindle hole, rigid with the spin */
.vinyl-disc::after {
  content: "";
  position: absolute;
  inset: 34%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, var(--surface-deep) 0 6%, rgba(0, 0, 0, 0) 7%),
    radial-gradient(circle at 50% 50%, var(--gold) 0%, #c9821a 74%, #a56d14 100%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45), inset 0 0 20px rgba(0, 0, 0, 0.34);
}

/* raised outer edge: a hairline inset ring, brighter than the grooves */
.vinyl-disc {
  box-shadow:
    inset 0 0 0 1px rgba(0, 192, 153, 0.3),
    inset 0 0 0 3px rgba(255, 255, 255, 0.04),
    inset 0 2px 6px rgba(255, 255, 255, 0.05);
}

/* Label typography. The whole .vinyl is aria-hidden, so this text is purely
   decorative: a record with no type on the label does not read as a record.
   It spins with the disc, exactly like the real thing. */
.vinyl-label {
  position: absolute;
  inset: 34%;
  border-radius: 50%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-align: center;
  color: #3a1f00;
  overflow: hidden;
}
.vinyl-label__side {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  opacity: 0.75;
}
.vinyl-label__title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
}
.vinyl-label__rate {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  opacity: 0.62;
}

/* Tonearm: sibling of the platter, so the wobble does not drag it along.
   Four pieces that survive at 260px: counterweight, tube, headshell, stylus. */
.vinyl-arm {
  position: absolute;
  left: calc(var(--vinyl-size) - 6px);
  top: 3px;
  width: 0;
  height: 0;
  z-index: 3;
  transform-origin: top center;
  animation: vinyl-arm-sweep 9s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.vinyl-arm__weight {
  position: absolute;
  left: -10px;
  top: -30px;
  width: 20px;
  height: 22px;
  border-radius: 3px;
  background: linear-gradient(180deg, #2c2140, #120c20);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.6);
}
.vinyl-arm__tube {
  position: absolute;
  left: -2.5px;
  top: 0;
  width: 5px;
  /* el pivote .vinyl-arm es 0x0, asi que un % de altura daria 0 */
  height: calc(var(--vinyl-size) * 0.44);
  border-radius: 2.5px;
  background: linear-gradient(90deg, #221a33 0%, #5d4d78 45%, #1c1529 100%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}
.vinyl-arm__head {
  position: absolute;
  left: -8px;
  top: calc(var(--vinyl-size) * 0.44 - 2px);
  width: 16px;
  height: 11px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent) 0%, #00a184 100%);
  transform: rotate(-22deg);
  box-shadow: 0 0 12px rgba(0, 192, 153, 0.45);
}
.vinyl-arm__head::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 8px;
  width: 0;
  height: 0;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-top: 6px solid var(--text);
}

/* ponytail: the arm runs a fixed 22-degree arc on a 9s loop and ignores scroll.
   Ceiling: CSS cannot read scroll position. Upgrade: an IntersectionObserver
   writing --arm-angle, interpolated by the same keyframe. */

@keyframes vinyl-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes vinyl-wobble {
  0%, 100% { transform: rotate(1.6deg); }
  50% { transform: rotate(-1.6deg); }
}
@keyframes vinyl-arm-sweep {
  0% { transform: rotate(-22deg); }
  20% { transform: rotate(4deg); }
  100% { transform: rotate(19deg); }
}
@keyframes vinyl-arc {
  0%, 100% { transform: rotate(-7deg) translateY(-2%); }
  50% { transform: rotate(7deg) translateY(2%); }
}


@media (prefers-reduced-motion: no-preference) {
  .vinyl-platter { will-change: transform; }
}
@media (prefers-reduced-motion: reduce) {
  .vinyl-disc,
  .vinyl-platter,
  .vinyl-disc::before { animation: none; }
  /* parked on the record, still legible as a tonearm */
  .vinyl-arm { animation: none; transform: rotate(6deg); }
}

/* ── pipeline ────────────────────────────────────────────── */

.pipeline {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.pipeline__step {
  flex: 1 1 200px;
  padding: 26px 24px 26px 0;
  border-bottom: 1px solid var(--line);
}
.pipeline__n {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  color: var(--gold);
  display: block;
  margin-bottom: 10px;
}
.pipeline__step strong { display: block; font-size: 1.02rem; letter-spacing: -0.01em; }
.pipeline__step small { color: var(--dim); font-size: 0.88rem; }

/* ── features as liner notes, not a card grid ────────────── */

.liners { border-top: 1px solid var(--line); }
.liner {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 8px 32px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
}
.liner__n {
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  color: var(--gold);
  padding-top: 4px;
}
.liner__body h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 4px; }
.liner__body p { color: var(--dim); max-width: 54ch; }

/* ── links ───────────────────────────────────────────────── */

.links { list-style: none; border-top: 1px solid var(--line); }
.links li { border-bottom: 1px solid var(--line); }
.links a {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  align-items: baseline;
  padding: 20px 0;
  color: var(--text);
  transition: color 0.15s;
}
.links a:hover { color: var(--accent); text-decoration: none; }
.links code { font-family: var(--mono); font-size: 1rem; color: var(--accent); }
.links a:hover code { text-decoration: underline; }
.links span { color: var(--dim); font-size: 0.9rem; }

/* ── buttons ─────────────────────────────────────────────── */

.btn {
  display: inline-block;
  background: var(--gold);
  color: #241200;
  font-weight: 700;
  padding: 13px 24px;
  border-radius: 4px;
  transition: filter 0.15s, transform 0.15s;
}
.btn:hover { filter: brightness(1.1); text-decoration: none; transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn--huge {
  font-size: clamp(1rem, 2.4vw, 1.3rem);
  padding: 18px 38px;
}

/* ── download band ───────────────────────────────────────── */

.cta { text-align: center; }
.cta .display { margin-bottom: 26px; }

/* ── colophon + footer ───────────────────────────────────── */

.colophon { margin-top: 48px; font-size: 0.88rem; text-wrap: pretty; }

/* BEM single underscore: these are the class names Footer.astro actually
   renders. The component is shared with t420.dev, mediadev, ptm and
   factoruno, so the names are not ours to change. */
.site-footer {
  background: var(--surface-deep);
  color: var(--dim);
}
.site-footer-rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 30%, var(--line) 70%, transparent);
}
.site-footer-inner {
  max-width: 1120px;
  margin-inline: auto;
  padding: 26px var(--gutter) 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  flex-wrap: wrap;
  font-size: 0.84rem;
  line-height: 1.5;
}
.site-footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.site-footer-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(0, 192, 153, 0.6);
  flex-shrink: 0;
}
.site-footer-name {
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.site-footer-tagline { color: var(--dim); }
.site-footer-copy {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

/* ── reveal (driven by reveal.js) ────────────────────────── */

.js-anim .reveal { opacity: 0; transform: translateY(14px); }
.js-anim .reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* ── responsive ──────────────────────────────────────────── */

@media (max-width: 900px) {
  :root { --band-gap: 72px; }
  .hero {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 44px;
  }
  .hero .lede { margin-inline: auto; }
  .hero__cta { justify-content: center; }
  .nav { gap: 5px 14px; font-size: 0.72rem; margin-bottom: 36px; }
  .nav .nav-brand { margin-right: 0; width: 100%; }
  .liner { grid-template-columns: 1fr; gap: 4px; }
  .pull { max-width: none; }
}

@media (max-width: 520px) {
  :root { --vinyl-size: 190px; --arm-room: 76px; --gutter: 18px; --band-gap: 60px; }
  .site-footer-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
  .pipeline__step { flex-basis: 100%; }
}
