/* ===========================================
   AINVAL SEGUROS — DESIGN SYSTEM
   Manual oficial: paleta + tipografía + isotipo
   =========================================== */

:root {
  /* Brand palette (manual oficial) */
  --ink:        #264653;   /* primary dark teal */
  --ink-2:      #287272;   /* mid teal */
  --teal:       #2a9c8e;   /* bright accent */
  --sand:       #e8c369;   /* warm yellow */
  --apricot:    #f4a261;   /* orange */
  --coral:      #e76f51;   /* coral */

  /* Neutrals */
  --bg:         #fdfcf9;   /* warm white predominant */
  --paper:      #f6f2ea;   /* soft tone for cards */
  --hairline:   #e6dfd2;
  --muted:      #7d8a8f;

  /* Type */
  --serif: "Cormorant Garamond", "Cormorant", Georgia, serif;
  --sans:  "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Layout */
  --maxw: 1280px;
  --pad: clamp(20px, 4vw, 56px);
  --radius: 999px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* === TYPOGRAPHY === */
.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--ink-2);
  display: inline-block;
}
.display {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-size: clamp(44px, 6.4vw, 92px);
}
.display em {
  font-style: italic;
  color: var(--teal);
  font-weight: 400;
}
h2.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 4.4vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
h2.section-title em { font-style: italic; color: var(--teal); }
.lead {
  font-size: clamp(17px, 1.4vw, 19px);
  color: var(--ink);
  opacity: 0.78;
  max-width: 56ch;
  font-weight: 300;
  letter-spacing: 0.005em;
}

/* === LAYOUT === */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}
section { padding: clamp(80px, 9vw, 140px) 0; position: relative; }

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: 0.02em;
  transition: transform .25s ease, background .25s ease, color .25s ease, box-shadow .25s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--teal);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-ghost:hover {
  background: var(--ink);
  color: var(--bg);
}
.btn-arrow {
  width: 18px; height: 18px;
  transition: transform .25s ease;
}
.btn:hover .btn-arrow { transform: translateX(4px); }

/* === HEADER === */
.site-header {
  position: sticky;
  top: 0; z-index: 50;
  background: rgba(253, 252, 249, 0.85);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.site-header.scrolled { border-bottom-color: var(--hairline); }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}
.nav-brand .iso {
  width: 38px; height: 38px;
  object-fit: contain;
  display: block;
}
.nav-brand .wm {
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: 0.02em;
  font-weight: 500;
}
.nav-brand .wm em { font-style: italic; color: var(--teal); font-weight: 400; }
.nav-links {
  display: flex; align-items: center;
  gap: clamp(20px, 3vw, 40px);
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  opacity: 0.78;
  transition: opacity .2s ease, color .2s ease;
  position: relative;
}
.nav-links a:hover, .nav-links a.active { opacity: 1; color: var(--ink-2); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: -22px; left: 50%;
  transform: translateX(-50%);
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--coral);
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  font-weight: 500;
  transition: background .25s ease;
}
.nav-cta:hover { background: var(--teal); }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 50%;
    background: var(--ink); color: var(--bg);
  }
  .nav.open .nav-links {
    display: flex; flex-direction: column;
    position: absolute; top: 78px; left: 0; right: 0;
    background: var(--bg);
    padding: 24px var(--pad) 32px;
    border-bottom: 1px solid var(--hairline);
    align-items: flex-start;
    gap: 18px;
  }
  .nav.open .nav-cta { display: inline-flex; align-self: flex-start; }
  .nav.open .nav-links a.active::after { display: none; }
}

/* === FOOTER === */
.site-footer {
  background: var(--ink);
  color: var(--bg);
  padding: 100px 0 36px;
  position: relative;
  overflow: hidden;
}
.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 32px;
}
.footer-social a {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(253,252,249, 0.2);
  display: grid; place-items: center;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.footer-social a:hover {
  background: var(--sand);
  color: var(--ink);
  border-color: var(--sand);
  transform: translateY(-2px);
}
.footer-social svg {
  width: 16px; height: 16px;
}
.site-footer .iso-wm {
  position: absolute;
  right: -120px; bottom: -120px;
  width: 480px; height: 480px;
  opacity: 0.08;
  pointer-events: none;
  /* Image is dark teal by default; invert it so it reads as light on the dark footer */
  filter: brightness(0) invert(1);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 60px 40px;
  position: relative;
  z-index: 1;
}
.footer-brand .wm {
  font-family: var(--serif);
  font-size: 38px;
  line-height: 1.1;
  margin-top: 18px;
  max-width: 18ch;
}
.footer-brand .wm em { font-style: italic; color: var(--sand); }
.footer-brand .iso {
  width: 56px; height: 56px;
  object-fit: contain;
  /* white-out the teal image on the dark footer */
  filter: brightness(0) invert(1);
}
.footer-col h4 {
  font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  opacity: 0.6;
  margin-bottom: 22px;
}
.footer-col ul { list-style: none; display: grid; gap: 12px; }
.footer-col a {
  font-size: 15px;
  opacity: 0.88;
  transition: opacity .2s, color .2s;
}
.footer-col a:hover { opacity: 1; color: var(--sand); }
.footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 80px;
  padding-top: 28px;
  border-top: 1px solid rgba(253,252,249,0.12);
  font-size: 12px;
  opacity: 0.65;
  position: relative; z-index: 1;
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-meta { flex-direction: column; gap: 14px; text-align: center; }
}

/* === WHATSAPP FLOAT === */
.wa-float {
  position: fixed;
  right: 24px; bottom: 24px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0;
  background: #25d366;
  color: #fff;
  border-radius: 999px;
  box-shadow: 0 16px 40px -10px rgba(37,211,102,0.55);
  transition: padding .35s ease, gap .35s ease;
  overflow: hidden;
  height: 60px;
  padding-right: 24px;
  padding-left: 0;
}
.wa-float .wa-icon {
  width: 60px; height: 60px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.wa-float .wa-label {
  font-size: 14px; font-weight: 600;
  white-space: nowrap;
  max-width: 0; opacity: 0;
  transition: max-width .35s ease, opacity .25s ease, margin .35s ease;
  margin-right: 0;
}
.wa-float:hover {
  padding-right: 24px;
}
.wa-float:hover .wa-label {
  max-width: 260px; opacity: 1; margin-right: 8px;
}
@media (max-width: 600px) {
  .wa-float { padding-right: 0; }
  .wa-float .wa-label { display: none; }
}

/* === ANIMATIONS (reveal on scroll) === */
/* Default to visible; JS adds .reveal-init to hide only when it knows it can animate */
.reveal {
  opacity: 1;
  transform: none;
}
.reveal.reveal-init {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.reveal-init.in {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.reveal-init { opacity: 1; transform: none; transition: none; }
}

/* === SHARED UTILITIES === */
.iso-wm {
  position: absolute;
  pointer-events: none;
  opacity: 0.05;
  object-fit: contain;
}
  color: var(--ink);
  opacity: 0.04;
}

.dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--coral);
}
