:root {
  --bg: #ffffff;
  --bg-soft: #f3f6f8;
  --bg-card: #ffffff;
  --bg-card-light: #edf6fb;
  --primary: #005a9c;
  --primary-dark: #24365f;
  --primary-soft: rgba(0, 90, 156, 0.10);
  --accent: #6cbce3;
  --accent-dark: #2f7f98;
  --accent-soft: rgba(108, 188, 227, 0.22);
  --text: #233247;
  --muted: #5f6f82;
  --line: #d7e0e8;
  --white: #ffffff;
  --footer-bg: #24365f;
  --footer-text: #ffffff;
  --footer-muted: #c4cfdf;
  --shadow: 0 18px 55px rgba(35, 50, 71, 0.10);
  --shadow-soft: 0 10px 30px rgba(35, 50, 71, 0.055);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --max-width: 1440px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(0, 90, 156, 0.08), transparent 34%),
    radial-gradient(circle at top right, rgba(108, 188, 227, 0.12), transparent 30%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(100% - 20px, var(--max-width)); margin: 0 auto; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.90);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 28px rgba(35, 50, 71, 0.055);
}
.nav { height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 155px; }
.brand img { width: 132px; height: auto; }
.nav-links { display: flex; align-items: center; gap: 26px; color: var(--muted); font-size: 0.94rem; font-weight: 600; }
.nav-links a, .dropdown-toggle { border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.nav-links a:hover, .dropdown:hover .dropdown-toggle, .nav-links a.active { color: var(--primary); }
.dropdown { position: relative; padding: 29px 0; }
.dropdown-toggle::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.dropdown-menu {
  position: absolute;
  top: 72px;
  left: -18px;
  width: 340px;
  padding: 12px;
  display: grid;
  gap: 4px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.dropdown:hover .dropdown-menu, .dropdown:focus-within .dropdown-menu { opacity: 1; pointer-events: auto; transform: translateY(0); }
.dropdown-menu a { padding: 12px 13px; border-radius: 12px; color: var(--text); font-size: 0.9rem; font-weight: 700; }
.dropdown-menu a span { display: block; margin-top: 4px; color: var(--muted); font-weight: 500; font-size: 0.78rem; line-height: 1.42; }
.dropdown-menu a:hover { background: var(--primary-soft); color: var(--primary-dark); }
.dropdown-menu.wide-menu {
  width: 430px;
}

.mobile-menu-btn { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 13px; background: #ffffff; color: var(--text); cursor: pointer; }
.mobile-menu-btn span, .mobile-menu-btn::before, .mobile-menu-btn::after { content: ""; display: block; width: 18px; height: 2px; background: var(--text); margin: 4px auto; border-radius: 999px; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 12px 20px; border-radius: 999px; border: 1px solid transparent; font-weight: 700; transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease; cursor: pointer; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--accent-dark)); color: #ffffff; box-shadow: 0 14px 34px rgba(0, 90, 156, 0.24); }
.btn-secondary { border-color: var(--line); background: #ffffff; color: var(--text); box-shadow: 0 8px 22px rgba(35, 50, 71, 0.055); }
.btn-secondary:hover { border-color: rgba(0, 90, 156, 0.38); background: var(--primary-soft); color: var(--primary-dark); }

.nav-cta {
  min-height: 32px;
  padding: 6px 15px;
  font-size: 0.88rem;
  line-height: 1.1;
}


.hero { padding: 92px 0 70px; position: relative; overflow: hidden; background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%); }
.hero::before { content: ""; position: absolute; inset: 50px auto auto -120px; width: 320px; height: 320px; border-radius: 50%; background: rgba(0, 90, 156, 0.06); filter: blur(5px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; position: relative; z-index: 1; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--primary); background: var(--accent-soft); border: 1px solid rgba(108, 188, 227, 0.48); padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 0.9rem; margin-bottom: 20px; }
.hero h1 { font-size: clamp(2.55rem, 5vw, 5.05rem); line-height: 1.02; letter-spacing: -0.055em; margin-bottom: 24px; color: var(--text); }
.hero h1 span { color: var(--primary); }
.hero p { color: var(--muted); font-size: 1.16rem; max-width: 690px; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.value-bar { display: flex; flex-wrap: wrap; gap: 10px; }
.value-pill { padding: 9px 12px; background: #ffffff; border: 1px solid var(--line); border-radius: 999px; color: var(--text); font-size: 0.9rem; box-shadow: 0 8px 20px rgba(35, 50, 71, 0.045); }

.dashboard-mockup { background: #ffffff; border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 20px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.mockup-top { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.dot { width: 11px; height: 11px; border-radius: 50%; background: #cbd6de; }
.mockup-title { margin-left: 10px; color: var(--muted); font-size: 0.85rem; }
.mockup-image { border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: #f7fbfd; margin-bottom: 14px; min-height: 270px; }
.mockup-image img { width: 100%; height: 270px; object-fit: cover; object-position: center; }
.mockup-main { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.metric-card { background: #f7fbfd; border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.metric-card strong { display: block; font-size: 2rem; line-height: 1; margin-bottom: 10px; color: var(--primary-dark); }
.metric-card span { color: var(--muted); font-size: 0.92rem; }
.mockup-wide { grid-column: 1 / -1; background: var(--primary-soft); border: 1px solid rgba(0, 90, 156, 0.18); border-radius: 18px; padding: 18px; color: var(--text); }
.workflow-line { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 14px; }
.workflow-step { height: 48px; border-radius: 12px; background: #ffffff; border: 1px solid var(--line); display: grid; place-items: center; font-size: 0.76rem; color: var(--text); text-align: center; padding: 6px; }

section { padding: 78px 0; }
.section-header { max-width: 800px; margin-bottom: 34px; }
.section-header.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-kicker { color: var(--primary); font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; margin-bottom: 10px; }
h2 { font-size: clamp(2rem, 3.2vw, 3.35rem); line-height: 1.08; letter-spacing: -0.035em; margin-bottom: 16px; color: var(--text); }
.section-header p { color: var(--muted); font-size: 1.08rem; }
.problem-grid, .benefit-grid, .module-grid, .trust-grid, .loading-grid, .usecase-grid { display: grid; gap: 18px; }
.problem-grid { grid-template-columns: repeat(3, 1fr); }
.module-grid { grid-template-columns: repeat(4, 1fr); }
.benefit-grid { grid-template-columns: repeat(3, 1fr); }
.trust-grid { grid-template-columns: repeat(3, 1fr); }
.loading-grid { grid-template-columns: repeat(4, 1fr); }
.usecase-grid { grid-template-columns: repeat(6, 1fr); }
.card { background: #ffffff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; min-height: 100%; box-shadow: var(--shadow-soft); }
.card-icon { display: inline-flex; align-items: center; justify-content: center; width: fit-content; max-width: 100%; min-height: 38px; padding: 9px 18px; border-radius: 12px; background: #dfeaf3; color: var(--primary); font-size: 0.82rem; font-weight: 800; margin-bottom: 14px; letter-spacing: 0.005em; line-height: 1.12; text-align: center; white-space: normal; box-shadow: inset 0 1px 0 rgba(255,255,255,0.45); }
.card .card-icon + p { margin-top: 2px; }
.card h3 { font-size: 1.18rem; margin-bottom: 10px; line-height: 1.25; color: var(--text); }
.card p, .card li { color: var(--muted); font-size: 0.96rem; }
.card ul { margin-left: 18px; margin-top: 12px; }

.solution, .technical-section, .loading-section { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.split { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 38px; align-items: center; }
.visual-card { background: #ffffff; border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 18px; box-shadow: var(--shadow); }
.visual-card img { border-radius: 20px; border: 1px solid var(--line); width: 100%; height: 370px; object-fit: cover; }
#outputs .split { align-items: stretch; }
#outputs .visual-card { height: 100%; display: flex; flex-direction: column; }
#outputs .visual-card img { height: 520px; min-height: 520px; object-fit: cover; object-position: center; }
.visual-caption { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.visual-caption div { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #f7fbfd; }
.visual-caption strong { display: block; color: var(--primary-dark); font-size: 0.92rem; margin-bottom: 2px; }
.visual-caption span { color: var(--muted); font-size: 0.78rem; }

.process-box { background: #ffffff; border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 24px; box-shadow: var(--shadow); }
.process-item { display: flex; align-items: flex-start; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.process-item:last-child { border-bottom: none; }
.number { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), var(--accent-dark)); color: #ffffff; font-weight: 900; font-size: 0.9rem; }
.process-item h3 { font-size: 1rem; margin-bottom: 4px; color: var(--text); }
.process-item p { color: var(--muted); font-size: 0.94rem; }

.loading-engine { background: #ffffff; border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 20px; box-shadow: var(--shadow); overflow: hidden; }
.engine-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.engine-title { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--primary-dark); }
.engine-status { padding: 7px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--primary); font-size: 0.78rem; font-weight: 800; }
.load-diagram { border-radius: 20px; border: 1px solid var(--line); background: #f8fcff; overflow: hidden; margin-bottom: 14px; }
.load-diagram img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.frame-line { position: absolute; left: 11%; right: 11%; height: 5px; background: var(--primary-dark); opacity: .88; border-radius: 999px; }
.frame-line.roof-left { top: 42%; right: 50%; transform: rotate(-11deg); transform-origin: right center; }
.frame-line.roof-right { top: 42%; left: 50%; transform: rotate(11deg); transform-origin: left center; }
.frame-line.col-left { top: 45%; left: 14%; right: auto; width: 5px; height: 42%; }
.frame-line.col-right { top: 45%; right: 14%; left: auto; width: 5px; height: 42%; }
.wind-zone { position: absolute; padding: 8px 10px; border-radius: 12px; background: rgba(0, 90, 156, 0.10); color: var(--primary-dark); font-size: .78rem; font-weight: 800; border: 1px solid rgba(0,90,156,.16); }
.wind-zone.one { left: 7%; top: 16%; }
.wind-zone.two { right: 7%; top: 16%; }
.wind-zone.three { left: 36%; top: 6%; }
.wind-zone.four { left: 36%; bottom: 9%; background: rgba(108,188,227,.22); }
.snow-band { position: absolute; left: 23%; top: 35%; width: 54%; height: 20px; background: rgba(108, 188, 227, 0.60); border-radius: 999px; transform: rotate(0deg); box-shadow: 0 12px 30px rgba(108, 188, 227, 0.22); }
.load-cases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.load-case { border: 1px solid var(--line); background: #f7fbfd; border-radius: 14px; padding: 12px; }
.load-case strong { display: block; color: var(--primary-dark); font-size: .88rem; margin-bottom: 3px; }
.load-case span { color: var(--muted); font-size: .78rem; }

.feature-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 30px; }
.feature-strip .badge { text-align: left; }
.compliance-badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 30px; }
.badge { background: #ffffff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; text-align: center; box-shadow: var(--shadow-soft); }
.badge strong { display: block; font-size: 1.25rem; color: var(--primary-dark); margin-bottom: 6px; }
.badge span { color: var(--muted); font-size: 0.92rem; }
.usecase { background: #ffffff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; text-align: center; color: var(--text); font-weight: 800; box-shadow: var(--shadow-soft); }
.usecase span { display: block; color: var(--muted); font-weight: 500; font-size: .78rem; margin-top: 3px; }

.lifecycle { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.lifecycle-step { position: relative; padding: 22px; min-height: 150px; background: #ffffff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); }
.lifecycle-step small { color: var(--primary); font-weight: 800; letter-spacing: 0.08em; }
.lifecycle-step h3 { margin: 8px 0; font-size: 1.05rem; color: var(--text); }
.lifecycle-step p { color: var(--muted); font-size: 0.92rem; }
.packages-preview { background: radial-gradient(circle at top right, rgba(0, 90, 156, 0.06), transparent 32%), #ffffff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.package-preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 26px; }
.package-preview-card { background: #ffffff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-soft); position: relative; overflow: hidden; min-height: 100%; }
.package-preview-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: linear-gradient(180deg, var(--primary), var(--accent-dark)); }
.package-preview-card small { display: inline-flex; color: var(--primary-dark); background: var(--primary-soft); border-radius: 999px; padding: 6px 10px; font-weight: 800; font-size: 0.76rem; margin-bottom: 14px; }
.package-preview-card h3 { font-size: 1.25rem; color: var(--text); margin-bottom: 9px; }
.package-preview-card p { color: var(--muted); font-size: 0.96rem; }
.cta { padding: 90px 0; background: linear-gradient(180deg, #ffffff 0%, #eef5f9 100%); }
.cta-box { background: linear-gradient(135deg, #d9edf7 0%, #89c9e5 100%); border: 1px solid rgba(0, 90, 156, 0.12); border-radius: var(--radius-xl); padding: 50px; text-align: center; box-shadow: var(--shadow); }
.cta-box p { color: var(--muted); max-width: 760px; margin: 0 auto 26px; font-size: 1.08rem; }
.footer { background: var(--footer-bg); border-top: 1px solid rgba(255, 255, 255, 0.08); padding: 54px 0 22px; }
.footer-grid { display: grid; grid-template-columns: 1.35fr .82fr 1fr .95fr 1.05fr; gap: 38px; align-items: start; }
.footer-logo { width: 126px; margin-bottom: 16px; }
.footer p { color: var(--footer-muted); font-size: 0.92rem; }
.footer h4 { font-size: 0.95rem; margin-bottom: 14px; color: var(--footer-text); letter-spacing: 0.06em; }
.footer-links { display: grid; gap: 8px; color: var(--footer-muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--accent); }
.footer-contact div { margin-bottom: 10px; color: var(--footer-muted); font-size: 0.9rem; }
.footer-contact span { display: block; color: var(--footer-text); font-weight: 700; }

.footer-company-links {
  margin-bottom: 18px;
}

.footer-bottom { margin-top: 38px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.16); display: flex; justify-content: space-between; gap: 18px; color: var(--footer-muted); font-size: 0.84rem; }
.footer-bottom-links { display: flex; gap: 18px; }
.footer-bottom-links a:hover { color: var(--accent); }

@media (max-width: 1180px) { .nav-links { gap: 20px; } }
@media (max-width: 1100px) { .nav-links { gap: 14px; font-size: 0.88rem; } .lifecycle { grid-template-columns: repeat(3, 1fr); } .usecase-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 980px) { .hero-grid, .split { grid-template-columns: 1fr; } .problem-grid, .benefit-grid, .module-grid, .trust-grid, .compliance-badges, .package-preview-grid, .lifecycle, .footer-grid, .loading-grid, .feature-strip { grid-template-columns: 1fr; } .nav { height: auto; min-height: 78px; flex-wrap: wrap; } .mobile-menu-btn { display: block; } .nav-links { display: none; width: 100%; padding: 0 0 18px; flex-direction: column; align-items: flex-start; } .topbar.menu-open .nav-links { display: flex; } .dropdown { padding: 0; width: 100%; } .dropdown-menu { position: static; width: 100%; margin-top: 10px; opacity: 1; pointer-events: auto; transform: none; box-shadow: none; } .nav-cta { margin-left: auto; } }
@media (max-width: 640px) { .container { width: min(100% - 18px, var(--max-width)); } .hero { padding: 62px 0 52px; } section { padding: 58px 0; } .hero h1 { font-size: 2.65rem; } .hero p { font-size: 1.02rem; } .workflow-line, .mockup-main, .visual-caption, .load-cases, .usecase-grid { grid-template-columns: 1fr; } .mockup-image img, .visual-card img, #outputs .visual-card img { height: 260px; min-height: 260px; } .cta-box { padding: 34px 20px; } .footer-bottom { flex-direction: column; } }

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.compact-workflow {
  grid-template-columns: repeat(5, 1fr);
}
.four-only {
  grid-template-columns: repeat(2, 1fr);
}
.compact-box {
  margin-top: 22px;
}
@media (max-width: 1180px) {
  .workflow-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 980px) {
  .workflow-grid, .four-only { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .compact-workflow { grid-template-columns: 1fr; }
}

/* Layout refinements requested after content review */
.loading-section .split {
  align-items: center;
}

.loading-section .loading-engine {
  max-width: 560px;
  margin-left: auto;
  padding: 16px;
}

.loading-section .engine-toolbar {
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.loading-section .load-diagram {
  margin-bottom: 10px;
}

.loading-section .load-diagram img {
  height: 230px;
  aspect-ratio: auto;
  object-fit: cover;
}

.loading-section .load-cases {
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.loading-section .load-case {
  padding: 9px;
}

.loading-section .load-case strong {
  font-size: 0.82rem;
}

.loading-section .load-case span {
  font-size: 0.72rem;
  line-height: 1.35;
}

#outputs .visual-card {
  min-height: 600px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

#outputs .visual-card img {
  flex: 1 1 auto;
  height: auto;
  min-height: 460px;
  object-fit: cover;
  object-position: center;
}

#outputs .visual-caption {
  margin-top: 14px;
  flex: 0 0 auto;
}

@media (max-width: 980px) {
  .loading-section .loading-engine {
    max-width: 100%;
    margin-left: 0;
  }

  .loading-section .load-cases {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .loading-section .load-diagram img,
  #outputs .visual-card img {
    height: 260px;
    min-height: 260px;
  }

  .loading-section .load-cases,
  #outputs .visual-caption {
    grid-template-columns: 1fr;
  }

  #outputs .visual-card {
    min-height: 0;
  }
}


@media (max-width: 980px) {
  .dropdown-menu.wide-menu {
    width: 100%;
  }
}


/* Compact header refinement */
.topbar {
  min-height: 50px;
}

.nav {
  height: 50px;
  min-height: 50px;
  gap: 18px;
}

.brand {
  min-width: 124px;
}

.brand img {
  width: 104px;
}

.nav-links {
  gap: 22px;
  font-size: 0.90rem;
}

.dropdown {
  padding: 16px 0;
}

.dropdown-menu {
  top: 52px;
}

.nav-cta {
  min-height: 30px;
  padding: 5px 14px;
  font-size: 0.84rem;
}

.mobile-menu-btn {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}

@media (max-width: 980px) {
  .nav {
    min-height: 56px;
    height: auto;
  }

  .topbar {
    min-height: 56px;
  }

  .brand img {
    width: 108px;
  }

  .dropdown {
    padding: 0;
  }

  .dropdown-menu {
    top: auto;
  }
}


/* Header/footer 1440px width refinement */
:root {
  --max-width: 1440px;
}

.container {
  width: min(100% - 20px, var(--max-width));
  margin-left: auto;
  margin-right: auto;
}

/* Header uses the same wider page rhythm as the updated pages */
.topbar .container.nav {
  width: min(100% - 20px, var(--max-width));
}

.nav {
  gap: 24px;
}

.nav-links {
  gap: 28px;
}

.dropdown-menu {
  width: 360px;
}

.dropdown-menu.wide-menu {
  width: 470px;
}

/* Footer adjusted for the wider 1440px content area */
.footer {
  padding: 60px 0 24px;
}

.footer .container {
  width: min(100% - 20px, var(--max-width));
}

.footer-grid {
  grid-template-columns: 1.48fr 0.78fr 1.08fr 1fr 1.12fr;
  gap: 46px;
}

.footer-logo {
  width: 136px;
}

.footer p,
.footer-links,
.footer-contact div {
  font-size: 0.94rem;
  line-height: 1.62;
}

.footer h4 {
  font-size: 0.98rem;
  margin-bottom: 16px;
}

.footer-bottom {
  margin-top: 42px;
}

@media (max-width: 1180px) {
  .nav-links {
    gap: 20px;
    font-size: 0.88rem;
  }

  .dropdown-menu {
    width: 330px;
  }

  .dropdown-menu.wide-menu {
    width: 420px;
  }

  .footer-grid {
    gap: 34px;
  }
}

@media (max-width: 980px) {
  .container,
  .topbar .container.nav,
  .footer .container {
    width: min(100% - 22px, var(--max-width));
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .dropdown-menu,
  .dropdown-menu.wide-menu {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .container,
  .topbar .container.nav,
  .footer .container {
    width: min(100% - 18px, var(--max-width));
  }

  .footer {
    padding: 46px 0 22px;
  }

  .footer-bottom-links {
    flex-wrap: wrap;
    gap: 12px 18px;
  }
}
/* End header/footer 1440px width refinement */

/* Header language selector */
.nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
  flex: 0 0 auto;
}

.language-switcher {
  position: relative;
}

.language-toggle {
  min-width: 66px;
  height: 32px;
  padding: 5px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-size: 0.80rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 7px 20px rgba(35, 50, 71, 0.05);
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.language-toggle:hover,
.language-toggle:focus-visible,
.language-switcher.is-open .language-toggle {
  border-color: rgba(0, 90, 156, 0.38);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.language-toggle:focus-visible {
  outline: 3px solid rgba(108, 188, 227, 0.30);
  outline-offset: 2px;
}

.language-toggle svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.language-toggle::after {
  content: "";
  width: 5px;
  height: 5px;
  margin-left: 1px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.18s ease;
}

.language-switcher.is-open .language-toggle::after {
  transform: rotate(225deg) translate(-1px, -1px);
}

.language-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 1200;
  width: 196px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(35, 50, 71, 0.16);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-7px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

/* Invisible hover bridge between the language button and its menu.
   This prevents the menu from closing while the pointer moves downward. */
.language-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -16px;
  height: 16px;
  background: transparent;
}

.language-switcher:hover .language-menu,
.language-switcher:focus-within .language-menu,
.language-switcher.is-open .language-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

/* Keep the open state stable when moving between the toggle and menu. */
.language-switcher:hover,
.language-switcher:focus-within,
.language-switcher.is-open {
  z-index: 1250;
}

.language-option {
  min-height: 40px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 10px;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 700;
}

.language-option:hover,
.language-option:focus-visible {
  background: var(--primary-soft);
  color: var(--primary-dark);
  outline: none;
}

.language-option.current {
  background: #f2f7fa;
  color: var(--primary-dark);
}

.language-meta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
}

.language-code {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.language-check {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.68rem;
  line-height: 1;
}

.mobile-language-switcher {
  display: none;
}

@media (max-width: 1180px) {
  .nav-actions {
    gap: 8px;
  }

  .language-toggle {
    min-width: 62px;
    padding-inline: 8px;
  }
}

@media (max-width: 980px) {
  .brand {
    order: 1;
  }

  .nav-actions {
    order: 2;
  }

  .nav-links {
    order: 3;
  }

  .desktop-language-switcher {
    display: none;
  }

  .mobile-language-switcher {
    display: block;
    width: 100%;
    margin-top: 5px;
    padding-top: 15px;
    border-top: 1px solid var(--line);
  }

  .mobile-language-title {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .mobile-language-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .mobile-language-options .language-option {
    min-height: 36px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    gap: 8px;
  }

  .mobile-language-options .language-option.current {
    border-color: rgba(0, 90, 156, 0.34);
    background: var(--primary-soft);
  }

  .mobile-language-options .language-code,
  .mobile-language-options .language-check {
    display: none;
  }
}

@media (max-width: 420px) {
  .nav {
    gap: 10px;
  }

  .nav-actions {
    gap: 7px;
  }

  .nav-cta {
    padding-inline: 11px;
    font-size: 0.78rem;
  }
}
/* End header language selector */

/* Six-language selector and long-label refinements */
.language-menu {
  width: 214px;
  max-height: min(360px, calc(100vh - 84px));
  overflow-y: auto;
  overscroll-behavior: contain;
}

html[lang^="fr"] .nav-links,
html[lang^="es"] .nav-links {
  gap: 20px;
  font-size: 0.87rem;
}

html[lang^="fr"] .dropdown-menu.wide-menu,
html[lang^="es"] .dropdown-menu.wide-menu {
  width: 500px;
}

html[lang^="fr"] .footer-grid,
html[lang^="es"] .footer-grid {
  grid-template-columns: 1.45fr 0.82fr 1.12fr 1.02fr 1.16fr;
  gap: 38px;
}

@media (max-width: 1240px) and (min-width: 981px) {
  html[lang^="fr"] .nav-links,
  html[lang^="es"] .nav-links {
    gap: 14px;
    font-size: 0.82rem;
  }

  html[lang^="fr"] .nav,
  html[lang^="es"] .nav {
    gap: 16px;
  }

  html[lang^="fr"] .nav-cta,
  html[lang^="es"] .nav-cta {
    padding-inline: 11px;
    font-size: 0.79rem;
  }
}

@media (max-width: 980px) {
  html[lang^="fr"] .dropdown-menu.wide-menu,
  html[lang^="es"] .dropdown-menu.wide-menu {
    width: 100%;
  }

  html[lang^="fr"] .footer-grid,
  html[lang^="es"] .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .mobile-language-options {
    max-width: 100%;
  }
}
/* End six-language selector refinements */

/* Stable hover corridor for the desktop language selector */
.desktop-language-switcher {
  padding-bottom: 6px;
  margin-bottom: -6px;
}

.desktop-language-switcher .language-menu {
  margin-top: 0;
}
/* End stable hover corridor */

