/* ============================================================
   Landing · Cómo Crear Una Página Web Con Claude
   Recursos del vídeo · Adrián Sáenz
   ============================================================ */

:root {
  --bg: #07080a;
  --bg-2: #0d0e11;
  --ink: #f1ece1;
  --ink-soft: #a39d92;
  --ink-muted: #6a655c;
  --line: rgba(241, 236, 225, 0.08);
  --line-strong: rgba(241, 236, 225, 0.16);
  --accent: #d8c9a3;
  --accent-warm: #c89b6c;
  --claude: #D97757;
  --danger: #c9222a;
  --ok: #6fbf73;
  --radius: 22px;
  --radius-sm: 12px;
  --shadow-card: 0 30px 80px -40px rgba(0, 0, 0, 0.7), 0 6px 20px -10px rgba(0, 0, 0, 0.5);
  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
}
html, body { overscroll-behavior: none; }
@media (max-width: 900px) {
  html { scroll-snap-type: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-snap-type: none; scroll-behavior: auto; }
}

/* ============================================================
   Scroll-snap architecture
   - Every top-level "view" (hero, each step) is a snap target.
   - Pinned steps also contain N-1 in-flow .step__zone elements (each 100vh)
     so that within a pinned step the user snaps once per slide.
   - First snap: hero with scroll-margin-top so the site-header stays visible.
   - Last snap: footer with snap-align:end so it appears at viewport bottom.
   ============================================================ */
.hero,
.step {
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.hero {
  scroll-margin-top: 88px;
}
.site-footer {
  scroll-snap-align: end;
  scroll-snap-stop: always;
}
/* In-flow per-slide snap zones inside pinned steps, injected by JS */
.step__zone {
  height: 100vh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  pointer-events: none;
  display: block;
  width: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: 'ss01', 'cv11';
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
input, textarea, select { font-size: 16px; }

/* ====== Background ====== */
.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aurora__blob { position: absolute; border-radius: 50%; pointer-events: none; }
.aurora__blob--1 {
  width: 100vmax; height: 100vmax;
  left: -30vmax; top: -30vmax;
  background: radial-gradient(closest-side, rgba(216, 201, 163, 0.16), transparent 70%);
}
.aurora__blob--2 {
  width: 90vmax; height: 90vmax;
  right: -35vmax; top: -10vmax;
  background: radial-gradient(closest-side, rgba(217, 119, 87, 0.10), transparent 70%);
}
.aurora__blob--3 {
  width: 110vmax; height: 110vmax;
  left: 10%; bottom: -55vmax;
  background: radial-gradient(closest-side, rgba(216, 201, 163, 0.10), transparent 70%);
}

.mesh {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: 0 0;
  opacity: 0.85;
}
.vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse 78% 65% at center, transparent 30%, var(--bg) 100%);
}
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  opacity: 0.025;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ====== Header ====== */
.site-header {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 36px;
  gap: 20px;
  animation: fadeDown 1.1s var(--ease-out-quint) both;
}
@keyframes fadeDown {
  from { opacity: 0; transform: translate3d(0, -12px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

.brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--line);
  background: rgba(20, 20, 24, 0.5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  transition: border-color .5s var(--ease-soft), transform .6s var(--ease-out-quint), background .5s var(--ease-soft);
}
.brand:hover {
  border-color: var(--line-strong);
  background: rgba(28, 28, 32, 0.6);
  transform: translate3d(0, -1px, 0);
}

.brand__avatar {
  position: relative;
  width: 32px; height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #2a2a2e, #1a1a1d);
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line-strong);
}
.brand__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand__avatar-fallback {
  font-family: var(--font-display); font-weight: 600;
  color: var(--accent); font-size: 14px;
}
.brand__avatar::after {
  content: ''; position: absolute; inset: -4px;
  border-radius: 50%; border: 1px solid rgba(216, 201, 163, 0.3);
  animation: avatarPulse 3.6s var(--ease-out-quint) infinite;
  pointer-events: none; will-change: transform, opacity;
}
@keyframes avatarPulse {
  0%   { transform: scale(1); opacity: 0.7; }
  60%  { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(1.4); opacity: 0; }
}

.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name { font-size: 13px; font-weight: 600; }
.brand__handle { font-size: 11px; color: var(--ink-soft); margin-top: 2px; font-family: var(--font-mono); }
.brand__yt {
  width: 28px; height: 28px; border-radius: 50%;
  background: #ff0033; color: #fff;
  display: inline-grid; place-items: center;
  margin-left: 4px;
  transition: transform .5s var(--ease-spring), box-shadow .4s var(--ease-soft);
  box-shadow: 0 0 0 0 rgba(255, 0, 51, 0.6);
}
.brand:hover .brand__yt {
  transform: scale(1.08);
  box-shadow: 0 0 0 8px rgba(255, 0, 51, 0);
}

.header-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  text-transform: uppercase;
}
.header-tag::before {
  content: ''; display: inline-block;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent-warm);
  margin-right: 8px; vertical-align: middle;
  transform: translate3d(0, -1px, 0);
  box-shadow: 0 0 8px var(--accent-warm);
  animation: pulse 2.4s ease-in-out infinite;
  will-change: opacity;
}

/* ====== Hero ====== */
.hero {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  /* Extra bottom padding shifts the flex-centered content up to compensate for
     the 88px-tall site-header sitting above the hero in the first snap. */
  padding: 0 36px 88px;
  text-align: center;
  min-height: calc(100vh - 88px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.eyebrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  animation: heroIn 0.9s var(--ease-out-quint) 0.1s both;
}
@keyframes heroIn {
  from { opacity: 0; transform: translate3d(0, 14px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

.dot {
  position: relative;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-warm);
  box-shadow: 0 0 10px var(--accent-warm);
  animation: pulse 2.4s ease-in-out infinite;
  will-change: opacity;
}
.dot::before {
  content: ''; position: absolute; inset: -4px;
  border-radius: 50%; border: 1px solid var(--accent-warm);
  animation: ripple 2.4s var(--ease-out-quint) infinite;
  pointer-events: none; will-change: transform, opacity;
}
@keyframes pulse { 0%,100% {opacity: 1;} 50% {opacity: .35;} }
@keyframes ripple {
  0%   { transform: scale(1); opacity: 0.7; }
  80%  { transform: scale(2.4); opacity: 0; }
  100% { transform: scale(2.4); opacity: 0; }
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, 5.4vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.022em;
  margin: 24px auto 22px;
  max-width: 22ch;
  color: var(--ink);
  animation: heroIn 1.1s var(--ease-out-quint) 0.25s both;
}
.hero__title em {
  font-style: italic; color: var(--accent); font-weight: 400;
  display: inline-block;
  animation: breathAccent 6s ease-in-out infinite;
}
.hero__claude {
  color: var(--claude);
  white-space: nowrap;
  display: inline-block;
  font-style: normal;
}
.claude-logo {
  width: 0.85em; height: 0.85em;
  display: inline-block;
  vertical-align: -0.08em;
  margin-right: 0.18em;
  color: var(--claude);
  filter: drop-shadow(0 0 14px rgba(217, 119, 87, 0.35));
}
@keyframes breathAccent {
  0%, 100% { text-shadow: 0 0 0 rgba(216, 201, 163, 0); }
  50%      { text-shadow: 0 0 30px rgba(216, 201, 163, 0.35); }
}

.hero__sub {
  max-width: 600px;
  margin: 0 auto 36px;
  color: var(--ink-soft);
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.6;
  animation: heroIn 1s var(--ease-out-quint) 0.4s both;
}

.hero__quick {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 12px 14px 12px 22px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.025);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: heroIn 1s var(--ease-out-quint) 0.55s both;
}
.hero__quick-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition:
    opacity 1s var(--ease-out-quint),
    transform 1s var(--ease-out-quint);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* ====== Steps ====== */
.steps {
  position: relative;
  z-index: 2;
  max-width: none;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 36px;
  width: 100%;
}
.step:not(.step--has-pin) {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 36px;
}
.step--has-pin {
  padding: 0;
  max-width: none;
}
.step__head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: start;
  max-width: 920px;
}
.step__num {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(56px, 7vw, 96px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(216, 201, 163, 0.55);
  letter-spacing: -0.04em;
  position: relative;
  padding-top: 4px;
}
.step__num::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -14px;
  transform: translateX(-50%);
  width: 1px;
  height: 28px;
  background: linear-gradient(180deg, rgba(216, 201, 163, 0.5), transparent);
}
.step__kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 6px;
  background: rgba(216, 201, 163, 0.1);
  color: var(--accent);
  border: 1px solid rgba(216, 201, 163, 0.2);
  margin-bottom: 14px;
}
.step__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  color: var(--ink);
}
.step__title em { font-style: italic; color: var(--accent); }
.step__desc {
  color: var(--ink-soft);
  font-size: clamp(14.5px, 1.2vw, 16.5px);
  line-height: 1.75;
  margin: 0;
  max-width: 78ch;
}
.step__desc strong { color: var(--ink); font-weight: 600; }
.step__body {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

/* ====== CTA Cards ====== */
.cta-card {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(20, 21, 26, 0.7), rgba(12, 13, 16, 0.7));
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform .6s var(--ease-out-quint), border-color .4s var(--ease-soft);
}
.cta-card:hover {
  transform: translate3d(0, -2px, 0);
  border-color: rgba(216, 201, 163, 0.3);
}
.cta-card__inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 28px 32px;
  flex-wrap: wrap;
}
.cta-card__text { max-width: 56ch; }
.cta-card__tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.cta-card__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.2;
  margin: 0 0 8px;
  color: var(--ink);
}
.cta-card__sub {
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0;
}
.cta-card__sub strong { color: var(--ink); font-weight: 600; }

.cta-card__glow {
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  pointer-events: none;
  background:
    radial-gradient(600px circle at 0% 0%, rgba(216, 201, 163, 0.10), transparent 50%),
    radial-gradient(600px circle at 100% 100%, rgba(217, 119, 87, 0.10), transparent 50%);
  opacity: 0.9;
  z-index: 1;
}

/* Hosting variant: warmer accent */
.cta-card--hosting {
  border-color: rgba(216, 201, 163, 0.25);
}
.cta-card--hosting .cta-card__glow {
  background:
    radial-gradient(600px circle at 0% 0%, rgba(216, 201, 163, 0.18), transparent 55%),
    radial-gradient(600px circle at 100% 100%, rgba(200, 155, 108, 0.18), transparent 55%);
}

/* Skill download card */
.cta-card--skill { margin-top: 6px; }

/* ====== Buttons ====== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .35s var(--ease-spring), background .35s var(--ease-soft), border-color .35s var(--ease-soft), color .35s var(--ease-soft), box-shadow .35s var(--ease-soft);
  text-decoration: none;
  background: transparent;
  color: var(--ink);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.btn::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(120px circle at var(--bx, 50%) var(--by, 50%), rgba(255, 255, 255, 0.12), transparent 60%);
  opacity: 0; transition: opacity .4s var(--ease-soft);
  pointer-events: none;
}
.btn:hover::after { opacity: 1; }
.btn:active { transform: translate3d(0, 1px, 0) scale(0.98); }

.btn--primary {
  background: var(--ink);
  color: #0b0c0e;
  border-color: var(--ink);
}
.btn--primary:hover { background: #fff; box-shadow: 0 12px 30px -12px rgba(241, 236, 225, 0.4); transform: translate3d(0, -1px, 0); }

.btn--ghost { border-color: var(--line-strong); color: var(--ink); }
.btn--ghost:hover { border-color: rgba(241, 236, 225, 0.34); background: rgba(255, 255, 255, 0.04); transform: translate3d(0, -1px, 0); }

/* Hosting button — branded with cream/warm gradient, no provider name */
.btn--hosting {
  background: linear-gradient(135deg, #e7d5ad, #c89b6c);
  color: #1a140d;
  border-color: rgba(216, 201, 163, 0.6);
  font-weight: 600;
  padding: 13px 22px;
  font-size: 14px;
  box-shadow: 0 18px 40px -18px rgba(200, 155, 108, 0.55), 0 0 0 1px rgba(216, 201, 163, 0.25) inset;
}
.btn--hosting:hover {
  background: linear-gradient(135deg, #f1e1bc, #d8a978);
  transform: translate3d(0, -1px, 0);
  box-shadow: 0 22px 50px -18px rgba(200, 155, 108, 0.7), 0 0 0 1px rgba(216, 201, 163, 0.4) inset;
}

.btn--copy.is-copied {
  background: var(--ok);
  border-color: var(--ok);
  color: #06140a;
}

/* ====== Step hint ====== */
.step__hint {
  margin: 14px 0 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.step__hint::before {
  content: '';
  width: 16px; height: 1px;
  background: var(--ink-muted);
  display: inline-block;
}
.step__hint::after {
  content: '↓';
  font-family: var(--font-sans);
  color: var(--accent-warm);
  animation: hintDown 1.8s ease-in-out infinite;
  font-size: 13px;
}
@keyframes hintDown {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50%      { transform: translateY(3px); opacity: 1; }
}

/* ====== Scroll hint — subtle invite to the next snap ======
   Absolute-positioned at the bottom of each snap so it never displaces
   layout. Hidden on mobile where there is no snap. */
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  animation: scrollHintFadeIn .9s var(--ease-out-quint) 1.4s both,
             scrollHintFloat 2.6s ease-in-out 2.3s infinite;
}
.scroll-hint__arrow {
  width: 12px;
  height: 12px;
  display: block;
  flex-shrink: 0;
  color: var(--accent-warm);
  opacity: 0.85;
}
@keyframes scrollHintFadeIn {
  from { opacity: 0; }
  to   { opacity: 0.7; }
}
@keyframes scrollHintFloat {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 4px); }
}

/* Large variant for hero + paso 1 + paso 2 (more empty space available) */
.scroll-hint--large {
  bottom: 28px;
  font-size: 11.5px;
  gap: 10px;
  letter-spacing: 0.2em;
}
.scroll-hint--large .scroll-hint__arrow { width: 14px; height: 14px; }

/* Small variant inside the pinned sticky stage */
.scroll-hint--inside {
  bottom: clamp(10px, 1.4vh, 18px);
}

@media (max-width: 900px) {
  .scroll-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-hint { animation: none; opacity: 0.6; }
}

/* ====== Pinned step container ====== */
.step--has-pin { gap: 0; }
.step__pin {
  position: relative;
  width: 100%;
}
/* The sticky stage — held in viewport while the .step__pin (which contains
   N-1 in-flow .step__zone elements after it) scrolls past underneath. */
.step__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2.4vh, 28px);
  padding: clamp(20px, 3.5vh, 40px) clamp(16px, 4vw, 56px) clamp(44px, 5.6vh, 64px);
  max-width: 1200px;
  margin: 0 auto;
  z-index: 1;
}

/* Compact head when inside the pin */
.step__head--pinned {
  grid-template-columns: auto 1fr;
  display: grid;
  gap: clamp(18px, 2.4vw, 28px);
  align-items: start;
  flex: 0 0 auto;
}
.step__head--pinned .step__num {
  font-size: clamp(40px, 5.4vw, 64px);
  padding-top: 0;
}
.step__head--pinned .step__num::after { display: none; }
.step__head--pinned .step__kicker { margin-bottom: 8px; }
.step__head--pinned .step__title {
  font-size: clamp(22px, 2.6vw, 32px);
  margin: 0 0 8px;
}
.step__head--pinned .step__desc {
  font-size: clamp(13.5px, 1vw, 15px);
  line-height: 1.65;
  margin: 0;
  max-width: 92ch;
}
.step__head--pinned .step__hint {
  margin-top: 8px;
  font-size: 10.5px;
  letter-spacing: 0.18em;
}

.step__sticky .slider {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  flex: 1 1 auto;
  min-height: 0;
}

/* Fallback when JS disabled / mobile (no pin) — sticky becomes normal flow */
.step__pin.is-unpinned .step__sticky {
  position: relative;
  height: auto;
  padding: 0;
}
.step__pin.is-unpinned .step__head--pinned {
  margin-bottom: 24px;
}

/* ====== Slider ====== */
.slider {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(20, 21, 26, 0.7), rgba(12, 13, 16, 0.7));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  padding: clamp(14px, 1.6vh, 20px);
  box-shadow: var(--shadow-card);
  /* Grid: viewport flexes to remaining space, others take their natural size */
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  grid-auto-rows: auto;
  gap: clamp(10px, 1.4vh, 16px);
  width: 100%;
  align-self: center;
}

.slider__viewport {
  overflow: hidden;
  border-radius: 14px;
  position: relative;
  /* All screenshots are normalized to 1914x1005. The frame is locked to that
     exact aspect; width drives the layout and aspect-ratio derives height.
     min-height: 0 lets the grid 1fr row shrink the frame when needed
     instead of forcing height: 100% which would break the aspect. */
  width: 100%;
  aspect-ratio: 1914 / 1005;
  max-width: 100%;
  max-height: 100%;
  min-height: 0;
  margin: 0 auto;
  justify-self: center;
}
.slider__track {
  display: flex;
  height: 100%;
  will-change: transform;
}
/* Pinning mode: JS drives transform per-frame, no CSS transition */
.slider--smooth .slider__track,
.slider--smooth .slider__caption-track,
.slider--smooth .slider__extras-track { transition: none; }
/* Click-based fallback (mobile / dot click): smooth ease */
.slider__track,
.slider__caption-track,
.slider__extras-track {
  transition: transform .7s var(--ease-out-expo);
}

.slide {
  flex: 0 0 100%;
  margin: 0;
  padding: 0;
  height: 100%;
  position: relative;
}
.slide__frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
}
.slide__frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* Normalized 16:9 in a 16:9 frame → cover fills perfectly with zero crop */
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ===== Inline extras inside the slider (download, command…) ===== */
.slider__extras {
  position: relative;
  min-height: 0;
  display: none;
}
/* Show extras row only when at least one slide-extra is active */
.slider__extras:has(.slide-extra.is-active) {
  display: block;
}
.slide-extra {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .45s var(--ease-soft), transform .45s var(--ease-out-quint);
  pointer-events: none;
  display: none;
}
.slide-extra.is-active {
  display: block;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.inline-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(180deg, rgba(216, 201, 163, 0.05), rgba(216, 201, 163, 0.02)),
    rgba(20, 21, 26, 0.6);
  padding: 12px 16px;
}
.inline-card__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.inline-card__tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.inline-card__hint {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
}
.inline-card__hint em { color: var(--ink); font-style: normal; font-weight: 600; }
.inline-card__row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.inline-card .cmd-card__code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 8px 12px;
  background: #0a0b0d;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.inline-card .cmd-card__code::before {
  content: '$';
  color: var(--accent-warm);
  margin-right: 8px;
  opacity: 0.7;
  font-weight: 600;
}
.btn--small {
  padding: 8px 14px;
  font-size: 12.5px;
}

/* ====== Caption (single-track that slides with the index) ======
   No horizontal padding on the wrapper — overflow:hidden clips at the
   border box, so any padding would expose adjacent captions on each side. */
.slider__caption {
  position: relative;
  overflow: hidden;
  min-height: 64px;
  padding: 0;
}
.slider__caption-track {
  display: flex;
  transition: transform .7s var(--ease-out-expo);
  will-change: transform;
}
.caption {
  flex: 0 0 100%;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 0 6px; /* push inner spacing onto each caption instead */
  flex-wrap: wrap;
}
.caption p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.6;
  flex: 1;
  min-width: 240px;
}
.caption p strong { color: var(--ink); font-weight: 600; }
.caption p em { color: var(--accent); font-style: italic; }
.caption p code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 5px;
  color: var(--accent);
}
.caption__step {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 5px 10px;
  border: 1px solid rgba(216, 201, 163, 0.25);
  border-radius: 6px;
  background: rgba(216, 201, 163, 0.06);
  flex-shrink: 0;
  white-space: nowrap;
}

/* ====== Nav buttons (inside viewport) ====== */
.slider__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(241, 236, 225, 0.25);
  background: rgba(15, 16, 20, 0.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform .35s var(--ease-spring), border-color .35s var(--ease-soft), background .35s var(--ease-soft), opacity .35s var(--ease-soft);
  z-index: 4;
  opacity: 0;
}
.slider__viewport:hover .slider__nav { opacity: 1; }
.slider__nav:focus-visible { opacity: 1; outline: 2px solid var(--accent); outline-offset: 2px; }
.slider__nav:hover {
  transform: translateY(-50%) scale(1.08);
  border-color: rgba(216, 201, 163, 0.5);
  background: rgba(25, 26, 30, 0.85);
}
.slider__nav:disabled {
  opacity: 0 !important;
  cursor: not-allowed;
  pointer-events: none;
}
.slider__nav--prev { left: 14px; }
.slider__nav--next { right: 14px; }

/* ====== Progress bar across the top of the slider ====== */
.slider__progress {
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 2px;
  background: rgba(241, 236, 225, 0.06);
  border-radius: 2px;
  overflow: hidden;
  z-index: 3;
}
.slider__progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-warm));
  border-radius: 2px;
  transition: width .55s var(--ease-out-expo);
}

/* ====== Dots ====== */
.slider__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0;
}
.slider__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: rgba(241, 236, 225, 0.18);
  cursor: pointer;
  transition: background .3s var(--ease-soft), transform .3s var(--ease-spring), width .35s var(--ease-out-quint);
}
.slider__dot.is-active {
  background: var(--accent);
  width: 22px;
  border-radius: 4px;
}
.slider__dot:hover { background: rgba(216, 201, 163, 0.6); }

/* ====== Command card ====== */
.cmd-card {
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(20, 21, 26, 0.7), rgba(12, 13, 16, 0.7));
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  padding: 22px 24px;
  box-shadow: var(--shadow-card);
  margin-top: 6px;
}
.cmd-card__head { margin-bottom: 14px; }
.cmd-card__tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.cmd-card__hint {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}
.cmd-card__row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex-wrap: wrap;
}
.cmd-card__code {
  flex: 1;
  min-width: 240px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink);
  background: #0a0b0d;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  word-break: break-all;
  letter-spacing: 0.01em;
}
.cmd-card__code::before {
  content: '$';
  color: var(--accent-warm);
  margin-right: 10px;
  font-weight: 600;
  opacity: 0.7;
}

/* ====== Footer — ultra-slim bar, single line ====== */
.site-footer {
  position: relative;
  z-index: 2;
  padding: 10px 24px;
  border-top: 1px solid var(--line);
  margin-top: 0;
  background: rgba(7, 8, 10, 0.85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.footer__inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  line-height: 1.4;
}
.footer__logo {
  display: inline-flex;
  align-items: center;
  height: 16px;
  opacity: 0.7;
  transition: opacity .3s var(--ease-soft);
}
.footer__logo:hover { opacity: 1; }
.footer__logo img {
  height: 100%;
  width: auto;
  display: block;
  filter: brightness(1.1);
}
.footer__sep {
  width: 1px;
  height: 10px;
  background: var(--line-strong);
}
.footer__credit {
  margin: 0;
  white-space: nowrap;
}
.footer__nav {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.footer__nav a {
  color: var(--ink-muted);
  text-decoration: none;
  transition: color .3s var(--ease-soft);
  white-space: nowrap;
}
.footer__nav a:hover { color: var(--ink-soft); }

@media (max-width: 700px) {
  .footer__inner { gap: 10px; font-size: 10px; }
  .footer__sep { display: none; }
  .footer__nav { gap: 10px; }
}

/* ====== Toast ====== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translate3d(-50%, 20px, 0);
  padding: 12px 20px;
  background: rgba(15, 16, 20, 0.95);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s var(--ease-soft), transform .5s var(--ease-out-quint);
  z-index: 200;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 40px -20px rgba(0,0,0,0.5);
}
.toast.is-visible {
  opacity: 1;
  transform: translate3d(-50%, 0, 0);
}

/* ====== Responsive ====== */
/* ============================================================
   MOBILE (≤900px)
   Snap + pin are disabled (html { scroll-snap-type: none } and
   JS sets enablePin=false). Layout reflows to a natural vertical
   stack — pasos 1/2 don't enforce 100vh, pinned pasos collapse
   to a regular manual-swipe carousel.
   ============================================================ */
@media (max-width: 900px) {
  .site-header { padding: 14px 16px; }
  .header-tag { display: none; }
  .brand__handle { display: none; }
  .brand { padding: 4px 10px 4px 4px; }
  .brand__avatar { width: 28px; height: 28px; }

  /* Hero — flow naturally, not forced 100vh */
  .hero {
    min-height: auto;
    padding: 48px 20px 36px;
    margin: 0 auto;
  }
  .hero__title { font-size: clamp(28px, 8vw, 44px); margin: 16px auto 12px; }
  .hero__quick {
    flex-direction: column;
    padding: 14px 16px;
    border-radius: 18px;
    gap: 10px;
  }

  /* Sections — vertical stack, no 100vh enforcement */
  .steps { padding: 0; gap: 0; }
  .step {
    max-width: 100%;
    padding: 48px 20px;
    gap: 24px;
  }
  .step:not(.step--has-pin) {
    min-height: auto;
    padding: 48px 20px;
    justify-content: flex-start;
  }
  .step--has-pin { padding: 48px 0; }
  .step__head { grid-template-columns: 1fr; gap: 12px; padding: 0 20px; }
  .step__head--pinned { grid-template-columns: 1fr; gap: 12px; }
  .step__num { font-size: clamp(48px, 13vw, 64px); }
  .step__num::after { display: none; }
  .step__title { font-size: clamp(24px, 7vw, 32px); }
  .step__head--pinned .step__title { font-size: clamp(24px, 7vw, 30px); }
  .step__desc { font-size: 14.5px; }
  .step__head--pinned .step__desc { font-size: 14px; }

  /* CTA cards stack vertically */
  .cta-card__inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    gap: 16px;
  }
  .cta-card__title { font-size: 18px; }
  .btn--hosting { width: 100%; justify-content: center; padding: 14px 20px; }

  /* Pinned step → manual carousel (JS sets is-unpinned) */
  .step__pin {
    width: 100%;
    height: auto !important;
    padding: 0 16px;
  }
  .step__sticky {
    position: relative;
    height: auto;
    padding: 0;
    max-width: none;
    gap: 18px;
    margin-top: 18px;
  }

  /* Slider laid out as: viewport on top, side-by-side controls below */
  .slider {
    padding: 12px;
    gap: 12px;
    grid-template-rows: auto;
    grid-auto-rows: auto;
  }
  .slider__viewport {
    width: 100%;
    height: auto;
    aspect-ratio: 1914 / 1005;
    max-height: none;
  }

  /* Nav buttons: always visible on touch (no hover) */
  .slider__nav {
    opacity: 1;
    width: 38px; height: 38px;
    background: rgba(15, 16, 20, 0.7);
  }
  .slider__nav--prev { left: 8px; }
  .slider__nav--next { right: 8px; }

  /* Inline extras stack vertically */
  .inline-card {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 14px;
  }
  .inline-card__row { flex-direction: column; align-items: stretch; }
  .inline-card .cmd-card__code { font-size: 11.5px; }

  /* Caption legible on small viewports */
  .caption p { font-size: 13.5px; }

  /* Command card (paso 5) */
  .cmd-card__row { flex-direction: column; align-items: stretch; }
  .cmd-card__code { font-size: 12px; }
}

/* Phone-tier tweaks */
@media (max-width: 480px) {
  .hero { padding: 40px 16px 28px; }
  .step { padding: 36px 16px; }
  .step:not(.step--has-pin) { padding: 36px 16px; }
  .step__pin { padding: 0 12px; }
  .slider { padding: 8px; gap: 10px; }
  .slider__nav { width: 34px; height: 34px; }
  .slider__nav svg { width: 16px; height: 16px; }
  .step__head { padding: 0 16px; }
}

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