/* ==========================================================================
   GARIANNA INSURANCE — MAIN STYLESHEET
   ========================================================================== */

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--charcoal);
  background: var(--marble);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul { list-style: none; }
input, textarea, select { font: inherit; color: inherit; }

/* ---- Foco accesible ---- */
:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--charcoal);
  color: var(--white);
  padding: var(--sp-sm) var(--sp-md);
  z-index: 200;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus {
  left: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---- Tipografía ---- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-tight);
  color: var(--charcoal);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

p { max-width: 62ch; }
.lead {
  font-size: var(--fs-lg);
  color: var(--charcoal-soft);
  max-width: 55ch;
}

/* ---- Contenedores ---- */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: var(--content-max-narrow); }
.container--wide { max-width: var(--content-max-wide); }

.section {
  padding-block: var(--sp-2xl);
}
.section--tight {
  padding-block: var(--sp-xl);
}
.section--alt {
  background: var(--marble-deep);
}

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: var(--sp-xs);
}

.section-eyebrow svg { width: 16px; height: 16px; }

.section-heading {
  max-width: 46ch;
  margin-bottom: var(--sp-lg);
}
.section-heading p {
  margin-top: var(--sp-sm);
}

/* ==========================================================================
   HEADER / NAVEGACIÓN
   Diseño con contraste intencional: header oscuro (carbón + acento dorado)
   que enmarca el contenido claro de mármol, en eco con el footer.
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 150;
  background: var(--charcoal);
  position: relative;
}
.site-header::after {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-primary) 35%, var(--sage) 70%, var(--gold-primary));
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--sp-sm);
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
  flex-shrink: 0;
}
.brand img {
  height: 40px;
  width: auto;
}
.brand-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--marble);
  line-height: 1.1;
}
.brand-text span {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
}

/* Selector de idioma sobre fondo oscuro del header */
.site-header .lang-toggle {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--marble);
}
.site-header .lang-toggle:hover,
.site-header .lang-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--gold-primary);
}
.site-header .lang-toggle svg { color: var(--gold-soft); }

/* Botón que abre el menú desplegable — solo el ícono de tres líneas */
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-pill);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.07);
  color: var(--marble);
  flex-shrink: 0;
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.menu-toggle:hover,
.menu-toggle:focus-visible {
  background: var(--gold-primary);
  border-color: var(--gold-primary);
}
.menu-toggle-icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 18px;
  height: 13px;
}
.menu-toggle-icon span {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}
.menu-toggle[aria-expanded="true"] .menu-toggle-icon span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-icon span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle-icon span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---- Panel de navegación desplegable (funciona igual en todos los tamaños) ---- */
.main-nav {
  position: absolute;
  top: calc(100% + 10px);
  left: var(--gutter);
  width: min(340px, calc(100vw - (var(--gutter) * 2)));
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.97);
  transform-origin: top left;
  transition: opacity var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out),
              visibility var(--dur-base);
  z-index: 150;
}
.main-nav.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.nav-list {
  display: flex;
  flex-direction: column;
}
.nav-item {
  border-bottom: 1px solid var(--line);
}
.nav-item:last-child { border-bottom: none; }

.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: var(--sp-xs);
  padding: var(--sp-sm) var(--sp-xs);
  font-weight: 700;
  font-size: var(--fs-sm);
  text-align: left;
  border-radius: var(--radius-sm);
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.nav-link:hover,
.nav-link:focus-visible {
  color: var(--gold-deep);
  background: var(--sage-soft);
}
.nav-link[aria-current="page"] {
  color: var(--gold-deep);
}
.nav-link .chevron {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  transition: transform var(--dur-fast) var(--ease-out);
}
.nav-item.open > .nav-link .chevron { transform: rotate(180deg); }

.dropdown {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 0 0 var(--sp-xs) var(--sp-xs);
}
.nav-item.open .dropdown { display: flex; }

.dropdown-link {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
  padding: var(--sp-xs) var(--sp-sm);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--charcoal);
  transition: background var(--dur-fast) var(--ease-out);
}
.dropdown-link:hover,
.dropdown-link:focus-visible {
  background: var(--sage-soft);
  color: var(--sage-deep);
}
.dropdown-link[aria-current="page"] {
  color: var(--gold-deep);
  background: var(--gold-soft);
}
.dropdown-link svg { flex-shrink: 0; width: 20px; height: 20px; color: var(--gold-primary); }

.nav-cta {
  margin-top: var(--sp-xs);
  width: 100%;
}

/* ==========================================================================
   BOTONES
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.9em 1.7em;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: var(--fs-sm);
  white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}
.btn svg { width: 18px; height: 18px; }

.btn--primary {
  background: var(--gold-primary);
  color: var(--white);
  box-shadow: var(--shadow-gold);
}
.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--gold-deep);
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(176, 138, 62, 0.32);
}

.btn--secondary {
  background: transparent;
  color: var(--charcoal);
  border: 1.5px solid var(--charcoal);
}
.btn--secondary:hover,
.btn--secondary:focus-visible {
  background: var(--charcoal);
  color: var(--white);
}

.btn--ghost {
  background: var(--sage-soft);
  color: var(--sage-deep);
}
.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: var(--sage);
  color: var(--white);
}

.btn--sm { padding: 0.65em 1.3em; font-size: var(--fs-xs); }
.btn--block { width: 100%; }

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--sp-2xl) var(--sp-xl);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 85% 10%, rgba(126, 143, 108, 0.14), transparent 60%),
    radial-gradient(ellipse 50% 45% at 5% 90%, rgba(176, 138, 62, 0.12), transparent 60%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--sp-xl);
  align-items: center;
}

.hero-top {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--sp-xl);
  align-items: center;
}

.hero-heading-block { display: flex; flex-direction: column; }

.hero-bottom {
  max-width: 56ch;
  margin-top: var(--sp-lg);
}
.hero-bottom .hero-actions { margin-top: var(--sp-lg); }
.hero-bottom .hero-trust { max-width: none; }

.hero-heading-block .section-eyebrow { display: flex; align-items: center; gap: 0.5em; }
.hero-heading-block .section-eyebrow svg { width: 16px; height: 16px; flex-shrink: 0; }
.hero-copy .section-eyebrow svg { width: 16px; height: 16px; }

.hero h1 {
  margin-bottom: var(--sp-sm);
}
.hero h1 em {
  font-style: normal;
  color: var(--gold-deep);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
  margin-top: var(--sp-lg);
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-lg);
  margin-top: var(--sp-lg);
  padding-top: var(--sp-lg);
  border-top: 1px solid var(--line);
}
.hero-trust-item {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--charcoal-soft);
}
.hero-trust-item svg {
  width: 22px;
  height: 22px;
  color: var(--gold-primary);
  flex-shrink: 0;
}

.hero-visual {
  position: relative;
  align-self: center;
  min-height: 420px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(155deg, var(--sage-soft) 0%, var(--marble) 55%, var(--gold-soft) 130%);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-lg);
  padding: var(--sp-lg) var(--sp-md);
}

.hero-visual-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-sm);
  animation: logo-reveal var(--dur-slow) var(--ease-out) forwards 0.15s;
  opacity: 0;
}
.hero-visual-logo img {
  width: clamp(96px, 18vw, 148px);
  height: auto;
  filter: drop-shadow(0 10px 24px rgba(139, 106, 46, 0.28));
}
.hero-visual-name {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 600;
  color: var(--charcoal);
  text-align: center;
  line-height: 1.15;
}
.hero-visual-name span {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-top: 0.35em;
}

@keyframes logo-reveal {
  from { opacity: 0; transform: translateY(14px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-visual-logo { animation: none; opacity: 1; }
}

.hero-visual-caption {
  position: relative;
  width: 100%;
  max-width: 320px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  border-radius: var(--radius-md);
  padding: var(--sp-sm) var(--sp-md);
  box-shadow: var(--shadow-md);
}
.hero-visual-caption strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-lg);
}
.hero-visual-caption span {
  font-size: var(--fs-xs);
  color: var(--charcoal-soft);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  background: var(--charcoal);
  color: var(--marble);
  padding-top: var(--sp-2xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: var(--sp-lg);
  padding-bottom: var(--sp-xl);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.footer-brand .brand {
  margin-bottom: var(--sp-sm);
}
.footer-brand p {
  color: rgba(248,246,241,0.65);
  font-size: var(--fs-sm);
  max-width: 32ch;
}

.footer-social {
  display: flex;
  gap: var(--sp-xs);
  margin-top: var(--sp-md);
}
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  transition: background var(--dur-fast) var(--ease-out);
}
.footer-social a:hover,
.footer-social a:focus-visible {
  background: var(--gold-primary);
}
.footer-social svg { width: 18px; height: 18px; }

.footer-col h4 {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: var(--sp-sm);
}
.footer-col ul { display: flex; flex-direction: column; gap: var(--sp-xs); }
.footer-col a {
  color: rgba(248,246,241,0.75);
  font-size: var(--fs-sm);
  transition: color var(--dur-fast) var(--ease-out);
}
.footer-col a:hover,
.footer-col a:focus-visible { color: var(--white); }

.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}
.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6em;
}
.footer-contact-item svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 0.2em;
  color: var(--gold-soft);
}
.footer-contact-item address,
.footer-contact-item a,
.footer-contact-item span {
  font-style: normal;
  color: rgba(248,246,241,0.75);
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
}
.footer-contact-item a:hover { color: var(--white); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-sm);
  padding-block: var(--sp-md);
  font-size: var(--fs-xs);
  color: rgba(248,246,241,0.55);
}
.footer-bottom-links {
  display: flex;
  gap: var(--sp-md);
  flex-wrap: wrap;
}
.footer-bottom-links a { color: rgba(248,246,241,0.55); }
.footer-bottom-links a:hover { color: var(--white); }

/* ---- Barra de contacto fija (móvil) ---- */
.mobile-contact-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: var(--white);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(43,42,37,0.08);
  padding: var(--sp-xs) var(--gutter);
  padding-bottom: max(var(--sp-xs), env(safe-area-inset-bottom));
}
.mobile-contact-bar-inner {
  display: flex;
  gap: var(--sp-xs);
}
.mobile-contact-bar .btn { flex: 1; }
