:root {
  --paper: #f7f5f0;
  --ink: #20252a;
  --muted: #666d72;
  --line: #d8d3ca;
  --red: #912b3c;
  --green: #55785e;
  --blue: #285a79;
  --gold: #d7a72f;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

/* Cabecera de escritorio: marca a la izquierda, navegación en el centro, redes a la derecha. */
.site-header {
  width: min(1660px, 94%);
  min-height: 88px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(225px, 1fr) auto minmax(96px, 1fr);
  align-items: center;
  gap: clamp(16px, 2vw, 30px);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 5;
}
.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 12px;
  white-space: nowrap;
  font-family: var(--serif);
  font-size: 23px;
  letter-spacing: .105em;
  font-weight: 600;
}
.brand-logo { display: block; width: 58px; height: 42px; object-fit: contain; }
.main-nav { display: flex; align-items: center; justify-content: center; gap: clamp(16px, 2vw, 30px); }
.main-nav > a,
.nav-dropdown > summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #30363a;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}
.main-nav > a:hover,
.nav-dropdown > summary:hover { color: var(--red); }
.nav-dropdown { position: relative; }
.nav-dropdown > summary { list-style: none; gap: 7px; }
.nav-dropdown > summary::-webkit-details-marker { display: none; }
.nav-dropdown > summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .18s ease;
}
.nav-dropdown[open] > summary::after { transform: rotate(225deg) translate(-1px, -1px); }
.dropdown-panel {
  position: absolute;
  top: calc(100% - 2px);
  left: -18px;
  min-width: 190px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdfa;
  box-shadow: 0 14px 32px rgba(32, 37, 42, .10);
  display: grid;
  gap: 3px;
}
.dropdown-panel a { padding: 12px 13px; border-radius: 8px; font-size: 14px; font-weight: 600; letter-spacing: .06em; }
.dropdown-panel a:hover { background: #f0ece4; }
.header-social { display: flex; justify-self: end; align-items: center; gap: 17px; }
.header-social a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  transition: background .18s ease, transform .18s ease;
}
.header-social a:hover { background: #ebe6dd; transform: translateY(-2px); }
.header-social svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.header-social .filled { fill: currentColor; stroke: none; }
.menu-toggle { display: none; }

/* Primera pantalla de escritorio: CLASE + identidad + LIBERTAD en una misma línea. */
.hero-composition {
  width: min(1660px, 94%);
  min-height: clamp(430px, calc(100svh - 300px), 570px);
  margin: 0 auto;
  padding: clamp(24px, 3.5vh, 42px) 0 clamp(22px, 3vh, 38px);
  display: grid;
  grid-template-columns: minmax(260px, .94fr) minmax(420px, 1.25fr) minmax(260px, .94fr);
  align-items: center;
  gap: clamp(20px, 2.6vw, 42px);
}
.identity { text-align: center; align-self: center; min-width: 0; }
.hero-logo {
  display: block;
  width: clamp(240px, 22vw, 330px);
  height: clamp(150px, 21vh, 210px);
  object-fit: contain;
  margin: 0 auto 2px;
}
.identity h1 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(48px, 4.35vw, 68px);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: .13em;
  white-space: nowrap;
}
.tagline {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(20px, 1.8vw, 27px);
  line-height: 1.3;
  letter-spacing: .025em;
}
.intro {
  max-width: 590px;
  margin: 0 auto;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(16px, 1.28vw, 19px);
  line-height: 1.55;
}

/* Recuadros cromáticos de las dos publicaciones. */
.publication-card {
  min-height: clamp(275px, 34vh, 350px);
  padding: 30px clamp(18px, 2.1vw, 34px);
  border: 1px solid rgba(48, 51, 53, .07);
  border-radius: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: center;
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease;
}
.publication-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 32px rgba(36, 40, 42, .09);
}
.class-card {
  color: #642636;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(145, 43, 60, .48), transparent 61%),
    radial-gradient(ellipse at 0% 100%, rgba(85, 120, 94, .62), transparent 62%),
    #f0e9e3;
}
.liberty-card {
  color: #214f6c;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(40, 90, 121, .48), transparent 61%),
    radial-gradient(ellipse at 100% 100%, rgba(215, 167, 47, .68), transparent 63%),
    #f0ece3;
}
.card-content { flex: 1; min-width: 0; }
.card-kicker {
  margin: 0 0 13px;
  color: rgba(32, 37, 42, .78);
  font-size: clamp(14px, 1.08vw, 16px);
  line-height: 1.45;
}
.publication-card h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(44px, 4.1vw, 62px);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -.045em;
}
.liberty-card h2 { font-style: italic; }
.card-line { display: block; width: 92px; margin: 17px auto 16px; border-top: 1px solid currentColor; opacity: .7; }
.card-description {
  max-width: 260px;
  margin: 0 auto;
  color: #30363a;
  font-size: clamp(15px, 1.12vw, 17px);
  line-height: 1.5;
}
.arrow {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1.3px solid currentColor;
  border-radius: 50%;
  font-size: 27px;
  line-height: 1;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.class-card .arrow { order: -1; }
.class-card:hover .arrow { transform: translateX(-3px); background: rgba(255,255,255,.28); }
.liberty-card:hover .arrow { transform: translateX(3px); background: rgba(255,255,255,.28); }

/* Newsletter: siempre debajo de los recuadros. */
.newsletter-strip {
  width: min(1450px, 91%);
  min-height: 116px;
  margin: 0 auto clamp(20px, 3vh, 34px);
  padding: 20px clamp(22px, 3vw, 42px);
  display: grid;
  grid-template-columns: 52px minmax(300px, 1fr) minmax(390px, 1.05fr);
  align-items: center;
  gap: clamp(17px, 2vw, 28px);
  border: 1px solid #d0cbc1;
  border-radius: 15px;
  background: rgba(255, 255, 255, .25);
}
.newsletter-mark { display: grid; place-items: center; width: 48px; height: 48px; border-right: 1px solid #b8b2a9; }
.newsletter-mark svg { width: 31px; height: 31px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.eyebrow { margin: 0 0 5px; color: var(--muted); font-size: 12px; line-height: 1.3; font-weight: 700; letter-spacing: .16em; }
.newsletter-copy h2 { margin: 0 0 4px; font-family: var(--serif); font-size: clamp(21px, 1.75vw, 26px); line-height: 1.25; font-weight: 500; }
.newsletter-copy h2 em { color: var(--red); font-style: normal; font-weight: 700; }
.newsletter-description { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.45; }
.newsletter-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.newsletter-form input {
  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 0 17px;
  border: 1px solid #bbb6ad;
  border-radius: 10px;
  background: rgba(255,255,255,.62);
  color: var(--ink);
  font-size: 16px;
}
.newsletter-form input::placeholder { color: #777b7d; }
.newsletter-form button {
  min-height: 52px;
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .18s ease, transform .18s ease;
}
.newsletter-form button:hover { background: #3b444b; transform: translateY(-1px); }
.form-feedback { grid-column: 1 / -1; min-height: 0; margin: 0; color: var(--red); font-size: 13px; line-height: 1.4; }
.form-feedback:not(:empty) { margin-top: 2px; }

/* Participación: sección editorial situada después de la primera pantalla. */
.participation {
  padding: clamp(66px, 10vh, 112px) 6%;
  border-top: 1px solid var(--line);
  background: #f0ede6;
  text-align: center;
}
.participation-inner { width: min(850px, 100%); margin: 0 auto; }
.participation .eyebrow { margin-bottom: 16px; }
.participation h2 {
  margin: 0 auto 17px;
  max-width: 800px;
  font-family: var(--serif);
  font-size: clamp(35px, 4vw, 52px);
  font-weight: 500;
  line-height: 1.16;
}
.participation h2 em { color: var(--green); font-style: italic; }
.participation-inner > p:not(.eyebrow) {
  max-width: 700px;
  margin: 0 auto 28px;
  color: var(--muted);
  font-size: clamp(17px, 1.45vw, 20px);
  line-height: 1.65;
}
.participation-link {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  min-height: 54px;
  padding: 0 23px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  transition: background .18s ease, color .18s ease;
}
.participation-link:hover { background: var(--ink); color: #fff; }
.participation-link span { font-size: 20px; }
.site-footer {
  width: min(1660px, 94%);
  min-height: 70px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.site-footer a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Tablet: se conserva el protagonismo central y las dos publicaciones pasan a una segunda fila. */
@media (max-width: 1120px) {
  .site-header { grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px 14px; padding: 13px 0; }
  .brand { grid-column: 1; grid-row: 1; }
  .header-social { grid-column: 2; grid-row: 1; }
  .menu-toggle {
    grid-column: 3; grid-row: 1;
    justify-self: end;
    display: flex;
    width: 43px; height: 43px;
    flex-direction: column; justify-content: center; align-items: center; gap: 5px;
    border: 1px solid var(--line); border-radius: 50%; background: transparent;
    cursor: pointer;
  }
  .menu-toggle span { display: block; width: 18px; height: 1.7px; background: var(--ink); transition: transform .2s ease, opacity .2s ease; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(6.7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-6.7px) rotate(-45deg); }
  .header-social { grid-column: 2; grid-row: 1; margin-right: 0; }
  .main-nav {
    display: none;
    grid-column: 1 / -1; grid-row: 2;
    align-items: stretch; justify-content: flex-start; flex-wrap: wrap;
    gap: 4px 22px; padding: 10px 0 5px;
  }
  .site-header.menu-open .main-nav { display: flex; }
  .main-nav > a, .nav-dropdown > summary { min-height: 40px; font-size: 15px; }
  .hero-composition {
    min-height: auto;
    grid-template-columns: minmax(230px, 1fr) minmax(230px, 1fr);
    gap: 28px 22px;
    padding: 34px 0 28px;
  }
  .identity { grid-column: 1 / -1; grid-row: 1; }
  .class-card { grid-column: 1; grid-row: 2; }
  .liberty-card { grid-column: 2; grid-row: 2; }
  .hero-logo { width: 255px; height: 165px; }
  .identity h1 { font-size: 55px; }
  .publication-card { min-height: 245px; padding: 24px 18px; }
  .publication-card h2 { font-size: clamp(38px, 5vw, 53px); }
  .arrow { flex-basis: 40px; width: 40px; height: 40px; }
  .newsletter-strip { width: 94%; grid-template-columns: 44px minmax(0, 1fr); gap: 13px 17px; padding: 20px 22px; }
  .newsletter-form { grid-column: 2; }
}

/* Móvil vertical: cabecera compacta y contenido apilado, legible y táctil. */
@media (max-width: 680px) {
  html { scroll-padding-top: 82px; }
  .site-header { width: 92%; min-height: 72px; padding: 10px 0; }
  .brand { gap: 8px; font-size: 18px; letter-spacing: .08em; }
  .brand-logo { width: 48px; height: 36px; }
  .header-social { gap: 3px; margin-right: 0; }
  .header-social a { width: 36px; height: 38px; }
  .header-social svg { width: 22px; height: 22px; }
  .menu-toggle { width: 40px; height: 40px; }
  .main-nav { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0 4px; }
  .main-nav > a, .nav-dropdown > summary { min-height: 48px; padding: 0 5px; font-size: 16px; border-top: 1px solid rgba(216,211,202,.7); }
  .nav-dropdown { width: 100%; }
  .nav-dropdown > summary { justify-content: space-between; }
  .dropdown-panel { position: static; min-width: 0; margin: 0 0 8px 9px; padding: 4px 0 4px 10px; border: 0; border-left: 2px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
  .dropdown-panel a { padding: 10px 12px; font-size: 15px; }
  .hero-composition {
    width: 92%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 26px 0 23px;
  }
  .identity { order: 0; padding: 0 4px 8px; }
  .hero-logo { width: min(270px, 76vw); height: 165px; margin-bottom: 2px; }
  .identity h1 { font-size: clamp(39px, 10vw, 48px); letter-spacing: .105em; margin-bottom: 9px; }
  .tagline { font-size: clamp(20px, 5.2vw, 24px); margin-bottom: 8px; }
  .intro { max-width: 440px; font-size: 16px; line-height: 1.55; }
  .publication-card {
    width: 100%;
    min-height: 184px;
    padding: 22px 17px;
    border-radius: 15px;
    gap: 10px;
  }
  .class-card { order: 1; }
  .liberty-card { order: 2; }
  .card-kicker { font-size: 14px; margin-bottom: 8px; }
  .publication-card h2 { font-size: clamp(43px, 11vw, 52px); }
  .card-line { width: 78px; margin: 10px auto 9px; }
  .card-description { max-width: 260px; font-size: 16px; line-height: 1.4; }
  .arrow { flex-basis: 39px; width: 39px; height: 39px; font-size: 23px; }
  .newsletter-strip {
    width: 92%;
    min-height: 0;
    margin: 0 auto 28px;
    padding: 22px 19px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    border-radius: 14px;
    text-align: center;
  }
  .newsletter-mark { width: 100%; height: 34px; border: 0; }
  .newsletter-mark svg { width: 29px; height: 29px; }
  .eyebrow { font-size: 11px; }
  .newsletter-copy h2 { font-size: 24px; line-height: 1.2; }
  .newsletter-description { font-size: 15px; }
  .newsletter-form { width: 100%; display: flex; flex-direction: column; gap: 10px; }
  .newsletter-form input, .newsletter-form button { width: 100%; height: 52px; font-size: 16px; }
  .newsletter-form button { justify-content: center; }
  .participation { padding: 62px 7%; }
  .participation h2 { font-size: clamp(34px, 8.5vw, 42px); }
  .participation-inner > p:not(.eyebrow) { font-size: 17px; line-height: 1.6; }
  .participation-link { min-height: 53px; font-size: 15px; }
  .site-footer { width: 92%; min-height: 68px; flex-wrap: wrap; justify-content: center; gap: 8px 22px; padding: 16px 0; font-size: 13px; }
}

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


/* Subpágina de newsletter y páginas editoriales de CLASE / LIBERTAD. */
.subpage-header {
  width: min(1500px, 92%);
  min-height: 82px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}
.back-link { color: var(--muted); font-size: 15px; }
.back-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.subscribe-main {
  min-height: calc(100svh - 83px);
  width: min(720px, 92%);
  margin: 0 auto;
  padding: 48px 18px 66px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.subscribe-logo { width: 205px; height: 135px; object-fit: contain; margin-bottom: 14px; }
.subscribe-main h1 { margin: 8px 0 16px; font: 500 clamp(40px, 6vw, 60px)/1.12 var(--serif); }
.subscribe-intro { max-width: 600px; margin: 0; color: var(--muted); font-size: 18px; line-height: 1.65; }
.subscribe-form { width: min(570px, 100%); margin: 28px 0 15px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.subscribe-form input { min-width: 0; height: 54px; padding: 0 17px; border: 1px solid #bbb6ad; border-radius: 10px; background: rgba(255,255,255,.62); font: inherit; font-size: 16px; }
.subscribe-form button { min-height: 54px; padding: 0 22px; border: 0; border-radius: 10px; background: var(--ink); color: white; font-size: 15px; font-weight: 600; cursor: pointer; }
.subscribe-main small { max-width: 520px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.editorial-page { min-height: calc(100svh - 153px); width: min(900px, 90%); margin: 0 auto; padding: 85px 16px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.editorial-page .publication-label { margin: 0 0 14px; font-size: 12px; letter-spacing: .18em; font-weight: 700; color: var(--muted); }
.editorial-page h1 { margin: 0 0 15px; font: 600 clamp(52px, 8vw, 84px)/1.05 var(--serif); }
.editorial-page.class-page h1 { color: var(--red); }
.editorial-page.liberty-page h1 { color: var(--blue); font-style: italic; }
.editorial-page .publication-subtitle { margin: 0 0 20px; font: 500 clamp(22px, 3vw, 29px)/1.3 var(--serif); }
.editorial-page .publication-note { max-width: 600px; margin: 0 auto 32px; color: var(--muted); font-size: 18px; line-height: 1.65; }
.editorial-page .return-home { display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 21px; border: 1px solid var(--line); border-radius: 999px; font-size: 15px; font-weight: 600; }
.editorial-page .return-home:hover { background: #eee9e0; }
@media (max-width: 680px) {
  .subpage-header { width: 92%; min-height: 70px; }
  .subpage-header .brand { font-size: 17px; }
  .subpage-header .brand-logo { width: 45px; height: 34px; }
  .back-link { font-size: 13px; }
  .subscribe-main { min-height: calc(100svh - 70px); padding: 34px 10px 48px; }
  .subscribe-logo { width: 180px; height: 120px; }
  .subscribe-main h1 { font-size: clamp(38px, 10vw, 48px); }
  .subscribe-intro { font-size: 17px; }
  .subscribe-form { display: flex; flex-direction: column; }
  .subscribe-form input, .subscribe-form button { width: 100%; min-height: 53px; }
  .editorial-page { min-height: calc(100svh - 120px); padding: 60px 8px; }
  .editorial-page .publication-note { font-size: 17px; }
}
