/* Pablo Cabona Suárez, shared design system
   Editorial, premium, timeless. Almost white, soft black, warm gray, one accent. */

:root {
  --bg: #FAFAF8;
  --bg-raised: #FFFFFF;
  --fg: #17161A;
  --fg-soft: #3A383F;
  --muted: #75726C;
  --border: #E7E4DD;
  --border-strong: #D8D4CA;
  --accent: #B5533C;
  --accent-soft: #F3E4DF;

  --font-display: 'Geist', 'Inter', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'Geist Mono', 'IBM Plex Mono', monospace;

  --container: 1120px;
  --gutter: 32px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--fg);
}
h1 { font-size: clamp(40px, 6vw, 76px); font-weight: 500; }
h2 { font-size: clamp(28px, 3.4vw, 42px); }
h3 { font-size: 20px; font-weight: 600; }

p { color: var(--fg-soft); }
p.lead { font-size: 20px; line-height: 1.55; color: var(--fg-soft); max-width: 640px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 18px;
}

/* ── NAV ── */
header.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  background: rgba(250, 250, 248, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
header.site-nav.scrolled { border-bottom-color: var(--border); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--gutter);
  max-width: var(--container);
  margin: 0 auto;
}
.nav-brand {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 14px;
  color: var(--muted);
  transition: color .2s;
}
.nav-links a:hover { color: var(--fg); }
.nav-menu-btn { display: none; }

/* ── SECTIONS ── */
section { padding: 120px 0; border-bottom: 1px solid var(--border); }
section:last-of-type { border-bottom: none; }
section.tight { padding: 80px 0; }
.section-head { margin-bottom: 64px; max-width: 680px; }

/* ── HERO ── */
.hero {
  padding: 220px 0 140px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero-inner { position: relative; z-index: 2; max-width: 780px; }
.hero h1 { margin-bottom: 28px; }
.hero .cta-row { display: flex; gap: 16px; margin-top: 40px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  padding: 14px 26px;
  border-radius: 100px;
  transition: all .2s;
}
.btn-primary { background: var(--fg); color: var(--bg); }
.btn-primary:hover { background: var(--accent); }
.btn-secondary { border: 1px solid var(--border-strong); color: var(--fg); }
.btn-secondary:hover { border-color: var(--fg); }

/* subtle LATAM map, decorative, absolutely positioned in hero */
.hero-map {
  position: absolute;
  top: 50%; right: -6%;
  transform: translateY(-50%);
  width: 560px;
  max-width: 46vw;
  z-index: 1;
  opacity: 0.9;
}
.hero-map svg { width: 100%; height: auto; }
.hero-map .node {
  fill: var(--accent);
  animation: pulse 3.2s ease-in-out infinite;
}
.hero-map .node:nth-child(2) { animation-delay: .6s; }
.hero-map .node:nth-child(3) { animation-delay: 1.2s; }
.hero-map .node:nth-child(4) { animation-delay: 1.8s; }
@keyframes pulse {
  0%, 100% { opacity: .25; r: 3; }
  50% { opacity: 1; r: 5; }
}
.hero-map path { stroke: var(--border-strong); stroke-width: 1; fill: none; }

/* ── TRUST MARQUEE ── */
.marquee-wrap {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.marquee-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  margin-bottom: 24px;
}
.marquee-track {
  display: flex;
  gap: 64px;
  width: max-content;
  animation: scroll-left 32s linear infinite;
}
.marquee-track span {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--fg-soft);
  white-space: nowrap;
}
@keyframes scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ── ABOUT ── */
.about-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 64px;
  align-items: start;
}
.about-photo {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 4px;
  overflow: hidden;
  background: var(--border);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-copy p { margin-bottom: 20px; font-size: 18px; }
.about-copy p:last-child { margin-bottom: 0; font-weight: 500; color: var(--fg); }

/* ── CARDS (How I Help) ── */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.card { background: var(--bg-raised); padding: 40px 32px; }
.card h3 { margin-bottom: 20px; }
.card ul li {
  font-size: 15px;
  color: var(--muted);
  padding: 8px 0;
  border-top: 1px solid var(--border);
}
.card ul li:first-child { border-top: none; }

/* ── HOW I WORK (5 columns, typography only) ── */
.process-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}
.process-step {
  border-top: 1px solid var(--fg);
  padding-top: 20px;
}
.process-step .num { font-family: var(--font-mono); font-size: 12px; color: var(--accent); display: block; margin-bottom: 10px; }
.process-step h4 { font-size: 18px; font-weight: 500; margin-bottom: 8px; }
.process-step p { font-size: 14px; }

/* ── SELECTED WORK ── */
.work-list { display: flex; flex-direction: column; }
.work-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 40px 0;
  border-top: 1px solid var(--border);
  transition: opacity .2s;
}
.work-list a.work-item:hover { opacity: 0.6; }
.work-item h3 { font-size: 26px; margin-bottom: 8px; }
.work-item p { font-size: 16px; max-width: 560px; }
.work-item .arrow { font-family: var(--font-mono); font-size: 22px; color: var(--muted); }

/* ── NUMBERS ── */
.numbers-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; }
.number-item .val {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 500;
  color: var(--accent);
  display: block;
}
.number-item .label { font-size: 14px; color: var(--muted); margin-top: 8px; }

/* ── PRINCIPLES ── */
.principles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 32px; }
.principle { padding-left: 20px; border-left: 2px solid var(--accent); }
.principle h4 { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.principle p { font-size: 14px; }

/* ── INSIGHTS ── */
.insights-list { display: flex; flex-direction: column; }
.insight-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  gap: 24px;
}
.insight-row h4 { font-size: 18px; font-weight: 500; }
.insight-row .date { font-family: var(--font-mono); font-size: 13px; color: var(--muted); white-space: nowrap; }

/* ── CONTACT ── */
.contact-links { display: flex; gap: 32px; flex-wrap: wrap; margin-top: 40px; }
.contact-links a { font-size: 16px; border-bottom: 1px solid var(--border-strong); padding-bottom: 4px; }
.contact-links a:hover { border-color: var(--fg); }

/* ── FOOTER ── */
footer {
  padding: 48px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}

/* ── FADE UTIL ── */
/* Visible by default. JS adds .pending only when it can guarantee revealing
   the element again, so a JS failure never leaves content permanently hidden. */
.fade-up { transition: opacity .7s ease, transform .7s ease; }
.fade-up.pending { opacity: 0; transform: translateY(24px); }
.fade-up.in { opacity: 1; transform: translateY(0); }

/* ── ARTICLE / CASE STUDY PAGES ── */
.article-hero { padding: 200px 0 80px; border-bottom: 1px solid var(--border); }
.article-hero .back { font-family: var(--font-mono); font-size: 13px; color: var(--muted); display: inline-block; margin-bottom: 32px; }
.article-hero .back:hover { color: var(--fg); }
.article-hero h1 { max-width: 760px; }
.article-meta { display: flex; gap: 24px; margin-top: 32px; font-family: var(--font-mono); font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.article-body { max-width: 720px; }
.article-body h3 { margin-top: 56px; margin-bottom: 18px; }
.article-body h3:first-child { margin-top: 0; }
.article-body p { font-size: 18px; margin-bottom: 20px; }
.article-body ul.result-list li { font-size: 17px; color: var(--fg-soft); padding: 6px 0 6px 20px; border-left: 2px solid var(--accent); margin-bottom: 8px; }
.article-nav-footer { display: flex; justify-content: space-between; padding: 40px 0; border-top: 1px solid var(--border); margin-top: 64px; font-size: 15px; }

/* ── RESOURCE CARDS ── */
.resource-card { border: 1px solid var(--border); padding: 32px; margin-bottom: 1px; }
.resource-card h3 { margin-bottom: 10px; }
.resource-card p { font-size: 15px; margin-bottom: 16px; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 220px; }
  .card-grid { grid-template-columns: 1fr; }
  .process-row { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
  .numbers-grid { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
  .principles-grid { grid-template-columns: 1fr; }
  .hero-map { display: none; }
  .nav-links { display: none; }
  .work-item { grid-template-columns: 1fr; }
  section { padding: 72px 0; }
  .hero { padding: 140px 0 80px; }
}
