/* styles.css — Margen newsletter landing (Swiss minimal, v2)
   ---------------------------------------------------------------
   Strict grid, sans-serif, white background, ink-black type, one
   accent green. All typography tokens come from --display /
   --body / --mono so the Tweaks "Typography" radio reflows the tree
   without touching JSX.
*/

:root {
  --paper: #ffffff;
  --ink: #0a0a0a;
  --ink-72: rgba(10, 10, 10, 0.72);
  --ink-54: rgba(10, 10, 10, 0.54);
  --ink-36: rgba(10, 10, 10, 0.36);
  --ink-18: rgba(10, 10, 10, 0.18);
  --ink-10: rgba(10, 10, 10, 0.10);
  --ink-06: rgba(10, 10, 10, 0.06);
  --accent: #16A34A;
  --accent-08: rgba(22, 163, 74, 0.08);

  --container: 1280px;
  --pad: clamp(20px, 4.5vw, 72px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--paper); }
::selection { background: var(--ink); color: var(--paper); }
a { color: inherit; }

.page {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv01", "kern";
  overflow-x: hidden;
}

/* ── Nav ──────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--pad);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--ink-06);
}
.nav__brand {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none;
  font-size: clamp(18px, 2vw, 28px);
  letter-spacing: -0.045em;
  font-weight: 600;
}
.nav__logo {
  display: block;
  width: clamp(34px, 3.4vw, 42px);
  height: clamp(34px, 3.4vw, 42px);
}
.nav__mark {
  display: inline-block; width: 14px; height: 14px;
  background: var(--ink);
  position: relative;
}
.nav__mark::after {
  content: ""; position: absolute;
  top: 0; right: 0; width: 6px; height: 6px;
  background: var(--accent);
}
.nav__name { font-weight: 700; }
.nav__by { color: var(--ink-54); font-weight: 500; letter-spacing: -0.04em; }
.nav__links {
  display: flex; align-items: center; gap: 28px;
  font-size: 14px;
}
.nav__links a {
  color: var(--ink-72); text-decoration: none;
  transition: color .15s ease;
}
.nav__links a:hover { color: var(--ink); }
.nav__cta {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--ink); color: var(--paper) !important;
  padding: 9px 14px;
  font-weight: 500;
  transition: background .15s ease, gap .2s ease;
}
.nav__cta:hover { background: var(--accent); gap: 10px; }
.nav__cta .arrow { transition: transform .2s ease; }

/* ── Eyebrow / generic mono labels ────────────────────── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-72);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.eyebrow__num { color: var(--accent); font-weight: 500; }
.eyebrow__sep { color: var(--ink-18); }
.eyebrow__live { display: inline-flex; align-items: center; gap: 6px; }
.dot {
  width: 6px; height: 6px;
  background: var(--accent);
  display: inline-block;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ── Hero ─────────────────────────────────────────────── */
.hero {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(72px, 10vw, 140px) var(--pad) clamp(80px, 10vw, 140px);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 32px;
  row-gap: clamp(28px, 4vw, 48px);
  border-bottom: 1px solid var(--ink-10);
}

/* Eyebrow always spans top row. */
.hero .eyebrow {
  grid-column: 1 / -1;
}

/* Default (index layout) — title left 8 cols, mono index right 4 cols */
.hero__title {
  grid-column: 1 / 9;
  font-family: var(--display);
  font-weight: var(--display-weight);
  font-size: clamp(40px, 6.6vw, 96px);
  line-height: 0.96;
  letter-spacing: var(--display-tracking);
  text-wrap: balance;
}
.hero__title em {
  font-style: normal;
  color: var(--accent);
}
.hero__lede {
  grid-column: 1 / 8;
  font-size: clamp(16.5px, 1.35vw, 19px);
  line-height: 1.55;
  color: var(--ink-72);
  text-wrap: pretty;
  max-width: 60ch;
}
.hero__form-wrap {
  grid-column: 1 / 8;
  display: flex; flex-direction: column; gap: 12px;
}
.hero__hint {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-54);
  letter-spacing: 0.02em;
}

/* Index layout — right column index */
.hero--index .hero-index {
  grid-column: 9 / 13;
  grid-row: 2 / span 3;
  align-self: end;
  border-top: 1px solid var(--ink);
  padding-top: 18px;
  display: flex; flex-direction: column; gap: 12px;
}

/* Center layout */
.hero--center { text-align: center; }
.hero--center .hero__title,
.hero--center .hero__lede,
.hero--center .hero__form-wrap,
.hero--center .eyebrow {
  grid-column: 2 / 12;
}
.hero--center .hero__title { font-size: clamp(44px, 7.2vw, 104px); }
.hero--center .hero__lede { max-width: none; margin: 0 auto; }
.hero--center .hero__form-wrap {
  align-items: center;
}
.hero--center .eyebrow { justify-self: center; }

/* Split layout */
.hero--split .hero__title { grid-column: 1 / 8; font-size: clamp(36px, 5.4vw, 76px); }
.hero--split .hero__lede { grid-column: 1 / 7; }
.hero--split .hero__form-wrap { grid-column: 1 / 7; }
.hero--split .hero-sample {
  grid-column: 8 / 13;
  grid-row: 2 / span 3;
  align-self: end;
}

/* ── Hero index aside ────────────────────────────────── */
.hero-index__head {
  display: flex; justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-54);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ink-10);
}
.hero-index__list { list-style: none; display: flex; flex-direction: column; }
.hero-index__link {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: baseline;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--ink-06);
  font-size: 16px;
  transition: padding .2s ease, color .15s ease;
  text-decoration: none;
}
.hero-index__link:hover { padding-left: 6px; color: var(--accent); }
.hero-index__link:hover .hero-index__n { color: var(--accent); }
.hero-index__n {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-54);
  letter-spacing: 0.04em;
  transition: color .15s ease;
}
.hero-index__label {
  font-weight: 500;
  letter-spacing: -0.01em;
}
.hero-index__foot {
  display: flex; justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-54);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-top: 10px;
}

/* ── Hero terminal sample ────────────────────────────── */
.term {
  background: var(--ink);
  color: #f5f3ee;
  border-radius: 8px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.4),
              0 8px 18px -8px rgba(0,0,0,.2);
}
.term__bar {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 14px;
  background: #1a1a17;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.term__dots { display: inline-flex; gap: 6px; }
.term__dots i {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,.18);
}
.term__title {
  font-size: 11.5px;
  color: rgba(255,255,255,.6);
  letter-spacing: 0.04em;
}
.term__body {
  padding: 20px 22px 18px;
  white-space: pre-wrap;
  font-family: var(--mono);
  font-size: 12.5px;
  color: #e8e6df;
}
.term__foot {
  display: flex; justify-content: space-between;
  padding: 12px 22px 14px;
  font-size: 11px;
  color: rgba(255,255,255,.5);
  letter-spacing: 0.04em;
  border-top: 1px solid rgba(255,255,255,.06);
}

/* ── Subscribe form ───────────────────────────────────── */
.subscribe {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: stretch;
  border: 1px solid var(--ink);
  background: var(--paper);
  position: relative;
  max-width: 520px;
  width: 100%;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.subscribe:focus-within {
  box-shadow: 4px 4px 0 var(--ink);
  transform: translate(-2px, -2px);
}
.subscribe--err { border-color: var(--accent); }
.subscribe--err:focus-within { box-shadow: 4px 4px 0 var(--accent); }

.subscribe__lbl {
  display: grid; place-items: center;
  padding: 0 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-54);
  border-right: 1px solid var(--ink-10);
  background: var(--ink-06);
}
.subscribe__input {
  border: 0; outline: none; background: transparent;
  padding: 16px 18px;
  font-family: var(--body);
  font-size: 16px;
  color: var(--ink);
  min-width: 0;
}
.subscribe__input::placeholder { color: var(--ink-36); }
.subscribe__btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  padding: 0 22px;
  font-family: var(--body);
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: background .15s ease, gap .2s ease;
}
.subscribe__btn:hover { background: var(--accent); gap: 12px; }
.subscribe__btn .arrow { transition: transform .2s ease; }

.subscribe__err {
  position: absolute; top: calc(100% + 8px); left: 0;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.subscribe--ok {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px;
  border: 1px solid var(--ink);
  border-left: 4px solid var(--accent);
  background: var(--accent-08);
  max-width: 520px;
  font-size: 15px;
}
.ok__mark {
  flex-shrink: 0;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px; font-weight: 600;
}
.ok__text { line-height: 1.4; }
.ok__email { font-family: var(--mono); font-size: 13.5px; }

/* ── Section heads (reused) ──────────────────────────── */
.sect-head {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 32px;
  align-items: end;
  padding-top: 8px;
  padding-bottom: clamp(40px, 5vw, 64px);
  border-top: 1px solid var(--ink);
}
.sect-head__meta {
  grid-column: 1 / 4;
  display: flex; align-items: baseline; gap: 14px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-72);
  padding-top: 14px;
}
.sect-head__num { color: var(--accent); font-weight: 500; }
.sect-head__title {
  grid-column: 4 / 11;
  font-family: var(--display);
  font-weight: var(--display-weight);
  font-size: clamp(32px, 4.2vw, 56px);
  line-height: 1.04;
  letter-spacing: var(--display-tracking);
  padding-top: 28px;
  text-wrap: balance;
}
.sect-head__right {
  grid-column: 11 / 13;
  padding-top: 14px;
  text-align: right;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
}
.sect-head__right a {
  color: var(--ink-72);
  text-decoration: none;
  transition: color .15s ease;
}
.sect-head__right a:hover { color: var(--accent); }
.more { display: inline-block; }

/* ── About ────────────────────────────────────────────── */
.about {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(80px, 10vw, 140px) var(--pad);
}
.about__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 32px;
  row-gap: 48px;
}
.about__meta {
  grid-column: 1 / 5;
  display: flex; flex-direction: column;
  border-top: 1px solid var(--ink-10);
}
.about__meta > div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--ink-06);
  align-items: baseline;
}
.about__meta dt {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-54);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.about__meta dd {
  font-size: 14.5px;
  color: var(--ink);
  font-weight: 500;
}
.about__body {
  grid-column: 6 / 12;
  display: flex; flex-direction: column; gap: 22px;
}
.about__body p {
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.6;
  color: var(--ink-72);
  text-wrap: pretty;
  max-width: 60ch;
}

/* ── Issues / Archive ────────────────────────────────── */
.issues {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad) clamp(80px, 10vw, 140px);
}

.archive {
  display: flex; flex-direction: column;
}
.archive__header {
  display: grid;
  grid-template-columns: 50px 110px 1fr 130px 22px;
  gap: 24px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-54);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.archive__list { list-style: none; }
.archive__row { border-bottom: 1px solid var(--ink-10); }
.archive__row:last-child { border-bottom: 1px solid var(--ink); }
.archive__link {
  display: grid;
  grid-template-columns: 50px 110px 1fr 130px 22px;
  gap: 24px;
  padding: 22px 0;
  text-decoration: none; color: var(--ink);
  align-items: baseline;
  position: relative;
  transition: padding .2s cubic-bezier(.3,.7,.4,1);
}
.archive__link::before {
  content: "";
  position: absolute;
  left: -16px; top: 0; bottom: 0; width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .25s cubic-bezier(.3,.7,.4,1);
}
.archive__link:hover { padding-left: 12px; }
.archive__link:hover::before { transform: scaleY(1); }
.archive__link:hover .archive__t { color: var(--accent); }
.archive__link:hover .archive__arr { transform: translateX(4px); color: var(--accent); }

.archive__n {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-54);
  letter-spacing: 0.02em;
}
.archive__date {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-72);
}
.archive__title-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.archive__t {
  font-family: var(--display);
  font-weight: var(--display-weight);
  font-size: clamp(20px, 1.8vw, 24px);
  line-height: 1.18;
  letter-spacing: var(--display-tracking);
  transition: color .15s ease;
  text-wrap: balance;
}
.archive__dek {
  font-size: 14.5px;
  color: var(--ink-54);
  line-height: 1.5;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .3s ease, opacity .2s ease, margin-top .25s ease;
}
.archive__link:hover .archive__dek {
  max-height: 80px;
  opacity: 1;
  margin-top: 2px;
}
.archive__tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  width: fit-content;
}
.archive__min {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-54);
  text-align: right;
  letter-spacing: 0.02em;
}
.archive__arr {
  font-size: 14px;
  color: var(--ink-36);
  text-align: right;
  transition: transform .2s ease, color .2s ease;
}
.ta-right { text-align: right; }

/* ── Footer ──────────────────────────────────────────── */
.footer {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad) 40px;
  display: flex; flex-direction: column; gap: 36px;
}
.footer__cta {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(48px, 6vw, 80px) clamp(28px, 5vw, 64px);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
}
.footer__cta::before {
  content: "§ 03 / Suscribirse";
  position: absolute;
  top: 20px; left: clamp(28px, 5vw, 64px);
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(255,255,255,.5);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.footer__h {
  font-family: var(--display);
  font-weight: var(--display-weight);
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.02;
  letter-spacing: var(--display-tracking);
  text-wrap: balance;
}
.footer__cta .subscribe { background: var(--paper); border-color: var(--paper); }
.footer__cta .subscribe__lbl { background: rgba(255,255,255,.08); color: rgba(255,255,255,.6); border-right-color: rgba(255,255,255,.1); display: none; }
.footer__cta .subscribe { grid-template-columns: 1fr auto; }
.footer__cta .subscribe__btn { background: var(--accent); }
.footer__cta .subscribe__btn:hover { background: var(--paper); color: var(--ink); }

.footer__rule { height: 1px; background: var(--ink-10); }
.footer__row {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
}
.footer__brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px;
  font-weight: 500;
}
.footer__logo { width: 28px; height: 28px; display: block; }
.footer__links { display: flex; gap: 22px; font-family: var(--mono); font-size: 12px; }
.footer__links a {
  text-decoration: none; color: var(--ink-72);
  transition: color .15s ease;
}
.footer__links a:hover { color: var(--accent); }
.footer__row--fine {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-54);
  letter-spacing: 0.02em;
  padding-top: 6px;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 960px) {
  .hero__title, .hero__lede, .hero__form-wrap { grid-column: 1 / -1; }
  .hero--index .hero-index, .hero--split .hero-sample {
    grid-column: 1 / -1;
    grid-row: auto;
  }
  .sect-head__meta { grid-column: 1 / -1; padding-top: 14px; }
  .sect-head__title { grid-column: 1 / -1; padding-top: 16px; }
  .sect-head__right { grid-column: 1 / -1; text-align: left; padding-top: 8px; }
  .about__meta { grid-column: 1 / -1; }
  .about__body { grid-column: 1 / -1; }
  .archive__header,
  .archive__link {
    grid-template-columns: 50px 1fr 22px;
    row-gap: 4px;
  }
  .archive__date { display: none; }
  .archive__tag { grid-column: 1 / -1; padding-top: 4px; }
}
@media (max-width: 640px) {
  .nav__links a:not(.nav__cta) { display: none; }
  .nav__brand { font-size: 18px; gap: 9px; }
  .nav__logo { width: 32px; height: 32px; }
  .nav__by { display: none; }
  .subscribe { grid-template-columns: 1fr; }
  .subscribe__lbl { display: none; }
  .subscribe__input { padding: 14px 16px; border-bottom: 1px solid var(--ink-10); }
  .subscribe__btn { padding: 14px; justify-content: center; }
  .footer__cta { grid-template-columns: 1fr; padding-top: 64px; }
  .archive__header { display: none; }
}
@media (max-width: 420px) {
  .nav { padding-left: 14px; padding-right: 14px; }
  .nav__brand { font-size: 16px; }
  .nav__cta { padding: 8px 10px; }
}
