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

  :root {
    --loader-intro-delay: 250ms;
    --loader-content-enter-duration: 350ms;
    --loader-type-duration: 800ms;
    --accent: #ff6b4a;
    --accent-soft: #ffb89a;
    --bg-dark: #0a0807;
    --text-primary: #fff;
    --text-muted: rgba(255, 245, 235, 0.7);
    --text-faint: rgba(255, 245, 235, 0.4);
    --noise-texture: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

    --t-headline:   1.6s;
    --t-subtitle:   4.0s;
    --t-f-eyebrow:  8.6s;
    --t-f-progress: 9.8s;
    --t-f-credit:  11.0s;
    --t-done:      12.4s;

    --d-reveal:  1.2s;
    --d-curtain: 2.6s;
    --ease-out:  cubic-bezier(0.19, 1, 0.22, 1);
    --ease-soft: cubic-bezier(0.16, 1, 0.3, 1);
  }

  html, body {
    height: 100%;
    overflow: hidden;
    background: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  .stage-root { position: fixed; inset: 0; isolation: isolate; }

  /* =========================================================
     LOADER · PAPARAZZI + DISOLVENCIA CÁLIDA
     ========================================================= */
  .page-loader {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #050405;
    color: #f5f0f0;
    opacity: 1;
    visibility: visible;
  }

  /* Cuando se retira, se quema con blur + brillo + bloom cálido */
  .page-loader.is-hidden {
    pointer-events: none;
    visibility: hidden;
    animation: loaderDissolve 1200ms ease-out forwards;
    transition: visibility 0s linear 1200ms;
  }
  @keyframes loaderDissolve {
    0%   { opacity: 1; filter: blur(0) brightness(1); }
    40%  { opacity: 1; filter: blur(14px) brightness(1.35); }
    100% { opacity: 0; filter: blur(70px) brightness(1.9); }
  }

  .page-loader__bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
      radial-gradient(ellipse 70% 60% at 28% 18%, rgba(255, 107, 74, 0.13), transparent 62%),
      radial-gradient(ellipse 80% 70% at 76% 82%, rgba(120, 60, 180, 0.14), transparent 66%),
      linear-gradient(160deg, #0b0710, #050405 62%);
  }

  .page-loader__flashes {
    position: absolute;
    inset: 0;
    z-index: 4;
    overflow: hidden;
    pointer-events: none;
  }

  .page-loader__flash {
    position: absolute;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(.1);
    opacity: 0;
    mix-blend-mode: screen;
    will-change: transform, opacity;
    background: radial-gradient(circle,
      rgba(255, 255, 255, 1) 0%,
      rgba(255, 246, 232, 0.88) 6%,
      rgba(255, 214, 178, 0.45) 18%,
      rgba(255, 168, 118, 0.12) 38%,
      transparent 68%);
    animation: loader-papa-pop 620ms cubic-bezier(0.08, 0.9, 0.2, 1) forwards;
  }
  @keyframes loader-papa-pop {
    0%   { opacity: 0;   transform: translate(-50%, -50%) scale(.08); }
    7%   { opacity: 1;   transform: translate(-50%, -50%) scale(.86); }
    16%  { opacity: .85; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0;   transform: translate(-50%, -50%) scale(1.55); }
  }

  .page-loader__flash-full {
    position: absolute;
    inset: 0;
    background: rgba(255, 250, 244, 0.92);
    opacity: 0;
    mix-blend-mode: screen;
    animation: loader-papa-full 200ms ease-out forwards;
  }
  @keyframes loader-papa-full {
    0%   { opacity: 0; }
    12%  { opacity: .6; }
    100% { opacity: 0; }
  }

  .page-loader__content {
    position: relative;
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.7);
  }

  .page-loader__label {
    display: block;
    font-family: 'Fraunces', Georgia, serif;
    font-style: italic;
    font-weight: 500;
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    line-height: 1;
    letter-spacing: -0.02em;
    color: #fff;
    animation: loader-papa-glow 3.4s ease-in-out infinite;
  }
  @keyframes loader-papa-glow {
    0%, 100% {
      text-shadow:
        0 0 18px rgba(255, 180, 140, 0.30),
        0 0 50px rgba(255, 107, 74, 0.14);
    }
    50% {
      text-shadow:
        0 0 30px rgba(255, 195, 155, 0.80),
        0 0 80px rgba(255, 107, 74, 0.45);
    }
  }

  .page-loader__dots {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
  }
  .page-loader__dots i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent-soft);
    box-shadow: 0 0 6px rgba(255, 184, 154, 0.7);
    animation: loader-papa-dot 1.4s ease-in-out infinite;
  }
  .page-loader__dots i:nth-child(2) { animation-delay: 200ms; }
  .page-loader__dots i:nth-child(3) { animation-delay: 400ms; }
  @keyframes loader-papa-dot {
    0%, 100% { opacity: .18; transform: scale(.75); }
    50%      { opacity: 1;   transform: scale(1.3); }
  }

  /* Bloom cálido que expande desde el centro al retirarse */
  .page-loader__bloom {
    position: absolute;
    inset: 0;
    z-index: 7;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0;
    background: radial-gradient(circle at 50% 50%,
      rgba(255, 180, 120, 0.95) 0%,
      rgba(255, 120, 70, 0.5) 28%,
      transparent 62%);
    will-change: transform, opacity;
  }
  .page-loader.is-hidden .page-loader__bloom {
    animation: loader-bloom 1200ms ease-out forwards;
  }
  @keyframes loader-bloom {
    0%   { opacity: 0;   transform: scale(.7); }
    42%  { opacity: .95; transform: scale(1); }
    100% { opacity: 0;   transform: scale(1.7); }
  }

  .page-loader__grain {
    position: absolute;
    inset: 0;
    z-index: 20;
    pointer-events: none;
    background-image: var(--noise-texture);
    opacity: 0.065;
    mix-blend-mode: overlay;
  }

  .page-loader__vignette {
    position: absolute;
    inset: 0;
    z-index: 18;
    pointer-events: none;
    background: radial-gradient(ellipse at 50% 50%, transparent 38%, rgba(0, 0, 0, 0.78) 100%);
  }

  /* =========================================================
     STAGE REVEAL (entrada desde blur + brillo)
     ========================================================= */
  .stage-root.is-revealing {
    animation: stage-reveal 1200ms ease-out forwards;
  }
  @keyframes stage-reveal {
    0%   { filter: blur(20px) brightness(1.6) saturate(1.2); }
    42%  { filter: blur(6px)  brightness(1.25) saturate(1.1); }
    100% { filter: blur(0)    brightness(1)    saturate(1); }
  }

  /* =========================================================
     ESCENARIO PRINCIPAL
     ========================================================= */
  .mix-stage {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #050405;
    z-index: 1;
    contain: layout paint;
  }

  .mix-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 0%;
    filter: contrast(1.05) brightness(0.95) saturate(1.1);
    transform-origin: center;
    backface-visibility: hidden;
    animation: none;
    background-size: cover;
    background-position: center;
    background-color: #050405;
  }

  @media (min-width: 900px) {
    .mix-layer { object-position: center 12%; transition: none; }
    .camera-middle .mix-layer { object-position: center 50%; }
    .camera-bottom .mix-layer { object-position: center 76%; }
  }

  .stage-root::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9;
    background: rgba(10, 8, 7, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 100ms ease-out;
  }
  .camera-cut-in::after { opacity: 1; }
  .camera-cut-out::after { opacity: 0; transition: opacity 240ms ease-in; }

  .overlay { position: absolute; inset: 0; pointer-events: none; contain: layout paint; }

  .overlay--gradient {
    z-index: 2;
    background: linear-gradient(
      180deg,
      rgba(10, 8, 7, 0.15) 0%,
      rgba(10, 8, 7, 0.05) 40%,
      rgba(10, 8, 7, 0.85) 100%
    );
  }

  .overlay--warm {
    z-index: 2;
    mix-blend-mode: soft-light;
    background: linear-gradient(135deg, rgba(255, 107, 74, 0.18) 0%, rgba(0, 0, 0, 0) 100%);
  }

  .overlay--grain {
    z-index: 3;
    opacity: 0.06;
    background-image: var(--noise-texture);
  }

  .paparazzi {
    position: absolute;
    inset: 0;
    z-index: 8;
    pointer-events: none;
    overflow: hidden;
    contain: layout style paint;
  }

  .flash { position: absolute; opacity: 0; pointer-events: none; contain: layout style paint; }
  .flash--cone, .flash--halo, .flash--streak, .flash--floor { mix-blend-mode: screen; }

  .flash--cone {
    top: 0; height: 100%; width: 130%; max-width: 1600px;
    animation: flash-cone 140ms cubic-bezier(0.02, 0.98, 0.1, 1) forwards;
  }
  .flash--cone.from-left  { left: 0;  transform-origin: left var(--y, 50%);  background: radial-gradient(ellipse 45% 55% at 0% var(--y,50%), rgba(255,255,255,1) 0%, rgba(255,250,240,0.95) 3%, rgba(255,235,215,0.7) 10%, rgba(255,210,180,0.3) 25%, rgba(255,190,160,0.08) 50%, transparent 72%); }
  .flash--cone.from-right { right: 0; transform-origin: right var(--y, 50%); background: radial-gradient(ellipse 45% 55% at 100% var(--y,50%), rgba(255,255,255,1) 0%, rgba(255,250,240,0.95) 3%, rgba(255,235,215,0.7) 10%, rgba(255,210,180,0.3) 25%, rgba(255,190,160,0.08) 50%, transparent 72%); }

  .flash--core {
    width: 8px; height: 8px; border-radius: 50%;
    background: #fff;
    transform: translateY(-50%);
    animation: flash-core 120ms cubic-bezier(0.02, 0.98, 0.1, 1) forwards;
    box-shadow:
      0 0 6px 2px #fff,
      0 0 18px 6px rgba(255, 240, 220, 1),
      0 0 60px 20px rgba(255, 210, 170, 0.8),
      0 0 160px 50px rgba(255, 180, 130, 0.4);
  }

  .flash--halo { top: 0; height: 100%; width: 55%; max-width: 700px; animation: flash-halo 200ms cubic-bezier(0.02, 0.98, 0.1, 1) forwards; }
  .flash--halo.from-left { left: 0; } .flash--halo.from-right { right: 0; }

  .flash--streak {
    height: 2px; width: 300px;
    transform-origin: left center;
    animation: flash-streak 160ms cubic-bezier(0.02, 0.98, 0.1, 1) forwards;
  }
  .flash--streak::before, .flash--streak::after {
    content: ''; position: absolute; top: 50%; left: 0; transform: translateY(-50%);
  }
  .flash--streak::before { width: 50%; height: 100%; background: linear-gradient(90deg, rgba(255,248,240,1) 0%, rgba(255,240,225,0.5) 50%, transparent 100%); }
  .flash--streak::after  { width: 100%; height: 70%; background: linear-gradient(90deg, rgba(255,220,190,0.6) 0%, rgba(255,190,150,0.2) 35%, transparent 100%); filter: blur(1.5px); }
  .flash--streak.from-right { transform-origin: right center; }
  .flash--streak.from-right::before { left: auto; right: 0; background: linear-gradient(270deg, rgba(255,248,240,1) 0%, rgba(255,240,225,0.5) 50%, transparent 100%); }
  .flash--streak.from-right::after  { left: auto; right: 0; background: linear-gradient(270deg, rgba(255,220,190,0.6) 0%, rgba(255,190,150,0.2) 35%, transparent 100%); }

  .flash--floor { bottom: 0; height: 35%; width: 60%; max-width: 800px; animation: flash-floor 220ms cubic-bezier(0.02, 0.98, 0.1, 1) forwards; }
  .flash--floor.from-left { left: 0; } .flash--floor.from-right { right: 0; }

  @keyframes flash-cone  { 0%{opacity:0;transform:scaleX(calc(var(--scale-x, 1) * .3)) scaleY(calc(var(--scale-y, 1) * .5));} 2%{opacity:var(--flash-opacity, 1);transform:scaleX(var(--scale-x, 1)) scaleY(var(--scale-y, 1));} 15%{opacity:calc(var(--flash-opacity, 1) * .9);} 40%{opacity:calc(var(--flash-opacity, 1) * .35);} 100%{opacity:0;transform:scaleX(calc(var(--scale-x, 1) * 1.1)) scaleY(calc(var(--scale-y, 1) * 1.05));} }
  @keyframes flash-core  { 0%{opacity:0;transform:translateY(-50%) scale(calc(var(--core-scale, 1) * .15));} 3%{opacity:1;transform:translateY(-50%) scale(calc(var(--core-scale, 1) * 1.4));} 20%{opacity:1;transform:translateY(-50%) scale(var(--core-scale, 1));} 100%{opacity:0;transform:translateY(-50%) scale(calc(var(--core-scale, 1) * .8));} }
  @keyframes flash-halo  { 0%{opacity:0;transform:scale(calc(var(--halo-scale, 1) * .6));} 5%{opacity:1;transform:scale(var(--halo-scale, 1));} 30%{opacity:.6;} 100%{opacity:0;transform:scale(calc(var(--halo-scale, 1) * 1.1));} }
  @keyframes flash-streak{ 0%{opacity:0;transform:scaleX(.1);} 4%{opacity:1;transform:scaleX(1);} 25%{opacity:.7;} 100%{opacity:0;transform:scaleX(1.15);} }
  @keyframes flash-floor { 0%{opacity:0;transform:scaleY(.2);} 6%{opacity:.7;transform:scaleY(1);} 35%{opacity:.3;} 100%{opacity:0;transform:scaleY(1.1);} }

  .content-stage {
    position: relative;
    z-index: 10;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 56px;
  }

  .content { max-width: 820px; width: 100%; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; text-align: left; }

  .content-stage .content > * { opacity: 0; }
  .content-stage.is-ready .content > * { opacity: 1; }

  .headline {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 300;
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 28px;
    overflow-wrap: break-word;
  }

  .headline__accent { font-style: italic; font-weight: 500; color: var(--accent-soft); }
  .headline__word { display: inline-block; white-space: nowrap; }
  .headline__typewriter-char { opacity: 0; transition: opacity 0.08s ease; }
  .headline__typewriter-char.is-typed { opacity: 1; }
  .headline__typewriter-space { display: inline-block; white-space: pre; }

  .subtitle {
    display: block;
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    font-weight: 300;
    line-height: 1.7;
    color: var(--text-muted);
    max-width: 540px; width: 100%; min-width: 0;
    margin-bottom: 44px;
    white-space: normal;
  }
  .content-stage.is-ready .subtitle { animation: none; }
  .subtitle strong { color: var(--text-primary); font-weight: 500; }
  .subtitle .word  { display: inline-block; white-space: nowrap; }
  .subtitle .space { display: inline-block; white-space: pre; }
  .subtitle .typewriter-char { opacity: 0; transition: opacity 0.12s ease; }
  .subtitle .typewriter-char.is-typed { opacity: 1; }
  .subtitle .typewriter-cursor {
    display: inline-block; width: 1px; height: 1em; margin-left: 2px; vertical-align: -0.15em;
    background: var(--accent-soft); box-shadow: 0 0 8px var(--accent-soft);
    opacity: 0; transition: opacity 0.35s ease;
  }
  .subtitle .typewriter-cursor.is-active { opacity: 1; animation: cursor-blink 0.9s steps(1) infinite; }
  @keyframes cursor-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

  .footer { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }

  .eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 0.7rem; font-weight: 400;
    letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--accent-soft); margin-bottom: 8px;
    opacity: 0;
    transform: translateY(36px);
    filter: blur(6px);
  }
  .eyebrow.is-revealed { animation: reveal-soft var(--d-reveal) var(--ease-out) both; }
  .eyebrow__dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent); box-shadow: 0 0 10px var(--accent);
  }
  .eyebrow.is-revealed .eyebrow__dot {
    animation: dot-pulse 2s ease-in-out infinite;
  }

  .progress {
    display: flex; align-items: center; gap: 14px;
    font-size: 0.65rem; font-weight: 400;
    letter-spacing: 0.2em; text-transform: uppercase;
    color: rgba(255, 245, 235, 0.5);
    opacity: 0;
    transform: translateY(36px);
    filter: blur(6px);
  }
  .progress.is-revealed { animation: reveal-soft var(--d-reveal) var(--ease-out) both; }
  .progress__track { position: relative; width: 100px; height: 1px; background: rgba(255,255,255,0.15); overflow: hidden; }
  .progress__fill  { position: absolute; inset: 0; width: 100%; transform: scaleX(0); transform-origin: left center; background: linear-gradient(90deg, var(--accent-soft), var(--accent)); }
  .progress.is-revealed .progress__fill { animation: progress-fill 6s cubic-bezier(0.65,0,0.35,1) forwards; }
  .progress__value { min-width: 34px; display: inline-block; color: var(--accent-soft); font-variant-numeric: tabular-nums; }

  .credit {
    font-size: 0.62rem; font-weight: 400;
    letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--text-faint); text-decoration: none;
    transition: color 0.3s ease;
    opacity: 0;
    transform: translateY(36px);
    filter: blur(6px);
  }
  .credit.is-revealed { animation: reveal-soft var(--d-reveal) var(--ease-out) both; }
  .credit:hover, .credit:focus-visible { color: var(--accent-soft); outline: none; }

  @keyframes reveal-soft {
    0%   { opacity: 0; transform: translateY(36px); filter: blur(6px); }
    40%  { opacity: 1; filter: blur(0); }
    100% { opacity: 1; transform: translateY(0);   filter: blur(0); }
  }
  @keyframes reveal-curtain {
    0%   { opacity: 0; transform: translateY(48px); clip-path: inset(0 0 100% 0); }
    35%  { opacity: 1; }
    100% { opacity: 1; transform: translateY(0);    clip-path: inset(0 0 -10% 0); }
  }
  @keyframes dot-pulse { 0%,100% { opacity:1; transform: scale(1);} 50% { opacity:.4; transform: scale(.8);} }
  @keyframes progress-fill { to { transform: scaleX(0.78); } }

  @media (max-width: 768px) {
    .content-stage { padding: 32px 20px; align-items: stretch; }
    .content { max-width: 100%; align-items: stretch; }
    .headline { margin-bottom: 22px; }
    .subtitle { max-width: 100%; margin-bottom: 32px; }
    .eyebrow  { font-size: 0.64rem; }
    .credit   { font-size: 0.56rem; }
    .flash--streak { width: 180px; height: 1.5px; }
  }

  @media (max-width: 899px) {
    .overlay--grain { display: none; }
    .mix-layer { object-position: center; animation: camera-drift-mobile 16s ease-in-out infinite alternate; }
    @keyframes camera-drift-mobile {
      from { transform: scale(1.18) translate3d(0, 5%, 0); }
      to   { transform: scale(1.28) translate3d(0, -5%, 0); }
    }
  }

  @media (max-width: 480px) {
    .progress { gap: 10px; font-size: 0.6rem; letter-spacing: 0.16em; }
    .progress__track { width: 70px; }
  }

  @media (prefers-reduced-motion: reduce) {
    .page-loader,
    .page-loader.is-hidden { animation: none; transition: none; }
    .page-loader.is-hidden { opacity: 0; visibility: hidden; }
    .page-loader__bloom { display: none; }
    .stage-root.is-revealing { animation: none; }

    .page-loader__flash,
    .page-loader__flash-full { display: none; }
    .page-loader__label { animation: none; text-shadow: 0 0 24px rgba(255, 195, 155, 0.35); }
    .page-loader__dots i { animation: none; opacity: 1; }

    .paparazzi { display: none; }
    .mix-layer { animation: none; transition: none; }
    .eyebrow__dot, .subtitle .typewriter-cursor { animation: none; }
    .headline, .subtitle, .eyebrow, .progress, .credit, .subtitle .typewriter-char, .headline__typewriter-char {
      animation-duration: 0.01ms; animation-delay: 0s;
      transition: none; opacity: 1; transform: none; filter: none; clip-path: none;
    }
    .content-stage .eyebrow, .content-stage .progress, .content-stage .credit {
      animation: none;
      opacity: 1;
      transform: none;
      filter: none;
    }
    .progress__fill { animation: none !important; }
  }