/* Shared foundation: tokens, reset, type, header, badges, mascot, footer. */

:root {
  --navy: #1b1f3c;
  --ink: #1b1f3c;
  --ink-soft: #4b5078;
  --ink-muted: #5e6488;
  --bg: #f3f6ff;
  --surface: #fff;
  --grid-line: #e4e9fa;
  --line: #dde3f7;
  --blue: #2458e8;
  --blue-hover: #1b47c9;
  --blue-bright: #2f6bff;
  --pink: #ec5a8c;
  --pink-text: #c2336a;

  --font-body: 'Figtree', ui-rounded, system-ui, sans-serif;
  --font-display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;

  --gutter: 24px;
  --header-h: 88px;
  --section-y: 128px;

  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-spring: cubic-bezier(0.3, 1.5, 0.5, 1);
  --shadow-card: 0 26px 48px -26px rgba(27, 31, 60, 0.45);
  --shadow-phone: 0 34px 60px -26px rgba(27, 31, 60, 0.55);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

img {
  height: auto;
}

a {
  color: var(--blue);
}

a:hover {
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--blue-bright);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

main {
  overflow-x: clip;
}

.wrap {
  width: min(1240px, 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.grid-bg {
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: -1px -1px;
}

.grid-bg-dark {
  background-color: var(--navy);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: -1px -1px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  color: #fff;
  transform: none;
}

/* Type */

.hero-title,
.h2,
.h3 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  color: var(--ink);
  text-wrap: balance;
}

.h2 {
  margin: 0 0 20px;
  font-weight: 800;
  font-size: clamp(2.1rem, 1.35rem + 3.4vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.h3 {
  margin: 0;
  font-weight: 700;
  font-size: clamp(1.5rem, 1.35rem + 0.6vw, 1.75rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.lede {
  max-width: 34em;
  margin: 0;
  font-size: clamp(1.075rem, 1rem + 0.35vw, 1.2rem);
  color: var(--ink-soft);
  text-wrap: pretty;
}

.on-dark {
  color: #fff;
}

.lede.on-dark {
  color: rgba(255, 255, 255, 0.82);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  transition:
    background-color 0.25s ease,
    box-shadow 0.25s ease;
}

.site-header.is-stuck {
  background-color: rgba(243, 246, 255, 0.86);
  box-shadow: 0 1px 0 var(--line);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
}

.site-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 100%;
}

.brand {
  display: inline-flex;
  flex: none;
  border-radius: 12px;
}

.brand-logo {
  width: auto;
  height: 40px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 12px 16px;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.nav-link:hover {
  color: var(--ink);
  background-color: rgba(47, 107, 255, 0.09);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-left: 8px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease;
}

.nav-cta:hover {
  color: #fff;
  background: var(--blue-hover);
  transform: translateY(-2px);
}

/* Store badges */

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 10px 26px 10px 18px;
  border-radius: 16px;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 12px 24px -14px rgba(27, 31, 60, 0.7);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.badge:hover {
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 18px 30px -14px rgba(27, 31, 60, 0.75);
}

.badge-light,
.badge-light:hover {
  background: #fff;
  color: var(--navy);
  box-shadow: 0 16px 30px -16px rgba(0, 0, 0, 0.6);
}

.badge-icon {
  flex: none;
  width: 26px;
  height: 26px;
}

.badge-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  white-space: nowrap;
}

.badge-small {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.85;
}

.badge-big {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Mascot */

.mascot {
  width: 100%;
  height: auto;
  overflow: visible;
}

.bob {
  transform-origin: 50% 100%;
  animation: bob 3.6s ease-in-out infinite alternate;
}

.m-body {
  fill: #fff;
}

.m-outline {
  fill: none;
  stroke: #0057ff;
  stroke-width: 20;
  stroke-linejoin: round;
}

.m-mark {
  fill: none;
  stroke: #0057ff;
  stroke-width: 16;
  stroke-linecap: round;
}

.m-cap {
  fill: #0057ff;
}

.m-eye {
  fill: #013193;
  transform-box: fill-box;
  transform-origin: center;
  animation: blink 5.5s infinite;
}

.m-smile {
  fill: none;
  stroke: #013193;
  stroke-width: 7;
  stroke-linecap: round;
}

.m-wave-back {
  fill: #0a55ff;
  animation: slosh-r 4.2s linear infinite;
}

.m-wave-front {
  fill: #2e81ff;
  animation: slosh-l 3s linear infinite;
}

/* Footer */

.footer {
  padding: 56px 0 48px;
  color: rgba(255, 255, 255, 0.64);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}

/* Directly under the closing call to action the two read as one block. */
.cta + .footer {
  padding-top: 0;
}

.cta + .footer .footer-row {
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-logo {
  width: auto;
  height: 30px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 -12px;
}

.footer-links a {
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 600;
  text-decoration: none;
}

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

.footer-fine {
  max-width: 60em;
  margin: 20px 0 0;
  font-size: 14px;
}

/* Motion shared across pages */

@keyframes bob {
  from { transform: translateY(0) rotate(-3deg); }
  to { transform: translateY(-10px) rotate(3deg); }
}

@keyframes blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.1); }
}

@keyframes slosh-l {
  from { transform: translateX(0); }
  to { transform: translateX(-180px); }
}

@keyframes slosh-r {
  from { transform: translateX(0); }
  to { transform: translateX(180px); }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Responsive */

@media (max-width: 960px) {
  :root {
    --section-y: 96px;
  }
}

@media (max-width: 820px) {
  .nav-link {
    display: none;
  }
}

@media (max-width: 560px) {
  :root {
    --gutter: 20px;
    --header-h: 72px;
    --section-y: 72px;
  }

  .brand-logo {
    height: 30px;
  }

  .nav-cta {
    min-height: 44px;
    padding: 0 16px;
    font-size: 15px;
  }

  .badges {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .badge {
    justify-content: center;
    gap: 8px;
    min-height: 54px;
    padding: 8px 12px;
    border-radius: 14px;
  }

  .badge-icon {
    width: 22px;
    height: 22px;
  }

  .badge-small {
    font-size: 10.5px;
  }

  .badge-big {
    font-size: 17px;
  }

  .footer-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 360px) {
  .site-header-row {
    gap: 12px;
  }

  .brand-logo {
    height: 26px;
  }

  .nav-cta {
    margin-left: 0;
    padding: 0 14px;
  }

  .badges {
    grid-template-columns: minmax(0, 1fr);
  }
}
