/* Base reset — layout only, no brand styling yet */
* {
  box-sizing: border-box;
}

/* Hide the page scrollbar; the page still scrolls with wheel, touch and keys */
html {
  scrollbar-width: none;
}

/* Stop the rubber-band bounce past the top/bottom of the page, which
   otherwise flashes a strip of the light body background above the header */
html,
body {
  overscroll-behavior-y: none;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  color: #222;
  background: #fbfaf9;
  text-align: center;
}

img {
  max-width: 100%;
  display: block;
}

/* Waveform graphic — sits directly on the page background at the bottom of
   every page, not boxed in as a separate banner */
.wave-banner {
  height: 240px;
  overflow: hidden;
}

.wave-banner canvas {
  display: block;
  width: 100%;
  height: 100%;
}

@media (max-width: 700px) {
  .wave-banner {
    height: 140px;
  }
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

a {
  color: inherit;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.4rem 1rem;
  border: 1px solid #222;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  background: none;
  font-size: 0.75rem;
}

.btn-primary {
  background: #222;
  color: #fff;
  border-color: #222;
}

.btn-large {
  padding: 0.55rem 1.25rem;
  font-size: 0.8rem;
}

/* Header */
.site-header {
  border-bottom: 1px solid #ddd;
}

.header-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
}

.logo {
  justify-self: start;
}

.logo img {
  height: 48px;
  width: auto;
}

.main-nav {
  position: relative;
  z-index: 1;
  display: flex;
  justify-self: center;
  gap: 1.5rem;
}

.main-nav a {
  text-decoration: none;
  font-weight: 500;
}

.header-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 1rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: #222;
}

/* Dark header variant — used on the home page, where the header sits
   directly on top of the dark hero with no visible seam */
.site-header--home {
  background: #121c33;
  border-bottom-color: rgba(251, 250, 249, 0.08);
}

.site-header--home .main-nav a {
  color: #fbfaf9;
}

.site-header--home .nav-toggle span {
  background: #fbfaf9;
}

.site-header--home .header-actions .btn-primary {
  background: #fbfaf9;
  color: #121c33;
  border-color: #fbfaf9;
}

/* Light header variant — home page, where the header sits on white above
   the inset hero card */
.site-header--light {
  border-bottom-color: transparent;
}

.site-header--light .header-actions .btn-primary {
  background: #121c33;
  border-color: #121c33;
  color: #fbfaf9;
}

.site-header--light .nav-toggle span {
  background: #121c33;
}

/* Language popup */
body.lang-popup-open {
  overflow: hidden;
}

.lang-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(20, 18, 16, 0.55);
}

.lang-popup-box {
  width: 100%;
  max-width: 360px;
  background: #fbfaf9;
  border-radius: 16px;
  padding: 2rem 1.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.lang-popup-title {
  margin: 0 0 1.25rem;
  font-weight: 600;
}

.lang-popup-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.lang-popup-btn {
  flex: 1;
  max-width: 140px;
}

/* Home hero + stats — the textured hero is an inset rounded card with a
   strip of white on each side; the stats tiles overlap its bottom edge */
.home-top {
  --stats-overlap: 3.75rem;
  padding: 0 0.75rem;
}

.hero-home {
  position: relative;
  overflow: clip;
  border-radius: 24px;
  text-align: left;
  color: #fbfaf9;
  /* extra bottom padding makes room for the tiles pulled up over the edge */
  padding: 4rem 0 calc(3.5rem + var(--stats-overlap));
  background-color: #121c33;
  background-image:
    radial-gradient(ellipse 620px 620px at 82% 38%, rgba(0, 151, 178, 0.35), transparent 65%),
    radial-gradient(ellipse 480px 480px at 96% 82%, rgba(251, 250, 249, 0.08), transparent 70%),
    repeating-linear-gradient(135deg, rgba(251, 250, 249, 0.035) 0px, rgba(251, 250, 249, 0.035) 1px, transparent 1px, transparent 34px),
    linear-gradient(180deg, #121c33 0%, #0d1626 100%);
}

.hero-home-container {
  position: relative;
}

.hero-home .btn-primary {
  background: #fbfaf9;
  color: #121c33;
  border-color: #fbfaf9;
}

.hero-home-inner {
  max-width: 600px;
  position: relative;
  z-index: 1;
}

.eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(251, 250, 249, 0.65);
  margin: 0 0 1rem;
}

.hero-home h1 {
  font-size: 2.4rem;
  line-height: 1.15;
  margin: 0 0 1.25rem;
}

.hero-home-lead {
  color: rgba(251, 250, 249, 0.85);
  max-width: 540px;
  margin: 0 0 1.75rem;
}

.btn-arrow-icon {
  display: inline-block;
  margin-left: 0.4rem;
  transition: transform 0.2s ease;
}

.btn:hover .btn-arrow-icon {
  transform: translateX(3px);
}

.hero-home-caption {
  position: absolute;
  right: 1.25rem;
  bottom: 0;
  max-width: 190px;
  margin: 0;
  text-align: right;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(251, 250, 249, 0.45);
}

@media (max-width: 860px) {
  .hero-home-caption {
    display: none;
  }
}

@media (max-width: 700px) {
  .home-top {
    --stats-overlap: 3.25rem;
    padding: 0 0.5rem;
  }

  .hero-home {
    border-radius: 18px;
    padding: 3rem 0 calc(2.5rem + var(--stats-overlap));
  }

  .hero-home h1 {
    font-size: 1.8rem;
  }
}

/* Stats bar — pulled up so the tiles straddle the hero card's bottom edge */
.stats-bar {
  position: relative;
  margin-top: calc(-1 * var(--stats-overlap));
  color: #fbfaf9;
  padding: 0 0 2.5rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

/* Tiles use the darkest stop of the hero gradient (its bottom-left) so
   their top half blends into it; only the outer corners of the whole
   block are rounded */
.stat {
  background: #0d1626;
  border-radius: 0;
  padding: 1.4rem 1rem;
  box-shadow: 0 14px 30px rgba(18, 28, 51, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 36px rgba(18, 28, 51, 0.3);
}

.stat:first-child {
  border-radius: 16px 0 0 16px;
}

.stat:last-child {
  border-radius: 0 16px 16px 0;
}

.stat-number {
  display: block;
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  line-height: 1.4;
  color: rgba(251, 250, 249, 0.7);
}

/* Language buttons sit on the white below the tiles */
.stats-lang {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.75rem;
}

.stats-lang-btn {
  padding: 0.3rem 0.75rem;
  border: 1px solid rgba(18, 28, 51, 0.3);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  text-decoration: none;
  color: #121c33;
}

.stats-lang-btn.is-active {
  background: #121c33;
  color: #fbfaf9;
  border-color: #121c33;
}

@media (max-width: 700px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat:nth-child(1) {
    border-radius: 16px 0 0 0;
  }

  .stat:nth-child(2) {
    border-radius: 0 16px 0 0;
  }

  .stat:nth-child(3) {
    border-radius: 0 0 0 16px;
  }

  .stat:nth-child(4) {
    border-radius: 0 0 16px 0;
  }
}

/* Impact section */
.impact {
  padding: 3.5rem 0 3rem;
  text-align: center;
}

.eyebrow-dark {
  color: #0097b2;
}

.impact h2 {
  font-size: 1.9rem;
  max-width: 640px;
  margin: 0 auto 1rem;
}

.impact-lead {
  max-width: 620px;
  margin: 0 auto;
  color: #555;
}

/* Services */
.services {
  padding: 3.5rem 0 4rem;
  background: #f0f0f2;
}

.services h1 {
  font-size: 2.1rem;
  line-height: 1.15;
  color: #121c33;
  max-width: 560px;
  margin: 0 auto 1rem;
}

.services-lead {
  max-width: 520px;
  margin: 0 auto 2.5rem;
  color: #555;
}

.service-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: left;
  max-width: 600px;
  margin: 0 auto;
}

.service-item {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(18, 28, 51, 0.06);
}

.service-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  cursor: pointer;
  list-style: none;
}

.service-summary::-webkit-details-marker {
  display: none;
}

.service-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #121c33;
}

.service-toggle {
  position: relative;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 1px solid #999;
  border-radius: 999px;
  color: #555;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.service-toggle::before {
  content: "";
  position: absolute;
  top: 42%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}

.service-item[open] .service-toggle,
.faq-item[open] .service-toggle {
  transform: rotate(180deg);
  background: #0097b2;
  border-color: #0097b2;
  color: #fff;
}

.service-item p {
  color: #555;
  margin: 0;
  padding: 0 1.25rem 1.25rem;
}

@media (prefers-reduced-motion: reduce) {
  .service-toggle {
    transition: none;
  }
}

@media (max-width: 700px) {
  .services h1 {
    font-size: 1.7rem;
  }
}

/* How it works — dark process band on the services page */
.process {
  background: #121c33;
  color: #fbfaf9;
  padding: 3.5rem 0 3.5rem;
}

.process h2 {
  font-size: 2rem;
  margin: 0 0 1rem;
}

.process-lead {
  max-width: 520px;
  margin: 0 auto 2.75rem;
  color: rgba(251, 250, 249, 0.8);
}

.process-steps {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.process-step {
  flex: 1;
  max-width: 250px;
}

.process-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border: 1.5px solid rgba(251, 250, 249, 0.75);
  border-radius: 999px;
  margin-bottom: 1rem;
}

.process-icon svg {
  width: 28px;
  height: 28px;
}

.process-step h3 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
}

.process-step p {
  font-size: 0.85rem;
  color: rgba(251, 250, 249, 0.75);
  margin: 0;
}

.process-arrow {
  margin-top: 20px;
  font-size: 1.25rem;
  color: rgba(251, 250, 249, 0.4);
}

.process .btn-primary {
  background: #fbfaf9;
  color: #121c33;
  border-color: #fbfaf9;
}

@media (max-width: 700px) {
  .process h2 {
    font-size: 1.7rem;
  }

  .process-steps {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .process-arrow {
    display: none;
  }
}

/* About — intro */
.about-intro {
  text-align: left;
  padding: 4rem 0 3.75rem;
  background:
    radial-gradient(ellipse 520px 380px at 88% 50%, rgba(0, 151, 178, 0.1), transparent 70%),
    linear-gradient(90deg, #f0f0f2 0%, #e7e9ed 100%);
}

.about-intro-inner {
  max-width: 560px;
}

.about-intro h1 {
  font-size: 2.6rem;
  line-height: 1.12;
  color: #121c33;
  margin: 0 0 1.25rem;
}

.about-intro-lead {
  color: #555;
  margin: 0;
}

/* About — FAQ */
.faq {
  padding: 3.5rem 0 4rem;
  background: #f0f0f2;
  border-top: 1px solid #e2e3e7;
}

.faq h2 {
  font-size: 1.9rem;
  color: #121c33;
  margin: 0 0 2rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: 680px;
  margin: 0 auto;
  text-align: left;
}

.faq-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  background: #121c33;
  color: #fbfaf9;
  border-radius: 12px;
  cursor: pointer;
  list-style: none;
  transition: background 0.2s ease;
}

.faq-summary:hover {
  background: #1b2a4a;
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-question {
  font-size: 0.95rem;
  font-weight: 600;
}

/* Same chevron toggle as the services accordion, recolored for the navy bar */
.faq-summary .service-toggle {
  width: 26px;
  height: 26px;
  border-color: rgba(251, 250, 249, 0.5);
  color: #fbfaf9;
}

.faq-item p {
  margin: 0;
  padding: 0.85rem 1.1rem 0.5rem;
  color: #555;
  font-size: 0.92rem;
}

@media (prefers-reduced-motion: reduce) {
  .faq-summary {
    transition: none;
  }
}

/* Dark call-to-action band */
.cta-band {
  color: #fbfaf9;
  padding: 4rem 0;
  background-color: #121c33;
  background-image:
    radial-gradient(ellipse 600px 320px at 50% 50%, rgba(0, 151, 178, 0.14), transparent 70%),
    repeating-linear-gradient(135deg, rgba(251, 250, 249, 0.03) 0px, rgba(251, 250, 249, 0.03) 1px, transparent 1px, transparent 34px),
    linear-gradient(180deg, #121c33 0%, #0d1626 100%);
}

.cta-band h2 {
  font-size: 2.2rem;
  line-height: 1.15;
  margin: 0 0 1.25rem;
}

.cta-band-lead {
  max-width: 540px;
  margin: 0 auto 2rem;
  color: rgba(251, 250, 249, 0.8);
}

.cta-band .btn-primary {
  background: #fbfaf9;
  color: #121c33;
  border-color: #fbfaf9;
}

@media (max-width: 700px) {
  .about-intro {
    padding: 3rem 0 2.75rem;
  }

  .about-intro h1 {
    font-size: 1.9rem;
  }

  .faq h2,
  .cta-band h2 {
    font-size: 1.6rem;
  }
}

/* Legal pages — Terms & Privacy */
.legal {
  padding: 3.5rem 0 3rem;
  text-align: left;
}

.legal-inner {
  max-width: 760px;
}

.legal h1 {
  font-size: 2.2rem;
  line-height: 1.15;
  color: #121c33;
  margin: 0 0 0.5rem;
}

.legal-updated {
  font-size: 0.85rem;
  font-weight: 600;
  color: #0097b2;
  margin: 0 0 1.75rem;
}

.legal h2 {
  font-size: 1.2rem;
  color: #121c33;
  margin: 2.25rem 0 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e3e7;
}

.legal p,
.legal li {
  color: #444;
  font-size: 0.95rem;
}

.legal p {
  margin: 0 0 0.9rem;
}

.legal ul {
  margin: 0 0 0.9rem;
  padding-left: 1.25rem;
}

.legal li {
  margin-bottom: 0.3rem;
}

.legal a {
  color: #0097b2;
}

@media (max-width: 700px) {
  .legal {
    padding: 2.5rem 0 2rem;
  }

  .legal h1 {
    font-size: 1.8rem;
  }
}

/* Contact / Quote */
.contact {
  padding: 3rem 0;
  border-top: 1px solid #ddd;
}

.contact h2 {
  margin-bottom: 1rem;
}

.contact-phone {
  font-weight: 600;
  margin-bottom: 2rem;
}

.quote-form {
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-field label {
  font-weight: 600;
  font-size: 0.9rem;
}

.form-field input,
.form-field select {
  padding: 0.65rem 1rem;
  border: 1px solid #999;
  border-radius: 14px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: #222;
}

.form-note {
  font-size: 0.85rem;
  color: #777;
  max-width: 420px;
  margin: 0 auto 0.75rem;
  text-align: right;
}

.form-error {
  color: #b00020;
  font-weight: 600;
}

.form-confirmation {
  max-width: 420px;
  margin: 0 auto;
  border: 1px solid #ddd;
  padding: 1.5rem;
}

/* Footer */
.site-footer {
  padding: 1.5rem 0 1.25rem;
  font-size: 0.85rem;
  color: #555;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-contact p {
  margin: 0.25rem 0;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
  font-size: 0.7rem;
  color: #999;
}

.footer-links a {
  text-decoration: underline;
  color: #999;
}

/* Phone browsers (e.g. Safari's floating bottom bar) draw their toolbar over
   the bottom of the page; leave room so the legal links aren't hidden under it */
@media (max-width: 700px) {
  .site-footer {
    padding-bottom: calc(5rem + env(safe-area-inset-bottom));
  }
}

/* Mobile nav — compact panel that slides in from the right edge under the
   header, so it doesn't cover the whole width of the page */
@media (max-width: 700px) {
  /* Clip sideways so the closed (off-screen) nav panel doesn't make the page
     scroll horizontally; vertical overflow stays visible for the dropdown */
  .site-header {
    position: relative;
    z-index: 50;
    overflow-x: clip;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    width: 200px;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
    text-align: left;
    background: #fff;
    border-radius: 0 0 0 14px;
    box-shadow: -6px 10px 24px rgba(18, 28, 51, 0.18);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.25s ease, visibility 0s linear 0.25s;
  }

  /* .site-header prefix so this beats the white links of the dark header */
  .site-header .main-nav a {
    padding: 0.7rem 1.25rem;
    color: #121c33;
  }

  .main-nav.open {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.25s ease, visibility 0s linear 0s;
  }

  .header-inner {
    padding: 0.6rem 0.85rem;
  }

  .logo img {
    height: 38px;
  }

  .nav-toggle {
    display: flex;
    width: 26px;
    height: 26px;
  }

  .nav-toggle span {
    transition: transform 0.25s ease, opacity 0.2s ease;
  }

  /* Hamburger turns into an X while the menu is open */
  .nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .header-actions {
    gap: 0.4rem;
  }

  .header-actions .btn-primary {
    padding: 0.3rem 0.6rem;
    font-size: 0.62rem;
    white-space: nowrap;
  }
}

@media (max-width: 700px) and (prefers-reduced-motion: reduce) {
  .main-nav,
  .main-nav.open,
  .nav-toggle span {
    transition: none;
  }
}
