/* InvertirCasa — design system
   Dark-first editorial aesthetic, optimized for video-heavy layouts,
   high Lighthouse SEO/Performance/Accessibility, and reduced-motion safety. */

:root {
  --bg: #07090c;
  --bg-soft: #0d1218;
  --bg-elev: #11171f;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --ink: #f4f1ea;
  --ink-soft: #c9c4b5;
  --ink-mute: #8a8675;
  --gold: #d4af6a;
  --gold-soft: #efd9a8;
  --emerald: #2fa67c;
  --emerald-soft: #8fdcc0;
  --rose: #d76b6b;
  --azul: #6fb3ff;
  --grad-warm: linear-gradient(135deg, #d4af6a 0%, #efd9a8 50%, #d4af6a 100%);
  --grad-cool: linear-gradient(140deg, #2fa67c 0%, #6fb3ff 100%);
  --grad-dark: linear-gradient(180deg, rgba(7,9,12,0) 0%, rgba(7,9,12,0.85) 70%, #07090c 100%);
  --shadow-1: 0 1px 0 rgba(255,255,255,0.04), 0 10px 30px rgba(0,0,0,0.45);
  --shadow-2: 0 30px 80px rgba(0,0,0,0.55), 0 8px 22px rgba(0,0,0,0.35);
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;
  --radius-xl: 32px;
  --max: 1320px;
  --gap: clamp(16px, 2vw, 28px);
  --serif: "Fraunces", "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f4ee;
    --bg-soft: #efeae0;
    --bg-elev: #ffffff;
    --line: rgba(0,0,0,0.08);
    --line-strong: rgba(0,0,0,0.18);
    --ink: #0c0f14;
    --ink-soft: #2b2e36;
    --ink-mute: #5a5e69;
    --grad-dark: linear-gradient(180deg, rgba(247,244,238,0) 0%, rgba(247,244,238,0.85) 70%, #f7f4ee 100%);
    --shadow-1: 0 1px 0 rgba(0,0,0,0.04), 0 10px 30px rgba(0,0,0,0.08);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}
body {
  background: radial-gradient(1200px 600px at 80% -10%, rgba(212,175,106,0.10), transparent 60%),
              radial-gradient(900px 500px at -10% 30%, rgba(47,166,124,0.10), transparent 60%),
              var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Typography */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.02em; line-height: 1.05; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 6vw, 5.6rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.7rem); }
p { margin: 0 0 1em; color: var(--ink-soft); }
.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--gold);
}
.lead { font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--ink-soft); }
.serif { font-family: var(--serif); }
.italic { font-style: italic; }
.muted { color: var(--ink-mute); }
.gold { color: var(--gold); }
.emerald { color: var(--emerald); }
.divider { height: 1px; background: var(--line); margin: 4rem 0; }

/* Layout primitives */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }
.wrap-narrow { max-width: 880px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }
.stack-xs > * + * { margin-top: .5rem; }
.stack-s > * + * { margin-top: 1rem; }
.stack-m > * + * { margin-top: 1.75rem; }
.stack-l > * + * { margin-top: 3rem; }
section { padding: clamp(64px, 9vw, 140px) 0; position: relative; }
section.tight { padding: clamp(40px, 6vw, 80px) 0; }

/* Skip link */
.skip {
  position: absolute; left: -9999px; top: 8px; padding: 8px 14px;
  background: var(--gold); color: #0b0d12; border-radius: 6px; font-weight: 600;
  z-index: 999;
}
.skip:focus { left: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 22px; letter-spacing: -0.01em; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--grad-warm);
  display: grid; place-items: center; color: #0b0d12; font-weight: 800; font-family: var(--sans); font-size: 14px;
  box-shadow: var(--shadow-1);
}
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { font-size: 14px; color: var(--ink-soft); position: relative; }
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--gold);
}
.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font-weight: 600; font-size: 14px;
}
.nav-cta:hover { background: var(--gold); color: #0b0d12; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line-strong); color: var(--ink); padding: 8px 12px; border-radius: 8px; cursor: pointer; }

@media (max-width: 880px) {
  .nav-links { display: none; }
  .menu-toggle { display: inline-flex; }
  .nav-links.open {
    display: flex; flex-direction: column; gap: 14px; align-items: flex-start;
    position: absolute; left: 16px; right: 16px; top: 64px;
    background: var(--bg-elev); padding: 18px; border-radius: var(--radius-m);
    border: 1px solid var(--line-strong); box-shadow: var(--shadow-2);
  }
}

/* Hero */
.hero {
  position: relative; min-height: clamp(620px, 92vh, 1080px);
  display: grid; grid-template-rows: 1fr auto;
  overflow: hidden;
}
.hero-media {
  position: absolute; inset: 0; z-index: 0;
}
.hero-media video, .hero-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  filter: saturate(110%) contrast(102%) brightness(0.85);
}
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: var(--grad-dark), radial-gradient(800px 400px at 20% 40%, rgba(0,0,0,0.45), transparent 70%);
}
.hero-content {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr; align-content: end;
  padding: clamp(60px, 12vw, 140px) 0 clamp(40px, 5vw, 80px);
}
.hero-content .wrap { display: grid; gap: clamp(16px, 2vw, 28px); }
.hero-title {
  font-size: clamp(2.6rem, 7vw, 6.4rem);
  letter-spacing: -0.03em;
  max-width: 14ch;
}
.hero-title em { font-style: italic; background: var(--grad-warm); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { max-width: 60ch; color: var(--ink-soft); font-size: clamp(1.05rem, 1.3vw, 1.25rem); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 18px 30px; padding-top: 12px; }
.hero-meta div { display: flex; flex-direction: column; gap: 4px; min-width: 140px; }
.hero-meta strong { font-family: var(--serif); font-size: 1.7rem; line-height: 1; color: var(--ink); }
.hero-meta span { font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-mute); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding-top: 8px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent;
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--gold); color: #0b0d12; }
.btn-primary:hover { background: var(--gold-soft); }
.btn-ghost { background: rgba(255,255,255,0.06); color: var(--ink); border-color: var(--line-strong); backdrop-filter: blur(10px); }
.btn-ghost:hover { background: rgba(255,255,255,0.12); }
.btn .arrow { width: 14px; height: 14px; }

/* Scroll hint */
.scroll-hint {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink-mute);
  display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 2;
}
.scroll-hint::after {
  content: ""; width: 1px; height: 36px; background: linear-gradient(180deg, var(--ink-mute), transparent);
  animation: dropline 2.2s ease-in-out infinite;
}
@keyframes dropline { 0%,100% { transform: scaleY(0.6); transform-origin: top; opacity: .4; } 50% { transform: scaleY(1); opacity: 1; } }

/* Cards */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-1);
  transition: transform .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.card-media img, .card-media video {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s ease;
}
.card:hover .card-media img { transform: scale(1.04); }
.card-body { padding: 22px 24px 26px; }
.card-tag { display: inline-flex; padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 12px; }
.card h3 { margin: 0 0 .35em; }
.card p { margin: 0; color: var(--ink-mute); font-size: .95rem; }

/* Grid */
.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Section headings */
.section-head { display: grid; gap: 14px; max-width: 760px; margin-bottom: clamp(28px, 4vw, 56px); }
.section-head .eyebrow + h2 { margin-top: 6px; }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; }

/* Marquee */
.marquee {
  display: flex; gap: 56px; overflow: hidden; padding: 22px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex; gap: 56px; flex: 0 0 auto;
  animation: scroll 38s linear infinite;
}
.marquee-item { display: inline-flex; align-items: center; gap: 12px; color: var(--ink-soft); font-family: var(--serif); font-size: 1.3rem; white-space: nowrap; }
.marquee-item .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* "Swipe deck" — Tinder-style property cards */
.deck {
  position: relative;
  width: min(420px, 92vw);
  height: 580px;
  margin: 0 auto;
  perspective: 1200px;
}
.deck-card {
  position: absolute; inset: 0;
  border-radius: 28px;
  overflow: hidden;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
  cursor: grab;
  touch-action: none;
  user-select: none;
  transition: transform .45s cubic-bezier(.2,.7,.2,1), opacity .35s ease;
  transform-origin: 50% 110%;
  will-change: transform, opacity;
}
.deck-card.is-dragging { transition: none; cursor: grabbing; }
.deck-card.gone-right { transform: translate(120%, -10%) rotate(22deg); opacity: 0; }
.deck-card.gone-left { transform: translate(-120%, -10%) rotate(-22deg); opacity: 0; }
.deck-card-media { position: absolute; inset: 0; }
.deck-card-media img, .deck-card-media video { width: 100%; height: 100%; object-fit: cover; }
.deck-card-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.85) 100%);
}
.deck-card-body {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 24px;
  display: grid; gap: 6px; color: #fff;
}
.deck-card-body .city { font-family: var(--serif); font-size: 2rem; line-height: 1.05; }
.deck-card-body .country { font-size: 12px; text-transform: uppercase; letter-spacing: 0.24em; color: var(--gold-soft); }
.deck-stats { display: flex; gap: 18px; margin-top: 10px; }
.deck-stats div { display: flex; flex-direction: column; }
.deck-stats strong { font-family: var(--serif); font-size: 1.15rem; }
.deck-stats span { font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; color: rgba(255,255,255,.7); }
.deck-stamp {
  position: absolute; top: 24px; padding: 8px 14px; border-radius: 8px;
  font-family: var(--sans); font-weight: 800; letter-spacing: .2em; font-size: 14px;
  opacity: 0; transition: opacity .15s ease;
  border: 2px solid;
}
.deck-stamp.like { right: 22px; color: #2fa67c; border-color: #2fa67c; transform: rotate(12deg); }
.deck-stamp.nope { left: 22px; color: #d76b6b; border-color: #d76b6b; transform: rotate(-12deg); }

.deck-actions {
  margin-top: 28px; display: flex; gap: 16px; justify-content: center;
}
.deck-btn {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--bg-elev); border: 1px solid var(--line-strong);
  color: var(--ink); display: grid; place-items: center; cursor: pointer;
  font-size: 22px;
  transition: transform .15s ease, background .15s ease;
}
.deck-btn:hover { transform: translateY(-2px); }
.deck-btn.like { color: var(--emerald); }
.deck-btn.skip { color: var(--rose); }
.deck-btn.info { color: var(--gold); }
.deck-empty { text-align: center; color: var(--ink-mute); margin-top: 1rem; min-height: 1.2em; }

/* Pillar cards row */
.pillar-list { display: grid; gap: 14px; }
.pillar-row {
  display: grid; grid-template-columns: 60px 1fr auto;
  gap: 22px; align-items: center;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--bg-elev);
  transition: border-color .2s ease, transform .2s ease;
}
.pillar-row:hover, .pillar-row:focus-visible { border-color: var(--gold); transform: translateX(4px); outline: none; }
.pillar-row:focus-visible { box-shadow: 0 0 0 3px rgba(212, 167, 106, 0.25); }
.pillar-row .num { font-family: var(--serif); font-size: 1.6rem; color: var(--gold); }
.pillar-row h3 { margin: 0 0 4px; font-size: 1.25rem; }
.pillar-row p { margin: 0; color: var(--ink-mute); font-size: .9rem; }
.pillar-row .arrow { width: 22px; height: 22px; color: var(--ink-mute); }
@media (max-width: 560px) { .pillar-row { grid-template-columns: 40px 1fr; } .pillar-row .arrow { display: none; } }

/* Search-result highlight */
mark { background: rgba(212, 167, 106, 0.22); color: var(--ink); padding: 0 2px; border-radius: 2px; }

/* Nav search icon */
.nav-search {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 999px;
  color: var(--ink-mute);
  text-decoration: none;
  transition: color .15s ease, background .15s ease;
  margin-right: 4px;
}
.nav-search:hover, .nav-search:focus-visible { color: var(--gold); background: rgba(212, 167, 106, 0.06); outline: none; }

/* Pill / tag chips */
.pill {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color .15s ease, background .15s ease;
}
.pill:hover, .pill:focus-visible { border-color: var(--gold); background: rgba(212, 167, 106, 0.06); outline: none; }

/* Reading progress bar — article pages */
#reading-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-soft) 100%);
  z-index: 80;
  transition: width .08s linear;
  pointer-events: none;
}

/* Back to top — article pages */
#back-to-top {
  position: fixed; right: 22px; bottom: 22px;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong);
  background: rgba(7, 9, 12, 0.86);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--ink);
  border-radius: 999px;
  text-decoration: none;
  opacity: 0; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, border-color .15s ease;
  pointer-events: none;
  z-index: 70;
}
#back-to-top.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
#back-to-top:hover, #back-to-top:focus-visible { border-color: var(--gold); outline: none; color: var(--gold); }
@media print { #reading-progress, #back-to-top, .nav-search, .site-header, .site-footer { display: none !important; } }

/* Print stylesheet — clean output, dark inverted */
@media print {
  body { background: #fff !important; color: #000 !important; }
  main { padding: 0 !important; }
  a { color: #000 !important; text-decoration: underline !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 10px; color: #555; }
  h1, h2, h3, h4 { color: #000 !important; page-break-after: avoid; }
  p, li { color: #222 !important; }
  pre, blockquote { page-break-inside: avoid; }
  details { display: block !important; }
  details > summary { font-weight: 700; }
}

/* Stats strip */
.stats-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.stats-strip div {
  padding: 28px 22px; border-right: 1px solid var(--line);
}
.stats-strip div:last-child { border-right: none; }
.stats-strip strong { display: block; font-family: var(--serif); font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1; }
.stats-strip span { display: block; margin-top: 8px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); }
@media (max-width: 720px) { .stats-strip { grid-template-columns: repeat(2, 1fr); } .stats-strip div:nth-child(2) { border-right: none; } .stats-strip div:nth-child(1), .stats-strip div:nth-child(2) { border-bottom: 1px solid var(--line); } }

/* FAQ accordion */
.faq { display: grid; gap: 12px; }
.faq details {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 18px 22px;
  transition: border-color .15s ease;
}
.faq details[open] { border-color: var(--gold); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--serif); font-size: 1.15rem; cursor: pointer; list-style: none; gap: 18px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--sans); font-size: 1.4rem; color: var(--gold); transition: transform .2s ease; }
.faq details[open] summary::after { content: "−"; }
.faq p { margin-top: 12px; color: var(--ink-soft); }

/* Quote */
.pull-quote {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.4rem, 2.4vw, 2.2rem);
  line-height: 1.25; color: var(--ink);
  border-left: 3px solid var(--gold); padding: 0 0 0 24px; max-width: 26ch;
}

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-m); }
table.data {
  width: 100%; border-collapse: collapse; font-size: .92rem;
  background: var(--bg-elev);
}
table.data th, table.data td {
  padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line);
}
table.data th { font-family: var(--sans); font-weight: 600; color: var(--ink); background: rgba(255,255,255,0.03); text-transform: uppercase; letter-spacing: .08em; font-size: .76rem; }
table.data tr:last-child td { border-bottom: none; }
table.data td.num { font-variant-numeric: tabular-nums; text-align: right; font-family: var(--mono); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.25));
  padding: clamp(60px, 8vw, 110px) 0 40px;
  margin-top: 80px;
}
.foot-grid { display: grid; gap: 40px; grid-template-columns: 1.5fr 1fr 1fr 1fr; }
.foot-grid h4 { font-family: var(--sans); text-transform: uppercase; letter-spacing: .14em; font-size: 12px; color: var(--ink-mute); margin: 0 0 14px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot-grid a { color: var(--ink-soft); font-size: 14px; }
.foot-grid a:hover { color: var(--gold); }
.foot-meta { border-top: 1px solid var(--line); margin-top: 50px; padding-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: 12px; color: var(--ink-mute); }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } }

/* Aside / sidebar (article pages) */
.article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 64px; }
@media (max-width: 1020px) { .article-grid { grid-template-columns: 1fr; } }
.toc {
  position: sticky; top: 96px;
  border: 1px solid var(--line); border-radius: var(--radius-m); padding: 22px;
  background: var(--bg-elev);
  max-height: calc(100vh - 120px); overflow: auto;
}
.toc h4 { font-family: var(--sans); font-size: 11px; text-transform: uppercase; letter-spacing: .18em; color: var(--ink-mute); margin: 0 0 14px; }
.toc ol { padding-left: 1.1rem; margin: 0; display: grid; gap: 8px; counter-reset: tocnum; }
.toc li { font-size: 14px; color: var(--ink-soft); }
.toc a { display: block; padding: 4px 0; }
.toc a:hover { color: var(--gold); }

/* Article prose */
.prose { max-width: 72ch; font-size: 1.08rem; line-height: 1.7; }
.prose h2 { font-size: clamp(1.6rem, 2.5vw, 2.2rem); margin-top: 2.2em; }
.prose h3 { font-size: 1.3rem; margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.4em; color: var(--ink-soft); }
.prose li { margin: .35em 0; }
.prose blockquote {
  margin: 1.6em 0; padding: 1em 1.4em;
  border-left: 3px solid var(--gold);
  background: rgba(212,175,106,0.06);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--ink);
}
.prose figure { margin: 2em 0; }
.prose figcaption { color: var(--ink-mute); font-size: .85rem; margin-top: 8px; }
.prose .callout {
  margin: 1.6em 0; padding: 1em 1.2em;
  border: 1px solid var(--line-strong); border-radius: var(--radius-m);
  background: var(--bg-elev);
}
.prose .callout strong.label { display: inline-block; font-family: var(--sans); text-transform: uppercase; letter-spacing: .12em; font-size: 11px; color: var(--gold); margin-bottom: 6px; }
.prose a { color: var(--gold); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.prose a:hover { color: var(--gold-soft); }

/* Coming-soon page */
.proximamente {
  min-height: 100vh; display: grid; place-items: center; position: relative; overflow: hidden;
}
.proximamente-video { position: absolute; inset: 0; z-index: 0; }
.proximamente-video video, .proximamente-video img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.5) saturate(120%); }
.proximamente-video::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(900px 500px at 50% 60%, rgba(212,175,106,0.18), transparent 70%), var(--grad-dark);
}
.proximamente-inner { position: relative; z-index: 1; text-align: center; padding: 24px; max-width: 720px; }
.proximamente-inner h1 { font-size: clamp(2.6rem, 7vw, 5.4rem); }
.proximamente-inner h1 em { font-style: italic; background: var(--grad-warm); -webkit-background-clip: text; background-clip: text; color: transparent; }
.proximamente-inner p { font-size: clamp(1rem, 1.4vw, 1.2rem); color: var(--ink-soft); }
.proximamente-progress { height: 4px; background: rgba(255,255,255,0.08); border-radius: 999px; overflow: hidden; margin: 24px auto; max-width: 360px; }
.proximamente-progress div { height: 100%; width: 65%; background: var(--grad-warm); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: .7; } 50% { opacity: 1; } }
.proximamente-back { display: inline-flex; gap: 10px; align-items: center; color: var(--gold); border-bottom: 1px solid var(--gold); padding-bottom: 4px; }

/* Newsletter */
.newsletter {
  border-radius: var(--radius-xl);
  padding: clamp(28px, 5vw, 60px);
  background:
    linear-gradient(135deg, rgba(212,175,106,0.18), rgba(47,166,124,0.16)),
    var(--bg-elev);
  border: 1px solid var(--line-strong);
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 36px; align-items: center;
}
.newsletter h2 { margin: 0 0 .3em; }
.newsletter p { margin: 0; color: var(--ink-soft); }
.newsletter form { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter input {
  flex: 1; min-width: 220px;
  padding: 14px 18px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: rgba(0,0,0,0.3); color: var(--ink); font-size: 15px;
}
.newsletter input:focus { outline: none; border-color: var(--gold); }
@media (max-width: 820px) { .newsletter { grid-template-columns: 1fr; } }

/* Map grid */
.map-grid { display: grid; gap: 12px; grid-template-columns: repeat(5, 1fr); }
.map-tile {
  position: relative; aspect-ratio: 3 / 4; border-radius: var(--radius-l);
  overflow: hidden; border: 1px solid var(--line);
}
.map-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.map-tile:hover img { transform: scale(1.05); }
.map-tile::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.85));
}
.map-tile span {
  position: absolute; left: 14px; bottom: 14px; right: 14px;
  font-family: var(--serif); font-size: 1.15rem; color: #fff;
  display: flex; justify-content: space-between; align-items: end; gap: 8px;
}
.map-tile small { font-family: var(--sans); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-soft); }
@media (max-width: 980px) { .map-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .map-grid { grid-template-columns: repeat(2, 1fr); } }

/* Source / citation list */
.sources { font-size: .85rem; color: var(--ink-mute); border-top: 1px dashed var(--line); padding-top: 20px; }
.sources h4 { font-family: var(--sans); text-transform: uppercase; font-size: 11px; letter-spacing: .18em; color: var(--ink-mute); margin: 0 0 12px; }
.sources ol { padding-left: 1.3rem; margin: 0; }
.sources li { margin-bottom: 6px; }
.sources a { color: var(--ink-soft); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.sources a:hover { color: var(--gold); }

/* Video frame */
.video-frame {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-l);
  overflow: hidden; border: 1px solid var(--line); background: #000;
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-frame video, .video-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

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

/* Utilities */
.center { text-align: center; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(212,175,106,0.12); color: var(--gold-soft); border: 1px solid rgba(212,175,106,0.28);
  font-size: 12px; letter-spacing: .08em;
}
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-size: 11px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-mute); }
.hr-grad { height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); border: 0; margin: 60px 0; }
.spacer { height: 60px; }
.tight-text { max-width: 60ch; }

/* Print */
@media print {
  .site-header, .site-footer, .hero-media, .marquee, .deck-actions, .deck { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ---- Live data widget (free public APIs, cached 1h) ---- */
.live-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px; margin: 18px 0;
}
.live-cell {
  padding: 18px 20px; border: 1px solid var(--line);
  border-radius: 14px; background: rgba(255, 255, 255, 0.01);
}
.live-label {
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-mute); margin-bottom: 6px;
}
.live-val {
  font-family: var(--mono); font-size: 22px; font-weight: 600;
  color: var(--gold); letter-spacing: -0.01em;
}
.live-meta { font-size: 12px; color: var(--ink-mute); margin-top: 14px; font-style: italic; }

/* Compact FX ticker strip */
.live-ticker {
  display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: baseline;
  padding: 12px 0; font-size: 13px;
}
.live-ticker .lt-item { white-space: nowrap; }
.live-ticker .lt-k {
  color: var(--ink-mute); font-size: 11px; letter-spacing: .07em;
  text-transform: uppercase;
}
.live-ticker .lt-v { font-family: var(--mono); color: var(--gold); font-weight: 600; }
.live-ticker .lt-meta { color: var(--ink-mute); font-style: italic; font-size: 11px; }
.live-strip {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}
.live-strip .wrap { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.live-strip .live-strip-tag {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold); white-space: nowrap;
}
