/* ──────────────────────────────────────────────────────────
   TERRENA ADVISORY — sitio
   Lenguaje: Costa Este (Bebas Neue / Cormorant Garamond / DM Mono)
   Énfasis: contemporáneo, aireado, sin ruido.
   ────────────────────────────────────────────────────────── */

:root {
  --ink: #0f0d0a;
  --paper: #f5f0e8;
  --sand: #d4c9a8;
  --ocean: #2c4a5e;
  --foam: #e8ede4;
  --coral: #c85c3a;
  --gold: #b8945a;
  --pale: #faf7f2;
  --mist: rgba(44, 74, 94, 0.08);
  --rule: rgba(15, 13, 10, 0.08);

  --f-display: 'Bebas Neue', sans-serif;
  --f-serif: 'Onest', sans-serif;
  --f-sans: 'Onest', sans-serif;

  --max: 1180px;
  --gutter: clamp(1.5rem, 4vw, 4rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--f-sans);
  font-optical-sizing: auto;
  background: var(--pale);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* ── HEADER ─────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem var(--gutter);
  background: transparent;
  transition: background .35s ease, border-color .35s ease, color .35s ease;
  border-bottom: 1px solid transparent;
  color: var(--paper);
}
.site-header.is-scrolled {
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--rule);
  color: var(--ink);
}
.brand {
  font-family: var(--f-sans);
  font-size: 2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-flex;
  gap: 0.4em;
  align-items: baseline;
}
.brand b { font-weight: 700; }
.brand i {
  font-family: var(--f-sans);
  font-style: normal;
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: none;
  font-size: 0.82rem;
  opacity: 0.7;
}
.nav {
  display: flex;
  gap: 2.2rem;
  align-items: center;
}
.nav a {
  font-family: var(--f-sans);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  text-decoration: none;
  opacity: 0.78;
  transition: opacity .2s;
}
.nav a:hover { opacity: 1; }
.nav .nav-cta {
  padding: 0.65em 1.2em;
  border: 1px solid currentColor;
  opacity: 1;
}
.nav .nav-cta:hover { background: var(--coral); border-color: var(--coral); color: var(--paper); }

.hamburger {
  display: none;
  background: none;
  border: 0;
  width: 32px;
  height: 24px;
  position: relative;
  cursor: pointer;
}
.hamburger span {
  position: absolute;
  left: 0; right: 0;
  height: 1.5px;
  background: currentColor;
  transition: transform .25s, opacity .2s, top .25s;
}
.hamburger span:nth-child(1) { top: 4px; }
.hamburger span:nth-child(2) { top: 11px; }
.hamburger span:nth-child(3) { top: 18px; }
body.menu-open .hamburger span:nth-child(1) { top: 11px; transform: rotate(45deg); }
body.menu-open .hamburger span:nth-child(2) { opacity: 0; }
body.menu-open .hamburger span:nth-child(3) { top: 11px; transform: rotate(-45deg); }

/* mobile sheet */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--ocean);
  color: var(--paper);
  padding: 6rem var(--gutter) 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  transform: translateY(-100%);
  transition: transform .35s ease;
}
body.menu-open .mobile-menu { transform: translateY(0); }
.mobile-menu a {
  font-family: var(--f-sans);
  font-weight: 700;
  font-size: 2.2rem;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.mobile-menu .mobile-cta {
  margin-top: 1.5rem;
  font-family: var(--f-sans);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  padding: 1em 1.5em;
  border: 1px solid var(--gold);
  align-self: flex-start;
  color: var(--gold);
}

/* ── HERO ───────────────────────────── */
.hero {
  min-height: 100vh;
  color: var(--paper);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 var(--gutter) 0;
  overflow: hidden;
}

/* video de fondo */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background-color: var(--ocean);
}
@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
}

/* gradiente para legibilidad del texto */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.72) 0%,
    rgba(0,0,0,0.35) 45%,
    rgba(0,0,0,0.12) 100%
  );
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
  padding: clamp(4rem, 8vw, 7rem) 0 2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: flex-end;
}

.hero-eyebrow {
  font-family: var(--f-sans);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  color: rgba(245, 240, 232, 0.65);
  margin-bottom: 1.6rem;
}

.hero-title {
  font-family: var(--f-serif);
  font-size: clamp(2.8rem, 7vw, 6.5rem);
  line-height: 1.05;
  font-weight: 700;
  color: var(--paper);
  max-width: 820px;
}
.hero-title em {
  font-style: italic;
  color: rgba(245, 240, 232, 0.82);
}

.hero-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(2rem, 5vw, 5rem);
  margin-top: 2.4rem;
  flex-wrap: wrap;
}

.hero-sub {
  font-family: var(--f-sans);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  font-weight: 300;
  line-height: 1.6;
  color: rgba(245, 240, 232, 0.72);
  max-width: 440px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  flex-shrink: 0;
}

.btn {
  font-family: var(--f-sans);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 0.9em 1.6em;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.btn-primary {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}
.btn-primary:hover { background: transparent; color: var(--paper); }
.btn-ghost { color: rgba(245, 240, 232, 0.78); border-color: rgba(245, 240, 232, 0.45); }
.btn-ghost:hover { color: var(--paper); border-color: var(--paper); }
.btn-dark {
  background: var(--ocean);
  border-color: var(--ocean);
  color: var(--paper);
}
.btn-dark:hover { background: var(--ink); border-color: var(--ink); }

/* barra de stats al pie del hero */
.hero-meta {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(245, 240, 232, 0.12);
  margin: 0 calc(var(--gutter) * -1);
  padding: 0 var(--gutter);
}
.hero-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.4rem 2.5rem 1.4rem 0;
}
.hero-meta-sep {
  width: 1px;
  height: 2rem;
  background: rgba(245, 240, 232, 0.15);
  margin-right: 2.5rem;
}
.hero-meta-n {
  font-family: var(--f-display);
  font-size: 1.9rem;
  color: var(--paper);
  letter-spacing: 0.04em;
  line-height: 1;
}
.hero-meta-l {
  font-family: var(--f-sans);
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.45);
}

/* ── SECCIONES BASE ─────────────────── */
section { position: relative; }
.section-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(5rem, 10vw, 8rem) var(--gutter);
}
.section-label {
  font-family: var(--f-sans);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 0.9rem;
  font-weight: 500;
}
.section-title {
  font-family: var(--f-serif);
  font-size: clamp(2.4rem, 4.5vw, 4.2rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ocean);
}
.section-title .accent { color: var(--coral); }
.divider {
  width: 60px;
  height: 1px;
  background: var(--coral);
  margin: 1.8rem 0;
}
.section-intro {
  font-size: clamp(1.1rem, 1.4vw, 1.32rem);
  font-weight: 300;
  line-height: 1.65;
  color: #3a3530;
  max-width: 680px;
}

/* ── INTRO / PITCH ──────────────────── */
.pitch-bg { background: var(--pale); }
.pitch-claim {
  font-family: var(--f-serif);
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  line-height: 1.4;
  font-weight: 600;
  color: var(--ink);
  max-width: 880px;
  margin-top: 2rem;
}
.pitch-claim em {
  font-style: italic;
  color: var(--coral);
}

/* ── 4 PILARES ──────────────────────── */
.pillars-bg { background: var(--paper); }
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: 4rem;
  background: var(--sand);
  border: 1px solid var(--sand);
}
.pillar {
  background: var(--pale);
  padding: clamp(2rem, 3vw, 2.8rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 240px;
}
.pillar-n {
  font-family: var(--f-sans);
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  color: var(--gold);
}
.pillar-title {
  font-family: var(--f-serif);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ocean);
  line-height: 1.2;
}
.pillar-body {
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.65;
  color: #4a4540;
}

/* ── SOBRE ──────────────────────────── */
.about-bg { background: var(--ocean); color: var(--paper); }
.about-bg .section-label { color: var(--gold); }
.about-bg .section-title { color: var(--paper); }
.about-bg .divider { background: var(--gold); }
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  margin-top: 3rem;
  align-items: start;
}
.about-text p {
  font-size: 1.15rem;
  line-height: 1.7;
  font-weight: 300;
  color: rgba(245, 240, 232, 0.78);
}
.about-text p + p { margin-top: 1.2rem; }
.about-side {
  border-left: 1px solid rgba(245, 240, 232, 0.14);
  padding-left: clamp(1.5rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.about-fact-l {
  font-family: var(--f-sans);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.4rem;
}
.about-fact-v {
  font-family: var(--f-serif);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--paper);
}
.about-fact-v small {
  font-family: var(--f-sans);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: rgba(245, 240, 232, 0.55);
  display: block;
  margin-top: 0.3rem;
}

/* ── TRAYECTORIA ────────────────────── */
.trayectoria-bg { background: var(--pale); }

.tray-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 4rem;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.tray-stat {
  padding: clamp(2rem, 3vw, 3rem);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.tray-n {
  font-family: var(--f-serif);
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1;
  color: var(--ocean);
  letter-spacing: -0.03em;
}
.tray-l {
  font-family: var(--f-sans);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 0.8rem;
  line-height: 1.5;
}

.tray-tipos {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: baseline;
  gap: clamp(2rem, 5vw, 5rem);
  flex-wrap: wrap;
}
.tray-mercados {
  margin-top: 1.2rem;
  display: flex;
  align-items: baseline;
  gap: clamp(2rem, 5vw, 5rem);
  flex-wrap: wrap;
}
.tray-tipos-label {
  font-family: var(--f-sans);
  font-size: 0.58rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--coral);
  white-space: nowrap;
  min-width: 130px;
}
.tray-tipos-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
}
.tray-tipos-list span {
  font-family: var(--f-sans);
  font-size: 1rem;
  font-weight: 300;
  color: #3a3530;
}

/* ── PROCESO ────────────────────────── */
.process-bg { background: var(--pale); }
.process-list {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 3.5rem;
  border-top: 1px solid var(--rule);
}
.process-step {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(1.6rem, 2.5vw, 2.2rem) 0;
  border-bottom: 1px solid var(--rule);
  transition: padding-left .25s ease, background .25s ease;
}
.process-step:hover {
  padding-left: 1rem;
  background: rgba(184, 148, 90, 0.05);
}
.process-n {
  font-family: var(--f-sans);
  font-weight: 800;
  font-size: 2.6rem;
  color: var(--coral);
  letter-spacing: 0.04em;
  line-height: 1;
}
.process-text h3 {
  font-family: var(--f-serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ocean);
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.process-text p {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.6;
  color: #4a4540;
  margin-top: 0.3rem;
}
.process-eta {
  font-family: var(--f-sans);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: right;
  white-space: nowrap;
}

/* ── SERVICIOS ACCORDION ────────────── */
.services-bg { background: var(--pale); }

.svc-accordion {
  margin-top: 3.5rem;
  border-top: 1px solid var(--rule);
}
.svc-item {
  border-bottom: 1px solid var(--rule);
}
.svc-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 2.2rem 0;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  color: var(--ink);
  transition: color .2s;
}
.svc-trigger:hover { color: var(--ocean); }
.svc-name {
  font-family: var(--f-sans);
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 700;
  line-height: 1;
  flex: 1;
  letter-spacing: -0.02em;
}
.svc-abbr {
  font-family: var(--f-sans);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--coral);
  border: 1px solid var(--coral);
  padding: 0.35em 0.75em;
  flex-shrink: 0;
}
.svc-icon {
  font-family: var(--f-sans);
  font-size: 1.8rem;
  font-weight: 300;
  color: var(--ink);
  transition: transform .3s ease;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1;
}
.svc-item.is-open .svc-icon {
  transform: rotate(45deg);
}
.svc-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height .35s ease;
}
.svc-item.is-open .svc-body {
  max-height: 500px;
}
.svc-list {
  list-style: none;
  padding: 0 0 2.8rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 680px;
}
.svc-list li {
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.5;
  color: #3a3530;
  padding-left: 1.6rem;
  position: relative;
}
.svc-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--coral);
  font-weight: 400;
}

/* ── COMERCIAL / ANCLA ──────────────── */
.commercial-bg { background: var(--ink); color: var(--paper); }
.commercial-bg .section-label { color: var(--gold); }
.commercial-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  margin-top: 3rem;
  align-items: center;
}
.commercial-quote {
  font-family: var(--f-serif);
  font-size: clamp(1.4rem, 2vw, 1.9rem);
  font-weight: 400;
  line-height: 1.45;
  color: var(--paper);
  font-style: italic;
}
.commercial-quote em { color: var(--coral); font-style: normal; font-weight: 500; }
.commercial-fact {
  border-left: 1px solid rgba(245, 240, 232, 0.12);
  padding-left: 2rem;
}
.commercial-fact-n {
  font-family: var(--f-sans);
  font-weight: 800;
  font-size: clamp(3rem, 6vw, 5rem);
  color: var(--gold);
  letter-spacing: 0.03em;
  line-height: 1;
}
.commercial-fact-l {
  font-family: var(--f-sans);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.5);
  margin-top: 0.8rem;
}
.commercial-fact-d {
  font-size: 1.05rem;
  font-weight: 300;
  color: rgba(245, 240, 232, 0.72);
  line-height: 1.55;
  margin-top: 1rem;
}

/* ── CONTACTO / CTA ─────────────────── */
.contact-bg { background: var(--ocean); color: var(--paper); }
.contact-bg .section-label { color: var(--gold); }
.contact-bg .section-title { color: var(--paper); }
.contact-bg .divider { background: var(--coral); }
.contact-bg .section-intro { color: rgba(245, 240, 232, 0.72); }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(245, 240, 232, 0.12);
  border: 1px solid rgba(245, 240, 232, 0.12);
  margin-top: 3.5rem;
}
.contact-card {
  background: var(--ocean);
  padding: clamp(1.8rem, 2.5vw, 2.4rem);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--paper);
  transition: background .25s ease;
}
.contact-card:hover { background: rgba(15, 13, 10, 0.4); }
.contact-card-l {
  font-family: var(--f-sans);
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
}
.contact-card-v {
  font-family: var(--f-sans);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: var(--paper);
  word-break: break-word;
}
.contact-card-d {
  font-size: 0.95rem;
  font-weight: 300;
  color: rgba(245, 240, 232, 0.6);
}

/* ── FOOTER ─────────────────────────── */
.site-footer {
  background: var(--ink);
  color: rgba(245, 240, 232, 0.55);
  padding: 3rem var(--gutter);
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer-brand {
  font-family: var(--f-sans);
  font-weight: 700;
  font-size: 1.8rem;
  letter-spacing: 0.05em;
  color: var(--paper);
}
.footer-brand span { color: var(--coral); }
.footer-tag {
  font-family: var(--f-sans);
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-top: 0.4rem;
}
.footer-meta {
  font-family: var(--f-sans);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: right;
}
.footer-meta a { color: var(--gold); text-decoration: none; }
.footer-meta a:hover { color: var(--coral); }

/* ── RESPONSIVE ─────────────────────── */
@media (max-width: 900px) {
  .nav { display: none; }
  .hamburger { display: block; }

  .pillars-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-side { border-left: 0; padding-left: 0; border-top: 1px solid rgba(245,240,232,0.14); padding-top: 2rem; }
  .tray-grid { grid-template-columns: 1fr; }
  .tray-tipos, .tray-mercados { flex-direction: column; gap: 0.8rem; }
  .services-grid { grid-template-columns: 1fr; }
  .commercial-grid { grid-template-columns: 1fr; }
  .commercial-fact { border-left: 0; padding-left: 0; border-top: 1px solid rgba(245,240,232,0.12); padding-top: 1.5rem; }
  .contact-grid { grid-template-columns: 1fr; }

  .process-step {
    grid-template-columns: 50px 1fr;
    gap: 1.2rem;
  }
  .process-eta {
    grid-column: 2;
    text-align: left;
  }
  .process-n { font-size: 2rem; }
}

@media (max-width: 560px) {
  .hero-meta { gap: 1.6rem; }
  .hero-meta-n { font-size: 1.8rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-meta { text-align: left; }
}
