/* ============================================================
   LESIONES — Sistema de diseño
   Negro / antracita + dorado sutil · moderno y cercano
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400;1,6..72,500&family=Hanken+Grotesk:wght@400;500;600;700&display=swap');

:root {
  /* — Dark palette (warm near-black) — */
  --ink:        oklch(0.165 0.006 60);   /* page background dark */
  --ink-2:      oklch(0.205 0.006 60);   /* raised surface */
  --ink-3:      oklch(0.245 0.007 62);   /* card / hover */
  --ink-line:   oklch(0.32 0.008 65);    /* hairline on dark */

  /* — Light palette (warm cream) — */
  --paper:      oklch(0.975 0.006 83);   /* light section bg */
  --paper-2:    oklch(0.945 0.008 83);   /* raised on light */
  --paper-line: oklch(0.88 0.008 80);    /* hairline on light */

  /* — Text — */
  --cream:      oklch(0.945 0.008 83);   /* primary text on dark */
  --cream-mut:  oklch(0.74 0.012 80);    /* muted text on dark */
  --graphite:   oklch(0.235 0.006 60);   /* primary text on light */
  --graphite-mut: oklch(0.46 0.008 65);  /* muted text on light */

  /* — Gold — */
  --gold:       oklch(0.80 0.085 84);    /* gold on dark */
  --gold-soft:  oklch(0.86 0.06 86);     /* lighter gold */
  --gold-deep:  oklch(0.585 0.085 72);   /* gold on light bg (readable) */
  --gold-glow:  oklch(0.80 0.085 84 / 0.14);

  /* — Type — */
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans:  'Hanken Grotesk', system-ui, -apple-system, sans-serif;

  /* — Layout — */
  --maxw: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 4px;
  --radius-lg: 10px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--ink);
  color: var(--cream);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
ul { list-style: none; padding: 0; }
::selection { background: var(--gold); color: var(--ink); }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.07; letter-spacing: -0.01em; }
.display {
  font-size: clamp(2.7rem, 6.4vw, 5.1rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.022em;
}
.h-xl { font-size: clamp(2.1rem, 4.4vw, 3.4rem); line-height: 1.05; letter-spacing: -0.018em; }
.h-lg { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.h-md { font-size: clamp(1.35rem, 2vw, 1.7rem); }
em, .italic { font-style: italic; }
.serif { font-family: var(--serif); }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--gold);
  opacity: 0.7;
}
.eyebrow.center::before { display: none; }

.lead { font-size: clamp(1.1rem, 1.5vw, 1.32rem); line-height: 1.55; color: var(--cream-mut); }

/* on light sections */
.on-light { background: var(--paper); color: var(--graphite); }
.on-light h1, .on-light h2, .on-light h3, .on-light h4 { color: var(--graphite); }
.on-light .lead { color: var(--graphite-mut); }
.on-light .eyebrow { color: var(--gold-deep); }
.on-light .eyebrow::before { background: var(--gold-deep); }

/* ---------- Layout helpers ---------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { max-width: 880px; margin-inline: auto; padding-inline: var(--gutter); }
section { padding-block: clamp(64px, 9vw, 130px); }
.section-tight { padding-block: clamp(48px, 6vw, 84px); }
.stack > * + * { margin-top: 1rem; }
.muted { color: var(--cream-mut); }
.on-light .muted { color: var(--graphite-mut); }
.center { text-align: center; }
.gold-text { color: var(--gold); }
.on-light .gold-text { color: var(--gold-deep); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  padding: 0.95em 1.6em;
  font-family: var(--sans); font-weight: 600; font-size: 0.96rem;
  letter-spacing: 0.005em;
  border-radius: var(--radius);
  transition: transform 0.4s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
  cursor: pointer;
  line-height: 1;
}
.btn svg { width: 1.05em; height: 1.05em; }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-soft); transform: translateY(-2px); }
.btn-ghost { border: 1px solid var(--ink-line); color: var(--cream); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.on-light .btn-ghost { border-color: var(--paper-line); color: var(--graphite); }
.on-light .btn-ghost:hover { border-color: var(--gold-deep); color: var(--gold-deep); }
.btn-dark { background: var(--graphite); color: var(--paper); }
.btn-dark:hover { background: var(--ink); transform: translateY(-2px); }
.btn-lg { padding: 1.1em 2em; font-size: 1.02rem; }
.btn-block { width: 100%; justify-content: center; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-weight: 600; font-size: 0.95rem; color: var(--gold);
  transition: gap 0.3s var(--ease);
}
.on-light .link-arrow { color: var(--gold-deep); }
.link-arrow:hover { gap: 0.85em; }
.link-arrow svg { width: 1em; height: 1em; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: oklch(0.165 0.006 60 / 0.82);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--ink-line); }
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
  max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter);
}
.brand { display: inline-flex; align-items: baseline; gap: 0.08em; }
.brand-mark {
  font-family: var(--serif); font-weight: 600; font-size: 1.5rem;
  letter-spacing: 0.04em; color: var(--cream);
}
.brand-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); align-self: center; margin-left: 3px; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-link {
  font-family: var(--sans); font-size: 0.93rem; font-weight: 500;
  color: var(--cream-mut); padding: 0.5em 0.9em; border-radius: var(--radius);
  transition: color 0.25s var(--ease);
  position: relative;
}
.nav-link:hover { color: var(--cream); }
.nav-link.active { color: var(--gold); }
.nav-right { display: flex; align-items: center; gap: 14px; }

.lang-toggle {
  display: inline-flex; align-items: center;
  border: 1px solid var(--ink-line); border-radius: 999px;
  padding: 2px; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.04em;
}
.lang-toggle button {
  padding: 0.32em 0.62em; border-radius: 999px; color: var(--cream-mut);
  transition: all 0.25s var(--ease);
}
.lang-toggle button.active { background: var(--gold); color: var(--ink); }

.nav-cta { white-space: nowrap; }
.nav-toggle { display: none; }

@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; top: 76px; left: 0; right: 0;
    background: var(--ink-2); border-bottom: 1px solid var(--ink-line);
    padding: 12px var(--gutter) 24px;
  }
  .nav-links.open .nav-link { padding: 0.85em 0; font-size: 1.05rem; border-bottom: 1px solid var(--ink-line); }
  .nav-toggle {
    display: inline-flex; flex-direction: column; gap: 5px; padding: 8px;
  }
  .nav-toggle span { width: 22px; height: 2px; background: var(--cream); transition: 0.3s var(--ease); }
  .nav-cta.desktop-only { display: none; }
}

/* ---------- Placeholder (drop your photo) ---------- */
.ph {
  position: relative; overflow: hidden;
  background-color: var(--ink-2);
  background-image: repeating-linear-gradient(
    -45deg,
    transparent, transparent 11px,
    oklch(1 0 0 / 0.022) 11px, oklch(1 0 0 / 0.022) 22px
  );
  border: 1px solid var(--ink-line);
  border-radius: var(--radius-lg);
  display: grid; place-items: center;
  color: var(--cream-mut);
}
.ph::after {
  content: attr(data-label);
  font-family: 'SFMono-Regular', ui-monospace, 'Menlo', monospace;
  font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase;
  color: oklch(0.7 0.012 80 / 0.85);
  background: oklch(0.165 0.006 60 / 0.55);
  padding: 0.5em 0.9em; border-radius: 999px;
  border: 1px solid var(--ink-line);
  text-align: center; max-width: 80%;
}
.on-light .ph {
  background-color: var(--paper-2);
  background-image: repeating-linear-gradient(-45deg, transparent, transparent 11px, oklch(0 0 0 / 0.028) 11px, oklch(0 0 0 / 0.028) 22px);
  border-color: var(--paper-line);
}
.on-light .ph::after { color: var(--graphite-mut); background: oklch(0.975 0.006 83 / 0.6); border-color: var(--paper-line); }

/* ---------- Cards ---------- */
.card {
  background: var(--ink-2);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 36px);
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease), background 0.4s var(--ease);
}
.card:hover { border-color: oklch(0.42 0.04 80); transform: translateY(-3px); }
.on-light .card { background: #fff; border-color: var(--paper-line); }
.on-light .card:hover { border-color: var(--gold-deep); }

/* ---------- Stats ---------- */
.stat-num {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.4rem, 4.5vw, 3.6rem); line-height: 1;
  color: var(--gold); letter-spacing: -0.02em;
}
.on-light .stat-num { color: var(--gold-deep); }
.stat-label { font-size: 0.92rem; color: var(--cream-mut); margin-top: 0.6em; letter-spacing: 0.01em; }
.on-light .stat-label { color: var(--graphite-mut); }

/* ---------- Reveal on scroll ----------
   Content is always visible (no opacity/transform entrance) for maximum
   reliability across rendering environments. .reveal/.in kept as no-ops
   so existing markup and JS hooks remain valid. */
.reveal { opacity: 1; transform: none; }

/* ---------- Divider rule ---------- */
.rule { height: 1px; background: var(--ink-line); border: 0; }
.on-light .rule { background: var(--paper-line); }

/* ---------- Pills / tags ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em;
  padding: 0.45em 0.9em; border-radius: 999px;
  border: 1px solid var(--ink-line); color: var(--cream-mut);
}
.pill.gold { border-color: oklch(0.5 0.06 80); color: var(--gold); background: var(--gold-glow); }
.on-light .pill { border-color: var(--paper-line); color: var(--graphite-mut); }
.on-light .pill.gold { color: var(--gold-deep); border-color: oklch(0.78 0.06 80); background: oklch(0.8 0.085 84 / 0.12); }

/* ---------- Footer ---------- */
.site-footer { background: oklch(0.135 0.006 60); border-top: 1px solid var(--ink-line); padding-block: clamp(56px, 7vw, 88px) 36px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; }
.footer-col h4 { font-family: var(--sans); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.1em; }
.footer-col a { display: block; color: var(--cream-mut); font-size: 0.95rem; padding: 0.32em 0; transition: color 0.25s var(--ease); }
.footer-col a:hover { color: var(--cream); }
.footer-brand .brand-mark { font-size: 1.7rem; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: clamp(40px, 5vw, 64px); padding-top: 28px; border-top: 1px solid var(--ink-line); font-size: 0.84rem; color: var(--cream-mut); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 460px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Generic grids ---------- */
.grid { display: grid; gap: clamp(18px, 2.4vw, 28px); }
.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: 940px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- Floating contact bar (mobile) ---------- */
.float-call {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  display: none; align-items: center; gap: 0.6em;
  background: var(--gold); color: var(--ink);
  padding: 0.85em 1.2em; border-radius: 999px; font-weight: 700; font-size: 0.95rem;
  box-shadow: 0 8px 30px oklch(0 0 0 / 0.4);
}
.float-call svg { width: 1.1em; height: 1.1em; }
@media (max-width: 760px) { .float-call { display: inline-flex; left: 18px; right: auto; } }

/* ---------- Floating WhatsApp (all pages) ---------- */
.float-wa {
  position: fixed; right: 18px; bottom: 18px; z-index: 95;
  width: 56px; height: 56px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #25D366; color: #fff;
  box-shadow: 0 10px 32px oklch(0 0 0 / 0.42);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.float-wa:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 14px 38px oklch(0 0 0 / 0.5); }
.float-wa svg { width: 30px; height: 30px; }

/* utility */
.flex { display: flex; }
.items-center { align-items: center; }
.gap-sm { gap: 10px; }
.gap-md { gap: 18px; }
.wrap-btns { display: flex; flex-wrap: wrap; gap: 14px; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.6rem; } .mt-4 { margin-top: 2.4rem; } .mt-5 { margin-top: 3.4rem; }
.maxch { max-width: 60ch; }
