/* PATRIMONIA — Sistema visual v3.0 Nórdica
   Tokens del brand guide codificados.
   No introducir colores fuera de esta paleta. */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Serif:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&family=Instrument+Sans:wght@400;500;600&display=swap');

:root {
  /* ── FONDOS (5 válidos) ── */
  --bone: #F2EEE8;          /* problema / gancho / tensión */
  --slate: #475568;          /* autoridad / data / wealth */
  --charcoal: #1A1A1A;       /* dolor profundo / revelación */
  --plum: #4A3645;           /* caso / editorial */
  --sage: #7A8478;           /* insight / criterio */

  /* ── ACENTOS ── */
  --champagne: #C9B790;      /* acento principal (80% piezas) */
  --gold: #B8956A;           /* RESERVADO: punto del logo + editorial */

  /* ── NEUTROS ── */
  --gray: #8A8070;           /* body texto explicativo */
  --gray-light: #C8C0B4;
  --light-gray: #D5CFC4;
  --off-white: #EDE8DE;
  --dark-surface: #242424;
  --dark-border: #333333;

  /* ── TIPOS ── */
  --serif: 'IBM Plex Serif', Georgia, serif;
  --sans: 'Instrument Sans', system-ui, sans-serif;

  /* ── ESTRUCTURA ── */
  --line: 1px;
  --gutter: 80px;
  --line-x: 54px;  /* x de la línea champagne en posts 1080 */
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bone); color: var(--charcoal); font-family: var(--serif); -webkit-font-smoothing: antialiased; }
body { font-size: 18px; line-height: 1.6; }

/* ── Tipografía base ── */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; margin: 0; letter-spacing: -0.01em; }
em.cham, .italic-cham { font-style: italic; font-weight: 700; color: var(--champagne); }
p { margin: 0; }

/* ── Patrimonia chrome (header de marca con espaciado) ── */
.brand-eyebrow {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.brand-eyebrow.small { font-size: 11px; letter-spacing: 0.18em; }

/* ── Logo P. (sello editorial / momentos puntuales) ── */
.logo-p {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1;
}
.logo-p .dot { color: var(--gold); }
.logo-p.on-dark { color: var(--bone); }
.logo-p.on-light { color: var(--charcoal); }

/* ── Logotipo completo "Patrimonia." (uso principal en web) ── */
.wordmark {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1;
  text-decoration: none;
  display: inline-block;
}
.wordmark .dot { color: var(--gold); }
.wordmark.on-dark { color: var(--bone); }
.wordmark.on-light { color: var(--charcoal); }

/* ── Línea champagne vertical (firma estructural) ── */
.gold-line {
  position: absolute;
  left: var(--line-x);
  top: 0;
  bottom: 0;
  width: var(--line);
  background: var(--champagne);
  opacity: 1;
}
.gold-line.thin { opacity: 0.5; }

/* ── Sección base ── */
.sec { position: relative; padding: 140px 0 140px; overflow: hidden; }
.sec.dense { padding: 96px 0 96px; }
.sec.bone { background: var(--bone); }
.sec.charcoal { background: var(--charcoal); color: var(--bone); }
.sec.slate { background: var(--slate); color: var(--bone); }
.sec.plum { background: var(--plum); color: var(--bone); }
.sec.sage { background: var(--sage); color: var(--bone); }

.inner { max-width: 1280px; margin: 0 auto; padding: 0 80px 0 140px; position: relative; }

/* ── Tipos editoriales ── */
.h1 { font-size: clamp(56px, 7.5vw, 104px); font-weight: 700; line-height: 1.02; letter-spacing: -0.02em; }
.h1.tight { line-height: 0.98; }
.h2 { font-size: clamp(40px, 4.8vw, 64px); font-weight: 700; line-height: 1.1; }
.h2-italic { font-style: italic; font-weight: 700; color: var(--champagne); font-size: clamp(36px, 4.4vw, 60px); line-height: 1.15; letter-spacing: -0.01em; }
.h3 { font-size: clamp(28px, 3vw, 40px); font-weight: 700; line-height: 1.2; }
.body { font-family: var(--serif); font-weight: 400; font-size: 20px; line-height: 1.7; color: var(--gray); }
.body.lg { font-size: 24px; line-height: 1.65; }
.on-dark .body { color: var(--gray); }
.on-dark .h1, .on-dark .h2, .on-dark .h3 { color: var(--bone); }

/* ── Eyebrow numérico de sección ── */
.eyebrow-num { font-family: var(--sans); font-size: 13px; letter-spacing: 0.14em; color: var(--champagne); text-transform: uppercase; }
.title-rule { width: 56px; height: 2px; background: var(--champagne); margin-top: 24px; }

/* ── Lista con guión champagne ── */
.dash-list { list-style: none; padding: 0; margin: 0; }
.dash-list li { display: flex; gap: 16px; padding: 14px 0; font-family: var(--serif); font-size: 22px; line-height: 1.5; }
.dash-list li::before { content: "—"; color: var(--champagne); font-weight: 700; flex: 0 0 28px; }

/* ── Botón / CTA único ── */
.cta {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 17px;
  color: var(--charcoal);
  background: var(--champagne);
  padding: 18px 26px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.005em;
  transition: background 120ms ease, color 120ms ease;
}
.cta:hover { background: var(--gold); color: var(--bone); }
.cta .arrow { font-family: var(--serif); font-size: 17px; transform: translateY(-1px); }
.cta.ghost { background: transparent; color: var(--bone); border-bottom: 1px solid var(--champagne); padding: 8px 0; }
.cta.ghost:hover { color: var(--champagne); background: transparent; }
.cta.on-light.ghost { color: var(--charcoal); border-bottom-color: var(--champagne); }

/* ── Patterns ── */
.inline-cham em { font-style: italic; font-weight: 700; color: var(--champagne); }

/* ── Sello P. flotante ── */
.brand-seal {
  position: absolute;
  bottom: 32px;
  right: 56px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 56px;
  line-height: 1;
}
.brand-seal .dot { color: var(--gold); }

/* ── Section eyebrow del header ── */
.sec-eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--champagne);
  text-transform: uppercase;
  margin-bottom: 28px;
}

/* ── Detail label rows ── */
.rowline { display: grid; grid-template-columns: 200px 1fr; gap: 32px; padding: 22px 0; border-bottom: 1px solid rgba(201,183,144,0.18); }
.rowline .k { font-family: var(--sans); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--champagne); }
.rowline .v { font-family: var(--serif); font-size: 19px; line-height: 1.55; }

/* ── Top nav ── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 80px 24px 140px;
  z-index: 100;
  background: rgba(26,26,26,0.0);
  transition: background 200ms ease, padding 200ms ease, border-color 200ms ease;
  border-bottom: 1px solid transparent;
}
.topbar.scrolled { background: rgba(26,26,26,0.92); backdrop-filter: blur(8px); padding-top: 18px; padding-bottom: 18px; border-bottom-color: rgba(201,183,144,0.18); }
.topbar .nav-links { display: flex; gap: 36px; }
.topbar .nav-links a { font-family: var(--sans); font-size: 14px; color: var(--bone); text-decoration: none; opacity: 0.78; letter-spacing: 0.02em; }
.topbar .nav-links a:hover { color: var(--champagne); opacity: 1; }
.topbar .logo-p { font-size: 30px; }
.topbar-cta { font-family: var(--serif); font-weight: 700; font-size: 14px; color: var(--charcoal); background: var(--champagne); padding: 12px 18px; text-decoration: none; white-space: nowrap; }
.topbar-cta:hover { background: var(--gold); color: var(--bone); }

/* Reserved scroll padding for fixed nav */
section { scroll-margin-top: 80px; }

/* ── Pequeñas firmas ── */
.section-mark {
  position: absolute;
  top: 40px;
  right: 56px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--champagne);
  text-transform: uppercase;
  opacity: 0.7;
}

/* ── Cards de pilares / método ── */
.pillar-card { padding: 56px 48px; border-left: 2px solid var(--champagne); position: relative; }
.pillar-card.charcoal { background: var(--charcoal); color: var(--bone); }
.pillar-card.bone { background: var(--bone); }
.pillar-card.slate { background: var(--slate); color: var(--bone); }
.pillar-card .num { font-family: var(--serif); font-weight: 700; font-size: 56px; color: var(--champagne); line-height: 1; margin-bottom: 28px; }
.pillar-card .title { font-family: var(--serif); font-weight: 700; font-size: 28px; line-height: 1.2; margin-bottom: 18px; }
.pillar-card .desc { font-family: var(--serif); font-weight: 400; font-size: 17px; line-height: 1.7; color: var(--gray); }
.pillar-card.charcoal .desc { color: var(--gray-light); }
.pillar-card.slate .desc { color: var(--gray-light); }

/* ── FAQ ── */
.faq-item { border-bottom: 1px solid rgba(26,26,26,0.12); padding: 28px 0; cursor: pointer; }
.faq-item .q { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; }
.faq-item .q-text { font-family: var(--serif); font-weight: 700; font-size: 22px; line-height: 1.4; color: var(--charcoal); }
.faq-item .q-toggle { font-family: var(--serif); font-weight: 700; font-size: 24px; color: var(--champagne); line-height: 1; }
.faq-item .a { display: none; margin-top: 18px; font-family: var(--serif); font-size: 19px; line-height: 1.7; color: var(--gray); max-width: 720px; }
.faq-item.open .a { display: block; }
.faq-item.open .q-toggle { color: var(--gold); }

/* ── Footer ── */
.footer { background: var(--charcoal); color: var(--bone); padding: 96px 0 60px; position: relative; }
.footer .top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 64px; margin-bottom: 64px; }
.footer .col-title { font-family: var(--sans); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--champagne); margin-bottom: 18px; }
.footer a { display: block; color: var(--bone); text-decoration: none; font-family: var(--serif); font-size: 16px; padding: 4px 0; opacity: 0.78; }
.footer a:hover { color: var(--champagne); opacity: 1; }
.footer .bottom { display: flex; justify-content: space-between; align-items: baseline; padding-top: 32px; border-top: 1px solid rgba(201,183,144,0.18); font-family: var(--sans); font-size: 13px; color: var(--gray); letter-spacing: 0.04em; }

/* ── Quiet animations ── */
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.reveal { opacity: 0; }
.reveal.in { animation: fade-up 800ms ease forwards; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .inner { padding: 0 28px 0 52px; }
  .topbar { padding: 16px 24px 16px 52px; }
  .topbar .nav-links { display: none; }
  .topbar-cta { font-size: 13px; padding: 10px 14px; }
  .sec { padding: 88px 0; }
  .footer { padding: 72px 0 36px; }
  .footer .top { grid-template-columns: 1fr; gap: 40px; }
  .rowline { grid-template-columns: 1fr; gap: 6px; padding: 18px 0; }
  .section-mark { display: none; }
  .brand-seal { right: 28px; bottom: 24px; font-size: 44px; }
}
@media (max-width: 600px) {
  :root { --line-x: 22px; }
  .inner { padding: 0 22px 0 40px; }
  .topbar { padding: 14px 18px 14px 40px; gap: 12px; }
  .topbar .wordmark { font-size: 22px; }
  .topbar-quien { display: none; }
  .topbar-cta { font-size: 12px; padding: 9px 12px; letter-spacing: 0; }
  body, html { overflow-x: hidden; }

  /* Footer mobile: prevent horizontal overflow */
  .footer { padding: 64px 0 32px; }
  .footer .top {
    grid-template-columns: 1fr;
    gap: 36px;
    margin-bottom: 48px;
  }
  .footer a {
    font-size: 15px;
    word-break: break-word;
    overflow-wrap: break-word;
  }
  .footer .bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    font-size: 11px;
  }
  .footer .tagline { font-size: 14px; }
}
