/* FortyX — paleta tomada del logo */
:root {
  --bg: #0c0f11;
  --surface: #12171a;
  --surface-2: #171d21;
  --line: rgba(177, 143, 97, 0.24);
  --gold: #b18f61;
  --gold-hi: #cdb083;
  --cream: #f5efd7;
  --muted: #a9a490;

  --sans: "Avenir Next", "Segoe UI", Montserrat, "Helvetica Neue", system-ui, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;

  --wrap: 1120px;
  --slide: 1040px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--gold-hi); text-underline-offset: 3px; }
a:hover { color: var(--cream); }

:focus-visible {
  outline: 2px solid var(--gold-hi);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: min(var(--wrap), 100% - 2.5rem);
  margin-inline: auto;
}

/* ---------- Cabecera ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(12, 15, 17, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
}

.brand img { height: 58px; width: auto; }

.nav { display: flex; gap: 1.75rem; }

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--cream);
  border-bottom-color: var(--gold);
}

/* ---------- Botones y enlaces ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }

.btn {
  display: inline-block;
  background: var(--gold);
  color: #14100a;
  font-weight: 700;
  text-decoration: none;
  padding: 0.95rem 1.7rem;
  border-radius: 6px;
  transition: background-color 0.15s, transform 0.15s;
}

.btn:hover { background: var(--gold-hi); color: #14100a; transform: translateY(-1px); }

.link-quiet {
  color: var(--cream);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
}

.link-quiet:hover { color: var(--gold-hi); }

.more { font-weight: 700; }

/* ---------- Portada: titular ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 1.5rem clamp(2rem, 6vw, 5rem);
  align-items: end;
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(1.5rem, 3vw, 2.25rem);
}

.hero h1 {
  font-size: clamp(2.2rem, 4.8vw, 3.7rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0;
  max-width: 16ch;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 34ch;
  margin: 0 0 1.4rem;
}

/* ---------- Carrusel ---------- */
.stage { padding-bottom: clamp(1.5rem, 3vw, 2.5rem); }

.track {
  --pad: max(1.25rem, calc((100% - var(--wrap)) / 2));
  position: relative;
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding: 0.25rem var(--pad) 0.5rem;
  scroll-padding-inline: var(--pad);
  scrollbar-width: none;
  transition: opacity 0.25s;
}

.track::-webkit-scrollbar { display: none; }

.track.is-fading { opacity: 0; }

.slide {
  flex: 0 0 min(var(--slide), 88%);
  scroll-snap-align: start;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(1.25rem, 3vw, 3rem);
  align-items: center;
  min-height: 25rem;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.kind {
  margin: 0 0 0.6rem;
  color: var(--gold-hi);
  font-weight: 600;
  font-size: 0.95rem;
}

.slide h2 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  max-width: 18ch;
}

.slide .txt { margin: 0; color: var(--muted); max-width: 40ch; }

.shot { margin: 0; }

.shot img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
}

/* Diapositiva del blog: tipografía en lugar de captura */
.slide--post {
  grid-template-columns: 1fr;
  align-content: center;
  background: var(--surface-2);
  border-left: 3px solid var(--gold);
}

.slide--post time { color: var(--muted); font-size: 0.95rem; }

.slide--post h2 {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  line-height: 1.15;
  margin: 0.3rem 0 0.9rem;
  max-width: 24ch;
}

.slide--post h2 a { color: var(--cream); text-decoration: none; }
.slide--post h2 a:hover { color: var(--gold-hi); }
.slide--post .txt { margin-bottom: 1.4rem; max-width: 52ch; }

/* Controles */
.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
}

.controls[hidden] { display: none; }

.dots { display: flex; align-items: center; margin-left: -0.5rem; }

.dot {
  position: relative;
  width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.dot::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  background: rgba(177, 143, 97, 0.38);
  transform: translate(-50%, -50%);
  transition: width 0.25s, background-color 0.25s;
}

.dot:hover::before { background: var(--gold); }

.dot[aria-current="true"]::before { width: 1.6rem; background: var(--gold); }

.ctls { display: flex; gap: 0.5rem; }

.ctl {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  color: var(--cream);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.ctl:hover { background: var(--surface-2); border-color: var(--gold); }

.ctl svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ctl .i-play { display: none; fill: currentColor; stroke: none; }
.ctl[aria-pressed="true"] .i-pause { display: none; }
.ctl[aria-pressed="true"] .i-play { display: block; }

/* ---------- Secciones ---------- */
.block {
  padding: clamp(2rem, 4.5vw, 3.25rem) 0;
  border-top: 1px solid var(--line);
}

.block h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 1.5rem;
  max-width: 20ch;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.facts h3 { margin: 0 0 0.3rem; font-size: 1.2rem; }
.facts p { margin: 0; color: var(--muted); max-width: 34ch; }

/* Pasos: aquí sí hay una secuencia real */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: paso;
}

.steps li { counter-increment: paso; }

.steps li::before {
  content: counter(paso);
  display: block;
  font-size: 2.6rem;
  line-height: 1;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.steps strong { display: block; font-size: 1.15rem; margin-bottom: 0.25rem; }
.steps span { color: var(--muted); }

/* Banda final */
.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.cta h2 { margin: 0; font-size: clamp(1.4rem, 3vw, 1.9rem); max-width: 22ch; }

/* ---------- Blog ---------- */
.page-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 1.5rem; }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); letter-spacing: -0.02em; margin: 0 0 0.5rem; line-height: 1.08; }
.page-head p { margin: 0; color: var(--muted); max-width: 40ch; }

.posts { list-style: none; margin: 1rem 0 4rem; padding: 0; }

.post-row {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}

.post-row:last-child { border-bottom: 1px solid var(--line); }

.post-row time { color: var(--muted); font-size: 0.95rem; padding-top: 0.3rem; }

.post-row h2 { margin: 0 0 0.35rem; font-size: 1.45rem; line-height: 1.25; }
.post-row h2 a { color: var(--cream); text-decoration: none; }
.post-row h2 a:hover { color: var(--gold-hi); }
.post-row p { margin: 0; color: var(--muted); max-width: 56ch; }

.post { padding: clamp(2.5rem, 6vw, 4.5rem) 0 4rem; }

.post-head { max-width: 40rem; margin-bottom: 2.25rem; }
.post-head h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 0.75rem; }
.post-meta { color: var(--muted); font-size: 0.95rem; }

.prose { max-width: 40rem; font-family: var(--serif); font-size: 1.2rem; line-height: 1.75; }
.prose p { margin: 0 0 1.25rem; }
.prose h2 { font-family: var(--sans); font-size: 1.5rem; line-height: 1.25; margin: 2.4rem 0 0.7rem; }
.prose blockquote { margin: 1.75rem 0; padding: 0.2rem 0 0.2rem 1.25rem; border-left: 3px solid var(--gold); color: var(--muted); font-style: italic; }
.prose img { border-radius: 8px; margin: 1.5rem 0; }

.back { display: inline-block; margin-top: 2rem; font-weight: 600; text-decoration: none; }

/* ---------- Pie ---------- */
.foot { border-top: 1px solid var(--line); padding: 2rem 0; color: var(--muted); font-size: 0.92rem; }
.foot-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.foot img { height: 34px; width: auto; }

/* ---------- Móvil ---------- */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; align-items: start; padding-top: 1.5rem; gap: 1rem; }
  .hero-lead { font-size: 1.05rem; margin-bottom: 1.1rem; }
  .hero h1 { max-width: 16ch; }
  .slide { grid-template-columns: 1fr; gap: 1.25rem; min-height: 0; align-content: start; }
  .slide--post { align-content: center; }
  .facts, .steps { grid-template-columns: 1fr; }
  .post-row { grid-template-columns: 1fr; gap: 0.2rem; }
  .brand img { height: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .track, .dot::before { transition: none; }
}
