/* =============================================================
   Tierra Joven — styles.css
   Archetype: 06 Magazine Multi-Page (adapted with agrarian palette)
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  /* Colors — warm cream + agrarian accents */
  --bg:          #f5f0e6;   /* warm cream, main background */
  --bg-2:        #ebe3d1;   /* sand, alternate section */
  --bg-3:        #e0d6bd;   /* deeper sand */
  --paper:       #ffffff;
  --ink:         #1c1a15;   /* warm near-black */
  --ink-soft:    #3a352c;
  --ink-mute:    #6e6759;
  --ink-faint:   #a29a89;
  --accent:      #7b3f1d;   /* deep terracotta */
  --accent-2:    #4d6b3a;   /* moss / olive green */
  --gold:        #b4842c;   /* wheat gold */
  --line:        rgba(28,26,21,0.14);
  --line-soft:   rgba(28,26,21,0.08);
  --line-strong: #1c1a15;

  /* Typography */
  --serif: "Fraunces", "Georgia", "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  /* Rhythm */
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --measure: 68ch;
  --content-max: 1240px;

  /* Easings */
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:    cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft:  cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* Shadows */
  --shadow-card:  0 20px 40px -20px rgba(28,26,21,0.20), 0 4px 12px -8px rgba(28,26,21,0.10);
  --shadow-lift:  0 32px 60px -24px rgba(28,26,21,0.30), 0 8px 20px -12px rgba(28,26,21,0.15);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  scroll-behavior: smooth;
}
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
  min-height: 100vh;
  min-height: 100svh;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.05; letter-spacing: -0.02em; }
::selection { background: var(--accent); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--ink); color: var(--bg);
  z-index: 9999; border-radius: 6px; font-weight: 500;
  transition: top 0.2s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

/* =============================================================
   3. Utilities & containers
   ============================================================= */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.measure { max-width: var(--measure); }

.hairline { border: 0; height: 1px; background: var(--line); margin: 0; }
.hairline-strong { border: 0; height: 1px; background: var(--ink); margin: 0; }

.kicker {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1rem;
  display: inline-block;
}
.kicker-mute { color: var(--ink-mute); }

/* =============================================================
   4. Typography scale
   ============================================================= */
h1, .h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 7vw + 0.5rem, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}
h2, .h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 4vw + 0.5rem, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
h3, .h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.35rem, 2vw + 0.5rem, 1.75rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
h4 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
h1 em, h2 em, h3 em {
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  color: var(--accent);
  font-weight: 400;
}
.lede {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.5vw + 0.4rem, 1.35rem);
  line-height: 1.55;
  color: var(--ink-soft);
  font-weight: 400;
  letter-spacing: -0.01em;
}
p + p { margin-top: 1em; }

.dropcap::first-letter {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  color: var(--accent);
  float: left;
  font-size: 5.5em;
  line-height: 0.85;
  padding: 0.08em 0.12em 0 0;
  margin: 0.04em 0 -0.04em 0;
}

.pull-quote {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  font-size: clamp(1.5rem, 2.5vw + 0.5rem, 2.25rem);
  line-height: 1.25;
  color: var(--ink);
  padding: 2.5rem 0 2.5rem 0;
  margin: 3rem 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  position: relative;
  text-wrap: balance;
}
.pull-quote::before {
  content: "“";
  position: absolute;
  top: 0.2rem;
  left: -0.4rem;
  font-size: 4rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.5;
  font-family: var(--serif);
}
.pull-quote cite {
  display: block;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 1.5rem;
  font-weight: 500;
}

/* =============================================================
   5. Buttons & links
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.6rem;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 0;
  transition: all 0.35s var(--ease-out);
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: pointer;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -12px rgba(123,63,29,0.5);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover, .btn-ghost:focus-visible {
  background: var(--ink);
  color: var(--bg);
}
.btn-arrow::after {
  content: "→";
  transition: transform 0.35s var(--ease-out);
  display: inline-block;
}
.btn-arrow:hover::after { transform: translateX(4px); }

.link-under {
  display: inline-block;
  position: relative;
  padding-bottom: 2px;
  color: var(--ink);
  transition: color 0.3s var(--ease-out);
}
.link-under::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform-origin: right;
  transform: scaleX(1);
  transition: transform 0.4s var(--ease-out);
}
.link-under:hover::after,
.link-under:focus-visible::after {
  transform-origin: left;
  animation: underline-sweep 0.6s var(--ease-out);
}
@keyframes underline-sweep {
  0%   { transform: scaleX(1); transform-origin: right; }
  50%  { transform: scaleX(0); transform-origin: right; }
  50.1%{ transform: scaleX(0); transform-origin: left; }
  100% { transform: scaleX(1); transform-origin: left; }
}

/* =============================================================
   6. Reading progress bar
   ============================================================= */
.reading-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: var(--accent);
  z-index: 200;
  transform-origin: left;
  width: 100%;
  transform: scaleX(0);
  transition: transform 0.05s linear;
  will-change: transform;
}

/* =============================================================
   7. Masthead nav
   ============================================================= */
.masthead {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245,240,230,0.85);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--line);
  transition: background 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
}
.masthead.is-solid {
  background: rgba(245,240,230,0.98);
}
.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  min-height: 68px;
}
.masthead-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1;
}
.masthead-logo {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.masthead-logo em {
  font-style: italic;
  color: var(--accent);
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
.masthead-issue {
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
}
.masthead-nav {
  display: none;
  align-items: center;
  gap: 2.2rem;
}
.masthead-nav a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding: 0.3rem 0;
  transition: color 0.3s var(--ease-out);
}
.masthead-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.4s var(--ease-out);
}
.masthead-nav a:hover, .masthead-nav a:focus-visible,
.masthead-nav a[aria-current="page"] { color: var(--accent); }
.masthead-nav a:hover::after, .masthead-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}
.masthead-cta {
  display: none;
}
.masthead-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  transition: all 0.3s var(--ease-out);
}
.masthead-menu-btn:hover { border-color: var(--ink); }
.masthead-menu-btn-line {
  display: inline-block;
  width: 14px;
  height: 1px;
  background: currentColor;
  position: relative;
}
.masthead-menu-btn-line::before,
.masthead-menu-btn-line::after {
  content: "";
  position: absolute;
  left: 0;
  width: 14px;
  height: 1px;
  background: currentColor;
}
.masthead-menu-btn-line::before { top: -4px; }
.masthead-menu-btn-line::after  { top: 4px; }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-out);
  display: flex;
  flex-direction: column;
  padding: 1.2rem var(--gutter) 2rem;
}
.mobile-menu.is-open {
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
  min-height: 68px;
}
.mobile-menu-close {
  font-size: 1.4rem;
  font-family: var(--sans);
  color: var(--ink);
  padding: 0.4rem 0.8rem;
}
.mobile-menu-list {
  list-style: none;
  padding: 3rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  flex: 1;
}
.mobile-menu-list a {
  font-family: var(--serif);
  font-size: clamp(2rem, 8vw, 3rem);
  line-height: 1;
  color: var(--ink);
  font-weight: 400;
  transition: color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  display: inline-block;
  transform-origin: left center;
}
.mobile-menu-list a:hover {
  color: var(--accent);
  transform: translateX(6px);
}
.mobile-menu-footer {
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--ink-mute);
  font-size: 0.85rem;
}

/* =============================================================
   8. Hero — home
   ============================================================= */
.hero {
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.hero-inner {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: end;
}
.hero-text .kicker { animation: fadeup 0.9s 0.1s both var(--ease-out); }
.hero-title {
  font-size: clamp(2.6rem, 7.5vw + 0.5rem, 5.75rem);
  animation: fadeup 1s 0.2s both var(--ease-out);
  margin-bottom: 1.4rem;
}
.hero-sub {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.5vw + 0.4rem, 1.4rem);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 640px;
  margin-bottom: 2rem;
  animation: fadeup 1s 0.35s both var(--ease-out);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: fadeup 1s 0.5s both var(--ease-out);
}
.hero-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-3);
  animation: fadeup 1.2s 0.3s both var(--ease-out);
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  transition: transform 8s var(--ease-out);
  filter: saturate(1.05) contrast(1.02);
}
.hero-media.is-loaded img { transform: scale(1); }
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(28,26,21,0.15));
  pointer-events: none;
}
.hero-caption {
  position: absolute;
  bottom: 0.8rem;
  left: 0.8rem;
  color: rgba(245,240,230,0.9);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  z-index: 2;
  padding: 0.4rem 0.7rem;
  background: rgba(28,26,21,0.4);
  backdrop-filter: blur(4px);
  font-weight: 500;
}
.hero-trust {
  margin-top: 1.5rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-mute);
  font-variation-settings: "opsz" 144, "SOFT" 100;
  animation: fadeup 1s 0.65s both var(--ease-out);
}

@keyframes fadeup {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Secondary hero (inner pages) */
.hero-sec {
  padding: clamp(4rem, 8vw, 6.5rem) 0 clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
  position: relative;
}
.hero-sec-title {
  font-size: clamp(2.2rem, 5vw + 0.5rem, 4.25rem);
  margin-bottom: 1.4rem;
  max-width: 22ch;
  animation: fadeup 1s 0.1s both var(--ease-out);
}
.hero-sec-sub {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1.3vw + 0.4rem, 1.3rem);
  color: var(--ink-soft);
  line-height: 1.5;
  max-width: 640px;
  animation: fadeup 1s 0.25s both var(--ease-out);
}
.hero-sec-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-top: 1.8rem;
  margin-top: 2.2rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-mute);
  animation: fadeup 1s 0.4s both var(--ease-out);
}
.hero-sec-meta strong { color: var(--ink); font-weight: 600; }

/* =============================================================
   9. Section base
   ============================================================= */
.section {
  padding: clamp(3.5rem, 7vw, 6rem) 0;
  border-bottom: 1px solid var(--line);
}
.section-alt { background: var(--bg-2); }
.section-dark {
  background: var(--ink);
  color: var(--bg);
}
.section-dark .kicker { color: var(--gold); }
.section-dark p { color: rgba(245,240,230,0.85); }
.section-dark h2, .section-dark h3 { color: var(--bg); }

.section-head {
  display: grid;
  gap: 1.5rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-head-title { max-width: 22ch; }
.section-head-lead {
  max-width: 60ch;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.65;
}

/* =============================================================
   10. Stats bar (home)
   ============================================================= */
.stats-bar {
  padding: clamp(2.5rem, 4vw, 3.5rem) 0;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem 1rem;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-left: 1rem;
  border-left: 2px solid var(--accent);
}
.stat-value {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.75rem, 3.5vw + 0.4rem, 2.75rem);
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.03em;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--ink-soft);
  line-height: 1.4;
  text-wrap: pretty;
}

/* =============================================================
   11. Pillars — home 3-column
   ============================================================= */
.pillars {
  display: grid;
  gap: 2rem;
}
.pillar-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out), border-color 0.4s var(--ease-out);
  will-change: transform;
}
.pillar-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-3);
}
.pillar-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease-out), filter 0.6s var(--ease-out);
  filter: saturate(1.05);
}
.pillar-num {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  font-size: 2rem;
  color: var(--bg);
  z-index: 2;
  padding: 0.2rem 0.8rem;
  background: rgba(28,26,21,0.55);
  backdrop-filter: blur(4px);
  line-height: 1;
}
.pillar-body {
  padding: 1.8rem 1.6rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}
.pillar-subtitle {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
  font-weight: 600;
}
.pillar-title {
  font-size: 1.5rem;
}
.pillar-text {
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.6;
  margin-top: 0.4rem;
}

@media (hover: hover) and (pointer: fine) {
  .pillar-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lift);
    border-color: var(--accent);
  }
  .pillar-card:hover .pillar-media img {
    transform: scale(1.08);
    filter: saturate(1.15) brightness(1.03);
  }
}

/* =============================================================
   12. Article prose (multi-page body)
   ============================================================= */
.article {
  display: grid;
  gap: clamp(2.5rem, 4vw, 3.5rem);
}
.article-body {
  max-width: 65ch;
  margin: 0 auto;
}
.article-body h2 {
  margin-top: 2.8rem;
  margin-bottom: 1.2rem;
}
.article-body h3 {
  margin-top: 2.2rem;
  margin-bottom: 0.8rem;
  color: var(--ink);
}
.article-body p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.7;
}
.article-body ul,
.article-body ol {
  margin: 1rem 0 1rem 0;
  padding-left: 1.5rem;
  color: var(--ink-soft);
}
.article-body li {
  line-height: 1.65;
  margin-bottom: 0.6rem;
  padding-left: 0.3rem;
}
.article-body li::marker {
  color: var(--accent);
  font-weight: 600;
}
.article-body strong { color: var(--ink); font-weight: 600; }
.article-body em { color: var(--ink); font-style: italic; font-family: var(--serif); font-variation-settings: "opsz" 144, "SOFT" 100; }
.article-body a { color: var(--accent); border-bottom: 1px solid currentColor; padding-bottom: 1px; transition: opacity 0.25s; }
.article-body a:hover { opacity: 0.7; }

/* Highlight block inside article body */
.highlight {
  background: var(--bg-2);
  padding: 1.6rem 1.8rem;
  margin: 2rem 0;
  border-left: 3px solid var(--accent);
}
.highlight strong { color: var(--ink); }

/* =============================================================
   13. Feature list (icon rows)
   ============================================================= */
.feature-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1.4rem;
  margin: 1.5rem 0;
}
.feature-list li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 1rem;
  align-items: start;
  padding: 0;
  color: var(--ink-soft);
}
.feature-list li::before {
  content: "";
  display: block;
  width: 2rem;
  height: 2rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 50%;
  position: relative;
}
.feature-list li[data-marker="check"]::before {
  background: var(--accent-2);
  border-color: var(--accent-2);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23f5f0e6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 60% 60%;
}
.feature-list li[data-marker="cross"]::before {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%237b3f1d' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><line x1='18' y1='6' x2='6' y2='18'/><line x1='6' y1='6' x2='18' y2='18'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 55% 55%;
}
.feature-list li[data-marker="target"]::before {
  background: var(--gold);
  border-color: var(--gold);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%231c1a15' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><circle cx='12' cy='12' r='6'/><circle cx='12' cy='12' r='2'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 60% 60%;
}
.feature-list li[data-marker="num"]::before {
  content: attr(data-num);
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
.feature-list li strong {
  color: var(--ink);
  font-weight: 600;
}

/* =============================================================
   14. Split section (image + text)
   ============================================================= */
.split {
  display: grid;
  gap: clamp(1.6rem, 3vw, 2.5rem);
  align-items: center;
}
.split-media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--bg-3);
}
.split-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 8s var(--ease-out);
  filter: saturate(1.05);
}
.split-media.is-visible img { transform: scale(1.05); }
.split-caption {
  position: absolute;
  bottom: 0.8rem;
  left: 0.8rem;
  right: 0.8rem;
  color: rgba(245,240,230,0.95);
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.85rem;
  z-index: 2;
  padding: 0.4rem 0.7rem;
  background: rgba(28,26,21,0.5);
  backdrop-filter: blur(4px);
  font-variation-settings: "opsz" 144, "SOFT" 100;
}

/* =============================================================
   15. Big price block (ayudas page)
   ============================================================= */
.money-block {
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  background: var(--bg-2);
  margin: 2.5rem 0;
  border-left: 3px solid var(--gold);
}
.money-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.money-row:first-child { padding-top: 0.4rem; }
.money-row:last-child  { border-bottom: 0; padding-bottom: 0.4rem; }

.money-price {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  flex-wrap: nowrap;
}
.money-from {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2vw + 0.5rem, 1.7rem);
  color: var(--ink-mute);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  line-height: 1;
  white-space: nowrap;
}
.money-arrow {
  color: var(--accent);
  font-size: 1.3rem;
  line-height: 1;
  flex-shrink: 0;
}
.money-to {
  font-family: var(--serif);
  font-size: clamp(2rem, 3.5vw + 0.5rem, 3rem);
  color: var(--accent);
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.money-label {
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.55;
}
.money-label strong { color: var(--ink); font-weight: 600; }

@media (min-width: 720px) {
  .money-row {
    grid-template-columns: minmax(240px, 340px) 1fr;
    gap: 2.5rem;
  }
}

/* =============================================================
   16. Newsletter / CTA form
   ============================================================= */
.cta-section {
  padding: clamp(4rem, 8vw, 6.5rem) 0;
  background: var(--ink);
  color: var(--bg);
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("assets/img/cta-bg.webp");
  background-size: cover;
  background-position: center;
  opacity: 0.14;
  filter: saturate(0.7);
}
.cta-inner {
  position: relative;
  display: grid;
  gap: 2.5rem;
  align-items: end;
}
.cta-text .kicker { color: var(--gold); }
.cta-title {
  color: var(--bg);
  font-size: clamp(2rem, 4vw + 0.5rem, 3.5rem);
  margin-bottom: 1.2rem;
  max-width: 20ch;
}
.cta-title em { color: var(--gold); }
.cta-lead {
  font-family: var(--serif);
  color: rgba(245,240,230,0.85);
  font-size: 1.1rem;
  line-height: 1.55;
  max-width: 45ch;
}
.cta-form {
  display: grid;
  gap: 1rem;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.form-field label {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}
.form-field input,
.form-field select {
  background: transparent;
  color: var(--bg);
  border: 0;
  border-bottom: 1px solid rgba(245,240,230,0.4);
  padding: 0.7rem 0;
  font-family: var(--sans);
  font-size: 1rem;
  border-radius: 0;
  transition: border-color 0.3s var(--ease-out);
  appearance: none;
  -webkit-appearance: none;
  background-image: none;
}
.form-field select {
  padding-right: 2rem;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23f5f0e6' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
}
.form-field select option {
  background: var(--ink);
  color: var(--bg);
}
.form-field input::placeholder {
  color: rgba(245,240,230,0.5);
}
.form-field input:focus,
.form-field select:focus {
  outline: none;
  border-bottom-color: var(--gold);
}
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: rgba(245,240,230,0.75);
  line-height: 1.5;
  padding-top: 0.4rem;
  cursor: pointer;
}
.form-check input {
  margin-top: 0.2rem;
  accent-color: var(--gold);
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}
.form-check a {
  color: var(--gold);
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}
.form-submit {
  margin-top: 0.6rem;
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
  padding: 1.05rem 1.6rem;
  font-weight: 600;
  transition: all 0.35s var(--ease-out);
  align-self: start;
}
.form-submit:hover, .form-submit:focus-visible {
  background: var(--bg);
  border-color: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -12px rgba(180,132,44,0.6);
}
.form-success {
  background: rgba(180,132,44,0.15);
  border: 1px solid var(--gold);
  padding: 1.6rem;
  color: var(--bg);
  font-family: var(--serif);
  font-size: 1.05rem;
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  display: none;
  animation: fadeup 0.5s var(--ease-out);
}
.cta-form.is-sent .form-body { display: none; }
.cta-form.is-sent .form-success { display: block; }

/* Sending state — button dims and disables interaction */
.cta-form.is-sending .form-submit {
  opacity: 0.6;
  cursor: wait;
  pointer-events: none;
}
.cta-form.is-sending .form-field input,
.cta-form.is-sending .form-field select {
  pointer-events: none;
  opacity: 0.7;
}

/* Error message — surfaces API failures without breaking the form */
.form-error {
  grid-column: 1 / -1;
  margin-top: 1rem;
  padding: 0.9rem 1.1rem;
  background: rgba(200, 60, 40, 0.15);
  border: 1px solid rgba(200, 60, 40, 0.5);
  color: #ffd4c8;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Inline CTA in article body */
.cta-inline {
  padding: 2rem 1.8rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  margin: 3rem 0;
  text-align: center;
}
.cta-inline h3 {
  margin-bottom: 1.2rem;
  max-width: 30ch;
  margin-left: auto;
  margin-right: auto;
}

/* =============================================================
   17. FAQ accordion
   ============================================================= */
.faq {
  border-top: 1px solid var(--line-strong);
}
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.6rem 0;
  text-align: left;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.5vw + 0.3rem, 1.4rem);
  font-weight: 500;
  color: var(--ink);
  transition: color 0.25s var(--ease-out);
  letter-spacing: -0.01em;
}
.faq-q:hover { color: var(--accent); }
.faq-q-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  position: relative;
}
.faq-q-icon::before,
.faq-q-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: currentColor;
  transition: transform 0.35s var(--ease-out);
}
.faq-q-icon::before { width: 14px; height: 1px; transform: translate(-50%,-50%); }
.faq-q-icon::after  { width: 1px; height: 14px; transform: translate(-50%,-50%); }
.faq-item.is-open .faq-q-icon::after { transform: translate(-50%,-50%) scaleY(0); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease-out);
}
.faq-a-inner {
  padding: 0 0 1.8rem 0;
  color: var(--ink-soft);
  max-width: 60ch;
  line-height: 1.7;
}

/* =============================================================
   17b. Blog index & article cards
   ============================================================= */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 4vw, 3rem);
}

/* Individual card */
.blog-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
  color: var(--ink);
  transition: transform 0.5s var(--ease-out);
  will-change: transform;
}
.blog-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-3);
}
.blog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease-out), filter 0.6s var(--ease-out);
  filter: saturate(1.05);
}
.blog-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding-top: 0.2rem;
}
.blog-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--ink-mute);
  letter-spacing: 0.02em;
}
.blog-card-sep { color: var(--line-strong); opacity: 0.4; }
.blog-card-cat {
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
}
.blog-card-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.35rem, 2vw + 0.3rem, 1.8rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  transition: color 0.3s var(--ease-out);
}
.blog-card-excerpt {
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.6;
}
.blog-card-more {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.01em;
  margin-top: 0.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap 0.35s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .blog-card:hover .blog-card-media img { transform: scale(1.05); filter: saturate(1.15); }
  .blog-card:hover .blog-card-title { color: var(--accent); }
  .blog-card:hover .blog-card-more { gap: 0.6rem; }
}

/* Featured (biggest) card at top of blog index */
.blog-card-featured {
  border-bottom: 1px solid var(--line);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}
.blog-card-featured .blog-card-media { aspect-ratio: 16 / 10; }
.blog-card-featured .blog-card-title {
  font-size: clamp(1.75rem, 3.5vw + 0.5rem, 3rem);
  line-height: 1.05;
}
.blog-card-featured .blog-card-excerpt {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1vw + 0.5rem, 1.2rem);
  line-height: 1.55;
  color: var(--ink-soft);
}

/* Grid for non-featured cards */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 4vw, 2.8rem);
}

/* =============================================================
   17c. Article page: hero meta + related section
   ============================================================= */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  padding-top: 1.6rem;
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--ink-mute);
  letter-spacing: 0.02em;
}
.article-meta .blog-card-cat { margin-right: 0.4rem; }
.article-meta .blog-card-sep { color: var(--line-strong); opacity: 0.5; }

/* Related articles section */
.related {
  padding: clamp(3rem, 5vw, 4.5rem) 0;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.related-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--line-strong);
}
.related-head h2 {
  font-size: clamp(1.4rem, 1.5vw + 0.5rem, 1.75rem);
  margin: 0;
}
.related-head a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
}
.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.related-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  color: var(--ink);
  transition: transform 0.4s var(--ease-out);
}
.related-card-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-3);
}
.related-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}
.related-card-body { display: flex; flex-direction: column; gap: 0.4rem; }
.related-card-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.15rem;
  line-height: 1.2;
  color: var(--ink);
  transition: color 0.3s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .related-card:hover .related-card-media img { transform: scale(1.05); }
  .related-card:hover .related-card-title { color: var(--accent); }
}
.site-footer {
  padding: clamp(3rem, 5vw, 4.5rem) 0 2rem;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
}
.footer-grid {
  display: grid;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
.footer-brand h3 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}
.footer-brand h3 em {
  color: var(--accent);
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
.footer-brand p {
  color: var(--ink-mute);
  font-size: 0.9rem;
  max-width: 42ch;
  line-height: 1.55;
}
.footer-col h4 {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 1rem;
  font-family: var(--sans);
}
.footer-col ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.footer-col a {
  color: var(--ink-soft);
  font-size: 0.95rem;
  transition: color 0.25s var(--ease-out);
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 1rem;
  color: var(--ink-mute);
  font-size: 0.78rem;
  line-height: 1.55;
}
.footer-disclaimer {
  padding: 1rem 1.2rem;
  background: rgba(180,132,44,0.08);
  border-left: 2px solid var(--gold);
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.55;
}

/* =============================================================
   19. Reveal on scroll
   ============================================================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* Defensive: never leave a reveal element permanently invisible */
.no-js .reveal { opacity: 1; transform: none; }

/* =============================================================
   20. Responsive
   ============================================================= */
@media (min-width: 540px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem 1.5rem; }
  .money-block { grid-template-columns: 1fr; }
  .money-row { flex-wrap: nowrap; }
}

@media (min-width: 720px) {
  .masthead-nav { display: flex; }
  .masthead-cta { display: inline-flex; }
  .masthead-menu-btn { display: none; }
  .hero-inner { grid-template-columns: 1.15fr 1fr; gap: 3.5rem; align-items: end; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); gap: 1rem 2rem; }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr 1.15fr; gap: 3rem; }
  .split.split-reverse { grid-template-columns: 1.15fr 1fr; }
  .split.split-reverse .split-text { order: -1; }
  .cta-inner { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-bottom { grid-template-columns: 2fr 1fr; gap: 2rem; align-items: start; }
  .money-block { padding: 3rem; }
  .money-row { flex-wrap: nowrap; }
  /* Blog */
  .blog-card { grid-template-columns: 1fr 1.4fr; gap: 2rem; align-items: center; }
  .blog-card-featured { grid-template-columns: 1.15fr 1fr; gap: 3rem; }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 960px) {
  .pillars { grid-template-columns: repeat(3, 1fr); gap: 2.2rem; }
  .section-head {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: end;
  }
  .cta-form {
    grid-template-columns: 1fr 1fr;
    gap: 1.4rem 1.5rem;
  }
  .cta-form .form-field-full,
  .cta-form .form-check,
  .cta-form .form-submit,
  .cta-form .form-success { grid-column: 1 / -1; }
  .cta-form .form-submit { justify-self: start; }
  .hero-inner { grid-template-columns: 1.25fr 1fr; gap: 4.5rem; }
  .split { gap: 4rem; }
}

@media (min-width: 1280px) {
  :root { --content-max: 1280px; }
  .hero-title { max-width: 12ch; }
}

/* =============================================================
   21. Page transitions (View Transitions API)
   ============================================================= */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.5s;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}
::view-transition-old(root) { animation-name: vt-out; }
::view-transition-new(root) { animation-name: vt-in; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-10px); } }
@keyframes vt-in  { from { opacity: 0; transform: translateY(10px); } }

/* =============================================================
   22. Reduced motion — only intrusive effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .hero-media img { transition-duration: 1s; }
  .split-media img { transition-duration: 1s; }
  @keyframes fadeup {
    from { opacity: 0; transform: none; }
    to   { opacity: 1; transform: none; }
  }
  .reading-progress { display: none; }
  /* Micro-interactions (hover, tilt, fade, underline sweep) intentionally NOT gated */
}

/* Safety net — if JS is disabled or slow, reveal content immediately after 3s */
html.js-timeout-safety .reveal { opacity: 1 !important; transform: none !important; }
