/* ============================================================
   AZUR Círculo Mediterráneo · Hoja de estilos global
   Archivo: /assets/css/azur.css

   Estructura por scope:
   — Fuentes autohospedadas (@font-face)
   — Base universal (sin clase de página)
   — Páginas editoriales interiores (sin clase específica)
   — Home (body.page-home)
   — Páginas legales (body.page-legal)

   La frase de apertura `.editorial p.opening` adopta por defecto
   el valor para Encuentros / Gatherings (52 px desktop, 40 px mobile).
   Home lo sobrescribe vía `.page-home .editorial p.opening`.
   ============================================================ */

/* ─── Fuentes autohospedadas ────────────────────── */

@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/playfair-display-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/playfair-display-400-italic.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/assets/fonts/inter-300.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/inter-400.woff2') format('woff2');
}

/* ─── Variables ─────────────────────────────────── */

:root {
  --bg: #0F2A3A;
  --azur: #0040B8;
  --cream: #F7F6F2;
  --grey: #7A7A7A;
}

/* ─── Reset y base ──────────────────────────────── */

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

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--cream);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.4s ease, color 0.4s ease;
}

::selection {
  background: var(--azur);
  color: var(--cream);
}

/* ─── Header (común) ────────────────────────────── */

.site-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(20px, 4vw, 48px);
  padding: clamp(22px, 2.6vw, 32px) clamp(24px, 5vw, 80px);
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1;
  color: var(--cream);
}

.brand-mark {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 400;
  font-size: clamp(13px, 1.2vw, 16px);
  letter-spacing: 0.05em;
}

.brand-tag {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(9px, 0.78vw, 11px);
  margin-top: 4px;
  color: var(--cream);
  opacity: 0.65;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: clamp(22px, 2.8vw, 44px);
}

.site-nav a {
  font-family: 'Inter', sans-serif;
  font-size: clamp(11px, 0.82vw, 12.5px);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cream);
  opacity: 0.55;
}

.site-nav a:hover { opacity: 0.85; }
.site-nav a.active { opacity: 1; }

.lang {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: clamp(11px, 0.85vw, 13px);
  letter-spacing: 0.04em;
  justify-self: end;
}

.lang a {
  color: var(--grey);
  position: relative;
  padding-bottom: 4px;
}

.lang a.active { color: var(--cream); }

.lang a.active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 10px;
  height: 1px;
  background: var(--azur);
  transform: translateX(-50%);
}

.lang span {
  color: var(--grey);
  opacity: 0.4;
}

/* ─── Hero (sólo Home) ──────────────────────────── */

.hero {
  min-height: calc(100vh - 100px);
  min-height: calc(100dvh - 100px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(60px, 10vw, 120px) 24px;
  text-align: center;
}

.hero-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 400;
  font-size: clamp(64px, 9vw, 128px);
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--cream);
}

.hero-tag {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(18px, 1.6vw, 22px);
  margin-top: 18px;
  color: var(--cream);
  opacity: 0.85;
}

/* ─── Page heading (interiores y legales) ───────── */

.page-heading {
  max-width: 580px;
  margin: 0 auto;
  padding: clamp(80px, 12vw, 156px) clamp(24px, 5vw, 32px) clamp(48px, 7vw, 80px);
  text-align: left;
}

.page-heading h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 400;
  font-size: clamp(36px, 4.4vw, 48px);
  letter-spacing: -0.005em;
  line-height: 1.1;
  color: var(--cream);
}

/* ─── Editorial — base interior ─────────────────── */

.editorial {
  max-width: 580px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 48px) clamp(24px, 5vw, 32px) clamp(96px, 14vw, 180px);
  text-align: left;
}

.editorial p {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: clamp(16px, 1.15vw, 18px);
  line-height: 1.9;
  color: var(--cream);
  opacity: 0.85;
  margin-bottom: 36px;
}

.editorial p:last-child {
  margin-bottom: 0;
}

.editorial p.opening {
  margin-bottom: 52px;
}

/* ─── Home (body.page-home) ─────────────────────── */

.page-home .editorial {
  max-width: 540px;
  padding: clamp(56px, 9vw, 132px) clamp(24px, 5vw, 32px) clamp(80px, 14vw, 200px);
  text-align: center;
}

.page-home .editorial p {
  margin-bottom: 48px;
}

.page-home .editorial p.opening {
  margin-bottom: 88px;
}

.page-home .editorial p.closing-statement {
  margin-bottom: 64px;
}

.page-home .editorial p.lead-out {
  margin-bottom: 0;
  margin-top: 8px;
}

.page-home .editorial p.lead-out a {
  font-family: 'Inter', sans-serif;
  font-size: clamp(15px, 1.05vw, 17px);
  color: var(--cream);
  opacity: 0.85;
}

.page-home .editorial p.lead-out a:hover { opacity: 1; }

/* ─── Bloques de imagen (latentes hasta activación) ── */

.lemon-tree,
.gathering-image {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 32px) clamp(96px, 14vw, 180px);
}

.lemon-tree img,
.gathering-image img {
  display: block;
  width: 100%;
  height: auto;
}

/* ─── Extensiones para páginas legales (body.page-legal) ── */

.page-legal .editorial {
  padding-bottom: clamp(72px, 10vw, 128px);
}

.page-legal .editorial p {
  margin-bottom: 18px;
}

.page-legal .editorial h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 400;
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: 1.35;
  color: var(--cream);
  margin-top: clamp(28px, 4vw, 40px);
  margin-bottom: clamp(14px, 1.8vw, 20px);
}

.page-legal .editorial dl {
  margin: 24px 0 64px;
}

.page-legal .editorial dt {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: clamp(13px, 0.95vw, 14px);
  color: var(--grey);
  margin-bottom: 6px;
}

.page-legal .editorial dd {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: clamp(16px, 1.15vw, 18px);
  line-height: 1.7;
  color: var(--cream);
  opacity: 0.85;
  margin-bottom: 22px;
}

.page-legal .editorial dd:last-child {
  margin-bottom: 0;
}

.page-legal .editorial p a {
  text-decoration: underline;
  text-decoration-color: rgba(247, 246, 242, 0.3);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color 0.4s ease, opacity 0.4s ease;
}

.page-legal .editorial p a:hover {
  text-decoration-color: rgba(247, 246, 242, 0.7);
}

.page-legal .editorial ol {
  list-style: none;
  counter-reset: legal-counter;
  padding-left: 1.8em;
  margin: 0 0 18px;
}

.page-legal .editorial ol li {
  counter-increment: legal-counter;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: clamp(16px, 1.15vw, 18px);
  line-height: 1.9;
  color: var(--cream);
  opacity: 0.85;
  margin-bottom: 8px;
  position: relative;
}

.page-legal .editorial ol li::before {
  content: counter(legal-counter, lower-alpha) ")";
  position: absolute;
  left: -1.8em;
  color: var(--grey);
}

.page-legal .editorial ol li:last-child {
  margin-bottom: 0;
}

/* ─── Footer (común) ────────────────────────────── */

.site-footer {
  padding: clamp(56px, 6vw, 80px) clamp(24px, 5vw, 80px);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(40px, 8vw, 96px);
  align-items: end;
  font-family: 'Inter', sans-serif;
  font-size: clamp(11px, 0.8vw, 12.5px);
  color: var(--grey);
  letter-spacing: 0.03em;
  line-height: 1.7;
}

.footer-brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  color: var(--cream);
  opacity: 0.82;
  font-size: clamp(13px, 0.95vw, 14.5px);
  letter-spacing: 0.01em;
}

.footer-motto {
  margin-top: 6px;
  font-size: clamp(10.5px, 0.78vw, 11.5px);
  letter-spacing: 0.04em;
  color: var(--grey);
  opacity: 0.85;
}

.footer-meta-block { text-align: right; }

.footer-contact a {
  color: var(--cream);
  opacity: 0.8;
}

.footer-contact a:hover { opacity: 1; }

.footer-legal {
  display: flex;
  gap: 22px;
  margin-top: 12px;
  justify-content: flex-end;
}

.footer-legal a {
  color: var(--grey);
  opacity: 0.9;
}

.footer-legal a:hover {
  color: var(--cream);
  opacity: 1;
}

.footer-legal a.active {
  color: var(--cream);
  opacity: 1;
}

.footer-copy {
  margin-top: 16px;
  font-size: clamp(10px, 0.7vw, 11px);
  color: var(--grey);
  opacity: 0.55;
  letter-spacing: 0.04em;
}

/* ─── Responsive: tablet ────────────────────────── */

@media (max-width: 1024px) {
  .site-header { padding: 24px 32px; }

  .hero {
    min-height: calc(100vh - 120px);
    min-height: calc(100dvh - 120px);
  }

  .page-heading {
    padding: clamp(68px, 10vw, 120px) 32px clamp(40px, 6vw, 64px);
  }

  .editorial {
    padding: 32px 32px clamp(80px, 12vw, 140px);
  }

  .page-home .editorial {
    padding: clamp(56px, 8vw, 96px) 32px clamp(80px, 12vw, 140px);
  }

  .page-legal .editorial {
    padding-bottom: clamp(64px, 9vw, 96px);
  }

  .site-footer {
    padding: 56px 32px;
    gap: 48px;
  }
}

/* ─── Responsive: mobile ────────────────────────── */

@media (max-width: 720px) {
  .site-header {
    grid-template-columns: 1fr auto;
    gap: 14px;
    padding: 20px 24px 14px;
  }

  .site-nav {
    order: 3;
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 14px 20px;
    padding-top: 14px;
    margin-top: 4px;
  }

  .site-nav a { font-size: 11.5px; letter-spacing: 0.07em; }
  .lang { font-size: 12px; }
  .brand-mark { font-size: 14px; }
  .brand-tag { font-size: 10px; margin-top: 3px; }

  .hero {
    min-height: 72vh;
    min-height: 72dvh;
    padding: 80px 28px;
  }

  .hero-name { font-size: clamp(56px, 18vw, 84px); }
  .hero-tag { font-size: 17px; margin-top: 14px; }

  .page-heading {
    padding: 60px 28px 36px;
  }

  .page-heading h1 {
    font-size: clamp(32px, 8vw, 40px);
  }

  .editorial {
    padding: 24px 28px 80px;
    max-width: 520px;
  }

  .editorial p {
    font-size: 16px;
    line-height: 1.85;
    margin-bottom: 28px;
  }

  .editorial p.opening { margin-bottom: 40px; }

  .page-home .editorial {
    padding: 56px 28px 80px;
    max-width: 480px;
  }

  .page-home .editorial p {
    margin-bottom: 36px;
  }

  .page-home .editorial p.opening {
    font-size: 17.5px;
    margin-bottom: 64px;
  }

  .page-home .editorial p.closing-statement { margin-bottom: 48px; }

  .page-home .editorial p.lead-out a { font-size: 15.5px; }

  .page-legal .editorial {
    padding-bottom: 64px;
  }

  .page-legal .editorial p {
    margin-bottom: 16px;
  }

  .page-legal .editorial h2 {
    margin-top: 28px;
    margin-bottom: 16px;
  }

  .page-legal .editorial dl {
    margin: 20px 0 48px;
  }

  .page-legal .editorial dt {
    font-size: 12.5px;
  }

  .page-legal .editorial dd {
    margin-bottom: 20px;
  }

  .page-legal .editorial ol {
    margin-bottom: 16px;
  }

  .page-legal .editorial ol li {
    font-size: 16px;
    line-height: 1.85;
    margin-bottom: 6px;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 44px 24px;
    text-align: left;
  }

  .footer-meta-block { text-align: left; }

  .footer-legal {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 16px;
  }

  .footer-brand { font-size: 13px; }
  .footer-motto { font-size: 11px; }
}

/* ─── Responsive: small mobile ──────────────────── */

@media (max-width: 380px) {
  .site-header { padding: 18px 20px 12px; }
  .site-nav { gap: 12px 16px; }
  .site-nav a { font-size: 11px; letter-spacing: 0.07em; }

  .hero-name { font-size: clamp(48px, 16vw, 64px); }

  .page-heading { padding: 52px 22px 28px; }
  .page-heading h1 { font-size: 30px; }

  .editorial { padding: 20px 22px 64px; }
  .editorial p { font-size: 15.5px; }

  .page-home .editorial { padding: 44px 22px 64px; }

  .page-legal .editorial { padding-bottom: 52px; }
  .page-legal .editorial dd { font-size: 15.5px; }
  .page-legal .editorial ol li { font-size: 15.5px; }

  .site-footer { padding: 36px 20px; }
}

/* ─── Reduced motion ────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
