/* ==========================================================================
   Layout: containers, sections, header and footer
   ========================================================================== */

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: calc(820px + var(--gutter) * 2);
}

.container--wide {
  max-width: calc(1080px + var(--gutter) * 2);
}

.section {
  position: relative;
  padding-block: var(--section-y);
}

.section--tight {
  padding-block: clamp(40px, 5vw, 72px);
}

/* Dark sections share a black base with soft coloured glows. */
.dark {
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(60% 50% at 0% 0%, rgba(120, 22, 22, 0.55), transparent 70%),
    radial-gradient(45% 60% at 100% 20%, rgba(14, 70, 80, 0.45), transparent 70%),
    radial-gradient(55% 45% at 85% 100%, rgba(60, 20, 120, 0.45), transparent 70%),
    var(--c-dark);
  color: var(--c-dark-ink);
}

.brand-stripes {
  position: absolute;
  z-index: -1;
  top: -6%;
  right: -16%;
  width: min(62vw, 900px);
  height: auto;
  aspect-ratio: 1;
  color: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.brand-stripes--low {
  top: auto;
  bottom: -24%;
}

/* Sub-pages leave room for the floating header. */
.page {
  padding-top: calc(var(--header-h) + 72px);
  background:
    radial-gradient(40% 420px at 0% 240px, rgba(214, 190, 236, 0.45), transparent 70%),
    radial-gradient(35% 380px at 100% 0%, rgba(240, 200, 222, 0.45), transparent 70%);
}

/* --- Header ------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  padding-top: 40px;
  transition: padding 0.4s var(--ease);
  pointer-events: none;
}

.site-header.is-scrolled {
  padding-top: 14px;
}

.nav {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
  padding-inline: 40px 20px;
  max-width: calc(1306px);
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  box-shadow: 0 8px 30px -14px rgba(40, 20, 90, 0.18);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}

.logo {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  color: var(--c-ink);
}

.logo__mark {
  width: 1.2em;
  height: 1.2em;
  object-fit: contain;
}

/* Full logo (mark + wordmark in one image): sized by height so it keeps its shape. */
.logo__full {
  display: block;
  height: 34px;
  width: auto;
  max-width: none;
}

.logo--lg {
  font-size: clamp(2rem, 3.4vw, 3rem);
}

.logo--lg .logo__full {
  height: clamp(36px, 3.4vw, 52px);
}

.nav__menu {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: space-between;
  margin-left: 48px;
}

.nav__links {
  display: flex;
  align-self: stretch;
  flex: 1;
  justify-content: space-around;
  margin-right: 40px;
}

.nav__links li {
  display: flex;
}

.nav__link {
  position: relative;
  display: flex;
  align-items: center;
  padding-inline: clamp(10px, 1.4vw, 40px);
  white-space: nowrap;
  height: var(--header-h);
  font-family: var(--font-display);
  font-size: 1.125rem;
  color: var(--c-ink);
  transition: color 0.2s;
}

/* Active link: soft blue glow rising from a solid underline. */
.nav__link::before,
.nav__link::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  opacity: 0;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.nav__link::before {
  top: 30%;
  background: radial-gradient(70% 90% at 50% 100%, rgba(80, 90, 255, 0.22), transparent 75%);
}

.nav__link::after {
  height: 2px;
  background: var(--c-blue);
  transform: scaleX(0.4);
}

.nav__link:hover::before {
  opacity: 0.5;
}

.nav__link[aria-current]::before,
.nav__link[aria-current]::after {
  opacity: 1;
  transform: none;
}

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: var(--radius-sm);
}

.nav__toggle .icon {
  width: 26px;
  height: 26px;
}

.nav__toggle .icon--close,
.nav__toggle[aria-expanded='true'] .icon--open {
  display: none;
}

.nav__toggle[aria-expanded='true'] .icon--close {
  display: block;
}

@media (max-width: 1240px) {
  .logo__full {
    height: 30px;
  }

  .nav__menu {
    margin-left: 24px;
  }

  .nav__links {
    margin-right: 16px;
  }

  .nav__link {
    font-size: 1rem;
    padding-inline: 12px;
  }
}

@media (max-width: 1000px) {
  :root {
    --header-h: 64px;
  }

  .site-header {
    padding-top: 12px;
  }

  .nav {
    margin-inline: 12px;
    width: auto;
    padding-inline: 20px 10px;
    border-radius: 16px;
  }

  .nav .logo {
    font-size: 1.25rem;
  }

  .nav .logo__full {
    height: 30px;
  }

  .nav__toggle {
    display: grid;
  }

  .nav__menu {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline: 0;
    margin: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--c-line);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s, transform 0.25s var(--ease), visibility 0.25s;
  }

  .nav__menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav__links {
    flex-direction: column;
    margin: 0;
  }

  .nav__link {
    height: 52px;
    padding-inline: 16px;
    border-radius: var(--radius-sm);
  }

  .nav__link::before {
    display: none;
  }

  .nav__link::after {
    inset: 14px auto 14px 0;
    width: 3px;
    height: auto;
    transform: none;
  }

  .nav__link[aria-current] {
    background: rgba(43, 59, 255, 0.06);
  }
}

/* --- Footer ------------------------------------------------------------- */

.site-footer {
  position: relative;
  overflow: hidden;
  padding-top: clamp(64px, 7vw, 112px);
  background: var(--c-bg);
}

.site-footer__glow {
  position: absolute;
  inset: 0 0 auto;
  height: 160px;
  background: linear-gradient(90deg, rgba(240, 236, 248, 0) 0%, rgba(226, 208, 240, 0.7) 45%, rgba(236, 232, 250, 0.5) 100%);
  filter: blur(30px);
  pointer-events: none;
}

/* Contact call-to-action that opens every footer. */
.site-footer__cta {
  position: relative;
  max-width: calc(1340px + var(--gutter) * 2);
  margin-bottom: clamp(48px, min(6vw, 8vh), 96px);
}

.cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px 48px;
  padding: clamp(32px, min(4.5vw, 7vh), 64px) clamp(24px, 5.5vw, 80px);
  border-radius: 28px;
  /* --grad-caplyzer's colours, with glows shaped for a wide banner. */
  background:
    radial-gradient(60% 130% at 0% 0%, #536fb8 0%, rgba(83, 111, 184, 0) 70%),
    radial-gradient(55% 130% at 100% 0%, #fc8875 0%, rgba(252, 136, 117, 0) 70%),
    radial-gradient(50% 120% at 100% 75%, #ba266d 0%, rgba(186, 38, 109, 0) 75%),
    linear-gradient(165deg, #6b2f80 0%, #4e1c68 50%, #27043a 100%);
  color: #fff;
}

.cta-banner__title {
  font-size: clamp(1.9rem, 3.9vw, 3.6rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  max-width: 15em;
}

.cta-banner__text {
  margin-top: 20px;
  font-size: clamp(1.05rem, 1.4vw, 1.375rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.85);
}

.cta-banner .cta-banner__btn {
  flex-shrink: 0;
  min-height: 64px;
  padding: 0 40px;
  border-radius: 14px;
  background: #fff;
  color: var(--c-ink);
  font-size: clamp(1rem, 1.3vw, 1.3rem);
  font-weight: 600;
}

.site-footer__top,
.site-footer__middle {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 32px;
  max-width: calc(1340px + var(--gutter) * 2);
}

.site-footer__top {
  align-items: center;
}

.site-footer__middle {
  align-items: flex-end;
  margin-top: clamp(40px, min(6vw, 8vh), 96px);
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  font-size: 1.125rem;
  color: var(--c-ink-soft);
}

.footer-contact li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-contact .icon {
  width: 18px;
  height: 18px;
  color: var(--c-blue);
}

.footer-contact a:hover {
  color: var(--c-violet);
}

.footer-address {
  font-size: 1.125rem;
  line-height: 1.4;
  color: var(--c-muted);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px clamp(24px, 4vw, 60px);
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.375rem;
  letter-spacing: -0.01em;
}

.footer-nav .icon {
  width: 18px;
  height: 18px;
  color: var(--c-purple);
  transition: transform 0.3s var(--ease);
}

.footer-nav a:hover .icon {
  transform: translate(3px, -3px);
}

.site-footer__wordmark {
  margin-top: 40px;
  margin-bottom: -0.2em;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(3.5rem, 17.8vw, 17rem);
  line-height: 0.8;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #dcdce0 0%, #ededf0 55%, rgba(244, 244, 245, 0) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  user-select: none;
}

.site-footer__bar {
  position: relative;
  background: var(--grad-brand);
  color: rgba(255, 255, 255, 0.75);
}

.site-footer__bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding-left: clamp(16px, 6vw, 88px);
}

.site-footer__bar p {
  font-size: 1rem;
}

/* The social icons sit on a raised tab with a slanted left edge. */
.footer-social {
  position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  height: 130px;
  padding: 20px clamp(16px, 3vw, 40px) 0 72px;
  background: #2b45ff;
  clip-path: polygon(46px 0, 100% 0, 100% 100%, 0 100%, 0 54px);
}

.footer-social a {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  transition: transform 0.25s var(--ease), opacity 0.25s;
}

.footer-social a:hover {
  transform: translateY(-2px);
  opacity: 0.85;
}

.footer-social .icon {
  width: 28px;
  height: 28px;
}

@media (max-width: 760px) {
  .cta-banner {
    flex-direction: column;
    align-items: flex-start;
    /* Stacked, the banner is tall like the compare column, so it takes the same blend. */
    background: var(--grad-caplyzer);
  }

  .cta-banner .cta-banner__btn {
    width: 100%;
    min-height: 56px;
    padding: 0 20px;
  }

  .site-footer__top,
  .site-footer__middle {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer__top .logo {
    order: -1;
  }

  .footer-nav a {
    font-size: 1.125rem;
  }

  .site-footer__bar-inner {
    flex-direction: column-reverse;
    align-items: stretch;
    padding: 0;
  }

  .site-footer__bar p {
    padding: 18px var(--gutter);
    font-size: 0.875rem;
  }

  .footer-social {
    position: static;
    height: auto;
    padding: 16px var(--gutter) 0;
    clip-path: none;
    background: transparent;
  }
}
