/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  /* --- brand palette --- */
  --color-terracotta:  #A46447;
  --color-almond:      #CEB59E;
  --color-umber:       #4C362D;
  --color-sage:        #88937B;

  --color-background:  #F5EEE6;
  --color-surface:     #CEB59E;
  --color-primary:     #A46447;
  --color-secondary:   #88937B;
  --color-dark:        #4C362D;
  --color-text:        #4C362D;
  --color-text-light:  #FDF9F5;

  /* --- semantic aliases used throughout the file --- */
  --bg:        var(--color-background);
  --bg-2:      var(--color-surface);
  --paper:     var(--color-almond);
  --ink:       var(--color-text);
  --ink-soft:  rgba(76, 54, 45, 0.88);
  --ink-mute:  rgba(76, 54, 45, 0.68);
  --accent:    var(--color-primary);
  --accent-2:  var(--color-secondary);
  --line:      rgba(76, 54, 45, 0.18);
  --line-soft: rgba(76, 54, 45, 0.09);

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --serif: "Fraunces", "Georgia", serif;

  --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);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --container: 1180px;
  --nav-h: 76px;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =============================================================
   3. Utilities
   ============================================================= */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .7rem 1.1rem; background: var(--color-dark); color: var(--color-text-light);
  z-index: 9999; border-radius: 8px; font-weight: 600; font-size: .9rem;
  transition: top .25s var(--ease-out);
}
.skip-link:focus { top: 1rem; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0;
}
.kicker {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent);
}
.kicker::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  flex-shrink: 0;
}
.section { position: relative; padding-block: clamp(3.5rem, 8vw, 7rem); }
.section-head { max-width: 640px; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); margin-top: .6rem; }
.section-head p { color: var(--ink-mute); font-size: 1.05rem; margin-top: 1rem; }

/* =============================================================
   4. Typography
   ============================================================= */
.eyebrow-italic { font-family: var(--serif); font-style: italic; color: var(--accent); }
em { font-style: italic; }

/* =============================================================
   5. Components
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .95rem 1.7rem; border-radius: 999px; font-weight: 600; font-size: .95rem;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), background .3s var(--ease-out), color .3s var(--ease-out);
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-primary); color: var(--color-text-light);
  box-shadow: 0 10px 26px -10px rgba(164, 100, 71, 0.55);
}
.btn-primary:hover {
  background: var(--color-dark);
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -10px rgba(76, 54, 45, 0.55);
}
.btn-primary:active { background: var(--color-dark); transform: translateY(0); box-shadow: 0 6px 16px -8px rgba(76, 54, 45, 0.5); }
.btn-ghost {
  background: transparent; color: var(--ink); border: 1.5px solid var(--line);
}
.btn-ghost:hover { border-color: var(--ink); background: rgba(76,54,45,0.06); transform: translateY(-2px); }
.btn-ghost:active { background: rgba(76,54,45,0.1); transform: translateY(0); }
.btn-light {
  background: var(--color-text-light); color: var(--color-dark);
  box-shadow: 0 10px 26px -12px rgba(76,54,45,0.35);
}
.btn-light:hover { transform: translateY(-2px); background: var(--color-background); }
.btn-light:active { transform: translateY(0); }

.card {
  background: var(--paper);
  border-radius: 22px;
  border: 1px solid var(--line-soft);
}

.pill-tag {
  display: inline-block; padding: .3rem .75rem; border-radius: 999px;
  font-size: .74rem; font-weight: 600; letter-spacing: .04em;
  background: rgba(136, 147, 123, 0.16); color: var(--color-dark);
}

/* nav */
.nav {
  position: fixed; inset-inline: 0; top: 0; z-index: 500;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: transparent;
  transition: background .4s var(--ease-out), box-shadow .4s var(--ease-out), border-color .4s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.nav.is-solid {
  background: rgba(245, 238, 230, 0.86);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
@supports not (backdrop-filter: blur(1px)) {
  .nav.is-solid { background: rgba(245, 238, 230, 0.97); }
}
.nav-inner { width: 100%; display: flex; align-items: center; justify-content: space-between; }
.nav-brand { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; letter-spacing: -0.01em; }
.nav-brand span { color: var(--accent); font-style: italic; }
.nav-links { display: none; align-items: center; gap: 2rem; font-size: .92rem; font-weight: 500; }
.nav-links a { position: relative; padding-block: .3rem; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1.5px;
  background: var(--accent); transition: right .35s var(--ease-out);
}
.nav-links a:hover::after { right: 0; }
.nav-actions { display: flex; align-items: center; gap: .9rem; }
.nav-actions .btn { padding: .68rem 1.35rem; font-size: .86rem; }
.nav-toggle {
  display: flex; flex-direction: column; gap: 5px; padding: .5rem;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease-out), opacity .3s var(--ease-out); }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 400;
  background: var(--bg);
  transform: translateY(-8px);
  opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
  display: flex; flex-direction: column; padding: 2rem 1.25rem;
  overflow-y: auto;
}
.mobile-menu.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.mobile-menu a {
  font-family: var(--serif); font-size: 1.9rem; padding-block: .55rem;
  border-bottom: 1px solid var(--line-soft);
}
.mobile-menu .btn { margin-top: 1.5rem; align-self: flex-start; }

/* =============================================================
   6. Sections
   ============================================================= */

/* --- splash --- */
.splash {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  animation: splashSafety .01s 4.5s forwards;
}
.splash.is-out { opacity: 0; pointer-events: none; transition: opacity .6s var(--ease-out); }
.splash-mark { font-family: var(--serif); font-style: italic; font-size: 2.4rem; color: var(--accent); opacity: 0; animation: splashFade .9s var(--ease-out) .15s forwards; }
@keyframes splashFade { to { opacity: 1; } }
@keyframes splashSafety { to { opacity: 0; pointer-events: none; } }

/* --- hero --- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  padding-top: var(--nav-h);
  overflow: clip;
}
.hero-bg-halo {
  position: absolute; inset: -20% -10% -30% -10%;
  background: radial-gradient(55% 45% at 78% 30%, rgba(164,100,71,0.18), transparent 70%),
              radial-gradient(45% 40% at 15% 80%, rgba(136,147,123,0.16), transparent 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}
.hero-grid {
  position: relative; z-index: 1;
  display: grid; gap: 2.5rem;
  padding-block: clamp(2.5rem, 6vw, 4rem);
}
.hero-copy { max-width: 620px; }
.hero-title {
  font-size: clamp(2.5rem, 6.4vw, 4.4rem);
  margin-top: .9rem;
  max-width: 14ch;
}
.hero-title em { color: var(--accent); }
.hero-sub {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  margin-top: 1.4rem;
  max-width: 46ch;
}
.hero-role {
  margin-top: .85rem; color: var(--ink-mute); font-size: .95rem; font-weight: 500;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.1rem; }
.hero-figure { position: relative; }
.hero-photo-wrap {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 4/5;
  max-width: 460px;
  margin-inline: auto;
  box-shadow: 0 40px 70px -30px rgba(76,54,45,0.4);
}
.hero-photo-wrap img {
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
  transform: scale(1.02);
  transition: transform 1.2s var(--ease-out);
}
.hero-badge {
  position: absolute; left: -1rem; bottom: -1.2rem;
  background: var(--color-text-light); border-radius: 18px; padding: 1rem 1.3rem;
  box-shadow: 0 20px 40px -18px rgba(76,54,45,0.35);
  max-width: 230px;
}
.hero-badge .num { font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 1.5rem; }
.hero-badge p { font-size: .82rem; color: var(--ink-mute); margin-top: .3rem; line-height: 1.4; }
.hero-scroll-hint {
  position: absolute; bottom: 1.6rem; left: 50%; transform: translateX(-50%);
  display: none; flex-direction: column; align-items: center; gap: .4rem;
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute);
}
.hero-scroll-hint .line { width: 1px; height: 34px; background: var(--line); position: relative; overflow: hidden; }
.hero-scroll-hint .line::after {
  content: ""; position: absolute; top: -34px; left: 0; width: 100%; height: 34px; background: var(--accent);
  animation: scrollLine 2.2s var(--ease-soft) infinite;
}
@keyframes scrollLine { to { top: 34px; } }

/* --- quien es / manifesto --- */
.manifesto { padding-block: clamp(3rem, 7vw, 6rem); }
.manifesto-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: 1fr;
}
.manifesto-num { font-family: var(--serif); font-style: italic; font-size: 3.2rem; color: var(--accent); line-height: 1; }
.manifesto-text p { font-size: clamp(1.15rem, 2.2vw, 1.55rem); line-height: 1.5; color: var(--ink-soft); }
.manifesto-text p + p { margin-top: 1.3rem; }
.manifesto-tags { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.6rem; }

/* --- pull quote --- */
.pull-quote { padding-block: clamp(3rem, 8vw, 6.5rem); position: relative; }
.pull-quote-inner {
  max-width: 900px; margin-inline: auto; text-align: center; position: relative;
}
.pull-quote blockquote {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.6rem, 4vw, 2.6rem); line-height: 1.3; color: var(--ink);
  text-wrap: balance;
}
.pull-quote cite {
  display: block; margin-top: 1.6rem; font-style: normal; font-size: .92rem;
  color: var(--ink-mute); font-weight: 600;
}

/* --- pillars (signature: bento hover halo + tilt) --- */
.pillars-grid {
  display: grid; gap: 1.4rem;
  grid-template-columns: 1fr;
}
.pillar-card {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  padding: 1.6rem;
  display: flex; flex-direction: column; gap: 1rem;
  transform: perspective(900px) rotateX(0deg) rotateY(0deg);
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out);
  will-change: transform;
}
.pillar-card::before {
  content: "";
  position: absolute; inset: -40% -40% auto -40%; height: 70%;
  background: radial-gradient(closest-side, rgba(164,100,71,0.32), transparent 70%);
  opacity: 0; transition: opacity .5s var(--ease-out);
  pointer-events: none;
}
.pillar-card:hover, .pillar-card.is-active {
  box-shadow: 0 30px 60px -30px rgba(164,100,71,0.45);
}
.pillar-card:hover::before { opacity: 1; }
.pillar-media {
  position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 16/11;
}
.pillar-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.pillar-card:hover .pillar-media img { transform: scale(1.08); }
.pillar-index { position: absolute; top: .8rem; left: .8rem; background: rgba(76,54,45,0.62); color: var(--color-text-light); font-size: .75rem; font-weight: 600; padding: .3rem .65rem; border-radius: 999px; backdrop-filter: blur(6px); }
.pillar-card h3 { font-size: 1.4rem; }
.pillar-role { color: var(--color-dark); font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.pillar-card p.desc { color: rgba(76,54,45,0.85); font-size: .96rem; line-height: 1.55; }

/* --- marquee ticker --- */
.ticker-wrap {
  border-block: 1px solid var(--line);
  background: var(--bg-2);
  overflow: hidden;
  padding-block: 1.1rem;
}
.ticker-track {
  display: flex; gap: 2.4rem; white-space: nowrap;
  width: max-content;
  animation: tickerMove 32s linear infinite;
}
.ticker-track span {
  font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--ink-soft);
  display: inline-flex; align-items: center; gap: 2.4rem;
}
.ticker-track span::after { content: "•"; color: rgba(76,54,45,0.55); font-style: normal; }
@keyframes tickerMove { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* --- values --- */
.values-grid {
  display: grid; gap: 1px; background: var(--line);
  border: 1px solid var(--line);
  border-radius: 20px; overflow: hidden;
  grid-template-columns: 1fr;
}
.value-item {
  background: var(--paper); padding: 1.6rem 1.5rem;
  transition: background .3s var(--ease-out);
}
.value-item:hover { background: var(--bg); }
.value-item h4 { font-size: 1.15rem; font-family: var(--serif); }
.value-item p { color: rgba(76,54,45,0.85); font-size: .9rem; margin-top: .5rem; line-height: 1.5; }

/* --- ways to help --- */
.ways-grid { display: grid; gap: 1.3rem; grid-template-columns: 1fr; }
.way-card {
  background: var(--color-dark); color: var(--color-text-light);
  border-radius: 24px; padding: 2rem;
  display: flex; flex-direction: column; gap: 1rem;
  position: relative; overflow: hidden;
}
.way-card:nth-child(2) { background: var(--color-primary); }
.way-card:nth-child(3) {
  background: linear-gradient(rgba(76,54,45,0.4), rgba(76,54,45,0.4)), var(--color-secondary);
}
.way-card h3 { font-size: 1.5rem; color: inherit; }
.way-card p { opacity: .94; font-size: .95rem; line-height: 1.5; }
.way-card .btn { margin-top: .4rem; align-self: flex-start; }

/* --- gallery --- */
.gallery-grid {
  display: grid; gap: .9rem;
  grid-template-columns: repeat(2, 1fr);
}
.gallery-item {
  position: relative; border-radius: 18px; overflow: hidden;
  aspect-ratio: 4/5;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out), filter .4s var(--ease-out); }
.gallery-item:hover img { transform: scale(1.07); filter: saturate(1.1); }
.gallery-item:first-child { grid-column: span 2; aspect-ratio: 16/10; }

/* --- contact --- */
.contact-section { position: relative; }
.contact-grid {
  display: grid; gap: 2.5rem;
  grid-template-columns: 1fr;
}
.contact-info h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.contact-info p { color: var(--ink-mute); margin-top: 1rem; max-width: 42ch; }
.contact-list { margin-top: 2rem; display: flex; flex-direction: column; gap: 1rem; }
.contact-list li { display: flex; gap: .8rem; align-items: baseline; font-size: .95rem; }
.contact-list .label { font-weight: 700; color: var(--ink); min-width: 90px; }

/* --- footer --- */
.site-footer { border-top: 1px solid var(--line); padding-block: 2.6rem; background: var(--bg-2); }
.footer-grid { display: flex; flex-direction: column; gap: 1.4rem; align-items: flex-start; }
.footer-brand { font-family: var(--serif); font-size: 1.2rem; }
.footer-brand span { color: var(--color-dark); font-style: italic; }
.footer-orgs { display: flex; flex-wrap: wrap; gap: .5rem; }
.footer-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; width: 100%; padding-top: 1.4rem; border-top: 1px solid var(--line-soft); font-size: .82rem; color: rgba(76,54,45,0.85); }
.footer-meta a { text-decoration: underline; text-underline-offset: 3px; }
.back-to-top {
  display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; font-weight: 600; color: var(--ink);
}

/* =============================================================
   7. Effects (reveal)
   ============================================================= */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }

/* =============================================================
   8. Responsive
   ============================================================= */
@media (min-width: 540px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-item:first-child { grid-column: span 3; }
}

@media (min-width: 720px) {
  .hero-grid { grid-template-columns: 1.1fr .9fr; align-items: center; }
  .manifesto-grid { grid-template-columns: 160px 1fr; }
  .pillars-grid { grid-template-columns: repeat(3, 1fr); }
  .values-grid { grid-template-columns: repeat(3, 1fr); }
  .ways-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { flex-direction: row; justify-content: space-between; width: 100%; }
  .hero-scroll-hint { display: flex; }
}

@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
  .mobile-menu { display: none; }
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
  .gallery-item:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
}

@media (min-width: 1280px) {
  .container { padding-inline: 2rem; }
}

/* =============================================================
   9. Reduced motion — only intrusive effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-track { animation-duration: 60s; }
  .hero-scroll-hint .line::after { animation: none; }
  .splash { animation: none; }
}
