@layer reset, tokens, base, components;

/* ------------------------------------------------------------------ RESET */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
  img, video, svg { display: block; max-width: 100%; }
  button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
  ul[role="list"] { list-style: none; padding: 0; }
  a { color: inherit; }
}

/* ----------------------------------------------------------------- TOKENS */
/* Sala de cine: negro cálido, oro de las capas de la barbería, luz fría de los paneles hexagonales. */
@layer tokens {
  :root {
    color-scheme: dark;
    --step--1: clamp(0.80rem, 0.78rem + 0.10vw, 0.86rem);
    --step-0:  clamp(0.98rem, 0.95rem + 0.15vw, 1.06rem);
    --step-1:  clamp(1.15rem, 1.08rem + 0.35vw, 1.40rem);
    --step-2:  clamp(1.50rem, 1.30rem + 0.90vw, 2.10rem);
    --step-3:  clamp(2.30rem, 1.70rem + 3.00vw, 4.20rem);
    --step-4:  clamp(2.90rem, 1.90rem + 5.00vw, 6.40rem);

    --space-2xs: 0.5rem; --space-xs: 0.75rem; --space-s: 1rem;
    --space-m: 1.5rem; --space-l: 2rem; --space-xl: 3rem;
    --section: clamp(3rem, 2rem + 4vw, 6rem);

    --bg:      oklch(11% 0.010 70);
    --bg-2:    oklch(15% 0.014 70);
    --surface: oklch(19% 0.016 70);
    --ink:     oklch(97% 0.010 85);
    --muted:   oklch(86% 0.015 80);
    --gold:    oklch(86% 0.16 88);
    --gold-hi: oklch(93% 0.12 93);
    --gold-lo: oklch(76% 0.15 76);
    --on-gold: oklch(16% 0.03 70);
    --cool:    oklch(62% 0.09 215);
    --rec:     oklch(64% 0.22 27);
    --line:    oklch(97% 0.01 85 / 0.12);

    --gold-grad: linear-gradient(100deg, var(--gold-lo) 0%, var(--gold) 30%, var(--gold-hi) 50%, var(--gold) 70%, var(--gold-lo) 100%);

    --display: "Anton", "Impact", "Arial Narrow Bold", sans-serif;
    --serif: "Instrument Serif", "Times New Roman", serif;
    --sans:  "Inter Tight", system-ui, sans-serif;
    --mono:  "JetBrains Mono", ui-monospace, monospace;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

    --gutter: clamp(1rem, 4vw, 3.5rem);
    --page-max: 80rem;
  }
}

/* ------------------------------------------------------------------- BASE */
@layer base {
  body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: var(--step-0);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
  }
  h1, h2, h3 { font-weight: 400; text-wrap: balance; }
  h1, h2 {
    font-family: var(--display);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.005em;
    color: var(--ink);
  }
  h2 { font-size: var(--step-3); line-height: 1; }
  p { text-wrap: pretty; }
  ::selection { background: var(--gold); color: var(--on-gold); }
  :focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
}

/* ------------------------------------------------------------- COMPONENTS */
@layer components {
  .wrap { width: min(100% - var(--gutter) * 2, var(--page-max)); margin-inline: auto; }

  .skip {
    position: fixed; top: var(--space-s); left: var(--space-s); z-index: 100;
    padding: var(--space-2xs) var(--space-s); background: var(--gold); color: var(--on-gold);
    transform: translateY(-200%);
  }
  .skip:focus { transform: none; }

  /* Texto dorado con brillo */
  .gold {
    font-family: var(--serif);
    font-style: italic;
    text-transform: none;
    letter-spacing: -0.01em;
    font-size: 1.12em;
    filter: drop-shadow(0 0 22px oklch(86% 0.16 88 / 0.35));
    background: var(--gold-grad);
    background-size: 220% 100%;
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
    animation: shine 6s var(--ease-in-out) infinite;
    padding-right: 0.06em;
  }
  @keyframes shine { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

  /* Telón de apertura: se abre una vez y desaparece */
  .curtain span {
    position: fixed; left: 0; right: 0; z-index: 90; height: 0; background: #000;
    pointer-events: none;
    transition: height 1s var(--ease-in-out) 0.1s;
  }
  .curtain span:first-child { top: 0; }
  .curtain span:last-child { bottom: 0; }
  .is-loading .curtain span { height: 50.5vh; transition: none; }

  .grain {
    position: fixed; inset: -50%; z-index: 80; pointer-events: none; opacity: 0.06;
    background-image: 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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: grain 0.9s steps(4) infinite;
  }
  @keyframes grain { 0% { transform: translate(0,0); } 25% { transform: translate(-3%,2%); } 50% { transform: translate(2%,-3%); } 75% { transform: translate(-2%,-1%); } }

  /* --- Encabezado --- */
  .top {
    position: fixed; z-index: 50; top: 0; left: 0; right: 0;
    display: flex; align-items: center; gap: var(--space-l);
    padding: calc(var(--space-xs) + env(safe-area-inset-top, 0px)) var(--gutter) var(--space-xs);
    transition: background 0.3s linear, border-color 0.3s linear;
    border-bottom: 1px solid transparent;
  }
  .is-scrolled .top {
    background: oklch(11% 0.01 70 / 0.85);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom-color: var(--line);
  }
  .brand { display: flex; flex-direction: column; text-decoration: none; margin-right: auto; line-height: 1; }
  .brand__name { font-family: var(--display); text-transform: uppercase; font-size: var(--step-1); letter-spacing: 0.02em; white-space: nowrap; }
  .brand__name .gold { font-size: 1.22em; filter: none; }
  .brand__tag {
    font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--gold); margin-top: 0.15rem;
  }
  .nav { display: flex; gap: var(--space-m); }
  .nav a {
    font-size: var(--step--1); font-weight: 500; text-decoration: none; color: var(--muted);
    background: linear-gradient(var(--gold), var(--gold)) 0 100% / 0 1px no-repeat;
    padding-block: 0.25rem;
    transition: color 0.18s linear, background-size 0.3s var(--ease-out);
  }
  .nav a:hover { color: var(--ink); background-size: 100% 1px; }
  @media (max-width: 760px) { .nav { display: none; } }

  /* --- Botones --- */
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2xs);
    min-height: 48px; padding: var(--space-xs) var(--space-m);
    background: var(--gold-grad); background-size: 200% 100%; background-position: 20% 50%;
    color: var(--on-gold);
    font-weight: 700; font-size: var(--step-0); text-decoration: none;
    border: 0; border-radius: 999px;
    box-shadow: 0 10px 30px -10px oklch(84% 0.15 86 / 0.55), inset 0 1px 0 oklch(100% 0 0 / 0.35);
    transition: transform 0.18s var(--ease-out), background-position 0.5s var(--ease-out), box-shadow 0.3s linear;
  }
  .btn:hover { background-position: 80% 50%; box-shadow: 0 14px 40px -10px oklch(84% 0.15 86 / 0.75), inset 0 1px 0 oklch(100% 0 0 / 0.35); }
  .btn:active { transform: scale(0.97); }
  .btn span { transition: transform 0.3s var(--ease-out); }
  .btn:hover span { transform: translateX(4px); }
  .btn--small { min-height: 42px; padding: var(--space-2xs) var(--space-m); font-size: var(--step--1); }
  .btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
  .btn--ghost:hover { color: var(--on-gold); background: var(--gold-grad); background-size: 200% 100%; box-shadow: none; }
  .btn--xl { min-height: 62px; padding: var(--space-s) var(--space-l); font-size: var(--step-1); }

  .link {
    color: var(--ink); text-decoration: none; font-weight: 600;
    background: linear-gradient(var(--gold), var(--gold)) 0 100% / 100% 2px no-repeat;
    padding-block: 0.25rem;
    transition: background-size 0.3s var(--ease-out);
  }
  .link:hover { background-size: 0 2px; background-position: 100% 100%; }

  /* --- Hero --- */
  .hero {
    position: relative; isolation: isolate; overflow: hidden;
    padding-top: calc(5.5rem + env(safe-area-inset-top, 0px));
    padding-bottom: var(--section);
    background:
      radial-gradient(55% 60% at 12% 18%, oklch(62% 0.09 215 / 0.22), transparent 70%),
      radial-gradient(50% 55% at 85% 75%, oklch(84% 0.15 86 / 0.16), transparent 70%),
      var(--bg);
  }
  /* Luz ambiental: la portada del video desenfocada ilumina la sala */
  .hero__ambient {
    position: absolute; inset: -10%; z-index: -1;
    background: url("../video/showreel.jpg") 78% 40% / 55% auto no-repeat;
    filter: blur(80px) saturate(1.4);
    opacity: 0.45;
  }
  .hero__grid {
    display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: center; gap: var(--space-xl);
  }
  .eyebrow {
    display: inline-flex; align-items: center; gap: var(--space-2xs);
    padding: 0.45rem 0.9rem;
    font-family: var(--mono); font-size: 0.74rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--gold-hi);
    background: oklch(84% 0.15 86 / 0.1);
    border: 1px solid oklch(84% 0.15 86 / 0.45);
    border-radius: 999px;
  }
  .rec { width: 8px; height: 8px; border-radius: 50%; background: var(--rec); box-shadow: 0 0 10px var(--rec); animation: blink 1.6s steps(1) infinite; flex: none; }
  @keyframes blink { 50% { opacity: 0.2; } }
  .hero__title {
    font-size: var(--step-4);
    line-height: 0.98;
    margin-top: var(--space-m);
    text-shadow: 0 4px 30px oklch(0% 0 0 / 0.6);
  }
  .hero__title .gold { display: inline-block; margin-top: 0.05em; }
  .hero__lede { font-size: var(--step-1); line-height: 1.45; color: var(--ink); max-width: 36ch; margin-top: var(--space-m); }
  .hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-s) var(--space-l); margin-top: var(--space-l); }
  .chips { display: flex; flex-wrap: wrap; gap: var(--space-2xs); margin-top: var(--space-l); }
  .chips li {
    font-size: 0.78rem; font-weight: 600; color: var(--ink);
    padding: 0.35rem 0.75rem; border: 1px solid var(--line); border-radius: 999px;
    background: oklch(97% 0.01 85 / 0.03);
  }

  .hero__reel {
    position: relative; justify-self: end;
    width: min(100%, 25rem);
    aspect-ratio: 9 / 16; max-height: 76vh;
    border-radius: 18px; overflow: hidden;
    box-shadow:
      0 0 0 1px oklch(84% 0.15 86 / 0.5),
      0 40px 120px -30px oklch(84% 0.15 86 / 0.45),
      0 30px 60px -20px oklch(0% 0 0 / 0.8);
    transform: rotate(1.5deg);
  }
  .hero__reel video { width: 100%; height: 100%; object-fit: cover; }
  .hero__badge {
    position: absolute; left: var(--space-s); top: var(--space-s);
    display: inline-flex; align-items: center; gap: var(--space-2xs);
    font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase;
    padding: 0.35rem 0.6rem; border-radius: 6px;
    background: oklch(0% 0 0 / 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  }

  /* Entrada del hero tras el telón */
  .hero__copy > *, .hero__reel { transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
  .is-loading .hero__copy > * { opacity: 0; transform: translateY(16px); }
  .is-loading .hero__reel { opacity: 0; transform: rotate(1.5deg) translateY(24px) scale(0.97); }
  .hero__copy > :nth-child(1) { transition-delay: 0.5s; }
  .hero__copy > :nth-child(2) { transition-delay: 0.6s; }
  .hero__copy > :nth-child(3) { transition-delay: 0.7s; }
  .hero__copy > :nth-child(n+4) { transition-delay: 0.8s; }
  .hero__reel { transition-delay: 0.65s; }

  /* Móvil: el video es el fondo del hero y el texto va encima */
  @media (max-width: 860px) {
    .hero {
      min-height: 88svh; display: grid; align-items: end;
      padding-bottom: var(--space-l);
    }
    .hero__ambient { display: none; }
    .hero__grid { display: block; }
    .hero__reel {
      position: absolute; inset: 0; z-index: -1;
      width: 100%; max-height: none; aspect-ratio: auto;
      border-radius: 0; box-shadow: none; transform: none;
    }
    .is-loading .hero__reel { transform: none; }
    .hero__reel::after {
      content: ""; position: absolute; inset: 0;
      background:
        linear-gradient(to top, var(--bg) 4%, oklch(11% 0.01 70 / 0.9) 42%, oklch(11% 0.01 70 / 0.45) 72%, oklch(11% 0.01 70 / 0.7) 100%);
    }
    .hero__badge { display: none; }
    .hero__lede { color: var(--ink); opacity: 0.88; }
    .chips { margin-top: var(--space-m); }
  }

  /* --- Cinta de barberías --- */
  .marquee {
    overflow: hidden;
    border-block: 1px solid oklch(84% 0.15 86 / 0.35);
    background: linear-gradient(90deg, oklch(15% 0.03 75), oklch(19% 0.05 80) 50%, oklch(15% 0.03 75));
    padding-block: var(--space-s);
  }
  .marquee__track {
    display: flex; align-items: center; gap: var(--space-l);
    width: max-content;
    animation: marquee 32s linear infinite;
  }
  .marquee span {
    font-family: var(--display); text-transform: uppercase; letter-spacing: 0.04em;
    font-size: var(--step-1); line-height: 1;
    color: var(--gold); white-space: nowrap;
  }
  .marquee i { font-style: normal; color: var(--gold); font-size: 0.8rem; opacity: 0.7; }
  @keyframes marquee { to { transform: translateX(-50%); } }

  /* --- Encabezados de sección --- */
  .head {
    display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between;
    gap: var(--space-xs) var(--space-l);
    margin-bottom: var(--space-l);
  }
  .head__note { color: var(--muted); font-size: var(--step-0); max-width: 36ch; }

  /* --- Trabajo --- */
  .work {
    padding-block: var(--section);
    background: radial-gradient(60% 40% at 50% 0%, oklch(62% 0.09 215 / 0.10), transparent 70%), var(--bg);
  }
  .reels {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-s);
  }
  @media (max-width: 1000px) { .reels { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  /* Móvil: carrusel horizontal para no alargar la página */
  @media (max-width: 680px) {
    .reels {
      grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 64%;
      overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
      margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter);
      scroll-padding-inline: var(--gutter);
      gap: var(--space-xs); padding-bottom: var(--space-2xs);
      scrollbar-width: none;
    }
    .reels::-webkit-scrollbar { display: none; }
    .reels > li { scroll-snap-align: start; }
  }

  .reel {
    position: relative; display: block; width: 100%; text-align: left;
    aspect-ratio: 9 / 16; overflow: hidden; border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 0 0 1px var(--line);
    transition: box-shadow 0.3s linear, transform 0.4s var(--ease-out);
  }
  .reel:hover, .reel.is-playing { box-shadow: 0 0 0 1px oklch(84% 0.15 86 / 0.7), 0 24px 50px -20px oklch(84% 0.15 86 / 0.4); }
  .reel:hover { transform: translateY(-4px); }
  .reel video, .reel img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  }
  .reel video { opacity: 0; transition: opacity 0.4s linear; }
  .reel.is-playing video { opacity: 1; }
  .reel::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(to top, oklch(0% 0 0 / 0.9) 0%, oklch(0% 0 0 / 0.35) 32%, transparent 55%);
    pointer-events: none;
  }
  .reel__info { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; padding: var(--space-s); }
  .reel__shop {
    font-family: var(--mono); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--gold);
  }
  .reel__title { font-weight: 700; font-size: var(--step-1); line-height: 1.15; letter-spacing: -0.01em; margin-top: 0.3rem; }
  .reel__type { font-size: 0.74rem; color: oklch(90% 0.01 85); margin-top: 0.4rem; }
  .reel__play {
    position: absolute; z-index: 1; top: var(--space-xs); right: var(--space-xs);
    width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
    background: oklch(0% 0 0 / 0.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    box-shadow: inset 0 0 0 1px oklch(100% 0 0 / 0.25);
  }
  .reel__play::before { content: ""; margin-left: 3px; border-left: 10px solid var(--gold); border-block: 6.5px solid transparent; }

  /* Tarjeta final: invitación */
  .reel--cta {
    display: flex; flex-direction: column; justify-content: flex-end; gap: var(--space-s);
    padding: var(--space-m); text-decoration: none;
    background:
      radial-gradient(80% 60% at 70% 20%, oklch(84% 0.15 86 / 0.35), transparent 70%),
      linear-gradient(160deg, oklch(24% 0.04 75), oklch(14% 0.02 70));
    box-shadow: 0 0 0 1px oklch(84% 0.15 86 / 0.5);
  }
  .reel--cta::after { display: none; }
  .reel--cta strong { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: var(--step-3); line-height: 1; }
  .reel--cta span { font-weight: 700; color: var(--gold); }

  /* --- Servicios --- */
  .services {
    padding-block: var(--section);
    background:
      radial-gradient(50% 70% at 100% 50%, oklch(84% 0.15 86 / 0.08), transparent 70%),
      var(--bg-2);
    border-block: 1px solid var(--line);
  }
  .plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-s); }
  @media (max-width: 860px) { .plans { grid-template-columns: 1fr; } }
  .plan {
    position: relative;
    display: grid; grid-template-rows: auto auto 1fr auto; gap: var(--space-xs);
    padding: var(--space-m);
    border-radius: 16px;
    background: linear-gradient(180deg, oklch(97% 0.01 85 / 0.04), oklch(97% 0.01 85 / 0.01));
    box-shadow: inset 0 0 0 1px var(--line);
  }
  .plan h3 { font-family: var(--display); text-transform: uppercase; font-size: var(--step-2); line-height: 1; letter-spacing: 0.01em; }
  .plan p { color: var(--muted); font-size: var(--step-0); line-height: 1.5; }
  .plan .plan__spec { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); align-self: end; }
  .plan .btn { justify-self: start; margin-top: var(--space-2xs); }
  .plan--featured {
    background:
      radial-gradient(90% 80% at 100% 0%, oklch(84% 0.15 86 / 0.18), transparent 70%),
      linear-gradient(180deg, oklch(22% 0.03 75), oklch(16% 0.02 70));
    box-shadow: inset 0 0 0 1px oklch(84% 0.15 86 / 0.6), 0 30px 60px -30px oklch(84% 0.15 86 / 0.35);
  }
  .plan .plan__flag {
    position: absolute; top: var(--space-m); right: var(--space-m);
    font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--on-gold); background: var(--gold); padding: 0.25rem 0.55rem; border-radius: 999px; line-height: 1.4;
  }
  @media (max-width: 860px) {
    .plan { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: none; column-gap: var(--space-s); row-gap: 0.4rem; padding: var(--space-s) var(--space-m); }
    .plan > * { grid-column: 1; }
    .plan .btn { grid-column: 2; grid-row: 1 / span 4; align-self: center; margin: 0; }
    .plan .plan__flag { position: static; justify-self: start; }
  }

  /* --- Contacto --- */
  .contact {
    position: relative; isolation: isolate; overflow: hidden;
    padding-block: var(--section);
  }
  .contact::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
      radial-gradient(45% 70% at 85% 60%, oklch(84% 0.15 86 / 0.18), transparent 70%),
      radial-gradient(40% 60% at 10% 30%, oklch(62% 0.09 215 / 0.14), transparent 70%);
  }
  .contact__title { font-size: var(--step-4); line-height: 0.98; }
  .contact__title .gold { display: inline-block; }
  .contact__phone { margin-top: var(--space-s); color: var(--muted); }
  .contact__phone a { color: var(--gold); font-weight: 700; text-decoration: none; font-variant-numeric: tabular-nums; white-space: nowrap; user-select: all; }
  .contact__lede { color: var(--ink); font-size: var(--step-1); line-height: 1.45; max-width: 34ch; margin-block: var(--space-s) var(--space-l); }
  .socials { display: flex; flex-wrap: wrap; gap: var(--space-2xs); margin-top: var(--space-l); }
  .socials a {
    display: inline-flex; align-items: center; gap: var(--space-2xs);
    min-height: 44px; padding: var(--space-2xs) var(--space-s);
    border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line);
    font-size: var(--step--1); font-weight: 500; text-decoration: none;
    transition: color 0.18s linear, box-shadow 0.18s linear;
  }
  .socials a:hover { color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
  .socials svg { width: 18px; height: 18px; }

  .foot { border-top: 1px solid var(--line); padding-block: var(--space-m) calc(var(--space-m) + env(safe-area-inset-bottom, 0px)); }
  .foot__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-s); color: var(--muted); font-size: var(--step--1); }
  @media (max-width: 760px) { .foot { padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px)); } }

  /* --- WhatsApp flotante (móvil) --- */
  .wa-float {
    position: fixed; z-index: 45; right: var(--gutter); bottom: calc(var(--space-s) + env(safe-area-inset-bottom, 0px));
    width: 56px; height: 56px; border-radius: 50%;
    display: none; place-items: center;
    background: var(--gold-grad); background-size: 200% 100%; color: var(--on-gold);
    box-shadow: 0 14px 34px -10px oklch(84% 0.15 86 / 0.6);
    opacity: 0; transform: translateY(16px);
    transition: opacity 0.3s linear, transform 0.3s var(--ease-out);
  }
  .is-scrolled .wa-float { opacity: 1; transform: none; }
  @media (max-width: 760px) { .wa-float { display: grid; } }

  /* --- Reproductor --- */
  .player {
    width: 100vw; height: 100dvh; max-width: none; max-height: none;
    padding: 0; border: 0; background: #000; color: var(--ink);
    display: none; grid-template-rows: minmax(0, 1fr) auto;
  }
  .player[open] { display: grid; animation: player-in 0.6s var(--ease-out); }
  .player::backdrop { background: #000; }
  @keyframes player-in { from { clip-path: inset(50% 0 50% 0); } to { clip-path: inset(0); } }
  .player__stage { min-height: 0; display: grid; place-items: center; padding: var(--space-s); padding-top: calc(var(--space-s) + env(safe-area-inset-top, 0px)); }
  .player__stage video { height: 100%; width: auto; max-width: 100%; border-radius: 10px; background: var(--surface); }
  .player__bar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-s);
    padding: var(--space-s) var(--gutter) calc(var(--space-s) + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
  }
  .player__text { min-width: 0; }
  .player__meta { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
  .player__bar h2 { font-family: var(--sans); text-transform: none; font-weight: 700; font-size: var(--step-1); }
  .player__actions { display: flex; align-items: center; gap: var(--space-2xs); }
  .icon-btn {
    width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
    box-shadow: inset 0 0 0 1px var(--line);
    transition: color 0.18s linear, box-shadow 0.18s linear;
  }
  .icon-btn:hover { color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  .grain { display: none; }
}
