/* ---------- Tokens ---------- */
:root {
  --ink: #05080a;
  --panel: #0d1614;
  --panel-line: #1c3d3a;
  --teal: #5eede2;
  --teal-dim: #3a7d76;
  --red: #e14b3a;
  --paper: #f3f1ea;
  --paper-dim: #9aa39f;

  --display: 'Anton', 'Archivo Black', sans-serif;
  --body: 'Inter', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;

  --edge: 1px solid var(--panel-line);
  --max: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

/* subtle film-grain overlay across the whole page */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(5, 8, 10, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: var(--edge);
}

.nav__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__mark {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

.nav__mark-dot { color: var(--red); }

.nav__cta {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  padding: 0.55rem 1rem;
  border: var(--edge);
  border-radius: 2px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.nav__cta:hover { border-color: var(--teal); color: var(--teal); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 3.5rem 1.5rem 4rem;
  border-bottom: var(--edge);
  overflow: hidden;
}

.hero__halftone {
  position: absolute;
  inset: -20% -10% auto auto;
  width: 60vw;
  height: 60vw;
  max-width: 700px;
  max-height: 700px;
  background:
    radial-gradient(circle, var(--teal) 0%, transparent 70%);
  opacity: 0.12;
  filter: blur(10px);
  -webkit-mask-image: radial-gradient(circle, black 0%, transparent 70%);
  mask-image: radial-gradient(circle, black 0%, transparent 70%);
  background-image:
    radial-gradient(circle, var(--teal) 1px, transparent 1.4px);
  background-size: 6px 6px;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}

.hero__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: 0.01em;
  margin: 0.9rem 0 1.2rem;
  text-wrap: balance;
}

.hero__sub {
  max-width: 46ch;
  color: var(--paper-dim);
  font-size: 1.05rem;
  margin-bottom: 1.75rem;
}

.hero__note {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--paper-dim);
  margin-top: 0.75rem;
  letter-spacing: 0.03em;
}

.hero__cover {
  position: relative;
  border: var(--edge);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
}

.hero__cover img { width: 100%; height: auto; }

/* ---------- Price ---------- */
.price-block {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  font-family: var(--mono);
}

.price-block--center { justify-content: center; }

.price-old {
  color: var(--paper-dim);
  text-decoration: line-through;
  text-decoration-color: var(--red);
  font-size: 1.1rem;
}

.price-new {
  color: var(--teal);
  font-size: 1.9rem;
  font-weight: 600;
}

.price-new small {
  font-size: 0.85rem;
  color: var(--paper-dim);
  font-weight: 400;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 1rem 2rem;
  border-radius: 2px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.btn--primary {
  background: var(--teal);
  color: var(--ink);
}

.btn--primary:hover { transform: translateY(-2px); }

.btn--large { padding: 1.15rem 2.75rem; font-size: 1.05rem; }

/* signature glitch: red/cyan chromatic-split on hover, echoing the cover */
.btn--glitch { position: relative; }

.btn--glitch span { position: relative; z-index: 2; }

.btn--glitch::before,
.btn--glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.btn--glitch::before {
  color: var(--red);
  transform: translate(0, 0);
}

.btn--glitch::after {
  color: var(--ink);
  mix-blend-mode: multiply;
}

.btn--glitch:hover::before {
  opacity: 0.7;
  transform: translate(-2px, 1px);
}

.btn--glitch:hover::after {
  opacity: 0.7;
  transform: translate(2px, -1px);
}

@media (prefers-reduced-motion: reduce) {
  .btn--primary:hover { transform: none; }
  .btn--glitch:hover::before,
  .btn--glitch:hover::after { opacity: 0; }
}

/* ---------- Problem strip (marquee) ---------- */
.strip {
  border-bottom: var(--edge);
  background: var(--panel);
  overflow: hidden;
  white-space: nowrap;
  padding: 0.85rem 0;
}

.strip__track {
  display: inline-flex;
  gap: 1.5rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--paper-dim);
  animation: scroll-left 34s linear infinite;
}

.strip__track span:nth-child(odd) { color: var(--red); }

@keyframes scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .strip__track { animation: none; }
}

/* ---------- Sections ---------- */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 4.5rem 1.5rem;
}

.section--alt {
  max-width: none;
  background: var(--panel);
  border-top: var(--edge);
  border-bottom: var(--edge);
}

.section--alt > * {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}

.section__head { margin-bottom: 2.5rem; }

.article-label {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.6rem;
}

.section__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  letter-spacing: 0.01em;
}

/* ---------- Cards (Artículo I) ---------- */
.grid { display: grid; gap: 1.25rem; }

.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  border: var(--edge);
  padding: 1.75rem 1.5rem;
  background: var(--panel);
  transition: border-color 0.2s ease;
}

.card:hover { border-color: var(--teal-dim); }

.card__kicker {
  font-family: var(--mono);
  color: var(--teal);
  font-size: 0.8rem;
  margin-bottom: 0.9rem;
}

.card__title {
  font-family: var(--body);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.card__text {
  color: var(--paper-dim);
  font-size: 0.92rem;
}

/* ---------- Clauses (Artículo II) ---------- */
.clauses {
  display: grid;
  gap: 0;
  border-top: var(--edge);
}

.clause {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-bottom: var(--edge);
}

.clause__num {
  font-family: var(--display);
  font-size: 2rem;
  color: var(--teal-dim);
}

.clause__title {
  font-family: var(--body);
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.clause__text { color: var(--paper-dim); max-width: 60ch; }

/* ---------- Modules (Artículo III) ---------- */
.modules {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: var(--edge);
}

.module {
  padding: 1.75rem 1.5rem;
  border-right: var(--edge);
}

.module:last-child { border-right: none; }

.module__num {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.75rem;
}

.module__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.4rem;
  margin-bottom: 0.15rem;
}

.module__sub {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--teal);
  margin-bottom: 0.9rem;
}

.module__text {
  color: var(--paper-dim);
  font-size: 0.9rem;
}

/* ---------- Author (Artículo IV) ---------- */
.author {
  max-width: 62ch;
  border-left: 3px solid var(--teal);
  padding-left: 1.5rem;
}

.author__name {
  font-family: var(--display);
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.author__text { color: var(--paper-dim); }

/* ---------- Closer ---------- */
.closer {
  position: relative;
  padding: 5.5rem 1.5rem;
  text-align: center;
  overflow: hidden;
  border-bottom: var(--edge);
}

.hero__halftone--closer {
  inset: auto auto -30% 50%;
  transform: translateX(-50%);
}

.closer__inner {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
}

.closer__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  line-height: 1.02;
  margin-bottom: 1rem;
}

.closer__sub {
  color: var(--paper-dim);
  margin-bottom: 2rem;
}

/* ---------- Footer ---------- */
.footer {
  padding: 2.5rem 1.5rem;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--paper-dim);
}

.footer p + p { margin-top: 0.4rem; }

.footer a { color: var(--teal); }

.footer__brand-label {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 0.6rem;
}

.footer__logo {
  height: 22px;
  width: auto;
  margin: 0 auto 1.5rem;
  display: block;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__cover { order: -1; max-width: 420px; margin: 0 auto; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .modules { grid-template-columns: repeat(2, 1fr); }
  .module { border-bottom: var(--edge); }
  .module:nth-child(2n) { border-right: none; }
}

@media (max-width: 560px) {
  .grid--4 { grid-template-columns: 1fr; }
  .modules { grid-template-columns: 1fr; }
  .module { border-right: none; }
  .clause { grid-template-columns: 3rem 1fr; gap: 1rem; }
  .nav__cta { display: none; }
}
