/*
 ╔══════════════════════════════════════════════════════════╗
 ║  PEDRO CORDOVA — SISTEMA ÁUREO & FIBONACCI              ║
 ║  φ = 1.618034  |  Sucesión: 1,1,2,3,5,8,13,21,34,55,89,144
 ╚══════════════════════════════════════════════════════════╝

 ESCALA DE ESPACIADO (Fibonacci × base 8px):
   --s1:  8px   (F6)
   --s2: 13px   (F7)
   --s3: 21px   (F8)
   --s4: 34px   (F9)
   --s5: 55px   (F10)
   --s6: 89px   (F11)
   --s7:144px   (F12)

 ESCALA TIPOGRÁFICA (×φ desde base 13px):
   --t0: 8px    micro
   --t1:13px    caption / label
   --t2:21px    body large / subhead
   --t3:34px    heading md
   --t4:55px    heading lg
   --t5:89px    display

 COLUMNAS ÁUREAS:
   menor: 38.197%  (1/φ²)
   mayor: 61.803%  (1/φ)
   → grid-template-columns: 38.197fr 61.803fr  (o inverso)

 RATIOS UI:
   --phi: 1.618034
   --nav-h: 89px        (Fibonacci)
   --header-min: 233px  (144+89)
   --radius: 0          (diseño editorial, sin redondeos)
*/

:root {
  /* ── COLOR TOKENS ── */
  --black:  #1A1612;
  --beige:  #F8F7F5;
  --cream:  #FEFCFA;
  --border: #EBE5DF;
  --muted:  #8A7F76;
  --accent: #8B6F47;
  --ff-serif: 'Lora', Georgia, serif;
  --ff-sans:  'Inter', system-ui, sans-serif;

  /* ── FIBONACCI SPACING ── */
  --s1:   8px;
  --s2:  13px;
  --s3:  21px;
  --s4:  34px;
  --s5:  55px;
  --s6:  89px;
  --s7: 144px;

  /* ── TYPE SCALE (Fibonacci px) ── */
  --t0:  8px;
  --t1: 13px;
  --t2: 21px;
  --t3: 34px;
  --t4: 55px;
  --t5: 89px;

  /* ── GOLDEN RATIO ── */
  --phi: 1.618034;

  /* ── LAYOUT ── */
  --nav-h:      89px;
  --header-min: 233px;   /* 144 + 89 */

  /* ── LINE HEIGHTS (φ-based) ── */
  --lh-tight:  1.236;    /* 1/φ × 2 */
  --lh-normal: 1.618;    /* φ */
  --lh-loose:  2.058;    /* φ × 1.272 */
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--ff-sans);
  background: var(--cream);
  color: var(--black);
  font-size: var(--t1);          /* 13px base */
  line-height: var(--lh-normal); /* 1.618 */
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ══════════════════════════════════════
   NAV  — height: 89px (Fibonacci F11)
══════════════════════════════════════ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 var(--s6) 0 var(--s6);   /* 89px sides */
  height: var(--nav-h);                /* 89px */
  background: var(--beige);
  border-bottom: 2px solid var(--black);
}
.nav-logo {
  font-family: var(--ff-serif);
  font-size: var(--t1);              /* 13px */
  font-weight: 600; letter-spacing: 0.02em;
  padding-bottom: var(--s3);         /* 21px */
  white-space: nowrap;
}
.nav-logo span { color: var(--muted); font-weight: 400; font-style: italic; }
.nav-links { display: flex; gap: 0; align-items: flex-end; list-style: none; }
.nav-links a {
  display: block;
  font-size: calc(var(--t0) + 1.5px);  /* ~9.5px → use 0.74rem for crispness */
  font-size: 0.74rem;
  font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--black); opacity: 0.5;
  padding: var(--s2) var(--s3);        /* 13px 21px */
  border: 1px solid transparent;
  border-bottom: none;
  margin-bottom: -2px;
  background: transparent;
  transition: all 0.18s;
}
.nav-links a:hover { opacity: 1; background: var(--cream); border-color: var(--border); }
.nav-links a.active {
  opacity: 1; background: var(--cream);
  border-color: var(--black);
  border-bottom: 2px solid var(--cream);
  margin-bottom: -2px;
}
.nav-cta {
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: var(--s2) var(--s4);       /* 13px 34px */
  border: 1px solid var(--black);
  transition: background 0.2s, color 0.2s;
}
.nav-cta:hover { background: var(--black); color: var(--cream); }
.lang-btn {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: var(--s1) var(--s2);       /* 8px 13px */
  border: 1px solid var(--border); color: var(--muted);
  transition: all 0.2s;
}
.lang-btn:hover { border-color: var(--black); color: var(--black); }
.nav-right {
  display: flex; gap: var(--s2);      /* 13px */
  align-items: flex-end;
  padding-bottom: var(--s2);          /* 13px */
}

/* ══════════════════════════════════════
   PAGE HEADER — min-height: 233px (144+89)
   Padding: 89px × 55px
══════════════════════════════════════ */
.page-header {
  min-height: var(--header-min);       /* 233px */
  background: var(--black); color: var(--cream);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: var(--s6) var(--s6) var(--s5);  /* 89px 89px 55px */
  margin-top: var(--nav-h);
  border-bottom: 1px solid rgba(235,229,223,0.1);
  position: relative; overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 38.197%;                      /* golden minor column */
  height: 100%;
  background-image: repeating-linear-gradient(
    90deg, transparent, transparent calc(var(--s5) - 1px),
    rgba(235,229,223,0.04) calc(var(--s5) - 1px),
    rgba(235,229,223,0.04) var(--s5)   /* 55px grid */
  );
}
.page-header-tag {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--accent);
  display: flex; align-items: center; gap: var(--s2);  /* 13px */
  margin-bottom: var(--s3);                            /* 21px */
}
.page-header-tag::before {
  content: ''; display: inline-block;
  width: var(--s4); height: 1px;       /* 34px */
  background: var(--accent);
}
.page-header h1 {
  font-family: var(--ff-serif);
  font-size: clamp(var(--t3), 4vw, var(--t4));  /* 34→55px */
  font-weight: 600; line-height: var(--lh-tight); letter-spacing: -0.02em;
}
.page-header h1 em { font-style: italic; color: var(--accent); }
.page-header-sub {
  font-size: var(--t1);                /* 13px */
  color: rgba(254,252,250,0.45);
  max-width: 38.197%;                  /* golden column */
  /* fallback for small screens */
  max-width: clamp(280px, 38.197%, 480px);
  line-height: var(--lh-normal);
  margin-top: var(--s3);              /* 21px */
}

/* ══════════════════════════════════════
   SECTION SHARED
══════════════════════════════════════ */
section { border-bottom: 1px solid var(--border); }
.section-header {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: var(--s5) var(--s6) var(--s4);  /* 55px 89px 34px */
  border-bottom: 1px solid var(--border);
}
.section-tag {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--muted);
  display: flex; align-items: center; gap: var(--s2);
}
.section-tag::before {
  content: ''; display: inline-block;
  width: var(--s4); height: 1px; background: var(--accent);
}
.section-title {
  font-family: var(--ff-serif);
  font-size: clamp(var(--t2), 3vw, var(--t3));  /* 21→34px */
  font-weight: 600; letter-spacing: -0.02em; line-height: var(--lh-tight);
}
.section-title em { font-style: italic; color: var(--accent); }

/* ══════════════════════════════════════
   GOLDEN GRID LAYOUTS
   Minor: 38.197fr  Major: 61.803fr
══════════════════════════════════════ */
.grid-golden        { display: grid; grid-template-columns: 61.803fr 38.197fr; }
.grid-golden-inv    { display: grid; grid-template-columns: 38.197fr 61.803fr; }
.grid-golden-equal  { display: grid; grid-template-columns: 1fr 1fr; }  /* hero halves */

/* ══════════════════════════════════════
   BUTTONS
══════════════════════════════════════ */
.btn-primary {
  display: inline-flex; align-items: center; gap: var(--s2);   /* 13px */
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: var(--s3) var(--s4);       /* 21px 34px */
  background: var(--black); color: var(--cream);
  transition: background 0.2s;
}
.btn-primary:hover { background: var(--accent); }
.btn-secondary {
  font-size: 0.8rem; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--border); padding-bottom: var(--s1);  /* 8px */
  transition: color 0.2s, border-color 0.2s;
}
.btn-secondary:hover { color: var(--black); border-color: var(--black); }

/* ══════════════════════════════════════
   MARQUEE
══════════════════════════════════════ */
.marquee-bar {
  overflow: hidden;
  padding: var(--s2) 0;              /* 13px */
  background: var(--black); color: var(--cream);
  border-top: 1px solid rgba(235,229,223,0.08);
  border-bottom: 1px solid rgba(235,229,223,0.08);
}
.marquee-track {
  display: flex; gap: var(--s5);     /* 55px */
  white-space: nowrap;
  animation: marquee 34s linear infinite;
}
.marquee-item {
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.15em;
  text-transform: uppercase; opacity: 0.6; flex-shrink: 0;
}
.marquee-sep { color: var(--accent); opacity: 1; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ══════════════════════════════════════
   FOOTER  — padding: 55px 89px
══════════════════════════════════════ */
footer {
  background: var(--black); color: var(--cream);
  padding: var(--s5) var(--s6);      /* 55px 89px */
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: var(--s4);  /* 34px */
  border-top: 1px solid rgba(235,229,223,0.1);
}
.footer-logo { font-family: var(--ff-serif); font-size: var(--t1); font-weight: 600; }
.footer-logo span { font-style: italic; font-weight: 400; color: var(--accent); }
.footer-links { display: flex; gap: var(--s4); list-style: none; justify-content: center; }
.footer-links a {
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(254,252,250,0.4);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--cream); }
.footer-socials { display: flex; gap: var(--s2); list-style: none; justify-content: flex-end; }
.social-link {
  width: var(--s5); height: var(--s5);  /* 55px × 55px — Fibonacci square */
  border: 1px solid rgba(235,229,223,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; color: rgba(254,252,250,0.5); transition: all 0.2s;
}
.social-link:hover { border-color: var(--accent); color: var(--accent); }
.footer-bottom {
  grid-column: 1/-1;
  text-align: center; font-size: 0.68rem;
  color: rgba(254,252,250,0.2); letter-spacing: 0.06em;
  padding-top: var(--s3);            /* 21px */
  border-top: 1px solid rgba(235,229,223,0.07);
  margin-top: var(--s2);            /* 13px */
}

/* ══════════════════════════════════════
   FORM
══════════════════════════════════════ */
.form-group { margin-bottom: var(--s4); }   /* 34px */
.form-label {
  display: block; font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: var(--s2);  /* 13px */
}
.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: var(--s2) var(--s3);     /* 13px 21px */
  border: 1px solid var(--border); background: var(--cream);
  font-family: var(--ff-sans); font-size: var(--t1);
  color: var(--black); outline: none; transition: border-color 0.2s;
  appearance: none; -webkit-appearance: none;
}
.form-input:focus, .form-textarea:focus, .form-select:focus { border-color: var(--black); }
.form-textarea { height: var(--s7); resize: vertical; }  /* 144px */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }  /* 21px */
.btn-submit {
  width: 100%;
  padding: var(--s3) var(--s4);     /* 21px 34px */
  background: var(--black); color: var(--cream);
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; transition: background 0.2s;
  cursor: pointer; border: none; font-family: var(--ff-sans);
}
.btn-submit:hover { background: var(--accent); }

/* ══════════════════════════════════════
   SCROLL REVEAL
══════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(var(--s4));   /* 34px */
  transition: opacity 0.618s ease, transform 0.618s ease;  /* φ×0.382s */
}
.reveal.visible { opacity: 1; transform: none; }

/* ══════════════════════════════════════
   LANGUAGE TOGGLE
══════════════════════════════════════ */
[data-en] { display: none !important; }
body.lang-en [data-es] { display: none !important; }
body.lang-en [data-en] { display: revert !important; }

/* ══════════════════════════════════════
   TWEAKS PANEL
══════════════════════════════════════ */
#tweaks-panel {
  display: none; position: fixed;
  bottom: var(--s3); right: var(--s3);  /* 21px */
  z-index: 999; background: var(--cream);
  border: 1px solid var(--border);
  padding: var(--s4);                   /* 34px */
  min-width: var(--s7);                 /* 144px → expands naturally */
  min-width: 240px;
  box-shadow: 0 var(--s2) var(--s5) rgba(26,22,18,0.12);
}
#tweaks-panel.open { display: block; }
.tweaks-title {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: var(--s3);            /* 21px */
}
.tweak-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--s3);
}
.tweak-label { font-size: 0.78rem; font-weight: 500; color: var(--black); }
.toggle-group { display: flex; border: 1px solid var(--border); overflow: hidden; }
.toggle-opt {
  padding: var(--s1) var(--s2);       /* 8px 13px */
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  cursor: pointer; color: var(--muted); transition: all 0.15s;
  border-right: 1px solid var(--border);
}
.toggle-opt:last-child { border-right: none; }
.toggle-opt.active { background: var(--black); color: var(--cream); }

/* ══════════════════════════════════════
   WHATSAPP FLOAT
══════════════════════════════════════ */
.wa-float {
  position: fixed;
  bottom: var(--s4); right: var(--s4);  /* 34px */
  z-index: 200;
  width: var(--s5); height: var(--s5);  /* 55px — Fibonacci */
  border-radius: 50%;
  background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 var(--s1) var(--s4) rgba(37,211,102,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
.wa-float:hover {
  transform: scale(var(--phi) * 0.667);
  transform: scale(1.08);
  box-shadow: 0 var(--s2) var(--s5) rgba(37,211,102,0.55);
}

/* ══════════════════════════════════════
   CREDENTIAL / BADGE ROW
══════════════════════════════════════ */
.credential {
  display: flex; align-items: center; gap: var(--s3);   /* 21px */
  padding: var(--s2) var(--s3);                          /* 13px 21px */
  border: 1px solid var(--border); background: var(--cream);
  font-size: 0.82rem;
  line-height: var(--lh-normal);
}
.credential-dot {
  width: var(--s1); height: var(--s1);  /* 8px — Fibonacci */
  border-radius: 50%; background: var(--accent); flex-shrink: 0;
}

/* ══════════════════════════════════════
   CONTACT CARD ITEM
══════════════════════════════════════ */
.contact-item {
  display: flex; align-items: center; gap: var(--s3);   /* 21px */
  padding: var(--s3) var(--s4);                          /* 21px 34px */
  border: 1px solid rgba(235,229,223,0.12);
  transition: border-color 0.2s;
  text-decoration: none; color: inherit;
}
.contact-item:hover { border-color: var(--accent); }
.contact-icon {
  width: var(--s5); height: var(--s5);  /* 55px */
  border: 1px solid rgba(235,229,223,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; flex-shrink: 0; color: var(--cream);
}

/* ══════════════════════════════════════
   BLOG CARD
══════════════════════════════════════ */
.blog-pill {
  display: inline-block;
  font-size: 0.65rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: var(--s1) var(--s2);     /* 8px 13px */
  border: 1px solid var(--border); color: var(--accent);
  margin-bottom: var(--s3);         /* 21px */
}
