/* ================================================================
   PETRUS PERÚ — Design System v4
   Paleta: Blanco · Gris piedra · Azul marino · Ladrillo cálido
   Estética: Ingeniería profesional, sobria, confiable
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=DM+Serif+Display:ital@0;1&display=swap');

/* ── TOKENS ── */
:root {
  /* Neutros base */
  --white:       #ffffff;
  --off-white:   #f7f8fa;
  --gray-50:     #f2f4f7;
  --gray-100:    #e8ecf0;
  --gray-200:    #d1d9e0;
  --gray-300:    #b0bcc8;
  --gray-400:    #8a99a8;
  --gray-500:    #647080;
  --gray-600:    #4a5568;
  --gray-700:    #374151;

  /* Azul marino institucional */
  --navy-900:    #0c1f35;
  --navy-800:    #102840;
  --navy-700:    #163354;
  --navy-600:    #1d4068;
  --navy-500:    #245080;
  --navy-400:    #2d6099;
  --navy-100:    #ddeaf7;
  --navy-50:     #eef5fc;

  /* Acento ladrillo (solo CTAs y énfasis) */
  --brick:       #a63220;
  --brick-hover: #8f2a1b;
  --brick-light: #f5ede9;
  --brick-mid:   #d4553e;

  /* Tipografía */
  --f-sans:    'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --f-serif:   'DM Serif Display', Georgia, serif;

  /* Sombras */
  --shadow-xs:  0 1px 3px rgba(12,31,53,0.08);
  --shadow-sm:  0 2px 8px rgba(12,31,53,0.10);
  --shadow-md:  0 4px 20px rgba(12,31,53,0.12);
  --shadow-lg:  0 12px 40px rgba(12,31,53,0.14);
  --shadow-xl:  0 24px 64px rgba(12,31,53,0.16);

  /* Bordes */
  --radius-sm:  3px;
  --radius-md:  6px;
  --radius-lg:  10px;

  /* Motion */
  --ease:       cubic-bezier(0.22, 1, 0.36, 1);
  --duration:   0.35s;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--f-sans);
  background: var(--white);
  color: var(--navy-900);
  overflow-x: hidden;
  line-height: 1.65;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul { list-style: none; }
::selection { background: var(--navy-100); color: var(--navy-900); }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--gray-50); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }

/* ── NAVBAR ── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 900;
  height: 76px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5%;
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--duration) var(--ease);
}
.nav.scrolled { box-shadow: var(--shadow-md); }
.nav-logo img { height: 50px; width: auto; }

.nav-links {
  display: flex; align-items: center; gap: 2.2rem;
}
.nav-links a {
  font-size: .875rem; font-weight: 600;
  letter-spacing: .01em;
  color: var(--gray-600);
  position: relative;
  transition: color var(--duration);
}
.nav-links a::after {
  content: ''; position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 2px;
  background: var(--brick);
  border-radius: 1px;
  transition: width var(--duration) var(--ease);
}
.nav-links a:hover,
.nav-links a.active { color: var(--navy-900); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-cta {
  background: var(--brick) !important;
  color: var(--white) !important;
  padding: .55rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 700 !important;
  font-size: .875rem;
  letter-spacing: .02em;
  box-shadow: 0 2px 8px rgba(166,50,32,.25);
  transition: background var(--duration), box-shadow var(--duration), transform .2s !important;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover {
  background: var(--brick-hover) !important;
  box-shadow: 0 4px 16px rgba(166,50,32,.35) !important;
  transform: translateY(-1px);
}

.burger {
  display: none; flex-direction: column; gap: 5px; padding: 4px;
}
.burger span {
  display: block; width: 24px; height: 2px;
  background: var(--navy-900); border-radius: 2px;
  transition: all .3s;
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-drawer {
  display: none; position: fixed;
  top: 76px; inset-inline: 0;
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  padding: 1.5rem 5% 2rem;
  flex-direction: column;
  box-shadow: var(--shadow-md);
  z-index: 899;
}
.nav-drawer.open { display: flex; }
.nav-drawer a {
  font-size: 1rem; font-weight: 600; color: var(--gray-600);
  padding: .85rem 0; border-bottom: 1px solid var(--gray-100);
  transition: color .25s, padding-left .25s;
}
.nav-drawer a:hover { color: var(--navy-900); padding-left: 8px; }
.nav-drawer .nav-cta { margin-top: 1rem; text-align: center; display: block; }

/* ── BOTONES ── */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--f-sans); font-weight: 700; font-size: .9rem;
  letter-spacing: .01em; padding: .85rem 1.8rem;
  border-radius: var(--radius-sm);
  transition: all var(--duration) var(--ease);
  cursor: pointer;
}
.btn-primary {
  background: var(--brick); color: var(--white);
  box-shadow: 0 2px 10px rgba(166,50,32,.3);
}
.btn-primary:hover {
  background: var(--brick-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(166,50,32,.4);
}
.btn-navy {
  background: var(--navy-800); color: var(--white);
  box-shadow: 0 2px 10px rgba(12,31,53,.2);
}
.btn-navy:hover {
  background: var(--navy-900);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(12,31,53,.3);
}
.btn-outline {
  border: 2px solid var(--navy-800); color: var(--navy-800);
}
.btn-outline:hover {
  background: var(--navy-800); color: var(--white);
  transform: translateY(-2px);
}
.btn-outline-white {
  border: 2px solid rgba(255,255,255,.5); color: var(--white);
}
.btn-outline-white:hover {
  border-color: var(--white); background: rgba(255,255,255,.1);
}
.btn-white {
  background: var(--white); color: var(--brick);
  box-shadow: var(--shadow-md);
}
.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ── SECTION BASE ── */
.section { padding: 7rem 5%; }
.section--white  { background: var(--white); }
.section--light  { background: var(--off-white); }
.section--stone  { background: var(--gray-50); }
.section--navy   { background: var(--navy-900); }
.section--navy2  { background: var(--navy-800); }

/* Eyebrow label */
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  margin-bottom: .9rem;
}
.eyebrow-rule { width: 28px; height: 2px; background: var(--brick); border-radius: 1px; }
.eyebrow span {
  font-size: .72rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--brick);
}

/* Section headings */
.h2 {
  font-family: var(--f-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400; /* Serif display doesn't need bold */
  line-height: 1.12;
  letter-spacing: -.01em;
  color: var(--navy-900);
  margin-bottom: .75rem;
}
.h2 em { font-style: italic; color: var(--brick); }
.h2--light { color: var(--white); }
.h2--light em { color: #f4b8a8; }

.lead {
  font-size: 1.05rem; font-weight: 400;
  color: var(--gray-500); max-width: 560px;
  line-height: 1.82; margin-bottom: 3rem;
}
.lead--light { color: var(--navy-100); }

/* ── PAGE HERO (inner pages) ── */
.page-hero {
  padding: 148px 5% 72px;
  background: var(--navy-900);
  position: relative; overflow: hidden;
}
/* Subtle geometric pattern */
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(135deg, transparent 30%, black 100%);
}
.page-hero::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brick) 0%, var(--brick-mid) 100%);
}
.page-hero-inner {
  position: relative; z-index: 2; max-width: 680px;
}
.page-hero-kicker {
  display: inline-block;
  font-size: .72rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: var(--brick-mid); margin-bottom: 1.2rem;
}
.page-hero h1 {
  font-family: var(--f-serif);
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  font-weight: 400; line-height: 1.08;
  letter-spacing: -.01em; color: var(--white);
  margin-bottom: 1.2rem;
}
.page-hero h1 em { font-style: italic; color: #f4b8a8; }
.page-hero p { font-size: 1.05rem; color: var(--navy-100); line-height: 1.82; max-width: 540px; }

/* ── DIVIDER LINE ── */
.divider {
  height: 1px; background: var(--gray-100);
  margin: 0 5%;
}
.divider--navy { background: rgba(255,255,255,.08); }

/* ── CTA BAND ── */
.cta-band {
  background: var(--navy-900);
  padding: 5rem 5%; text-align: center;
  position: relative; overflow: hidden;
}
.cta-band::before {
  content: ''; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    -45deg, transparent 0, transparent 36px,
    rgba(255,255,255,.02) 36px, rgba(255,255,255,.02) 37px
  );
}
.cta-band > * { position: relative; }
.cta-band .h2 { color: var(--white); }
.cta-band .lead { color: var(--navy-100); }

/* ── FOOTER ── */
.footer {
  background: var(--navy-900);
  border-top: 4px solid var(--brick);
  padding: 4.5rem 5% 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem; margin-bottom: 3.5rem;
}
.footer-brand img { height: 48px; margin-bottom: 1.2rem; }
.footer-brand p { font-size: .875rem; color: var(--gray-400); line-height: 1.8; max-width: 260px; }
.footer-col h4 {
  font-size: .72rem; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--brick-mid); margin-bottom: 1.2rem;
}
.footer-col li { margin-bottom: .55rem; }
.footer-col a { font-size: .875rem; color: var(--gray-400); transition: color .25s, padding-left .25s; }
.footer-col a:hover { color: var(--white); padding-left: 4px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 1.5rem;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem;
}
.footer-bottom p { font-size: .8rem; color: var(--gray-500); }
.footer-bottom strong { color: var(--gray-400); }

/* ── SCROLL REVEAL ── */
.r {
  opacity: 0; transform: translateY(26px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.r.in { opacity: 1; transform: translateY(0); }
.r-d1 { transition-delay: .08s; }
.r-d2 { transition-delay: .16s; }
.r-d3 { transition-delay: .24s; }
.r-d4 { transition-delay: .32s; }
.r-d5 { transition-delay: .40s; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px)  { .nav-links { display: none; } .burger { display: flex; } }
@media (max-width: 600px) {
  .section { padding: 5rem 5%; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { justify-content: center; text-align: center; }
}
