/* =========================================================
   ESTUDIO PEIRANO CONSULTORES — Refined landing styles
   Refinamiento visual sobre la estructura original.
   Mobile-first. Vanilla CSS.
   ========================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  --navy: #0A1B2D;
  --navy-soft: #28384C;
  --navy-deep: #06101C;
  --navy-ink: #0F2236;
  --off-white: #F4F4F0;
  --paper: #FAFAF6;
  --white: #FFFFFF;
  --gold: #C9A86A;
  --gold-soft: #D9BE8A;
  --gold-deep: #A88748;
  --gray-text: #5B6878;
  --gray-quiet: #8A95A4;
  --gray-light: #E8E8E2;
  --gray-rule: #D8D8D0;
  --gray-on-dark: #A8B4C4;
  --whatsapp-green: #25D366;
  --whatsapp-green-dark: #1FB855;
  --error-red: #C0392B;
  --success-green: #27AE60;

  --container-max: 1280px;
  --container-pad: 24px;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 12px;

  --shadow-soft: 0 8px 24px rgba(10, 27, 45, 0.08);
  --shadow-fab: 0 10px 28px rgba(10, 27, 45, 0.22), 0 2px 4px rgba(0, 0, 0, 0.08);

  --transition: 220ms cubic-bezier(0.2, 0.7, 0.2, 1);

  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Inter Tight', 'Inter', system-ui, sans-serif;
  --font-serif: 'Fraunces', 'Times New Roman', serif;
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Mono', 'Roboto Mono', Menlo, Consolas, monospace;
}

/* ---------- 2. Reset + base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 104px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--navy);
  background: var(--paper);
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--navy);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}
a:hover { color: var(--navy-soft); }

ul, ol { list-style: none; padding: 0; margin: 0; }

button {
  font-family: inherit;
  cursor: pointer;
  border: 0;
  background: transparent;
}

input, textarea, select {
  font-family: inherit;
  font-size: 16px;
  color: var(--navy);
}

hr.hairline {
  border: 0;
  border-top: 1px solid var(--gray-rule);
  margin: 32px 0;
}
hr.hairline--dark { border-top-color: rgba(255, 255, 255, 0.08); }

/* ---------- 3. Skip link ---------- */
.skip-link {
  position: absolute;
  top: -40px; left: 16px;
  background: var(--navy);
  color: var(--white);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  z-index: 10000;
  font-size: 14px;
  font-weight: 500;
  transition: top 200ms;
}
.skip-link:focus {
  top: 16px;
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- 4. Container ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* ---------- 5. Eyebrows / titles / lead (shared) ---------- */
.eyebrow {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  line-height: 1;
}
.eyebrow .gold-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  display: inline-block;
}
.eyebrow .num {
  color: var(--gray-quiet);
  font-weight: 400;
}
.eyebrow--gold { color: var(--gold-deep); }
.eyebrow--on-dark { color: var(--gold-soft); }
.eyebrow--on-dark .num { color: rgba(255,255,255,0.45); }

.section-title {
  font-family: var(--font-sans);
  font-size: clamp(32px, 4.4vw, 56px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.028em;
  color: var(--navy);
  margin: 0 0 20px;
  text-wrap: balance;
}
.section-title .accent,
.section-title em {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.018em;
}
.section-title--on-dark { color: var(--white); }
.section-title--on-dark .accent { color: var(--gold-soft); }

.section-lead {
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.6;
  color: var(--gray-text);
  max-width: 640px;
  margin: 0 0 48px;
  letter-spacing: -0.005em;
}
.section-lead--on-dark { color: rgba(244, 244, 240, 0.7); }

.subsection-eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.subsection-eyebrow .gold-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
}
.subsection-eyebrow--on-dark { color: var(--gold-soft); }

.subsection-title {
  font-family: var(--font-sans);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.2;
  margin: 0;
  color: inherit;
  text-wrap: balance;
}
.subsection-title .accent {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.012em;
}

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.003em;
  padding: 13px 22px;
  border-radius: var(--radius-md);
  transition: background var(--transition), color var(--transition),
              transform var(--transition), opacity var(--transition),
              border-color var(--transition), box-shadow var(--transition);
  text-align: center;
  min-height: 44px;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-sm { padding: 10px 16px; font-size: 14px; min-height: 38px; }
.btn-block { width: 100%; }

.btn-primary {
  background: var(--navy);
  color: var(--off-white);
}
.btn-primary:hover {
  background: var(--navy-soft);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -10px rgba(10, 27, 45, 0.4);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: transparent;
  padding: 13px 8px;
  position: relative;
}
.btn-ghost::after {
  content: "";
  position: absolute;
  left: 8px; right: 8px;
  bottom: 8px;
  height: 1px;
  background: var(--navy);
  transform: scaleX(0.3);
  transform-origin: left;
  transition: transform 280ms cubic-bezier(.2,.7,.2,1);
}
.btn-ghost:hover::after { transform: scaleX(1); }
.btn-ghost .arrow {
  display: inline-block;
  transition: transform 220ms cubic-bezier(.2,.7,.2,1);
}
.btn-ghost:hover .arrow { transform: translateX(4px); }

.btn-whatsapp {
  background: var(--whatsapp-green);
  color: var(--white);
}
.btn-whatsapp:hover {
  background: var(--whatsapp-green-dark);
  color: var(--white);
}

.btn-spinner {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}
.btn.is-loading .btn-label { opacity: 0.6; }
.btn.is-loading .btn-spinner { display: inline-block; }
.btn[disabled] { opacity: 0.7; cursor: not-allowed; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 7. Header / nav ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition), border-color var(--transition);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(250, 250, 246, 0.88);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom-color: var(--gray-rule);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height, 104px);
  transition: height 220ms ease;
}

.nav-logo { display: inline-flex; align-items: center; }
.nav-logo img {
  height: var(--nav-logo-h, 72px);
  width: auto;
  transition: height 220ms ease;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 28px;
}
.nav-links a:not(.btn) {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--navy);
  letter-spacing: -0.003em;
  transition: color 180ms ease;
}
.nav-links a:not(.btn):hover { color: var(--gray-text); }
.nav-links .btn { margin-left: 4px; }

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 10px;
  border-radius: var(--radius-sm);
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  top: var(--nav-height, 104px); left: 0; right: 0; bottom: 0;
  background: var(--paper);
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}
.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.mobile-menu nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 32px 24px;
}
.mobile-menu a {
  font-size: 22px;
  font-weight: 500;
  padding: 14px 4px;
  border-bottom: 1px solid var(--gray-rule);
  letter-spacing: -0.015em;
}
.mobile-menu a.btn {
  border-bottom: 0;
  margin-top: 16px;
  justify-content: center;
  font-size: 16px;
}

/* ---------- 8. HERO (B · Serif Accent) ---------- */
.hero {
  position: relative;
  padding: 112px 0 56px;
  overflow: hidden;
}

.hero-backdrop {
  position: absolute;
  top: 50%; right: -120px;
  transform: translateY(-50%);
  width: clamp(420px, 50vw, 820px);
  height: auto;
  opacity: var(--hero-backdrop-opacity, 0.06);
  pointer-events: none;
  z-index: 0;
  filter: saturate(0);
  transition: opacity 300ms ease;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - 220px);
}

.hero-content {
  max-width: 880px;
}

.hero-eyebrow {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 28px;
  line-height: 1;
}
.hero-eyebrow .gold-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
}
.hero-eyebrow .sep {
  color: var(--gray-quiet);
  font-weight: 400;
}

.hero-overline {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(18px, 1.8vw, 24px);
  letter-spacing: -0.012em;
  color: var(--gold-deep);
  margin: 0 0 20px;
  line-height: 1.3;
}

.hero-title {
  font-family: var(--font-sans);
  font-size: clamp(38px, 6.4vw, 72px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.032em;
  margin: 0 0 24px;
  color: var(--navy);
  text-wrap: balance;
}
.hero-title .accent {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.022em;
  font-feature-settings: 'ss01';
}

.hero-lead {
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--gray-text);
  max-width: 600px;
  margin: 0 0 36px;
  line-height: 1.55;
  letter-spacing: -0.005em;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.hero-foot {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-rule);
  display: flex;
  justify-content: space-between;
  align-items: end;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-quiet);
  flex-wrap: wrap;
  gap: 12px;
}
.hero-foot-left {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.hero-foot-left::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--gray-rule);
}

/* ---------- 9. FOOTER ---------- */
.site-footer {
  background: var(--navy-deep);
  color: var(--off-white);
  padding: 72px 0 32px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
.footer-logo {
  height: var(--footer-logo-h, 160px);
  width: auto;
  transition: height 220ms ease;
}

.footer-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.footer-col-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin: 0 0 16px;
}
.footer-columns ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-columns li {
  font-size: 14.5px;
  color: var(--gray-on-dark);
}
.footer-columns a { color: var(--gray-on-dark); }
.footer-columns a:hover { color: var(--white); }

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 32px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(168, 180, 196, 0.7);
}
.footer-bottom p { margin: 0; }
.footer-bottom a {
  color: rgba(168, 180, 196, 0.85);
  text-decoration: none;
  transition: color 180ms ease;
}
.footer-bottom a:hover { color: var(--white); }
.footer-meta { color: rgba(168, 180, 196, 0.5); }

/* ---------- 10. FAB WhatsApp ---------- */
.fab-whatsapp {
  position: fixed;
  bottom: 16px; left: 16px;
  z-index: 9999;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--whatsapp-green);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-fab);
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
  opacity: 0;
  transform: translateY(8px) scale(0.94);
  pointer-events: none;
}
.fab-whatsapp.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.fab-whatsapp svg { width: 60%; height: 60%; }
.fab-whatsapp:hover {
  background: var(--whatsapp-green-dark);
  transform: scale(1.08);
  color: var(--white);
}
.fab-whatsapp:active { transform: scale(0.95); }
.fab-whatsapp:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

/* ---------- 11. Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease, transform 600ms ease;
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   RESPONSIVE BREAKPOINTS — base shell
   ========================================================= */

@media (min-width: 640px) {
  :root { --container-pad: 32px; }
  .hero { padding: 132px 0 72px; }
  .hero-ctas { gap: 16px; }
  .footer-top { grid-template-columns: 1fr 2fr; gap: 64px; }
  .footer-columns { grid-template-columns: repeat(3, 1fr); }
  .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; margin-top: 40px; }
  .fab-whatsapp { bottom: 24px; left: 24px; width: 60px; height: 60px; }
}

@media (min-width: 1025px) {
  body { font-size: 17px; }
  html { scroll-padding-top: 120px; }
  :root {
    --container-pad: 40px;
    --nav-height: 128px;
  }

  .nav-links { display: flex; }
  .nav-toggle { display: none; }
  .nav-inner { height: var(--nav-height, 128px); }
  .nav-logo img { height: var(--nav-logo-h-desktop, 96px); }
  .mobile-menu { top: var(--nav-height, 128px); }

  .hero { padding: 144px 0 88px; }
  .hero-content { max-width: 920px; }
}

@media (min-width: 1280px) {
  .nav-logo img { height: var(--nav-logo-h-xl, 112px); }
}
