:root {
  --bg0: #05070a;
  --bg1: #0c1218;
  --ink: #eef3f7;
  --ink-soft: #c5d0da;
  --muted: #8a98a6;
  --red: #c62828;
  --red-hot: #e53935;
  --line: rgba(255, 255, 255, 0.1);
  --glass: rgba(8, 12, 18, 0.72);
  --font-display: "Bebas Neue", Impact, Haettenschweiler, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.45;
  /* Misma libreta que el panel principal de Maik */
  background-color: #1a1510;
  background-image:
    linear-gradient(
      180deg,
      rgba(8, 10, 14, 0.42) 0%,
      rgba(8, 10, 14, 0.55) 45%,
      rgba(8, 10, 14, 0.62) 100%
    ),
    url("../fondo_libreta_notas_tramo.png");
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

/* —— Hero full-bleed —— */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(1.5rem, 4vw, 3rem);
  overflow: hidden;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-color: #05070a;
  /* contain = panel entero visible (cover lo recortaba) */
  background-image: url("../fotos/01_ingeniero_panel.jpg");
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
}

.hero__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(5, 7, 10, 0.35) 0%, rgba(5, 7, 10, 0.55) 40%, rgba(5, 7, 10, 0.92) 78%, var(--bg0) 100%),
    linear-gradient(90deg, rgba(5, 7, 10, 0.75) 0%, rgba(5, 7, 10, 0.25) 55%, rgba(5, 7, 10, 0.55) 100%);
}

.hero__inner {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding-bottom: clamp(2rem, 6vh, 4rem);
  animation: fade-up 0.9s ease-out both;
}

.hero__brand {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.35rem;
}

.hero__brand img {
  width: clamp(96px, 14vw, 148px);
  height: clamp(96px, 14vw, 148px);
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.55));
}

.hero__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.6rem, 12vw, 7rem);
  letter-spacing: 0.04em;
  line-height: 0.92;
  font-weight: 400;
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.55);
}

.hero__name span {
  display: block;
  margin-top: 0.12em;
  color: var(--red-hot);
  font-size: 0.32em;
  letter-spacing: 0.28em;
}

.hero__headline {
  margin: 0 0 1.1rem;
  max-width: 22ch;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  letter-spacing: 0.03em;
  font-weight: 400;
  line-height: 1.05;
}

.lang-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
  max-width: 52rem;
}

.lang-pair p {
  margin: 0;
  font-size: clamp(1.02rem, 2.1vw, 1.18rem);
  color: var(--ink-soft);
  line-height: 1.45;
}

.lang-pair .lang-tag {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  color: var(--red-hot);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
  margin-top: 1.75rem;
}

.price {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(8px);
}

.price strong {
  font-family: var(--font-display);
  font-size: 2.15rem;
  letter-spacing: 0.03em;
  color: #fff;
  font-weight: 400;
}

.price span {
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.35rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.btn--buy {
  background: var(--red);
  color: #fff;
}

.btn--buy:hover:not(:disabled):not(.is-soon) {
  background: var(--red-hot);
  transform: translateY(-1px);
}

.btn--buy.is-soon,
.btn--buy:disabled {
  background: #3a434c;
  color: #b8c2cc;
  cursor: not-allowed;
  opacity: 0.92;
}

.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn--ghost:hover:not(:disabled):not(.is-soon) {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.04);
}

.btn--ghost.is-soon,
.btn--ghost:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.launch {
  margin: 1.15rem 0 0;
  max-width: 40rem;
}

.launch .lang-pair {
  max-width: 40rem;
}

.launch p {
  font-size: 0.98rem;
  color: var(--muted);
}

/* —— Sections —— */
.wrap {
  width: min(1100px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 0 0 4.5rem;
}

.section {
  padding: 1.75rem 1.5rem 2rem;
  margin-top: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(8, 12, 18, 0.78);
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.section.is-in {
  opacity: 1;
  transform: none;
}

.section__head {
  margin-bottom: 1.5rem;
}

.section__head h2 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.4rem);
  letter-spacing: 0.06em;
  font-weight: 400;
}

.section__head .lang-pair {
  max-width: 48rem;
}

.section__head .lang-pair p {
  font-size: 1.02rem;
  color: var(--muted);
}

.youtube-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--line);
  overflow: hidden;
}

.youtube-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.youtube-soon {
  padding: 1.25rem 1.35rem;
  border: 1px dashed var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.youtube-soon code {
  font-size: 0.9em;
  color: var(--red-hot);
}

.youtube-open {
  margin: 1rem 0 0;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.35rem;
}

figure {
  margin: 0;
}

figure img {
  width: 100%;
  border: 1px solid var(--line);
  background: #000;
  aspect-ratio: 16 / 10;
  object-fit: contain;
}

figcaption {
  margin-top: 0.55rem;
}

figcaption .lang-pair {
  grid-template-columns: 1fr;
  gap: 0.35rem;
}

figcaption .lang-pair p {
  font-size: 0.95rem;
  color: var(--muted);
}

figcaption strong {
  color: var(--ink);
  font-weight: 700;
}

.includes ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--ink-soft);
}

.includes li {
  margin-bottom: 0.65rem;
}

.includes li .lang-pair {
  grid-template-columns: 1fr;
  gap: 0.2rem;
}

.includes li .lang-pair {
  grid-template-columns: 1fr 1fr;
}

.includes li .lang-pair p {
  font-size: 1.02rem;
  color: var(--ink-soft);
}

@media (max-width: 780px) {
  .includes li .lang-pair {
    grid-template-columns: 1fr;
  }
}

/* Equal weight: override muted for en in bilingual blocks that should match */
.lang-pair--equal p[lang="es"],
.lang-pair--equal p[lang="en"] {
  color: var(--ink-soft);
  font-size: clamp(1.02rem, 2.1vw, 1.15rem);
}

.site-footer {
  width: min(1100px, calc(100% - 2.5rem));
  margin: 1.5rem auto 3rem;
  padding: 1.35rem 1.5rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(8, 12, 18, 0.78);
  backdrop-filter: blur(6px);
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer .lang-pair {
  margin: 0.75rem 0;
  max-width: 48rem;
}

.site-footer .lang-pair p {
  font-size: 0.92rem;
  color: var(--muted);
}

.site-footer a {
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 780px) {
  .lang-pair {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 92vh;
    justify-content: flex-end;
  }

  .hero__headline {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero__inner,
  .section {
    animation: none !important;
    transition: none !important;
    opacity: 1;
    transform: none;
  }
}
