/* =========================================================
   Insurance Advisor Website — Stylesheet
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --navy: #0E2A47;
  --navy-deep: #091C31;
  --teal: #12877A;
  --teal-strong: #0E6F64;
  --teal-soft: #E2F3F0;
  --sky: #EEF4FB;
  --sky-strong: #DCE8F5;
  --white: #FFFFFF;

  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --tint: var(--sky);
  --ink: #13253B;
  --muted: #55667B;
  --line: #D8E3EF;
  --heading: var(--navy);

  --font-display: "Literata", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;

  --radius-lg: 22px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px -12px rgba(14, 42, 71, 0.22);
  --shadow-soft: 0 4px 16px -8px rgba(14, 42, 71, 0.18);
  --container: 1180px;
  --header-h: 72px;

  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A1828;
    --surface: #102338;
    --tint: #0D1F33;
    --ink: #E4ECF5;
    --muted: #A3B4C7;
    --line: #223953;
    --heading: #F2F6FB;
    --teal-soft: #0F3532;
    --sky-strong: #1A3350;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0A1828;
  --surface: #102338;
  --tint: #0D1F33;
  --ink: #E4ECF5;
  --muted: #A3B4C7;
  --line: #223953;
  --heading: #F2F6FB;
  --teal-soft: #0F3532;
  --sky-strong: #1A3350;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 12px);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--teal-strong); }
h1, h2, h3 { font-family: var(--font-display); color: var(--heading); line-height: 1.2; margin: 0 0 .5em; font-weight: 600; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
address { font-style: normal; }
ul[role="list"], ol[role="list"] { list-style: none; margin: 0; padding: 0; }
.break { overflow-wrap: anywhere; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 10px; color: #fff; }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.icon {
  width: 1.25em; height: 1.25em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.icon-fill { fill: currentColor; stroke: none; }

/* ---------- Buttons ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  font: 600 1rem/1.2 var(--font-body);
  border-radius: 12px; border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 42px; padding: 9px 18px; font-size: .95rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-deep); color: #fff; }
.btn-whatsapp { background: var(--teal); color: #fff; }
.btn-whatsapp:hover { background: var(--teal-strong); color: #fff; }
.btn-ghost { background: transparent; color: var(--heading); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--sky); color: var(--navy); }
.btn-outline-light { color: #fff; border-color: rgba(255,255,255,.5); }
.btn-outline-light:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.08); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-primary { background: #2A5C8F; }
  :root:not([data-theme="light"]) .btn-primary:hover { background: #336BA3; }
}
:root[data-theme="dark"] .btn-primary { background: #2A5C8F; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
/* Blur lives on a pseudo-element so the fixed mobile menu is not trapped by backdrop-filter */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
}
body.menu-open .site-header::before { background: var(--bg); }
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-soft); }
.nav-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand-mark {
  display: grid; place-items: center; width: 42px; height: 42px; flex: none;
  border-radius: 12px; background: var(--navy); color: #fff;
  font: 700 1rem/1 var(--font-display); letter-spacing: .02em;
  box-shadow: inset 0 -3px 0 var(--teal);
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font: 700 1.08rem/1.2 var(--font-display); color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: .8rem; color: var(--muted); font-weight: 500; }

.primary-nav { display: flex; align-items: center; gap: 28px; }
.primary-nav ul { display: flex; gap: 22px; }
.primary-nav ul a {
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.primary-nav ul a:hover { color: var(--teal); border-bottom-color: var(--teal); }
.nav-toggle {
  display: none; width: 46px; height: 46px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--heading);
  align-items: center; justify-content: center; cursor: pointer;
}
.nav-toggle .icon { width: 22px; height: 22px; }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    position: fixed; left: 0; right: 0;
    top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
    bottom: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px 24px calc(28px + env(safe-area-inset-bottom, 0px));
    background: var(--bg); border-top: 1px solid var(--line);
    overflow-y: auto;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .2s, transform .2s, visibility 0s .2s;
  }
  .primary-nav.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity .2s, transform .2s; }
  .primary-nav ul { flex-direction: column; gap: 0; }
  .primary-nav ul a { display: block; padding: 15px 4px; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  .primary-nav ul a:hover { border-bottom-color: var(--line); }
  .nav-cta { margin-top: 20px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 64px 0 76px;
  background:
    radial-gradient(circle at 85% 20%, color-mix(in srgb, var(--teal) 10%, transparent), transparent 45%),
    var(--tint);
  overflow: hidden;
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 56px; align-items: center;
}
.hero-services {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 18px; padding: 6px 14px;
  background: var(--teal-soft); color: var(--teal-strong);
  border-radius: 999px; font-weight: 600; font-size: .92rem;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero-services { color: #7FD8CB; } }
:root[data-theme="dark"] .hero-services { color: #7FD8CB; }
.hero-title {
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3rem);
  font-weight: 700; letter-spacing: -0.01em; margin-bottom: 16px;
}
.hero-lead { font-size: 1.1rem; color: var(--muted); max-width: 36em; margin-bottom: 26px; }
.hero-person {
  border-left: 3px solid var(--teal);
  padding: 2px 0 2px 16px; margin-bottom: 30px;
}
.hero-name { font: 600 1.2rem/1.3 var(--font-display); color: var(--heading); margin: 0 0 2px; }
.hero-role { margin: 0; color: var(--muted); font-size: .98rem; }

.hero-visual {
  position: relative; justify-self: center;
  width: 100%; max-width: 400px;
  animation: rise .8s cubic-bezier(.2,.7,.2,1) both;
}
.photo-frame { position: relative; padding: 0 18px 18px 0; }
.photo-frame::before {
  content: ""; position: absolute; z-index: 0;
  inset: 18px 0 0 18px;
  border-radius: 24px;
  background: linear-gradient(140deg, var(--teal), var(--navy));
}
/* Profile photo: responsive square, no fixed width/height */
.profile-photo {
  position: relative; z-index: 1;
  display: block;
  inline-size: 100%;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 30%;
  border-radius: 20px;
  border: 5px solid var(--surface);
  box-shadow: var(--shadow);
  background: var(--sky-strong);
}
.hero-badge {
  position: absolute; z-index: 2; left: -22px; bottom: 34px;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px 12px 14px;
  background: var(--surface); color: var(--ink);
  border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.hero-badge .icon { width: 28px; height: 28px; color: var(--teal); }
.hero-badge strong { display: block; font: 700 1.1rem/1.2 var(--font-display); color: var(--heading); }
.hero-badge span { font-size: .85rem; color: var(--muted); }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-tint { background: var(--tint); }
.section-navy { background: var(--navy); color: #D9E5F2; }
.section-navy .section-title, .section-navy h3 { color: #fff; }
.section-navy .section-intro { color: #B4C6DA; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-title { font-size: clamp(1.6rem, 1.25rem + 1.3vw, 2.125rem); margin-bottom: 12px; }
.section-intro { color: var(--muted); font-size: 1.05rem; margin: 0; }

/* About */
.about-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 56px; align-items: start; }
.about-grid .section-title { position: sticky; top: calc(var(--header-h) + 32px); }
.about-text p { max-width: 62ch; }
.about-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px;
  margin-top: 28px !important;
}
.about-facts li {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface);
}
.about-facts .icon { color: var(--teal); }
.about-facts strong { color: var(--heading); }

/* Solutions cards */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 28px 26px;
  box-shadow: var(--shadow-soft);
}
.card p { color: var(--muted); margin: 0; font-size: 1rem; }
.card-icon {
  display: inline-grid; place-items: center; width: 52px; height: 52px;
  border-radius: 14px; margin-bottom: 18px;
  background: var(--teal-soft); color: var(--teal);
}
.card-icon .icon { width: 26px; height: 26px; }

/* Why list */
.why-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px 40px; }
.why-list li { display: flex; gap: 16px; align-items: flex-start; padding-top: 22px; border-top: 2px solid var(--line); }
.why-list .icon { width: 28px; height: 28px; color: var(--teal); margin-top: 2px; }
.why-list h3 { margin-bottom: 6px; }
.why-list p { margin: 0; color: var(--muted); font-size: 1rem; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; counter-reset: none; }
.step {
  position: relative; padding: 30px 28px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
}
.step-num {
  display: block; margin-bottom: 14px;
  font: 700 3rem/1 var(--font-display); color: #5FD0C0;
}
.step p { margin: 0; color: #C3D3E4; font-size: 1rem; }

/* Gallery */
.gallery { display: grid; gap: 20px; }
.gallery.count-1 { max-width: 820px; }
.gallery.count-2 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.gallery.count-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery-item {
  margin: 0; overflow: hidden; border-radius: var(--radius-lg);
  box-shadow: var(--shadow); background: var(--sky-strong);
  border: 4px solid var(--surface);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.gallery-item { position: relative; }
.gallery.count-2 .gallery-item:first-child { aspect-ratio: 4 / 3; }
.gallery.count-2 .gallery-item:last-child img { position: absolute; inset: 0; }

/* CTA */
.cta { background: linear-gradient(120deg, var(--navy) 0%, #12406B 60%, var(--teal-strong) 140%); color: #fff; padding: 64px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta h2 { color: #fff; font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2rem); margin-bottom: 8px; }
.cta p { margin: 0; color: #C9D8E8; max-width: 52ch; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 28px; align-items: start; }
.contact-card, .form-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-soft);
}
.contact-name { font-size: 1.4rem; margin-bottom: 4px; }
.contact-role { color: var(--muted); margin-bottom: 22px; }
.contact-list li { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.contact-list li:first-child { border-top: 0; }
.contact-list .icon { color: var(--teal); margin-top: 3px; }
.contact-list .label { display: block; font-size: .82rem; font-weight: 600; color: var(--muted); }
.contact-list a { color: var(--heading); font-weight: 600; text-decoration: none; }
.contact-list a:hover { color: var(--teal); text-decoration: underline; }
.contact-actions { margin-top: 22px; }
.contact-actions .btn { flex: 1 1 140px; }

/* Form */
.form-card h3 { font-size: 1.4rem; margin-bottom: 4px; }
.form-note { color: var(--muted); font-size: .92rem; margin-bottom: 22px; }
.field { margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; color: var(--heading); }
.req { color: #C2410C; }
.optional { font-weight: 500; color: var(--muted); }
input, select, textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  font: 400 1rem/1.4 var(--font-body); color: var(--ink);
  background: var(--bg); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; min-height: 120px; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2312877A' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--teal);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--teal) 20%, transparent);
}
.has-error input, .has-error textarea { border-color: #C2410C; }
.error { margin: 6px 0 0; font-size: .88rem; color: #C2410C; font-weight: 500; min-height: 0; }
.error:empty { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .error, :root:not([data-theme="light"]) .req { color: #FB923C; }
}
:root[data-theme="dark"] .error, :root[data-theme="dark"] .req { color: #FB923C; }
.form-success {
  margin: 16px 0 0; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--teal-soft); color: var(--heading); font-weight: 600;
  border-left: 4px solid var(--teal);
}

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: #B9C8D8; padding-top: 56px; font-size: .97rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, .8fr); gap: 40px; padding-bottom: 40px; }
.footer-name { font: 700 1.4rem/1.2 var(--font-display); color: #fff; margin-bottom: 4px; }
.footer-sub { color: #5FD0C0; font-weight: 600; margin-bottom: 14px; }
.footer-advisor { margin: 0; }
.footer-heading { font: 600 1rem/1.3 var(--font-body); color: #fff; margin-bottom: 14px; }
.footer-col li { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.footer-col .icon { color: #5FD0C0; margin-top: 3px; width: 1.1em; height: 1.1em; }
.site-footer a { color: #DCE6F1; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0; }
.footer-bottom-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; font-size: .88rem; }
.footer-bottom p { margin: 0; }

/* ---------- Legal pages ---------- */
.legal-hero { background: var(--tint); padding: 56px 0 44px; border-bottom: 1px solid var(--line); }
.legal-hero h1 { font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.5rem); margin-bottom: 10px; }
.legal-meta { color: var(--muted); margin: 0; }
.legal-body { padding: 52px 0 80px; }
.legal-body .container { max-width: 820px; }
.legal-body h2 { font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem); margin: 38px 0 10px; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body p, .legal-body li { color: var(--ink); }
.legal-body ul { padding-left: 1.25em; margin: 0 0 1em; }
.legal-body li { margin-bottom: 6px; }
.legal-contact {
  margin-top: 14px; padding: 22px 24px; border-radius: var(--radius);
  background: var(--tint); border: 1px solid var(--line);
}
.legal-contact p { margin: 0 0 6px; }
.legal-contact p:last-child { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .card-grid, .why-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hero { padding: 40px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-visual { order: -1; max-width: 300px; }
  .hero-badge { position: relative; left: auto; bottom: auto; width: fit-content; margin: 6px auto 0; padding: 10px 16px 10px 12px; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 24px; }
  .about-grid .section-title { position: static; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { padding: 0 18px; }
  .section { padding: 60px 0; }
  .section-head { margin-bottom: 30px; }
  .hero-title { font-size: clamp(1.85rem, 1.3rem + 2.4vw, 2.125rem); }
  .hero-lead { font-size: 1.02rem; }
  .hero .btn-row .btn { flex: 1 1 100%; }
  .card-grid, .why-list { grid-template-columns: 1fr; }
  .why-list { gap: 24px; }
  .card { padding: 24px 22px; }
  .gallery.count-2, .gallery.count-3 { grid-template-columns: 1fr; }
  .gallery.count-2 .gallery-item:first-child { aspect-ratio: auto; }
  .gallery-item img { height: auto; }
  .gallery.count-2 .gallery-item:last-child img { position: static; }
  .cta { padding: 52px 0; }
  .cta .btn-row { width: 100%; }
  .cta .btn { flex: 1 1 100%; }
  .contact-card, .form-card { padding: 24px 20px; }
  .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 380px) {
  .hero-visual { max-width: 260px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-name { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.legal-hero .container { max-width: 820px; }
