/* OE-INT-003-MG1 · Cuaderno Vivo
   Gate visual aislado: solo se carga en Inicio, Apoya y Artículo. */

@font-face {
  font-family: "Alegreya";
  src: url("assets/fonts/Alegreya-Medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya";
  src: url("assets/fonts/Alegreya-MediumItalic.ttf") format("truetype");
  font-style: italic;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("assets/fonts/AtkinsonHyperlegible-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("assets/fonts/AtkinsonHyperlegible-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

.cv-gate {
  --serif: "Alegreya", serif;
  --sans: "Atkinson Hyperlegible", sans-serif;
  --cv-rail: clamp(104px, 9vw, 132px);
  --cv-rule: rgba(23,42,50,.30);
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
}
.cv-gate h1,
.cv-gate h2,
.cv-gate h3,
.cv-gate .brand,
.cv-gate .footer-brand,
.cv-gate .article-body { font-family: var(--serif); }
.cv-gate h1,
.cv-gate h2,
.cv-gate h3 { font-weight: 500; }
.cv-gate h1 { letter-spacing: -.035em; line-height: .95; }
.cv-gate h2 { letter-spacing: -.022em; line-height: 1.02; }
.cv-gate p { text-wrap: pretty; }
.cv-gate .body-large { font-family: var(--sans); }
.cv-gate .eyebrow,
.cv-gate .panel-label {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: .085em;
  font-size: .72rem;
}
.cv-gate a:focus-visible,
.cv-gate button:focus-visible,
.cv-gate input:focus-visible {
  outline: 3px solid var(--olive);
  outline-offset: 4px;
}

/* Header / wordmark / brasa */
.cv-gate .site-header {
  background: rgba(245,240,230,.97);
  border-bottom: 1px solid var(--cv-rule);
  box-shadow: none;
}
.cv-gate .header-inner {
  min-height: 84px;
  grid-template-columns: minmax(220px,.9fr) minmax(0,1.7fr) auto;
  gap: 26px;
}
.cv-gate .brand {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-size: 1.72rem;
  font-weight: 500;
  letter-spacing: -.02em;
  text-decoration: none;
  width: fit-content;
}
.cv-gate .brand::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--terracotta);
  flex: 0 0 auto;
  transform: translateY(-2px);
}
.cv-gate .desktop-nav {
  justify-content: flex-end;
  gap: clamp(18px,2.2vw,34px);
}
.cv-gate .desktop-nav a {
  font-family: var(--sans);
  font-weight: 400;
  text-underline-offset: 8px;
  text-decoration-thickness: 1px;
}
.cv-gate .desktop-nav a:hover,
.cv-gate .desktop-nav a[aria-current="page"] { text-decoration: underline; }
.cv-gate .header-cta {
  position: relative;
  min-height: 44px;
  padding: 10px 10px 10px 22px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 700;
  text-decoration: none;
}
.cv-gate .header-cta::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 50%;
  width: 6px;
  height: 22px;
  background: var(--terracotta);
  transform: translateY(-50%);
  transition: height .18s ease;
}
.cv-gate .header-cta:hover::before { height: 32px; }
.cv-gate .menu-toggle { border-radius: 0; }
.cv-gate .mobile-menu {
  background: var(--paper);
  border-top: 1px solid var(--cv-rule);
}
.cv-gate .mobile-nav a {
  border-bottom: 1px solid var(--cv-rule);
  font-family: var(--sans);
}
.cv-gate .mobile-nav a[href="apoya.html"] { position: relative; padding-left: 26px; }
.cv-gate .mobile-nav a[href="apoya.html"]::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 50%;
  width: 6px;
  height: 22px;
  background: var(--terracotta);
  transform: translateY(-50%);
}

/* Folio / margen persistente */
.cv-gate [data-folio] { position: relative; }
.cv-gate [data-folio]::before {
  content: attr(data-folio);
  position: absolute;
  z-index: 3;
  top: 28px;
  left: max(18px, calc((100vw - var(--container))/2));
  width: calc(var(--cv-rail) - 26px);
  padding-top: 9px;
  border-top: 1px solid var(--ink);
  color: var(--terracotta);
  font-family: var(--sans);
  font-size: .68rem;
  line-height: 1.25;
  letter-spacing: .085em;
  font-weight: 700;
}
.cv-gate [data-folio] > .container { padding-left: var(--cv-rail); }

/* Botones / acción brasa */
.cv-gate .button {
  min-height: 48px;
  border-radius: 2px;
  font-family: var(--sans);
  font-weight: 700;
  box-shadow: none;
  transform: none;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.cv-gate .button:hover { transform: none; }
.cv-gate .button-primary {
  position: relative;
  background: var(--ink);
  border: 1px solid var(--ink);
  color: var(--paper);
  padding-left: 28px;
}
.cv-gate .button-primary::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 5px;
  height: 18px;
  background: var(--terracotta);
  transform: translateY(-50%);
}
.cv-gate .button-primary:hover { background: var(--paper); color: var(--ink); }
.cv-gate .button-secondary {
  background: transparent;
  color: var(--ink);
  border: 0;
  border-bottom: 1px solid var(--ink);
  padding-inline: 0;
  border-radius: 0;
}
.cv-gate .button-secondary:hover { color: var(--terracotta); border-bottom-color: var(--terracotta); }
.cv-gate .text-link { text-underline-offset: 5px; }
.cv-gate .text-link:hover { color: var(--terracotta); }

/* Imagen: una sola esquina “paso de página” */
.cv-gate .image-treatment,
.cv-gate .hero-frame,
.cv-gate .article-header-image,
.cv-gate .support-image,
.cv-gate .feature-image {
  border-radius: 0 0 0 92px !important;
  box-shadow: none !important;
  overflow: hidden;
}
.cv-gate .image-treatment img,
.cv-gate .hero-frame img { filter: none; }

/* INICIO */
.cv-home .hero {
  padding: clamp(42px,5vw,72px) 0 74px;
  border-bottom: 1px solid var(--cv-rule);
}
.cv-home .hero[data-folio]::before { top: 56px; }
.cv-home .hero-grid {
  display: grid;
  grid-template-columns: repeat(12,minmax(0,1fr));
  gap: 0 clamp(10px,1.4vw,20px);
  align-items: start;
}
.cv-home .hero-copy {
  grid-column: 1 / 8;
  grid-row: 1;
  z-index: 2;
  padding: 58px 0 24px;
}
.cv-home .hero-media {
  grid-column: 7 / 13;
  grid-row: 1;
  width: auto;
  margin: 0;
  align-self: stretch;
}
.cv-home .hero-frame {
  min-height: 600px;
  height: clamp(600px,52vw,700px);
  max-height: 700px;
  background: var(--olive);
}
.cv-home .hero-frame img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  object-position: 58% 48%;
}
.cv-home .hero-media::before,
.cv-home .hero-media::after { display:none; }
.cv-home .hero-media figcaption {
  max-width: 34ch;
  margin: 10px 0 0 auto;
  color: rgba(23,42,50,.68);
  font-family: var(--sans);
  font-size: .72rem;
}
.cv-home .hero h1 {
  max-width: 10.8ch;
  margin: 0;
  font-size: clamp(4.1rem,5.4vw,5rem);
  line-height: .91;
}
.cv-home .cv-h1-line { display:block; }
.cv-home .cv-h1-em { margin-top: .05em; }
.cv-home .cv-h1-em em { font-weight: 500; }
.cv-home .hero .eyebrow { margin-bottom: 28px; }
.cv-home .hero-text {
  max-width: 52ch;
  margin-top: 34px;
  padding-left: clamp(18px,2vw,34px);
  border-left: 1px solid var(--ink);
  font-size: 1.14rem;
}
.cv-home .hero-actions {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap: 14px 28px;
  margin-top: 34px;
}
.cv-home .editorial-statement { background: var(--sand); }
.cv-home .statement-grid { min-height: 230px; }
.cv-home .statement-grid p {
  max-width: 850px;
  font-family: var(--serif);
  font-size: clamp(2.1rem,3.1vw,3.25rem);
  line-height: 1.05;
}
.cv-home .statement-mark::before { border-radius: 0; background: var(--terracotta); width: 10px; height: 52px; }
.cv-home .statement-mark span { background: var(--ink); height: 1px; }
.cv-home .section-kicker-row .rule { background: var(--ink); opacity:.35; }
.cv-home .work-list { border-top: 1px solid var(--ink); }
.cv-home .work-item { border-bottom: 1px solid var(--cv-rule); }
.cv-home .work-number,
.cv-home .editorial-list>li>span:first-child { color: var(--terracotta); font-family:var(--sans); font-weight:700; }
.cv-home .feature-grid {
  grid-template-columns: repeat(12,minmax(0,1fr));
  gap: 18px;
  align-items:center;
}
.cv-home .feature-image { grid-column: 1 / 7; min-height: 520px; }
.cv-home .feature-copy { grid-column: 8 / 13; }
.cv-home .notebook-grid { grid-template-columns: 4fr 8fr; border-top:1px solid var(--ink); padding-top:40px; }
.cv-home .editorial-list { border-top:0; }
.cv-home .editorial-list li { border-color: var(--cv-rule); }
.cv-home .closing-cta { background: var(--ink); }
.cv-home .closing-cta h2,
.cv-home .closing-cta .body-large { color: var(--paper); }
.cv-home .closing-cta .button-primary { background:var(--paper); color:var(--ink); border-color:var(--paper); }
.cv-home .closing-cta .button-primary:hover { background:transparent; color:var(--paper); }

/* APOYA */
.cv-support .support-hero {
  padding: clamp(44px,6vw,84px) 0 72px;
  border-bottom: 1px solid var(--cv-rule);
}
.cv-support .support-grid {
  display:grid;
  grid-template-columns:repeat(12,minmax(0,1fr));
  gap:18px;
  align-items:start;
}
.cv-support .support-copy { grid-column:1 / 8; padding-top:52px; }
.cv-support .support-copy h1 {
  max-width: 11ch;
  font-size: clamp(4.25rem,5.5vw,5.25rem);
  line-height:.94;
}
.cv-support .support-copy h1 em { font-weight:500; }
.cv-support .support-image { grid-column:8 / 13; height:590px; }
.cv-support .concept-note {
  border:0;
  border-top:1px solid var(--ink);
  background:transparent;
  padding:16px 0 0;
  max-width:56ch;
}
.cv-support .donation-demo { background: var(--paper); padding-top:72px; }
.cv-support .donation-grid {
  display:grid;
  grid-template-columns:repeat(12,minmax(0,1fr));
  gap:18px;
}
.cv-support .donation-grid > div:first-child { grid-column:1 / 5; padding-right:22px; }
.cv-support .donation-options { grid-column:5 / 13; }
.cv-support .donation-options fieldset { gap:0; border-top:1px solid var(--ink); }
.cv-support .amount-option {
  display:grid;
  grid-template-columns:56px 150px minmax(0,1fr);
  gap:18px;
  min-height:92px;
  padding:20px 22px;
  border:0;
  border-bottom:1px solid var(--cv-rule);
  border-radius:0;
  background:transparent;
  cursor:pointer;
}
.cv-support .amount-option:hover { border-color:var(--ink); background:rgba(221,203,168,.20); }
.cv-support .amount-option:has(input:checked) {
  padding:20px 22px;
  border:0;
  border-bottom:1px solid var(--cv-rule);
  box-shadow: inset 5px 0 0 var(--terracotta);
  background:rgba(221,203,168,.28);
}
.cv-support .amount-option input { position:absolute; opacity:0; }
.cv-support .amount-index {
  color:var(--terracotta);
  font-size:.72rem;
  font-weight:700;
  letter-spacing:.08em;
}
.cv-support .amount-value {
  font-family:var(--serif);
  font-weight:500;
  font-size:2rem;
}
.cv-support .donation-options .button-full { margin-top:24px; width:100%; }
.cv-support .demo-dialog {
  width:min(100%,650px);
  padding:58px 48px 44px;
  border:1px solid var(--ink);
  border-radius:2px;
  box-shadow:none;
}
.cv-support .demo-dialog::before {
  content:"03 / FLUJO";
  display:block;
  margin-bottom:18px;
  padding-top:8px;
  border-top:1px solid var(--ink);
  color:var(--terracotta);
  font-family:var(--sans);
  font-size:.68rem;
  font-weight:700;
  letter-spacing:.085em;
}
.cv-support .demo-dialog h2 { font-family:var(--serif); font-weight:500; }
.cv-support .dialog-close { border-radius:0; }
.cv-support .dialog-security {
  border-radius:0;
  background:transparent;
  border-top:1px solid var(--cv-rule);
  border-bottom:1px solid var(--cv-rule);
  padding:18px 0;
}
.cv-support .dialog-security>span { border-radius:0; background:var(--terracotta); width:8px; height:34px; font-size:0; }

/* ARTÍCULO */
.cv-article .article-header {
  padding: clamp(44px,6vw,84px) 0 64px;
  border-bottom:1px solid var(--cv-rule);
}
.cv-article .article-header-grid {
  display:grid;
  grid-template-columns:repeat(12,minmax(0,1fr));
  gap:18px;
  align-items:start;
}
.cv-article .article-header-grid > div:first-child { grid-column:1 / 8; padding-top:36px; }
.cv-article .article-header-image { grid-column:8 / 13; height:570px; }
.cv-article .back-link {
  margin-bottom:46px;
  color:var(--ink);
  font-family:var(--sans);
  font-weight:700;
  text-decoration-thickness:1px;
}
.cv-article .article-header h1 {
  max-width: 11.5ch;
  font-size:clamp(4.15rem,5.4vw,5.3rem);
  line-height:.94;
}
.cv-article .article-header h1 em { font-weight:500; }
.cv-article .article-deck {
  max-width:58ch;
  padding-left:28px;
  border-left:1px solid var(--ink);
  font-family:var(--sans);
  font-size:1.16rem;
  line-height:1.55;
}
.cv-article .article-header-image figcaption {
  font-family:var(--sans);
  font-size:.72rem;
  color:rgba(23,42,50,.7);
  margin-top:10px;
}
.cv-article .article-layout {
  display:grid;
  grid-template-columns:repeat(12,minmax(0,1fr));
  gap:18px;
  padding-top:82px;
  padding-bottom:120px;
}
.cv-article .article-aside {
  grid-column:1 / 4;
  position:sticky;
  top:116px;
  border-top:1px solid var(--ink);
  border-left:0;
  padding:16px 20px 0 0;
}
.cv-article .article-aside ol { padding-left:18px; }
.cv-article .article-aside li {
  margin-bottom:14px;
  font-family:var(--sans);
  font-size:.92rem;
  line-height:1.4;
}
.cv-article .article-body {
  grid-column:4 / 11;
  max-width:42rem;
  font-size:1.27rem;
  line-height:1.66;
  letter-spacing:.002em;
}
.cv-article .article-body>p:first-child {
  font-size:1.58rem;
  line-height:1.46;
  margin-bottom:34px;
}
.cv-article .article-body>p:first-child::first-letter {
  float:left;
  margin:.05em .10em 0 0;
  color:var(--terracotta);
  font-size:4.4rem;
  line-height:.74;
}
.cv-article .article-body h2 {
  margin:64px 0 20px;
  padding-top:14px;
  border-top:1px solid var(--cv-rule);
  font-size:2.55rem;
  line-height:1.02;
}
.cv-article .article-body p { margin-bottom:25px; }

/* Footer gate */
.cv-gate .site-footer { border-top:1px solid var(--ink); }
.cv-gate .footer-brand { font-weight:500; }
.cv-gate .footer-nav a { font-family:var(--sans); }

@media (max-width: 1100px) {
  .cv-gate { --cv-rail: 94px; }
  .cv-gate .header-inner { grid-template-columns:minmax(180px,.7fr) minmax(0,1.7fr) auto; }
  .cv-home .hero h1,
  .cv-support .support-copy h1,
  .cv-article .article-header h1 { font-size:clamp(3.75rem,6vw,4.65rem); }
}

@media (max-width: 800px) {
  .cv-gate { --cv-rail: 0px; }
  .cv-gate .container { width:min(calc(100% - 38px),var(--container)); }
  .cv-gate .header-inner { min-height:72px; grid-template-columns:1fr auto; }
  .cv-gate .brand { font-size:1.48rem; }
  .cv-gate [data-folio]::before {
    position:static;
    display:block;
    width:auto;
    margin:0 19px 24px;
    padding:10px 0 0;
    border-top:1px solid var(--ink);
    font-size:.67rem;
  }
  .cv-gate [data-folio] > .container { padding-left:0; }
  .cv-gate .image-treatment,
  .cv-gate .hero-frame,
  .cv-gate .article-header-image,
  .cv-gate .support-image,
  .cv-gate .feature-image { border-radius:0 0 0 54px !important; }

  .cv-home .hero { padding:24px 0 42px; }
  .cv-home .hero[data-folio]::before { margin-top:18px; }
  .cv-home .hero-grid { display:flex; flex-direction:column; gap:22px; }
  .cv-home .hero-copy { order:2; padding:0; }
  .cv-home .hero-media { order:1; width:calc(100% + 38px); margin-left:-19px; }
  .cv-home .hero-frame { min-height:0; height:46vh; max-height:390px; }
  .cv-home .hero-media figcaption { margin:8px 19px 0; }
  .cv-home .hero h1 { font-size:clamp(2.8rem,10.9vw,3rem); max-width:10.5ch; }
  .cv-home .hero .eyebrow { margin-bottom:18px; }
  .cv-home .hero-text { margin-top:24px; padding-left:18px; font-size:1.05rem; }
  .cv-home .hero-actions { display:grid; gap:14px; margin-top:28px; }
  .cv-home .hero-actions .button-primary { width:100%; }
  .cv-home .hero-actions .button-secondary { width:max-content; min-height:40px; }
  .cv-home .statement-grid { min-height:0; padding-top:18px; padding-bottom:50px; }
  .cv-home .statement-grid p { font-size:2rem; }
  .cv-home .feature-grid { display:grid; grid-template-columns:1fr; }
  .cv-home .feature-image,.cv-home .feature-copy { grid-column:1; }
  .cv-home .feature-image { min-height:330px; }
  .cv-home .notebook-grid { grid-template-columns:1fr; }

  .cv-support .support-hero { padding:22px 0 52px; }
  .cv-support .support-grid { display:flex; flex-direction:column; gap:28px; }
  .cv-support .support-copy { order:2; padding-top:0; }
  .cv-support .support-image { order:1; width:calc(100% + 38px); margin-left:-19px; height:360px; }
  .cv-support .support-copy h1 { font-size:clamp(2.8rem,10.8vw,3rem); max-width:10.5ch; }
  .cv-support .donation-demo { padding-top:44px; }
  .cv-support .donation-grid { display:block; }
  .cv-support .donation-grid>div:first-child { padding-right:0; margin-bottom:34px; }
  .cv-support .amount-option { grid-template-columns:42px 1fr; gap:8px 14px; min-height:96px; padding:18px 16px; }
  .cv-support .amount-option:has(input:checked) { padding:18px 16px; }
  .cv-support .amount-index { grid-row:1 / 3; align-self:start; padding-top:8px; }
  .cv-support .amount-value { font-size:1.8rem; }
  .cv-support .amount-option>span:last-child { grid-column:2; }
  .cv-support .demo-dialog { padding:48px 24px 30px; }

  .cv-article .article-header { padding:22px 0 44px; }
  .cv-article .article-header-grid { display:flex; flex-direction:column; gap:28px; }
  .cv-article .article-header-grid>div:first-child { order:2; padding-top:0; }
  .cv-article .article-header-image { order:1; width:calc(100% + 38px); margin-left:-19px; height:360px; }
  .cv-article .article-header-image figcaption { margin-inline:19px; }
  .cv-article .back-link { margin-bottom:28px; }
  .cv-article .article-header h1 { font-size:clamp(2.8rem,10.6vw,3rem); max-width:11ch; }
  .cv-article .article-deck { padding-left:18px; }
  .cv-article .article-layout { display:block; padding-top:46px; padding-bottom:78px; }
  .cv-article .article-aside { position:static; margin-bottom:48px; padding:14px 0 18px; border-bottom:1px solid var(--cv-rule); }
  .cv-article .article-body { max-width:none; font-size:1.18rem; line-height:1.63; }
  .cv-article .article-body>p:first-child { font-size:1.42rem; }
  .cv-article .article-body h2 { font-size:2.25rem; margin-top:52px; }
}

@media (max-width: 430px) {
  .cv-gate .container { width:min(calc(100% - 32px),var(--container)); }
  .cv-gate [data-folio]::before { margin-inline:16px; }
  .cv-home .hero-media,
  .cv-support .support-image,
  .cv-article .article-header-image { width:calc(100% + 32px); margin-left:-16px; }
  .cv-home .hero-media figcaption,
  .cv-article .article-header-image figcaption { margin-inline:16px; }
  .cv-home .hero h1 { font-size:clamp(2.72rem,11vw,2.95rem); }
  .cv-support .support-copy h1,
  .cv-article .article-header h1 { font-size:clamp(2.7rem,10.7vw,2.95rem); }
  .cv-home .statement-grid p { font-size:1.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .cv-gate *, .cv-gate *::before, .cv-gate *::after { scroll-behavior:auto !important; transition-duration:.001ms !important; }
}
