/* ===================================================
   juansacri.com — estilos globales
   v3.0 — MOBILE-FIRST · MODERNO · inspirado en el logo SACRI
   =================================================== */

:root {
  /* Paleta */
  --c-bg: #F7F4EE;          /* crema cálido */
  --c-bg-alt: #EFEAE0;      /* crema más oscuro */
  --c-ink: #1A1F1A;         /* tinta verdosa */
  --c-ink-soft: #4A4F4A;    /* texto secundario */
  --c-green: #2E8B5A;       /* verde Sacri */
  --c-green-dark: #1F6840;
  --c-lime: #B8D135;        /* lima del logo */
  --c-line: #E5DECF;        /* líneas suaves */
  --c-white: #FFFFFF;

  /* Gradientes (del logo) */
  --grad-net: linear-gradient(135deg, #1F6840 0%, #2E8B5A 55%, #B8D135 100%);
  --grad-net-soft: linear-gradient(135deg, rgba(31,104,64,0.08) 0%, rgba(184,209,53,0.08) 100%);

  /* Tipografía */
  --f-serif: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  --f-sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  /* Espaciado base (mobile) */
  --max-w: 1200px;
  --max-w-text: 720px;
  --pad: 1.25rem;
  --section-pad: 3rem;

  /* Radios — más redondeados, inspirados en los nodos del logo */
  --r-sm: 14px;
  --r-md: 22px;
  --r-lg: 32px;
  --r-xl: 48px;
  --r-pill: 999px;

  /* Sombras */
  --shadow-soft: 0 4px 24px rgba(26, 31, 26, 0.06);
  --shadow-hover: 0 12px 40px rgba(46, 139, 90, 0.18);
  --shadow-card: 0 2px 12px rgba(26, 31, 26, 0.04);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%; /* evita zoom automático en iOS */
  text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--f-sans);
  font-size: 16px;            /* base mobile: 16 evita zoom en iOS al focus inputs */
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;          /* previene scroll horizontal en móvil */
}
img, svg { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

/* ---------- Tipografía MOBILE-FIRST ---------- */
h1, h2, h3, h4 {
  font-family: var(--f-serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 8vw, 4.2rem); }
h2 { font-size: clamp(1.5rem, 5vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 3.5vw, 1.6rem); }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
.lead {
  font-size: clamp(1.05rem, 3vw, 1.25rem);
  color: var(--c-ink-soft);
  line-height: 1.5;
}
strong { color: var(--c-ink); font-weight: 600; }
blockquote {
  font-family: var(--f-serif);
  font-size: clamp(1.15rem, 4vw, 1.6rem);
  line-height: 1.4;
  font-style: italic;
  border-left: 3px solid var(--c-green);
  margin: 1.5rem 0;
  padding: 0.4rem 0 0.4rem 1rem;
  color: var(--c-ink);
}
blockquote cite {
  display: block;
  font-size: 0.85rem;
  font-style: normal;
  color: var(--c-ink-soft);
  margin-top: 0.6rem;
  font-family: var(--f-sans);
}

/* ---------- Layout ---------- */
.container, .container-text {
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--pad);
}
.container { max-width: var(--max-w); }
.container-text { max-width: var(--max-w-text); }
section { padding: var(--section-pad) 0; }
section.tight { padding: 2rem 0; }
.bg-alt { background: var(--c-bg-alt); }
.bg-green { background: var(--c-green); color: var(--c-white); }
.bg-green h2 { color: var(--c-white); }

/* ---------- Header / nav (MOBILE first) ---------- */
.site-header {
  position: sticky; top: 0;
  background: rgba(247, 244, 238, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  z-index: 100;
  transition: border-color 0.3s;
}
.site-header.scrolled { border-bottom-color: var(--c-line); }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem var(--pad);
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
}
.nav-logo {
  display: flex; align-items: center; gap: 0.5rem;
  flex-shrink: 0;
}
.nav-logo img { height: 38px; width: auto; max-width: 160px; object-fit: contain; }

.nav-toggle {
  display: block;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0.6rem;
  margin: -0.6rem;            /* aumenta hit area sin cambiar layout */
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--c-ink);
  margin: 5px 0;
  transition: 0.3s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-menu {
  display: none;
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--c-bg);
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0.5rem var(--pad) 1.5rem;
  gap: 0;
  border-bottom: 1px solid var(--c-line);
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}
.nav-menu.open { display: flex; }
.nav-menu a {
  display: block;
  padding: 0.9rem 0;          /* touch target ≥ 44px */
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--c-ink);
  border-bottom: 1px solid var(--c-line);
}
.nav-menu li:last-child a { border-bottom: 0; }
.nav-menu a.active { color: var(--c-green); }

/* Desktop nav */
@media (min-width: 820px) {
  .nav { padding: 1rem var(--pad); }
  .nav-logo img { height: 44px; max-width: 200px; }
  .nav-toggle { display: none; }
  .nav-menu {
    display: flex !important;
    position: static;
    flex-direction: row;
    background: transparent;
    padding: 0;
    gap: 2rem;
    border-bottom: 0;
    box-shadow: none;
  }
  .nav-menu a {
    padding: 0.3rem 0;
    border: 0;
    font-size: 0.95rem;
    color: var(--c-ink-soft);
    position: relative;
    transition: color 0.2s;
  }
  .nav-menu a:hover, .nav-menu a.active { color: var(--c-green); }
  .nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 2px;
    background: var(--c-green);
    transition: width 0.3s ease;
  }
  .nav-menu a:hover::after, .nav-menu a.active::after { width: 100%; }
}

/* ---------- Botones (MOBILE first — full width donde toque) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.5rem;     /* touch target ≥ 48px de alto */
  min-height: 48px;
  font-family: var(--f-sans);
  font-size: 1rem;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary { background: var(--c-green); color: var(--c-white); }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--c-green-dark); transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.btn-ghost { background: transparent; color: var(--c-ink); border-color: var(--c-ink); }
.btn-ghost:hover, .btn-ghost:focus-visible { background: var(--c-ink); color: var(--c-white); }
.btn-light { background: var(--c-white); color: var(--c-green-dark); }
.btn-light:hover { background: var(--c-bg-alt); }
.btn-arrow::after { content: '→'; transition: transform 0.25s; }
.btn-arrow:hover::after { transform: translateX(4px); }

/* ---------- Hero ---------- */
.hero {
  padding: 2.5rem 0 2rem;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: flex;
  flex-direction: column-reverse;  /* IMG arriba, texto abajo en móvil */
  gap: 2rem;
  align-items: stretch;
}
.hero h1 { margin-bottom: 1rem; }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, transparent 0%, transparent 60%, var(--c-lime) 60%, var(--c-lime) 100%);
  background-size: 100% 30%;
  background-repeat: no-repeat;
  background-position: 0 90%;
}
.hero-sub {
  font-size: clamp(1.05rem, 3.5vw, 1.2rem);
  color: var(--c-ink-soft);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}
.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.hero-cta .btn { width: 100%; }     /* full-width en móvil */
.hero-img-wrap {
  position: relative;
  border-radius: var(--r-lg);       /* esquinas más redondeadas, modernas */
  overflow: hidden;
  aspect-ratio: 1/1;                /* foto cuadrada (1024x936 aprox) */
  background: var(--c-bg-alt);
  max-width: 360px;
  margin: 0 auto;                   /* centrado en móvil */
  box-shadow: var(--shadow-card);
  isolation: isolate;
}
.hero-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 20%;       /* foco en cara, no recorta cabeza */
}
/* Halo lima decorativo detrás de la foto, evoca el círculo del logo */
.hero-img-wrap::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(46,139,90,0.18) 0%, rgba(184,209,53,0.18) 100%);
  z-index: -1;
}
.hero-img-wrap::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 70%, rgba(31, 104, 64, 0.08) 100%);
  pointer-events: none;
}

@media (min-width: 760px) {
  .hero { padding: 5rem 0 3rem; }
  .hero-grid {
    display: grid;
    flex-direction: unset;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
    align-items: center;
  }
  .hero-cta {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.8rem;
  }
  .hero-cta .btn { width: auto; }
  .hero-img-wrap { max-width: 480px; }
}
@media (min-width: 1100px) {
  .hero { padding: 6rem 0 4rem; }
  .hero-grid { gap: 4rem; }
}

/* ---------- Bloque manifiesto ---------- */
.manifesto {
  font-family: var(--f-serif);
  font-size: clamp(1.1rem, 3.2vw, 1.35rem);
  line-height: 1.55;
  max-width: 720px;
  margin: 0 auto;
}
.manifesto p:first-child {
  font-size: clamp(1.25rem, 4vw, 1.6rem);
  font-weight: 600;
  color: var(--c-green-dark);
  margin-bottom: 1.2rem;
}
.manifesto p { margin-bottom: 1.2rem; }

/* ---------- Grid de proyectos ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;        /* 1 col en móvil */
  gap: 1rem;
  margin-top: 2rem;
}
@media (min-width: 600px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
}
@media (min-width: 900px) {
  .projects-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 3rem; }
}
@media (min-width: 1200px) {
  .projects-grid { grid-template-columns: repeat(5, 1fr); gap: 1.4rem; }
}
.project-card {
  background: var(--c-white);
  border-radius: 16px;
  padding: 1.5rem 1.4rem;
  display: flex; flex-direction: column;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  border: 1px solid var(--c-line);
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}
@media (min-width: 600px) {
  .project-card { padding: 2rem 1.6rem; }
}
.project-card:active { transform: scale(0.98); }
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--c-green); }
.project-card .logo-mark {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--c-bg-alt);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-serif); font-weight: 700; font-size: 1.2rem;
  color: var(--c-green-dark);
  margin-bottom: 1rem;
}
@media (min-width: 600px) {
  .project-card .logo-mark { width: 56px; height: 56px; font-size: 1.4rem; margin-bottom: 1.2rem; }
}
.project-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.project-card p { font-size: 0.95rem; color: var(--c-ink-soft); flex: 1; margin-bottom: 0.8rem; }
.project-card .arrow {
  margin-top: auto;
  color: var(--c-green);
  font-weight: 500;
  font-size: 0.9rem;
  display: inline-flex; gap: 0.4rem; align-items: center;
}

/* ---------- Cita destacada ---------- */
.quote-feature {
  background: var(--c-green);
  color: var(--c-white);
  padding: 3rem 0;
  text-align: center;
}
@media (min-width: 760px) {
  .quote-feature { padding: 5rem 0; }
}
.quote-feature blockquote {
  border: 0;
  font-size: clamp(1.15rem, 4.5vw, 2.4rem);
  line-height: 1.35;
  max-width: 900px;
  margin: 0 auto;
  color: var(--c-white);
  padding: 0 var(--pad);
  font-style: normal;
  font-weight: 500;
}
.quote-feature cite { color: rgba(255, 255, 255, 0.75); margin-top: 1rem; font-size: 0.9rem; }

/* ---------- Lista posts ---------- */
.post-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2rem;
}
@media (min-width: 600px) {
  .post-list { grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
}
@media (min-width: 900px) {
  .post-list { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 3rem; }
}
.post-card {
  background: var(--c-white);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--c-line);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex; flex-direction: column;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); }
.post-card .thumb {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--c-green) 0%, var(--c-lime) 100%);
  display: flex; align-items: center; justify-content: center;
  color: var(--c-white);
  font-family: var(--f-serif);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  padding: 0.5rem;
}
.post-card .body { padding: 1.2rem; flex: 1; display: flex; flex-direction: column; }
@media (min-width: 600px) { .post-card .body { padding: 1.5rem; } }
.post-card .meta {
  font-size: 0.78rem;
  color: var(--c-ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.post-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  flex: 1;
}
.post-card .read-more {
  color: var(--c-green);
  font-weight: 500;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Post destacado del blog */
.post-card.featured { display: flex; flex-direction: column; margin-bottom: 2rem; }
.post-card.featured .featured-thumb { aspect-ratio: 16/9; min-height: 180px; font-size: 0.9rem; }
.post-card.featured .featured-body h3 { font-size: 1.25rem; }
@media (min-width: 760px) {
  .post-card.featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    margin-bottom: 2.5rem;
  }
  .post-card.featured .featured-thumb { aspect-ratio: auto; min-height: 300px; font-size: 1rem; }
  .post-card.featured .featured-body { padding: 2.5rem; }
  .post-card.featured .featured-body h3 { font-size: 1.6rem; }
}

/* ---------- Newsletter ---------- */
.newsletter {
  background: var(--c-ink);
  color: var(--c-white);
  padding: 3rem 0;
  text-align: center;
}
@media (min-width: 760px) {
  .newsletter { padding: 5rem 0; }
}
.newsletter h2 { color: var(--c-white); }
.newsletter p {
  color: rgba(255, 255, 255, 0.75);
  max-width: 560px;
  margin: 0 auto 1.5rem;
  padding: 0 var(--pad);
}
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 var(--pad);
}
.newsletter-form input {
  width: 100%;
  padding: 0.9rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: var(--c-white);
  font-family: inherit;
  font-size: 16px;            /* 16px evita zoom en iOS */
  min-height: 48px;
}
.newsletter-form input::placeholder { color: rgba(255, 255, 255, 0.5); }
.newsletter-form .btn { width: 100%; }
@media (min-width: 540px) {
  .newsletter-form {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  .newsletter-form input { flex: 1; min-width: 240px; width: auto; }
  .newsletter-form .btn { width: auto; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-ink);
  color: rgba(255, 255, 255, 0.75);
  padding: 3rem 0 2rem;
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (min-width: 540px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 3rem; } }
.footer-grid h4 {
  color: var(--c-white);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.8rem;
  font-family: var(--f-sans);
  font-weight: 600;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 0.5rem; }
.footer-grid a {
  display: inline-block;
  padding: 0.2rem 0;          /* hit area un pelín mayor */
}
.footer-grid a:hover { color: var(--c-lime); }
.footer-tagline {
  font-family: var(--f-serif);
  font-size: 1.05rem;
  color: var(--c-white);
  line-height: 1.4;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
}
@media (min-width: 540px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
  }
}

/* ---------- Sobre mí — capítulos ---------- */
.chapter {
  max-width: var(--max-w-text);
  margin: 0 auto;
  padding: 2rem var(--pad);
  border-bottom: 1px solid var(--c-line);
}
@media (min-width: 760px) { .chapter { padding: 3rem var(--pad); } }
.chapter:last-child { border-bottom: 0; }
.chapter-num {
  font-family: var(--f-serif);
  font-size: 0.85rem;
  color: var(--c-green);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.chapter h2 {
  font-size: clamp(1.4rem, 4.5vw, 2.2rem);
  margin-bottom: 1.2rem;
}
.chapter p {
  font-size: clamp(1rem, 2.6vw, 1.1rem);
  line-height: 1.65;
}

/* ---------- Proyecto ficha ---------- */
.project-hero { padding: 3rem 0 2rem; }
@media (min-width: 760px) { .project-hero { padding: 5rem 0 3rem; } }
.project-hero .breadcrumb {
  font-size: 0.8rem;
  color: var(--c-ink-soft);
  margin-bottom: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.project-hero h1 { margin-bottom: 1rem; }
.project-hero .manifesto-line {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(1.15rem, 3.5vw, 1.5rem);
  color: var(--c-green-dark);
  border-left: 3px solid var(--c-green);
  padding-left: 1rem;
  margin: 1.2rem 0 0;
}

.project-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
  padding: 2rem 0;
  border-top: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
}
@media (min-width: 760px) {
  .project-stats {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
    padding: 2.5rem 0;
  }
}
.project-stats .stat { text-align: center; }
.project-stats .stat-num {
  font-family: var(--f-serif);
  font-size: clamp(2rem, 7vw, 3rem);
  font-weight: 600;
  color: var(--c-green);
  line-height: 1;
  display: block;
  margin-bottom: 0.4rem;
}
.project-stats .stat-label {
  color: var(--c-ink-soft);
  font-size: 0.9rem;
  line-height: 1.3;
}

/* ---------- Páginas internas — hero ---------- */
.page-hero {
  padding: 3rem 0 1.5rem;
  border-bottom: 1px solid var(--c-line);
}
@media (min-width: 760px) {
  .page-hero { padding: 5rem 0 2rem; }
}
.page-hero .eyebrow {
  font-size: 0.8rem;
  color: var(--c-green);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
  font-weight: 500;
  display: block;
}
.page-hero p.lead { max-width: 600px; }

/* ---------- Tabla prensa ---------- */
.press-list { list-style: none; padding: 0; margin: 0; }
.press-item {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 1rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--c-line);
  align-items: start;
}
@media (min-width: 760px) {
  .press-item {
    grid-template-columns: 80px 1fr auto;
    gap: 2rem;
    padding: 1.5rem 0;
    align-items: center;
  }
}
.press-item .year {
  font-family: var(--f-serif);
  font-size: 1.2rem;
  color: var(--c-green);
}
@media (min-width: 760px) { .press-item .year { font-size: 1.4rem; } }
.press-item .meta {
  font-size: 0.78rem;
  color: var(--c-ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}
.press-item h3 {
  font-size: 1rem;
  margin: 0;
  font-weight: 500;
  line-height: 1.4;
}
@media (min-width: 760px) { .press-item h3 { font-size: 1.1rem; } }
.press-item .arrow-link {
  color: var(--c-green);
  font-size: 1.4rem;
  display: none;              /* oculto en móvil, el h3 ya es link */
}
@media (min-width: 760px) {
  .press-item .arrow-link { display: inline; font-size: 1.5rem; }
}

/* ---------- Ponencias — talks ---------- */
.talks-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  margin-top: 2rem;
}
@media (min-width: 700px) {
  .talks-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; margin-top: 3rem; }
}
.talk-card {
  background: var(--c-white);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--c-line);
}
@media (min-width: 700px) { .talk-card { padding: 2rem; } }
.talk-card .num {
  font-family: var(--f-serif);
  font-size: 0.8rem;
  color: var(--c-green);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.talk-card h3 { font-size: 1.15rem; margin-bottom: 0.7rem; }
.talk-card .duration {
  font-size: 0.85rem;
  color: var(--c-ink-soft);
  margin-bottom: 1rem;
}
.talk-card .audience {
  font-size: 0.9rem;
  color: var(--c-ink);
  border-top: 1px solid var(--c-line);
  padding-top: 1rem;
}

/* ---------- Form ---------- */
.contact-form {
  display: grid; gap: 1rem;
  max-width: 600px;
}
.contact-form label {
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  display: block;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--c-line);
  background: var(--c-white);
  font-family: inherit;
  font-size: 16px;            /* 16px evita zoom en iOS */
  min-height: 48px;
}
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  outline: 2px solid var(--c-green);
  border-color: var(--c-green);
}
.contact-form button { width: 100%; }
@media (min-width: 540px) {
  .contact-form button { width: auto; }
}

.contact-tiles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
  margin: 1.5rem 0 2rem;
}
@media (min-width: 540px) {
  .contact-tiles {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 2rem 0 3rem;
  }
}
.contact-tile {
  background: var(--c-white);
  border: 1px solid var(--c-line);
  padding: 1.2rem;
  border-radius: 12px;
  text-align: center;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}
@media (min-width: 540px) { .contact-tile { padding: 1.5rem; } }
.contact-tile:hover { border-color: var(--c-green); transform: translateY(-2px); }
.contact-tile:active { transform: scale(0.98); }
.contact-tile .icon {
  width: 44px; height: 44px;
  background: var(--c-bg-alt);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 0.7rem;
  color: var(--c-green);
  font-size: 1.4rem;
}
.contact-tile h4 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
  font-family: var(--f-sans);
}
.contact-tile p {
  font-size: 0.88rem;
  color: var(--c-ink-soft);
  margin: 0;
}

/* ---------- Article ---------- */
.article-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--pad);
}
.article-body h2 {
  margin-top: 2rem;
  font-size: clamp(1.3rem, 4vw, 1.8rem);
}
.article-body p {
  font-size: clamp(1rem, 2.8vw, 1.15rem);
  line-height: 1.7;
}
.article-meta {
  display: flex;
  gap: 0.8rem 1.2rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--c-ink-soft);
  margin-bottom: 1.5rem;
}
.article-meta .tag {
  background: var(--c-bg-alt);
  color: var(--c-green-dark);
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-weight: 500;
}

/* ---------- Logos provisionales ---------- */
.logo-svg-placeholder {
  background: linear-gradient(135deg, var(--c-green) 0%, var(--c-lime) 100%);
  color: var(--c-white);
  font-family: var(--f-serif);
  font-weight: 700;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Accesibilidad — focus visible */
:focus-visible {
  outline: 3px solid var(--c-lime);
  outline-offset: 2px;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ===================================================
   MODAL / POPUP de proyectos
   =================================================== */

/* El project-card cuando es un <button> debe verse igual que un <a> */
button.project-card {
  font: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
  font-family: var(--f-sans);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 31, 26, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  overflow-y: auto;
}
.modal-overlay[hidden] { display: none; }
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--c-bg);
  border-radius: var(--r-lg);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 30px 80px rgba(26, 31, 26, 0.35);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.3s ease;
  -webkit-overflow-scrolling: touch;
}
.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

/* Botón cerrar */
.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 0;
  background: var(--c-bg-alt);
  color: var(--c-ink);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.2s, transform 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.modal-close:hover { background: var(--c-line); transform: rotate(90deg); }
.modal-close:focus-visible { outline: 3px solid var(--c-lime); outline-offset: 2px; }

/* Navegación entre proyectos */
.modal-nav {
  position: sticky;
  top: 0;
  background: var(--c-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 4rem 0.8rem 1.2rem;     /* 4rem derecha para no chocar con el botón cerrar */
  border-bottom: 1px solid var(--c-line);
  z-index: 1;
}
.modal-prev, .modal-next {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--c-line);
  background: transparent;
  color: var(--c-ink);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.modal-prev:hover, .modal-next:hover {
  background: var(--c-green);
  color: var(--c-white);
  border-color: var(--c-green);
}
.modal-prev:focus-visible, .modal-next:focus-visible { outline: 3px solid var(--c-lime); outline-offset: 2px; }
.modal-counter {
  font-size: 0.85rem;
  color: var(--c-ink-soft);
  font-family: var(--f-serif);
  letter-spacing: 0.05em;
}

/* Contenido del modal */
.modal-content { padding: 2rem 1.5rem; }
@media (min-width: 600px) { .modal-content { padding: 2.5rem 2.5rem; } }

.modal-body .modal-eyebrow {
  font-size: 0.78rem;
  color: var(--c-ink-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}
.modal-body h2 {
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  margin-bottom: 0.8rem;
}
.modal-body h3 {
  font-size: 1.15rem;
  margin-top: 1.8rem;
  margin-bottom: 0.6rem;
}
.modal-body p { font-size: 1rem; line-height: 1.65; }
.modal-body .manifesto-line {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(1.1rem, 3vw, 1.3rem);
  color: var(--c-green-dark);
  border-left: 3px solid var(--c-green);
  padding-left: 1rem;
  margin: 1rem 0 1.5rem;
}
.modal-body .project-stats {
  margin: 2rem 0;
  padding: 1.5rem 0;
  grid-template-columns: repeat(2, 1fr);
}
.modal-body .stat-num {
  font-size: clamp(1.6rem, 5vw, 2.2rem);
}
.modal-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.8rem;
}

/* Cuando el modal está abierto, bloquea scroll del body */
body.modal-open { overflow: hidden; }


/* ============================================================
   COOKIE BANNER  (RGPD / LSSI)
   ============================================================ */
.cookie-banner{position:fixed;left:1rem;right:1rem;bottom:1rem;z-index:9000;background:var(--c-ink, #1a1a1a);color:#fff;border-radius:var(--r-lg,18px);box-shadow:0 20px 60px rgba(0,0,0,.25);padding:1.1rem 1.3rem;animation:cookieIn .35s ease both;max-width:980px;margin:0 auto}
.cookie-banner--hide{animation:cookieOut .25s ease both}
.cookie-banner__inner{display:flex;flex-direction:column;gap:.9rem;align-items:flex-start}
.cookie-banner__text{font-size:.92rem;line-height:1.55;color:#eaeaea}
.cookie-banner__text strong{color:#fff}
.cookie-banner__text a{color:var(--c-lime,#B8D135);text-decoration:underline;text-underline-offset:3px}
.cookie-banner__actions{display:flex;gap:.6rem;flex-wrap:wrap;width:100%;justify-content:flex-end}
.cookie-banner__actions .btn{padding:.55rem 1.1rem;font-size:.88rem;border-radius:999px}
.cookie-banner__actions .cookie-reject{background:transparent;color:#fff;border:1px solid rgba(255,255,255,.4)}
.cookie-banner__actions .cookie-reject:hover{background:rgba(255,255,255,.08)}
@media (min-width:720px){
  .cookie-banner__inner{flex-direction:row;align-items:center;justify-content:space-between;gap:1.5rem}
  .cookie-banner__actions{width:auto}
}
@keyframes cookieIn{from{transform:translateY(120%);opacity:0}to{transform:translateY(0);opacity:1}}
@keyframes cookieOut{to{transform:translateY(120%);opacity:0}}

/* ============================================================
   NEWSLETTER — Sticky tab + Modal
   (estilo flowenergia.es)
   ============================================================ */
.newsletter-tab{position:fixed;right:0;top:50%;transform:translateY(-50%);z-index:8000;background:var(--c-green,#5b8a3c);color:#fff;border:0;border-radius:14px 0 0 14px;padding:1.1rem .55rem;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:.65rem;box-shadow:-4px 6px 20px rgba(0,0,0,.18);font-family:inherit;transition:transform .2s ease, background .2s ease}
.newsletter-tab:hover{background:var(--c-green-dark,#456b2c);transform:translateY(-50%) translateX(-3px)}
.newsletter-tab__text{writing-mode:vertical-rl;transform:rotate(180deg);font-size:.78rem;font-weight:600;letter-spacing:.04em;text-transform:none}
.newsletter-tab__icon{display:block}
@media (max-width:520px){
  .newsletter-tab{padding:.85rem .45rem}
  .newsletter-tab__text{font-size:.72rem}
}

.newsletter-modal-overlay{position:fixed;inset:0;background:rgba(20,20,20,.55);z-index:9100;display:flex;align-items:center;justify-content:center;padding:1rem;opacity:0;transition:opacity .25s ease}
.newsletter-modal-overlay.open{opacity:1}
.newsletter-modal-overlay[hidden]{display:none}
.newsletter-modal{background:#fff;border-radius:var(--r-xl,22px);max-width:480px;width:100%;max-height:92vh;overflow:auto;padding:2.4rem 2rem 2rem;position:relative;text-align:center;box-shadow:0 30px 80px rgba(0,0,0,.3);transform:scale(.96);transition:transform .25s ease}
.newsletter-modal-overlay.open .newsletter-modal{transform:scale(1)}
.newsletter-modal__close{position:absolute;top:.7rem;right:.9rem;background:transparent;border:0;font-size:1.7rem;line-height:1;cursor:pointer;color:var(--c-ink-soft,#666);padding:.2rem .5rem}
.newsletter-modal__close:hover{color:var(--c-ink,#111)}
.newsletter-modal__icon{width:74px;height:74px;border-radius:50%;background:var(--c-lime-soft,#ECF4D2);color:var(--c-green,#5b8a3c);display:flex;align-items:center;justify-content:center;margin:0 auto 1.2rem}
.newsletter-modal h2{font-family:var(--f-serif);font-size:1.5rem;margin:0 0 .6rem;color:var(--c-ink,#111)}
.newsletter-modal__sub{color:var(--c-ink-soft,#666);font-size:.95rem;margin:0 0 1.6rem;line-height:1.55}
.newsletter-modal__form{display:flex;flex-direction:column;gap:.9rem;text-align:left}
.newsletter-modal__form label{display:flex;flex-direction:column;font-size:.85rem;color:var(--c-ink-soft,#555);font-weight:500;gap:.35rem}
.newsletter-modal__form .req{color:#c0392b}
.newsletter-modal__form input[type="text"],
.newsletter-modal__form input[type="email"]{padding:.75rem .95rem;border:1px solid var(--c-line,#dadada);border-radius:10px;font-size:.95rem;font-family:inherit;background:#fff;transition:border-color .15s ease}
.newsletter-modal__form input[type="text"]:focus,
.newsletter-modal__form input[type="email"]:focus{outline:none;border-color:var(--c-green,#5b8a3c)}
.newsletter-modal__legal{font-size:.78rem;color:var(--c-ink-soft,#666);line-height:1.5;margin:.4rem 0 .2rem}
.newsletter-modal__legal a{color:var(--c-green,#5b8a3c);text-decoration:underline;text-underline-offset:2px}
.newsletter-modal__check{flex-direction:row !important;align-items:flex-start;gap:.55rem !important;font-size:.78rem;color:var(--c-ink-soft,#555);font-weight:400 !important;line-height:1.45}
.newsletter-modal__check input[type="checkbox"]{margin-top:.18rem;flex-shrink:0;accent-color:var(--c-green,#5b8a3c)}
.newsletter-modal__check a{color:var(--c-green,#5b8a3c);text-decoration:underline;text-underline-offset:2px}
.newsletter-modal__cta{margin-top:.6rem;padding:.95rem 1.4rem;font-size:.95rem;font-weight:600;letter-spacing:.02em;text-transform:uppercase;border-radius:999px}

/* ============================================================
   LANGUAGE SWITCHER  (estilo Flow Energía)
   ============================================================ */
.lang-switch{display:flex;align-items:center;gap:.4rem;margin-left:1rem}
.lang-switch a{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%;border:2px solid var(--c-line,#dadada);background:#fff;font-size:.7rem;font-weight:600;color:var(--c-ink,#333);text-decoration:none;transition:all .15s ease;overflow:hidden;line-height:1}
.lang-switch a:hover{border-color:var(--c-green,#5b8a3c);transform:scale(1.08)}
.lang-switch a.is-active{border-color:var(--c-green,#5b8a3c);background:var(--c-green,#5b8a3c);color:#fff}
.lang-switch a span{display:block;font-size:.65rem;letter-spacing:.02em}
@media (max-width:720px){
  .lang-switch{order:3;margin-left:auto;margin-right:.5rem}
  .lang-switch a{width:26px;height:26px}
}
