/* =========================================================
   PAIDEIA STUDIO — Rediseño
   Base: Poppins · Verde #7dc22b · Off-white cálido
   ========================================================= */

:root {
  --green: #7dc22b;
  --green-dark: #5e9520;
  --green-deep: #3d6614;
  --green-tint: #eef6dd;
  --green-wash: #f6faec;

  --ink: #161613;
  --ink-2: #2c2c27;
  --ink-3: #6a6a62;
  --ink-4: #a8a89e;

  --bg: #fbfaf5;
  --bg-alt: #f4f1e7;
  --bg-deep: #ece8da;
  --paper: #ffffff;

  --line: rgba(22, 22, 19, 0.12);
  --line-soft: rgba(22, 22, 19, 0.06);
  --line-strong: rgba(22, 22, 19, 0.24);

  /* "inverse" surface used by experience / hosting-band / footer / dark card.
     Stays dark in both themes for visual rhythm. */
  --inverse-bg: #161613;
  --inverse-fg: #fbfaf5;
  --inverse-line: rgba(255,255,255,0.12);
  --inverse-line-strong: rgba(255,255,255,0.18);
  --inverse-muted: rgba(255,255,255,0.6);
  --inverse-faint: rgba(255,255,255,0.45);

  /* glass blur for sticky nav */
  --nav-glass: rgba(251, 250, 245, 0.92);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;

  --max: 1280px;
  --gutter: clamp(20px, 4vw, 56px);

  --serif: "Fraunces", "Source Serif Pro", Georgia, serif;
  --sans: "Poppins", system-ui, sans-serif;
}

[data-theme="dark"] {
  --green-dark: #a3df60;
  --green-deep: #c5ed8c;
  --green-tint: rgba(125, 194, 43, 0.18);
  --green-wash: rgba(125, 194, 43, 0.06);

  --ink: #f5f3ea;
  --ink-2: #d6d3c8;
  --ink-3: #93908a;
  --ink-4: #5e5b56;

  --bg: #0d0d0b;
  --bg-alt: #181612;
  --bg-deep: #1f1d18;
  --paper: #1a1814;

  --line: rgba(245, 243, 234, 0.10);
  --line-soft: rgba(245, 243, 234, 0.05);
  --line-strong: rgba(245, 243, 234, 0.22);

  /* In dark mode, push the inverse sections almost-black for subtle rhythm */
  --inverse-bg: #050504;
  --inverse-fg: #f5f3ea;

  --nav-glass: rgba(13, 13, 11, 0.88);
}

/* Theme transition (only after first frame to avoid initial flash) */
.theme-ready, .theme-ready * {
  transition: background-color .35s ease, border-color .35s ease, color .35s ease, fill .35s ease, stroke .35s ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ---------- Container ---------- */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Top banner ---------- */
.banner {
  background: var(--inverse-bg);
  color: var(--inverse-fg);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.02em;
}
.banner .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  gap: 24px;
}
.banner .promo b { color: var(--green); font-weight: 600; }
.banner .meta {
  display: flex; gap: 22px;
  color: rgba(255,255,255,0.7);
}
.banner .meta a { transition: color .2s; }
.banner .meta a:hover { color: var(--green); }
@media (max-width: 720px) {
  .banner .meta { display: none; }
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav .wrap {
  display: flex; align-items: center; gap: 14px;
  min-height: 78px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0;
}
.brand img { height: 38px; width: auto; }
.nav-links {
  display: flex; gap: 13px; align-items: center;
  font-size: 12.5px; font-weight: 500;
  margin-left: 2px;
}
.nav-links a {
  position: relative;
  padding: 8px 0;
  color: var(--ink-2);
  transition: color .15s;
}
.nav-links a:hover { color: var(--green-dark); }
.nav-links a.has-sub {
  display: inline-flex;
  align-items: center;
}
.nav-links a.has-sub::after {
  content: "";
  flex: none;
  width: 6px; height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-left: 6px;
  margin-top: -3px;
  opacity: 0.5;
}
.nav-actions {
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
  font-size: 13px;
}
.nav-actions > .btn-primary { padding: 9px 15px; }
.ext-arrow { font-size: 12px; color: var(--green-dark); font-weight: 600; }
.nav-icon {
  width: 33px; height: 33px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  background: var(--paper);
  color: var(--ink);
  transition: all .2s;
}
.nav-icon svg { stroke: currentColor; }
.nav-icon:hover { border-color: var(--green); color: var(--green-dark); }
.btn-burger {
  display: none;
  width: 40px; height: 40px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
}
.nav-links a.nav-cta-mobile { display: none; }
@media (max-width: 1100px) {
  .nav-links { display: none; }
  .btn-burger { display: grid; place-items: center; }
  .nav-links.nav-open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: calc(100% + 1px); left: 0; right: 0;
    background: var(--nav-glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line); padding: 14px 24px 22px; gap: 4px;
    box-shadow: 0 24px 40px -28px rgba(0,0,0,0.4); z-index: 70;
  }
  .nav-links.nav-open > a,
  .nav-links.nav-open .has-dropdown > a { padding: 12px 4px; border-bottom: 1px solid var(--line-soft); }
  .nav-links.nav-open .dropdown {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; padding: 4px 0 8px; min-width: 0;
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .nav-links.nav-open .has-dropdown.open .dropdown { max-height: 600px; }
  .nav-links.nav-open .dropdown::before { display: none; }
  .nav-actions .btn-primary { display: none; }
  .nav-links.nav-open .nav-cta-mobile {
    display: inline-flex; width: 100%; justify-content: center;
    padding: 14px 22px; margin-top: 12px; border-bottom: 0;
    color: var(--bg);
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: all .25s cubic-bezier(.2,.7,.2,1);
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover { background: var(--green-deep); transform: translateY(-1px); }
.btn-green {
  background: var(--green);
  color: var(--ink);
}
.btn-green:hover { background: var(--green-dark); color: var(--bg); }
.btn-ghost {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--bg); }
.btn .arrow {
  width: 14px; height: 14px; flex-shrink: 0;
  transition: transform .2s;
}
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Section base ---------- */
section {
  position: relative;
  padding: clamp(72px, 10vw, 130px) 0;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--green-dark);
}
.eyebrow::before {
  content: ""; width: 28px; height: 1px; background: var(--green);
}
h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-wrap: balance;
}
.display {
  font-size: clamp(40px, 5.4vw, 72px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.0;
}
.display .accent {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--green-dark);
}
h2 {
  font-size: clamp(32px, 4.5vw, 58px);
  letter-spacing: -0.025em;
  line-height: 1.02;
}
h3 { font-size: clamp(20px, 1.8vw, 26px); }
p { margin: 0 0 1em; color: var(--ink-2); }
.lead { font-size: clamp(17px, 1.4vw, 20px); color: var(--ink-2); font-weight: 300; line-height: 1.55; }

/* ---------- Universal line-art utilities ---------- */
.line-bg {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.line-bg svg {
  position: absolute;
  stroke: var(--ink);
  fill: none;
  stroke-width: 1;
  opacity: 0.5;
}
.content { position: relative; z-index: 1; }

/* dotted grid background (academic feeling) */
.dotgrid {
  background-image: radial-gradient(circle, rgba(22,22,19,0.15) 1px, transparent 1.2px);
  background-size: 28px 28px;
}

/* ---------- HERO ---------- */
.hero {
  padding-top: clamp(60px, 8vw, 110px);
  padding-bottom: clamp(60px, 8vw, 110px);
  background: var(--bg);
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  position: relative;
}
.hero-copy { position: relative; z-index: 2; }
.hero h1 { margin-top: 22px; }
.hero h1 .underline {
  position: relative;
  display: inline-block;
}
.hero h1 .underline::after {
  content: "";
  position: absolute;
  left: -2%; right: -2%;
  bottom: 0.05em;
  height: 0.35em;
  background: var(--green);
  z-index: -1;
  opacity: 0.55;
}
.hero p.lead {
  margin: 28px 0 36px;
  max-width: 540px;
}
.hero-cta {
  display: flex; flex-wrap: wrap; gap: 14px;
  margin-bottom: 50px;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  max-width: 560px;
}
.hero-stats .n {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: block;
  line-height: 1;
}
.hero-stats .n sup { color: var(--green-dark); font-size: 0.55em; vertical-align: top; }
.hero-stats .l {
  font-size: 12px; color: var(--ink-3);
  margin-top: 8px; line-height: 1.4;
  display: block;
}

.hero-art {
  position: relative;
  aspect-ratio: 1 / 1.02;
  min-height: 420px;
}
.hero-art svg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  overflow: visible;
}

@media (max-width: 880px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { min-height: 360px; max-width: 480px; margin: 0 auto; }
}

/* ---------- Marquee / trust strip ---------- */
.trust {
  padding: 56px 0 68px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg);
  overflow: hidden;
}
.trust-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.trust-head .title {
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 500;
  letter-spacing: -0.01em;
  max-width: 520px;
}
.trust-head .title b { color: var(--green-dark); font-weight: 600; }
.trust-head .rating {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; color: var(--ink-3);
}
.stars { color: var(--green-dark); letter-spacing: 2px; font-size: 16px; }

.marquee {
  position: relative;
  mask-image: linear-gradient(90deg, transparent 0, #000 80px, #000 calc(100% - 80px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 80px, #000 calc(100% - 80px), transparent 100%);
}
.marquee-track {
  display: flex;
  gap: 60px;
  animation: scroll 50s linear infinite;
  width: max-content;
}
.marquee-item {
  font-family: var(--serif);
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 400;
  font-style: italic;
  color: var(--ink-3);
  white-space: nowrap;
  display: flex; align-items: center; gap: 60px;
}
.marquee-item::after {
  content: "✦";
  color: var(--green);
  font-style: normal;
  font-size: 0.6em;
}
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- About / Visión ---------- */
.about { background: var(--bg-alt); overflow: hidden; }
.about .wrap { position: relative; }
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(40px, 6vw, 90px);
  align-items: start;
}
.about-left .eyebrow { margin-bottom: 28px; }
.about-left h2 { margin-bottom: 30px; }
.about-left h2 em {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  color: var(--green-dark);
}
.about-right { padding-top: clamp(40px, 7vw, 90px); }
.pillar {
  padding: 32px 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 30px;
}
.pillar:last-child { border-bottom: 1px solid var(--line); }
.pillar .num {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: 14px;
  color: var(--green-dark);
  letter-spacing: 0.04em;
  padding-top: 4px;
}
.pillar h3 { margin-bottom: 12px; font-weight: 500; letter-spacing: -0.015em; }
.pillar p { margin: 0; color: var(--ink-3); font-size: 15px; }

@media (max-width: 880px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-right { padding-top: 0; }
  .pillar { grid-template-columns: 1fr; gap: 8px; }
}

/* ---------- Services ---------- */
.services { background: var(--bg); }
.services-head {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 60px;
  margin-bottom: 70px;
  align-items: end;
}
.services-head .eyebrow { margin-bottom: 22px; }
.services-head h2 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--green-dark);
}
.services-head .right { padding-bottom: 8px; color: var(--ink-3); font-size: 16px; max-width: 380px; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.svc {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 40px 36px 48px;
  background: var(--bg);
  position: relative;
  transition: background .3s;
  display: flex; flex-direction: column;
  min-height: 360px;
}
.svc:hover { background: var(--green-wash); }
.svc-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-4);
  margin-bottom: 26px;
}
.svc-icon {
  width: 76px; height: 76px;
  margin-bottom: 22px;
  color: var(--ink);
  transition: color .3s;
}
.svc:hover .svc-icon { color: var(--green-dark); }
.svc-icon svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 1.2; }
.svc h3 { margin-bottom: 10px; font-weight: 500; font-size: 22px; }
.svc p { font-size: 14px; color: var(--ink-3); margin: 0 0 22px; }
.svc-link {
  margin-top: auto;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  display: inline-flex; align-items: center; gap: 8px;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  align-self: flex-start;
}
.svc:hover .svc-link { border-bottom-color: var(--green-dark); color: var(--green-dark); }
@media (max-width: 980px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .services-grid { grid-template-columns: 1fr; }
  .services-head { grid-template-columns: 1fr; gap: 24px; }
}

/* ---------- Experience timeline ---------- */
.experience {
  background: var(--inverse-bg);
  color: var(--inverse-fg);
  overflow: hidden;
}
.experience .eyebrow { color: var(--green); }
.experience .eyebrow::before { background: var(--green); }
.experience h2 { color: var(--inverse-fg); max-width: 800px; margin-bottom: 60px; }
.experience h2 em { font-family: var(--serif); font-style: italic; color: var(--green); font-weight: 400; }

.timeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border-top: 1px solid rgba(255,255,255,0.18);
}
.tl {
  padding: 32px 24px 36px;
  border-right: 1px solid rgba(255,255,255,0.12);
  position: relative;
}
.tl:last-child { border-right: 0; }
.tl .year {
  font-family: var(--serif);
  font-style: italic;
  color: var(--green);
  font-size: 13px;
  margin-bottom: 18px;
}
.tl .ico {
  width: 44px; height: 44px;
  margin-bottom: 60px;
  color: var(--green);
}
.tl .ico svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 1.2; }
.tl h4 {
  font-size: 16px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  margin-bottom: 12px;
}
.tl p { font-size: 13px; color: rgba(255,255,255,0.6); line-height: 1.5; margin: 0; }

@media (max-width: 980px) {
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .tl { border-bottom: 1px solid rgba(255,255,255,0.12); }
  .tl:nth-child(even) { border-right: 0; }
  .tl .ico { margin-bottom: 28px; }
}
@media (max-width: 540px) {
  .timeline { grid-template-columns: 1fr; }
  .tl { border-right: 0; }
}

/* ---------- Featured (Crossref / XML / Hosting) ---------- */
.featured { background: var(--bg); overflow: hidden; }
.feat-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}
.feat-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px;
  overflow: hidden;
  transition: transform .3s, box-shadow .3s;
}
.feat-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -20px rgba(0,0,0,0.18); }
.feat-card .tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--green-dark);
  margin-bottom: 18px;
}
.feat-card .tag::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green);
}
.feat-card h3 {
  font-size: clamp(24px, 2.5vw, 36px);
  font-weight: 600; letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.feat-card p { font-size: 15px; color: var(--ink-3); margin: 0 0 24px; max-width: 460px; }
.feat-art {
  position: absolute;
  pointer-events: none;
  opacity: 0.85;
}

.feat-card--main {
  grid-column: span 7;
  background: linear-gradient(140deg, #f6faec 0%, #ffffff 60%);
  min-height: 380px;
}
.feat-card--main .feat-art { right: -20px; bottom: -30px; width: 320px; height: 320px; }
.feat-card--side1 { grid-column: span 5; min-height: 240px; background: var(--bg-alt); }
.feat-card--side1 .feat-art { right: -10px; top: -10px; width: 180px; height: 180px; }
.feat-card--side2 { grid-column: span 5; min-height: 240px; }
.feat-card--side2 .feat-art { right: 8px; bottom: 8px; width: 140px; height: 140px; opacity: 0.6; }
.feat-card--side3 { grid-column: span 7; min-height: 240px; background: var(--inverse-bg); color: var(--inverse-fg); }
.feat-card--side3 h3 { color: var(--inverse-fg); }
.feat-card--side3 p { color: var(--inverse-muted); }
.feat-card--side3 .tag { color: var(--green); }
.feat-card--side3 .feat-art { right: -10px; bottom: -10px; width: 240px; height: 240px; }

.cta-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 500; font-size: 14px;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

@media (max-width: 880px) {
  .feat-card--main, .feat-card--side1, .feat-card--side2, .feat-card--side3 { grid-column: span 12; }
}

/* ---------- Podcast section ---------- */
.podcast {
  background: var(--green);
  color: var(--ink);
  overflow: hidden;
}
.podcast .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 60px;
  align-items: center;
}
.podcast .eyebrow { color: var(--ink); }
.podcast .eyebrow::before { background: var(--ink); }
.podcast h2 {
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 600; letter-spacing: -0.03em; line-height: 0.95;
  margin: 22px 0 24px;
}
.podcast h2 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}
.podcast p { color: rgba(22,22,19,0.7); font-size: 17px; max-width: 460px; margin-bottom: 32px; }
.podcast-art {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  max-width: 460px;
  justify-self: end;
}
.podcast-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.episode-list {
  margin-top: 36px;
  border-top: 1px solid rgba(22,22,19,0.18);
}
.ep {
  padding: 18px 0;
  border-bottom: 1px solid rgba(22,22,19,0.12);
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 16px;
  align-items: center;
  font-size: 14px;
}
.ep .play {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--green);
  display: grid; place-items: center;
}
.ep .play svg { width: 12px; height: 12px; fill: currentColor; }
.ep .ttl { font-weight: 500; }
.ep .dur { color: rgba(22,22,19,0.5); font-family: var(--serif); font-style: italic; font-size: 13px; }
@media (max-width: 880px) {
  .podcast .wrap { grid-template-columns: 1fr; }
  .podcast-art { justify-self: center; }
}

/* ---------- Blog ---------- */
.blog { background: var(--bg); }
.blog-head {
  display: flex; align-items: end; justify-content: space-between;
  gap: 30px; margin-bottom: 60px; flex-wrap: wrap;
}
.blog-head h2 { max-width: 580px; }
.blog-head h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--green-dark); }
.blog-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.post {
  display: flex; flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .3s, box-shadow .3s;
}
.post:hover { transform: translateY(-4px); box-shadow: 0 16px 30px -20px rgba(0,0,0,0.18); }
.post-img {
  aspect-ratio: 16 / 10;
  position: relative;
  background: var(--bg-alt);
  overflow: hidden;
}
.post-img svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.post-body { padding: 26px 28px 30px; flex: 1; display: flex; flex-direction: column; }
.post-cat {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--green-dark);
  margin-bottom: 14px;
}
.post h3 {
  font-size: 18px; font-weight: 500; letter-spacing: -0.01em;
  line-height: 1.25; margin-bottom: 16px;
}
.post .meta {
  margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--ink-3);
}
.post .meta a { color: var(--ink); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 880px) { .blog-grid { grid-template-columns: 1fr; } }

/* ---------- Newsletter CTA ---------- */
.newsletter {
  background: var(--bg-alt);
  overflow: hidden;
  position: relative;
}
.newsletter .wrap {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 60px; align-items: center;
  position: relative; z-index: 1;
}
.newsletter h2 { font-size: clamp(36px, 5vw, 64px); }
.newsletter h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--green-dark); }
.newsletter p { color: var(--ink-3); max-width: 460px; }
.nl-form {
  background: var(--paper);
  border-radius: 999px;
  padding: 8px;
  display: flex;
  border: 1px solid var(--line);
  max-width: 460px;
}
.nl-form input {
  flex: 1; border: 0; background: transparent;
  padding: 14px 22px; font: inherit; font-size: 15px;
  outline: none; color: var(--ink);
}
.nl-form input::placeholder { color: var(--ink-4); }
.nl-form button {
  background: var(--ink); color: var(--bg);
  border: 0; border-radius: 999px;
  padding: 12px 22px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background .2s;
}
.nl-form button:hover { background: var(--green-deep); }
.nl-bullets {
  display: flex; flex-direction: column; gap: 16px;
  margin-top: 28px;
  font-size: 13px; color: var(--ink-3);
}
.nl-bullets li {
  list-style: none;
  display: flex; gap: 12px; align-items: center;
}
.nl-bullets li::before {
  content: "✓"; color: var(--green-dark); font-weight: 600;
  width: 22px; height: 22px;
  border-radius: 50%; background: var(--green-tint);
  display: grid; place-items: center; font-size: 11px;
}

.nl-art {
  position: relative;
  aspect-ratio: 1;
  max-width: 380px;
  margin-left: auto;
}
.nl-art svg { width: 100%; height: 100%; }
@media (max-width: 880px) {
  .newsletter .wrap { grid-template-columns: 1fr; }
  .nl-art { margin: 0 auto; max-width: 280px; }
}

/* ---------- Footer ---------- */
footer {
  background: var(--inverse-bg);
  color: var(--inverse-fg);
  padding: 56px 0 26px;
}
footer .wrap { position: relative; }
.foot-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.1fr;
  gap: 40px;
  margin-bottom: 44px;
}
.foot-brand { max-width: 320px; }
.foot-brand img {
  height: 38px;
  margin-bottom: 22px;
  width: auto;
}
.foot-brand p { color: rgba(255,255,255,0.6); font-size: 14px; line-height: 1.6; }
.foot-col h5 {
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.18em;
  margin: 0 0 22px;
  color: var(--green);
}
.foot-col ul { padding: 0; margin: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.foot-col a {
  font-size: 14px; color: rgba(255,255,255,0.75);
  transition: color .2s;
}
.foot-col a:hover { color: var(--green); }
.foot-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 30px;
  display: flex; gap: 24px; justify-content: space-between;
  flex-wrap: wrap;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}
.foot-bottom .social {
  display: flex; gap: 12px;
}
.foot-bottom .social a {
  width: 34px; height: 34px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50%;
  display: grid; place-items: center;
  color: rgba(255,255,255,0.8);
  transition: all .2s;
}
.foot-bottom .social a:hover { background: var(--green); color: var(--ink); border-color: var(--green); }
.foot-bottom .legal a { margin-right: 18px; color: rgba(255,255,255,0.5); }
.foot-bottom .legal a:hover { color: var(--green); }

/* ---------- Footer contact + residences (shared chrome) ---------- */
.foot-contactblock { margin-top: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: rgba(255,255,255,0.65); }
.foot-contactblock a { color: var(--green); }
.foot-contactblock a:hover { color: #fff; }
.foot-residences { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 12px; }
.foot-res {
  display: flex; align-items: flex-start; gap: 10px;
  border: 1px solid rgba(255,255,255,0.14); border-radius: 11px;
  padding: 10px 13px; flex: 1 1 210px; min-width: 190px;
  background: rgba(255,255,255,0.02);
}
.foot-res .fr-flag { font-size: 19px; line-height: 1.1; flex: 0 0 auto; }
.foot-res .fr-k { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--green); margin-bottom: 3px; }
.foot-res .fr-v { font-size: 12.5px; color: rgba(255,255,255,0.7); line-height: 1.4; }

@media (max-width: 880px) {
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .foot-brand { grid-column: span 2; }
}
@media (max-width: 560px) {
  .foot-grid { grid-template-columns: 1fr; }
  .foot-brand { grid-column: span 1; }
}

/* ---------- Floating decorative elements ---------- */
.float-deco {
  position: absolute;
  pointer-events: none;
  opacity: 0.5;
  color: var(--ink);
}
.float-deco svg { stroke: currentColor; fill: none; stroke-width: 1; }

/* ---------- Selection ---------- */
::selection { background: var(--green); color: var(--ink); }

/* ===== SVG illustration colors: theme-aware re-map =====
   Attribute selectors override SVG presentation attributes,
   so hardcoded colors in markup pick up the active theme. */
[stroke="#161613"] { stroke: var(--ink); }
[fill="#161613"]   { fill: var(--ink); }
[stroke="#fbfaf5"] { stroke: var(--paper); }
[fill="#fbfaf5"]   { fill: var(--paper); }
[stroke="#5e9520"] { stroke: var(--green-dark); }
[fill="#5e9520"]   { fill: var(--green-dark); }
[fill="#eef6dd"]   { fill: var(--green-tint); }

/* Theme-aware main featured-card gradient */
.feat-card--main {
  background: linear-gradient(140deg, var(--green-wash) 0%, var(--paper) 60%) !important;
}

/* Podcast section is always a bright-green stripe — text stays dark for AA contrast */
.podcast,
.podcast .eyebrow,
.podcast h2,
.podcast h2 em { color: #161613 !important; }
.podcast .eyebrow::before { background: #161613 !important; }
.podcast p { color: rgba(22,22,19,0.72) !important; }
.podcast .btn-primary { background: #161613 !important; color: #fbfaf5 !important; }
.podcast .btn-primary:hover { background: #3d6614 !important; color: #fbfaf5 !important; }
.podcast .ep .dur { color: rgba(22,22,19,0.55) !important; }
.podcast .ep .play { background: #161613 !important; color: var(--green) !important; }
.podcast .episode-list { border-top-color: rgba(22,22,19,0.2) !important; }
.podcast .ep { border-bottom-color: rgba(22,22,19,0.14) !important; }

/* Green CTAs always dark text */
.btn-green { color: #161613 !important; }
.btn-green:hover { background: #5e9520 !important; color: #fbfaf5 !important; }
.hb-domain { color: #161613 !important; background: var(--green) !important; }

/* Selection always dark text on green */
::selection { background: var(--green); color: #161613; }

/* ---------- Theme toggle button ---------- */
.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  display: grid; place-items: center;
  color: var(--ink);
  position: relative;
  overflow: hidden;
  transition: all .25s cubic-bezier(.2,.7,.2,1);
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--green); color: var(--green-dark); transform: rotate(15deg); }
.theme-toggle svg { width: 16px; height: 16px; transition: transform .35s cubic-bezier(.2,.7,.2,1), opacity .25s; }
.theme-toggle .sun, .theme-toggle .moon { position: absolute; }
.theme-toggle .sun { opacity: 1; transform: rotate(0deg) scale(1); }
.theme-toggle .moon { opacity: 0; transform: rotate(-90deg) scale(0.5); }
[data-theme="dark"] .theme-toggle .sun { opacity: 0; transform: rotate(90deg) scale(0.5); }
[data-theme="dark"] .theme-toggle .moon { opacity: 1; transform: rotate(0deg) scale(1); }

/* Brand logo swap by theme (nav only — footer always uses the dark-variant on its dark bg) */
.brand .logo-dark { display: none; }
[data-theme="dark"] .brand .logo-light { display: none; }
[data-theme="dark"] .brand .logo-dark { display: block; }

/* ---------- Reveal-on-scroll (CSS-only gated by .js class) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
}
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Nav external (sister brand) ---------- */
.nav-external {
  display: inline-flex !important;
  align-items: baseline;
  gap: 8px;
}
.ext-badge {
  font-size: 9px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--green-tint);
  color: var(--green-deep);
  letter-spacing: 0.02em;
}

/* ---------- Nav dropdowns ---------- */
.has-dropdown {
  position: relative;
}
.dropdown {
  position: absolute;
  top: calc(100% + 14px);
  left: -22px;
  min-width: 320px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px -28px rgba(0,0,0,0.18), 0 2px 6px -3px rgba(0,0,0,0.06);
  padding: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .22s cubic-bezier(.2,.7,.2,1), transform .22s cubic-bezier(.2,.7,.2,1), visibility .22s;
  z-index: 60;
}
.dropdown::before {
  content: "";
  position: absolute;
  inset: -14px 0 auto 0;
  height: 14px;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown,
.has-dropdown.open .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.dropdown.single-col .dropdown-grid { grid-template-columns: 1fr; }
.dd-item {
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  align-items: flex-start;
  transition: background .18s;
}
.dd-item:hover { background: var(--green-wash); }
.dd-ico {
  width: 28px; height: 28px;
  flex-shrink: 0;
  background: var(--bg-alt);
  border-radius: 8px;
  display: grid; place-items: center;
  color: var(--ink);
  transition: background .18s, color .18s;
}
.dd-item:hover .dd-ico { background: var(--green); color: var(--ink); }
.dd-ico svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.dd-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dd-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.dd-sub {
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.35;
  font-weight: 400;
}
.dd-footer {
  margin-top: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px;
}
.dd-footer .small-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--green-dark); font-weight: 600;
}
.dd-footer .small-link:hover { text-decoration: underline; }

/* hide native ::after arrow on dropdown anchor wrappers (we use .has-sub on the anchor inside) */

/* ---------- Hero parallax ---------- */
.hero-art {
  perspective: 1200px;
  transform-style: preserve-3d;
}
.hero-art svg {
  transition: transform .15s cubic-bezier(.2,.7,.2,1);
  will-change: transform;
}
.hero-art .layer {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
  will-change: transform;
}
.float-soft {
  animation: floatSoft 6s ease-in-out infinite;
}
.float-soft.delay-1 { animation-delay: -2s; }
.float-soft.delay-2 { animation-delay: -4s; }
@keyframes floatSoft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* loader state for blog */
.post.is-loading {
  position: relative;
  pointer-events: none;
}
.post.is-loading .post-img,
.post.is-loading .post-body * {
  filter: blur(0);
  opacity: 0.5;
}
.skeleton {
  background: linear-gradient(90deg, var(--bg-alt) 0%, var(--bg-deep) 50%, var(--bg-alt) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* ---------- Hosting sister-brand band ---------- */
.hosting-band {
  background: var(--inverse-bg);
  color: var(--inverse-fg);
  padding: 0;
  overflow: hidden;
  position: relative;
}
.hosting-band .line-bg svg { stroke: var(--green); opacity: .25; }
.hb-wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(40px, 6vw, 80px);
  padding: clamp(60px, 8vw, 90px) 0;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hb-left .eyebrow { color: var(--green); }
.hb-left .eyebrow::before { background: var(--green); }
.hb-left h2 {
  margin: 22px 0 22px;
  font-size: clamp(34px, 4.5vw, 56px);
  color: var(--inverse-fg);
}
.hb-left h2 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--green);
}
.hb-left p { color: rgba(255,255,255,0.6); max-width: 460px; margin-bottom: 30px; font-size: 16px; }
.hb-domain {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--green);
  color: var(--ink);
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  transition: transform .2s;
}
.hb-domain:hover { transform: translateY(-2px); }
.hb-domain svg { width: 16px; height: 16px; }

.hb-platforms {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(255,255,255,0.02);
}
.hb-plat {
  padding: 26px 22px;
  border-right: 1px solid rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  transition: background .25s;
}
.hb-plat:nth-child(3n) { border-right: 0; }
.hb-plat:nth-last-child(-n+3) { border-bottom: 0; }
.hb-plat:hover { background: rgba(125, 194, 43, 0.08); }
.hb-plat .pico {
  width: 28px; height: 28px;
  margin-bottom: 14px;
  color: var(--green);
}
.hb-plat .pico svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 1.5; }
.hb-plat .pname {
  font-size: 14px; font-weight: 600;
  color: var(--inverse-fg);
  margin-bottom: 4px;
}
.hb-plat .pdesc {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  line-height: 1.4;
}

@media (max-width: 880px) {
  .hb-wrap { grid-template-columns: 1fr; }
  .hb-platforms { grid-template-columns: repeat(2, 1fr); }
  .hb-plat:nth-child(3n) { border-right: 1px solid rgba(255,255,255,0.1); }
  .hb-plat:nth-child(2n) { border-right: 0; }
  .hb-plat:nth-last-child(-n+3) { border-bottom: 1px solid rgba(255,255,255,0.1); }
  .hb-plat:nth-last-child(-n+2) { border-bottom: 0; }
}

/* ============== LANGUAGE TOGGLE (shared) ============== */
.lang-toggle {
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .03em;
  display: inline-flex; align-items: center; gap: 4px;
  cursor: pointer;
  transition: all .2s;
}
.lang-toggle:hover { border-color: var(--green); color: var(--green-dark); }
.lang-toggle .lang-sep { opacity: .4; font-weight: 400; }
.lang-toggle .lang-es, .lang-toggle .lang-en { opacity: .4; transition: opacity .2s; }
html[data-lang="es"] .lang-toggle .lang-es,
html:not([data-lang="en"]) .lang-toggle .lang-es { opacity: 1; color: var(--green-dark); }
html[data-lang="en"] .lang-toggle .lang-en { opacity: 1; color: var(--green-dark); }
html[data-lang="en"] .lang-toggle .lang-es { opacity: .4; color: inherit; }

/* ============== NAV SEARCH (expand on click) — shared ============== */
.nav-search { display: inline-flex; align-items: center; position: relative; }
.nav-search-input {
  width: 0; padding: 0;
  border: 1px solid transparent; border-radius: 999px;
  background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 13px; height: 36px;
  opacity: 0; margin-left: 0;
  transition: width .3s cubic-bezier(.2,.7,.2,1), opacity .25s, padding .3s, margin .3s;
  pointer-events: none;
}
.nav-search.open .nav-search-input {
  width: 190px; padding: 0 16px; margin-left: 8px;
  border-color: var(--line); opacity: 1; pointer-events: auto;
}
.nav-search.open .nav-search-input:focus { border-color: var(--green); outline: none; }
@media (max-width: 1100px) {
  .nav-search.open .nav-search-input { width: 130px; }
}

@media (max-width: 600px) {
    .nl-form {
        width: 100%;
        max-width: 100%;
        border-radius: 16px;
        flex-direction: column;
        gap: 8px;
    }
    .nl-form input {
        padding: 12px 16px;
        font-size: 15px;
    }
    .nl-form button {
        width: 100%;
        justify-content: center;
        border-radius: 999px;
        padding: 12px 22px;
        font-size: 15px;
    }
    .nl-form button svg {
        display: none;
    }
}
