/* ==========================================================================
   Clearwave Merchant Services — design system
   Tokens, primitives and components. One stylesheet for the whole site.
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */

:root {
  /* Brand */
  --navy: #00285d;
  --blue: #0867e8;
  --wave: #1789f5;
  --light-wave: #4ca7f8;
  --ice: #eaf4ff;
  --white: #fff;

  /* Derived neutrals */
  --body: #546480;
  --body-strong: #3a4a63;
  --line: rgba(0, 40, 93, 0.09);
  --line-strong: rgba(0, 40, 93, 0.14);

  /* On navy */
  --on-navy: rgba(255, 255, 255, 0.78);
  --on-navy-dim: rgba(255, 255, 255, 0.55);
  --on-navy-line: rgba(255, 255, 255, 0.14);

  /* Type */
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Rhythm */
  --gutter: clamp(20px, 5vw, 64px);
  --max: 1320px;
  --pad-y: clamp(56px, 7vw, 92px);

  /* Radii */
  --r-sm: 9px;
  --r-md: 14px;
  --r-lg: 18px;

  /* Shadows */
  --shadow-sm: 0 6px 18px rgba(0, 40, 93, 0.07);
  --shadow-md: 0 14px 34px rgba(0, 40, 93, 0.11);
  --shadow-lg: 0 26px 60px rgba(0, 40, 93, 0.16);

  /* Motion. --ease for state changes, --spring for entrances (it overshoots
     slightly, which is what reads as "snappy"), --press for tap feedback. */
  --ease: cubic-bezier(0.2, 0.72, 0.3, 1);
  --spring: cubic-bezier(0.34, 1.42, 0.5, 1);
  --press: cubic-bezier(0.3, 0, 0.2, 1);
  --enter: 0.52s;
  --stagger: 45ms;
}

/* --- Reset -------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  /* Sticky header offset for in-page anchors */
  scroll-padding-top: clamp(72px, 9vw, 130px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--body);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--navy);
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

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

.visually-hidden {
  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: 12px 18px;
  border-radius: var(--r-sm);
  font-weight: 600;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

/* --- Layout primitives -------------------------------------------------- */

.section {
  padding: var(--pad-y) 0;
}

.section--tight {
  padding: clamp(40px, 4.6vw, 62px) 0;
}

.section--ice {
  background: var(--ice);
}

.section--navy {
  background:
    radial-gradient(120% 130% at 88% 8%, #0a4a9e 0%, rgba(10, 74, 158, 0) 58%),
    linear-gradient(148deg, #00285d 0%, #013a80 100%);
  background-color: var(--navy);
  color: var(--on-navy);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.section--blue {
  background: linear-gradient(135deg, var(--blue) 0%, var(--wave) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.section--navy h1,
.section--navy h2,
.section--navy h3,
.section--navy h4,
.section--blue h1,
.section--blue h2,
.section--blue h3,
.section--blue h4 {
  color: #fff;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow {
  max-width: 860px;
}

.stack > * + * {
  margin-top: var(--gap, 18px);
}

/* Auto-fitting grid: never overflows because of the min() floor */
.grid {
  display: grid;
  gap: clamp(16px, 2vw, 26px);
  grid-template-columns: repeat(auto-fit, minmax(min(var(--col, 260px), 100%), 1fr));
}

.grid--2 {
  --col: 380px;
}

.grid--3 {
  --col: 300px;
}

.grid--4 {
  --col: 230px;
}

.split {
  display: grid;
  gap: clamp(30px, 5vw, 68px);
  grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr));
  align-items: start;
}

/* --- Type primitives ---------------------------------------------------- */

.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 14px;
}

.section--navy .eyebrow,
.section--blue .eyebrow {
  color: var(--light-wave);
}

.section--blue .eyebrow {
  color: rgba(255, 255, 255, 0.8);
}

h1,
.h1 {
  font-size: clamp(34px, 5.2vw, 66px);
  line-height: 1.04;
  letter-spacing: -0.025em;
}

h2,
.h2 {
  font-size: clamp(27px, 3.4vw, 40px);
  line-height: 1.16;
  letter-spacing: -0.018em;
}

h3,
.h3 {
  font-size: clamp(19px, 2vw, 22px);
  line-height: 1.28;
  letter-spacing: -0.01em;
}

h4,
.h4 {
  font-size: 17px;
  line-height: 1.35;
}

.lede {
  font-size: clamp(16px, 1.35vw, 19px);
  line-height: 1.62;
  color: var(--body);
}

.section--navy .lede,
.section--blue .lede {
  color: var(--on-navy);
}

.section-head {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
  margin-bottom: clamp(34px, 4vw, 54px);
}

.section-head--left {
  margin-inline: 0;
  text-align: left;
}

.section-head p {
  margin-top: 16px;
}

.rule {
  width: 58px;
  height: 3px;
  border-radius: 2px;
  background: var(--blue);
  margin: 20px 0 0;
}

.section-head:not(.section-head--left) .rule {
  margin-inline: auto;
}

/* --- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition:
    transform 0.2s var(--ease),
    background-color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.btn .arrow {
  transition: transform 0.2s var(--ease);
}

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

.btn--primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 10px 24px rgba(8, 103, 232, 0.26);
}

.btn--primary:hover {
  background: #0a58c4;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(8, 103, 232, 0.32);
}

.btn--secondary {
  background: #fff;
  color: var(--navy);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.btn--secondary:hover {
  color: var(--blue);
  border-color: var(--light-wave);
  transform: translateY(-2px);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.32);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
}

.btn--white {
  background: #fff;
  color: var(--blue);
}

.btn--white:hover {
  color: var(--navy);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--sm {
  min-height: 46px;
  padding: 11px 20px;
  font-size: 15px;
}

.btn--block {
  width: 100%;
}

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

.btn-row--center {
  justify-content: center;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 600;
  font-size: 15px;
  color: var(--blue);
}

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

.link-arrow .arrow {
  transition: transform 0.2s var(--ease);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
  transition:
    box-shadow 0.25s var(--ease),
    background-color 0.25s var(--ease);
}

.site-header.is-stuck {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 6px 22px rgba(0, 40, 93, 0.09);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: clamp(66px, 8vw, 104px);
  padding-block: 10px;
  transition:
    min-height 0.25s var(--ease),
    padding-block 0.25s var(--ease);
}

.brand img {
  transition: height 0.25s var(--ease);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  min-height: 44px;
}

.brand img {
  height: clamp(34px, 4.6vw, 68px);
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 34px);
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: clamp(15px, 1.15vw, 17px);
  font-weight: 500;
  color: var(--body-strong);
  white-space: nowrap;
}

.nav a:hover {
  color: var(--blue);
}

.nav a[aria-current="page"] {
  color: var(--navy);
  font-weight: 600;
}

.header-cta {
  flex: none;
}

/* Hamburger */
.burger {
  display: none;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--navy);
  cursor: pointer;
  flex: none;
}

.burger:hover {
  border-color: var(--light-wave);
  color: var(--blue);
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  flex-direction: column;
  background: linear-gradient(160deg, #00285d 0%, #013a80 100%);
  color: #fff;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.mobile-menu[data-open="true"] {
  display: flex;
}

.mobile-menu__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px var(--gutter);
  min-height: 76px;
  border-bottom: 1px solid var(--on-navy-line);
}

.mobile-menu__top img {
  height: 40px;
  width: auto;
}

.mobile-menu__close {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--on-navy-line);
  border-radius: var(--r-sm);
  color: #fff;
  cursor: pointer;
}

.mobile-menu__close:hover {
  background: rgba(255, 255, 255, 0.18);
}

.mobile-menu__links {
  padding: 10px var(--gutter) 6px;
}

.mobile-menu__links a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 16px 0;
  min-height: 60px;
  border-bottom: 1px solid var(--on-navy-line);
  font-family: var(--serif);
  font-size: clamp(26px, 7vw, 34px);
  font-weight: 600;
  color: #fff;
}

.mobile-menu__links a:hover {
  color: var(--light-wave);
}

.mobile-menu__links .idx {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--light-wave);
  letter-spacing: 0.08em;
}

.mobile-menu__foot {
  margin-top: auto;
  padding: 24px var(--gutter) calc(28px + env(safe-area-inset-bottom));
  display: grid;
  gap: 14px;
}

.mobile-menu__contact {
  display: grid;
  gap: 4px;
  padding-top: 8px;
}

.mobile-menu__contact a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--on-navy);
  font-size: 16px;
  word-break: break-word;
}

.mobile-menu__contact a:hover {
  color: #fff;
}

@media (max-width: 899px) {
  .nav,
  .header-cta {
    display: none;
  }

  .burger {
    display: inline-flex;
  }

  /* Tighten the bar once it is stuck so it costs less of a small screen */
  .site-header.is-stuck .site-header__inner {
    min-height: 58px;
    padding-block: 6px;
  }

  .site-header.is-stuck .brand img {
    height: 30px;
  }
}

/* --- Hero --------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(180deg, #f4f9ff 0%, #fff 100%);
  padding: clamp(44px, 6vw, 84px) 0 clamp(30px, 4vw, 52px);
  text-align: center;
}

.hero__inner {
  max-width: 900px;
  margin-inline: auto;
}

.hero h1 {
  margin-bottom: 20px;
}

.hero .lede {
  max-width: 620px;
  margin-inline: auto;
}

.hero .btn-row {
  margin-top: 30px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin-top: 26px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--body);
}

.hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}

.hero__meta span + span::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--light-wave);
}

.hero-media {
  margin-top: clamp(30px, 4vw, 52px);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--ice);
}

.hero-media video,
.hero-media img {
  width: 100%;
  height: clamp(200px, 30vw, 420px);
  object-fit: cover;
}

/* Page hero (interior pages) — the same light wash as the homepage hero */
.page-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(180deg, #eaf4ff 0%, #f7fbff 62%, #fff 100%);
  padding: clamp(48px, 6vw, 92px) 0 clamp(44px, 5.4vw, 80px);
  text-align: center;
}

.page-hero.section--navy {
  background:
    radial-gradient(120% 130% at 88% 8%, #0a4a9e 0%, rgba(10, 74, 158, 0) 58%),
    linear-gradient(148deg, #00285d 0%, #013a80 100%);
  background-color: var(--navy);
}

.page-hero .lede {
  max-width: 660px;
  margin: 20px auto 0;
}

.page-hero .btn-row {
  margin-top: 28px;
}

/* Decorative wave rings */
.swell {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.swell span {
  position: absolute;
  left: 50%;
  bottom: -46%;
  translate: -50% 0;
  border-radius: 50%;
  border: 1px solid currentColor;
  opacity: 0.16;
  animation: cw-swell 17s ease-in-out infinite;
}

.swell span:nth-child(1) {
  width: 620px;
  aspect-ratio: 1;
  animation-duration: 13s;
}

.swell span:nth-child(2) {
  width: 940px;
  aspect-ratio: 1;
  animation-duration: 18s;
  animation-delay: -4s;
}

.swell span:nth-child(3) {
  width: 1300px;
  aspect-ratio: 1;
  animation-duration: 23s;
  animation-delay: -9s;
}

.hero .swell {
  color: var(--light-wave);
}

.section--navy .swell,
.section--blue .swell {
  color: #fff;
}

@keyframes cw-swell {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(0, -26px, 0) scale(1.035);
  }
}

/* --- Cards -------------------------------------------------------------- */

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: clamp(22px, 2.4vw, 30px);
  transition:
    transform 0.25s var(--ease),
    border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.card h3 {
  margin-bottom: 10px;
}

.card p {
  font-size: 15.5px;
  line-height: 1.6;
}

a.card,
.card--link {
  display: block;
  color: inherit;
}

a.card:hover,
.card--interactive:hover {
  transform: translateY(-4px);
  border-color: var(--light-wave);
  box-shadow: var(--shadow-md);
  color: inherit;
}

.card--ice {
  background: var(--ice);
  border-color: transparent;
}

.card--on-navy {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--on-navy-line);
}

.card--on-navy p {
  color: var(--on-navy);
}

.card--on-navy:hover {
  border-color: var(--light-wave);
  background: rgba(255, 255, 255, 0.09);
}

.card__foot {
  margin-top: 16px;
}

/* Featured card — the first item in a grid, lifted out in navy */
.card--featured {
  background:
    radial-gradient(120% 130% at 88% 8%, #0a4a9e 0%, rgba(10, 74, 158, 0) 60%),
    linear-gradient(150deg, #00285d 0%, #013a80 100%);
  border-color: transparent;
  color: #fff;
}

.card--featured h2,
.card--featured h3,
.card--featured h4 {
  color: #fff;
}

.card--featured p {
  color: var(--on-navy);
}

.card--featured .icon-tile {
  background: rgba(255, 255, 255, 0.12);
  color: var(--light-wave);
}

.card--featured .link-arrow {
  color: var(--light-wave);
}

a.card--featured:hover {
  border-color: var(--light-wave);
}

/* --- Feature rows ------------------------------------------------------
   Compact icon + index + title + description list. Used down the Solutions
   page beside each section's heading. */

.feature-rows {
  display: grid;
  gap: clamp(18px, 2vw, 26px);
}

.feature-rows li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(14px, 1.4vw, 20px);
  align-items: start;
}

.feature-rows .icon-tile {
  width: 42px;
  height: 42px;
  margin: 0;
  border-radius: 11px;
}

/* On an ice section an ice tile would vanish into the background */
.section--ice .feature-rows .icon-tile {
  background: #fff;
}

.feature-rows .icon-tile svg {
  width: 19px;
  height: 19px;
}

.feature-rows__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}

.feature-rows .num {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--light-wave);
}

.feature-rows h3 {
  font-size: clamp(17px, 1.5vw, 19px);
}

.feature-rows p {
  font-size: 15.5px;
  line-height: 1.55;
}

/* --- Connector rail ----------------------------------------------------
   Six capability nodes strung along a single line across a navy band. */

.rail {
  position: relative;
  display: grid;
  gap: 20px clamp(8px, 1.4vw, 18px);
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 45%), 1fr));
  margin-top: clamp(34px, 4vw, 52px);
}

.rail::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 26px;
  height: 1px;
  background: var(--on-navy-line);
}

@media (max-width: 719px) {
  .rail::before {
    display: none;
  }
}

.rail__node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.rail__dot {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #04306c;
  border: 1px solid rgba(76, 167, 248, 0.45);
  color: var(--light-wave);
}

.rail__dot svg {
  width: 20px;
  height: 20px;
}

.rail__node span {
  font-size: 14.5px;
  font-weight: 600;
  color: #fff;
}

/* --- Pill cards --------------------------------------------------------- */

.pill-cards {
  display: grid;
  gap: clamp(12px, 1.4vw, 18px);
  grid-template-columns: repeat(auto-fit, minmax(min(238px, 100%), 1fr));
}

/* Designed as a single row of five; auto-fit alone orphans the last one */
@media (min-width: 1080px) {
  .pill-cards {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.pill-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 64px;
  padding: 16px 20px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  font-size: 15.5px;
  font-weight: 600;
  color: var(--navy);
  transition:
    transform 0.2s var(--ease),
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.pill-card:hover {
  transform: translateY(-3px);
  border-color: var(--light-wave);
  box-shadow: var(--shadow-md);
}

.pill-card svg {
  width: 19px;
  height: 19px;
  flex: none;
  color: var(--blue);
}

/* --- Industry cards ----------------------------------------------------- */

.industry-cards {
  display: grid;
  gap: clamp(12px, 1.6vw, 20px);
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
}

/* Pin the designed column counts once there is room for them */
@media (min-width: 1080px) {
  .industry-cards--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .industry-cards--5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.industry-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 152px;
  padding: clamp(18px, 2vw, 24px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition:
    transform 0.25s var(--ease),
    border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.industry-card:hover {
  transform: translateY(-4px);
  border-color: var(--light-wave);
  box-shadow: var(--shadow-md);
}

.industry-card .icon-tile {
  margin: 0;
  width: 42px;
  height: 42px;
  border-radius: 11px;
}

.industry-card .icon-tile svg {
  width: 19px;
  height: 19px;
}

.industry-card h3 {
  margin-top: auto;
  font-size: clamp(17px, 1.5vw, 19px);
}

.industry-card .num {
  position: absolute;
  top: clamp(18px, 2vw, 24px);
  right: clamp(18px, 2vw, 24px);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(0, 40, 93, 0.28);
}

.industry-card--featured {
  background:
    radial-gradient(120% 130% at 88% 8%, #0a4a9e 0%, rgba(10, 74, 158, 0) 60%),
    linear-gradient(150deg, #00285d 0%, #013a80 100%);
  border-color: transparent;
}

.industry-card--featured h3 {
  color: #fff;
}

.industry-card--featured .num {
  color: rgba(255, 255, 255, 0.4);
}

.industry-card--featured .icon-tile {
  background: rgba(255, 255, 255, 0.12);
  color: var(--light-wave);
}

.section--navy .industry-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--on-navy-line);
}

.section--navy .industry-card h3 {
  color: #fff;
}

.section--navy .industry-card .num {
  color: rgba(255, 255, 255, 0.4);
}

.section--navy .industry-card:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--light-wave);
}

/* --- Stat panel (navy chart card) --------------------------------------- */

.stat-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--r-md);
  padding: clamp(22px, 2.6vw, 32px);
  background:
    radial-gradient(120% 130% at 88% 8%, #0a4a9e 0%, rgba(10, 74, 158, 0) 60%),
    linear-gradient(150deg, #00285d 0%, #013a80 100%);
  box-shadow: var(--shadow-md);
}

.stat-panel__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.stat-panel__label {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--light-wave);
}

.stat-panel__note {
  font-size: 13px;
  font-style: italic;
  color: var(--on-navy-dim);
}

.stat-panel .chips {
  margin-top: 22px;
}

/* Icon tile */
.icon-tile {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--ice);
  color: var(--blue);
  margin-bottom: 18px;
}

.card--on-navy .icon-tile,
.section--navy .icon-tile {
  background: rgba(255, 255, 255, 0.1);
  color: var(--light-wave);
}

.icon-tile svg {
  width: 22px;
  height: 22px;
}

/* Numbered feature rows */
.numbered {
  border-top: 1px solid var(--line);
}

.numbered li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(16px, 2vw, 28px);
  padding: clamp(20px, 2.2vw, 26px) 0;
  border-bottom: 1px solid var(--line);
}

.numbered .num {
  font-family: var(--serif);
  font-size: clamp(24px, 2.6vw, 30px);
  font-weight: 500;
  color: var(--light-wave);
  line-height: 1.1;
}

.numbered h3 {
  margin-bottom: 6px;
}

.numbered p {
  font-size: 15.5px;
}

.section--navy .numbered,
.section--navy .numbered li {
  border-color: var(--on-navy-line);
}

.section--navy .numbered p {
  color: var(--on-navy);
}

/* --- Solutions explorer (homepage) -------------------------------------- */

.explorer {
  display: grid;
  gap: clamp(20px, 2.6vw, 34px);
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
  align-items: start;
}

.explorer__list {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.explorer__item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 18px clamp(16px, 1.8vw, 22px);
  min-height: 64px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
  text-align: left;
  cursor: pointer;
  color: var(--navy);
  transition:
    background-color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.explorer__item:last-child {
  border-bottom: 0;
}

.explorer__item .icon-tile {
  width: 34px;
  height: 34px;
  margin: 0;
  border-radius: 9px;
}

.explorer__item .icon-tile svg {
  width: 17px;
  height: 17px;
}

.explorer__item .arrow {
  width: 18px;
  height: 18px;
  flex: none;
}

.explorer__item .label {
  flex: 1;
  font-family: var(--serif);
  font-size: clamp(16px, 1.4vw, 18px);
  font-weight: 600;
}

.explorer__item .arrow {
  color: var(--blue);
  opacity: 0.5;
  transition:
    opacity 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.explorer__item:hover {
  background: var(--ice);
}

.explorer__item[aria-selected="true"] {
  background: var(--ice);
  border-left-color: var(--blue);
}

.explorer__item[aria-selected="true"] .arrow {
  opacity: 1;
  transform: translateX(3px);
}

.explorer__panel {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--r-md);
  padding: clamp(28px, 3.4vw, 44px);
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(120% 120% at 85% 10%, #0a4a9e 0%, rgba(10, 74, 158, 0) 60%),
    linear-gradient(150deg, #00285d 0%, #013a80 100%);
  color: var(--on-navy);
  box-shadow: var(--shadow-md);
}

.explorer__panel .icon-tile {
  background: rgba(255, 255, 255, 0.1);
  color: var(--light-wave);
}

.explorer__count {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  color: var(--light-wave);
  margin-bottom: 10px;
}

.explorer__panel h3 {
  color: #fff;
  font-size: clamp(23px, 2.4vw, 30px);
  margin-bottom: 12px;
}

.explorer__panel p {
  color: var(--on-navy);
  max-width: 46ch;
}

.explorer__panel .btn {
  margin-top: 24px;
  align-self: flex-start;
}

.explorer__body[data-swap] {
  animation: cw-fade 0.35s var(--ease) both;
}

@keyframes cw-fade {
  from {
    opacity: 0;
    transform: translate3d(0, 8px, 0);
  }
}

/* --- Card networks ------------------------------------------------------ */

.networks {
  display: grid;
  gap: clamp(14px, 2vw, 24px);
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 45%), 1fr));
  max-width: 900px;
  margin-inline: auto;
}

.network-card {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 8 / 5;
  padding: clamp(18px, 2.4vw, 28px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    border-color 0.25s var(--ease);
}

.network-card:hover {
  transform: translateY(-4px);
  border-color: var(--light-wave);
  box-shadow: var(--shadow-md);
}

.network-card img {
  max-height: 46px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* --- Carousel (mobile) --------------------------------------------------
   Below 700px the network cards become a one-at-a-time swipe track.
   Pure CSS scroll-snap: it works before the JS loads and without it. */

.carousel__dots {
  display: none;
  justify-content: center;
  gap: 2px;
  margin-top: 6px;
}

.carousel__dot {
  width: 34px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}

.carousel__dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
  transition:
    background-color 0.25s var(--ease),
    transform 0.25s var(--ease);
}

.carousel__dot[aria-current="true"]::before {
  background: var(--blue);
  transform: scale(1.45);
}

@media (max-width: 699px) {
  .networks {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 6px;
    /* Room for the card's hover/rest shadow so it isn't clipped by the track */
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
  }

  .networks::-webkit-scrollbar {
    display: none;
  }

  .network-card {
    flex: 0 0 100%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    aspect-ratio: 22 / 9;
  }

  .network-card img {
    max-height: 62px;
  }

  .carousel[data-carousel-ready] .carousel__dots {
    display: flex;
  }
}

@media (max-width: 699px) and (prefers-reduced-motion: reduce) {
  .networks {
    scroll-behavior: auto;
  }
}

/* --- Industry tiles ----------------------------------------------------- */

.tiles {
  display: grid;
  gap: clamp(10px, 1.4vw, 16px);
  grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
}

/* The industry lists are designed as 4 across; auto-fit alone leaves a ragged
   final row on wide screens, so pin the column count once there is room. */
@media (min-width: 1080px) {
  .tiles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  min-height: 60px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 15.5px;
  font-weight: 500;
  color: var(--navy);
  transition:
    transform 0.2s var(--ease),
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.tile:hover {
  transform: translateY(-3px);
  border-color: var(--light-wave);
  box-shadow: var(--shadow-sm);
}

.tile svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--blue);
}

.section--ice .tile {
  background: #fff;
}

.section--navy .tile {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--on-navy-line);
  color: #fff;
}

.section--navy .tile svg {
  color: var(--light-wave);
}

.section--navy .tile:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: var(--light-wave);
}

/* Chip list (feature keywords) */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  min-height: 46px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line-strong);
  color: var(--navy);
  font-size: 15px;
  font-weight: 500;
  transition:
    border-color 0.2s var(--ease),
    color 0.2s var(--ease),
    transform 0.2s var(--ease);
}

a.chip:hover {
  border-color: var(--light-wave);
  color: var(--blue);
  transform: translateY(-2px);
}

.section--navy .chip,
.section--blue .chip {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--on-navy-line);
  color: #fff;
}

.chip svg {
  width: 16px;
  height: 16px;
  color: var(--blue);
  flex: none;
}

.section--navy .chip svg,
.section--blue .chip svg {
  color: var(--light-wave);
}

/* --- Rating ------------------------------------------------------------- */

.rating {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: clamp(30px, 3.4vw, 44px);
}

.rating__stars {
  display: inline-flex;
  gap: 4px;
  color: var(--wave);
}

.rating__stars svg {
  width: 19px;
  height: 19px;
}

.rating__label {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--body);
}

.section--navy .rating__label {
  color: var(--on-navy-dim);
}

/* --- Media panels ------------------------------------------------------- */

.media-panel {
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background:
    radial-gradient(110% 120% at 80% 12%, #0a4a9e 0%, rgba(10, 74, 158, 0) 60%),
    linear-gradient(150deg, #00285d 0%, #013a80 100%);
  min-height: 260px;
  display: grid;
  place-items: center;
  padding: clamp(28px, 4vw, 48px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.media-panel img {
  width: min(78%, 340px);
  height: auto;
}

/* Stylised terminal / chart illustrations */
.figure-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: clamp(20px, 2.4vw, 28px);
  box-shadow: var(--shadow-md);
}

/* --- Forms -------------------------------------------------------------- */

.form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(24px, 3.4vw, 44px);
  box-shadow: var(--shadow-md);
}

.field-grid {
  display: grid;
  gap: 18px clamp(16px, 2vw, 24px);
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.field--full {
  grid-column: 1 / -1;
}

.field label,
.fieldset-legend {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--navy);
}

.field .req {
  color: var(--blue);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 13px 15px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--navy);
  font-size: 16px;
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.field textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.6;
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300285D' stroke-width='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;
  background-size: 18px;
  padding-right: 42px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #93a2b8;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(8, 103, 232, 0.16);
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: #d3453c;
  box-shadow: 0 0 0 3px rgba(211, 69, 60, 0.13);
}

.field-error {
  font-size: 13.5px;
  font-weight: 500;
  color: #c23a32;
  min-height: 0;
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  border: 0;
  padding: 0;
  margin: 0;
}

.radio-row legend {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--navy);
  padding: 0;
  margin-bottom: 8px;
}

.radio {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 15.5px;
  color: var(--navy);
  transition:
    border-color 0.2s var(--ease),
    background-color 0.2s var(--ease);
}

.radio:hover {
  border-color: var(--light-wave);
}

.radio input {
  accent-color: var(--blue);
  width: 18px;
  height: 18px;
  margin: 0;
}

.radio:has(input:checked) {
  border-color: var(--blue);
  background: var(--ice);
}

.form-foot {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.form-note {
  font-size: 14px;
  color: var(--body);
}

.form-status {
  margin-top: 20px;
  padding: 18px 20px;
  border-radius: var(--r-md);
  background: var(--ice);
  border: 1px solid rgba(8, 103, 232, 0.22);
  color: var(--navy);
  font-size: 15.5px;
}

.form-status[hidden] {
  display: none;
}

.form-status strong {
  display: block;
  font-family: var(--serif);
  font-size: 19px;
  margin-bottom: 4px;
}

.form-status--error {
  background: #fdf1f0;
  border-color: rgba(194, 58, 50, 0.3);
  color: #7d241e;
}

/* Direct contact cards */
.contact-cards {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  max-width: 860px;
  margin-inline: auto;
}

.contact-card {
  text-align: center;
  padding: clamp(26px, 3vw, 36px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition:
    transform 0.25s var(--ease),
    border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.contact-card:hover {
  transform: translateY(-4px);
  border-color: var(--light-wave);
  box-shadow: var(--shadow-md);
}

.contact-card .icon-tile {
  margin-inline: auto;
}

.contact-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.contact-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font-size: 16px;
  font-weight: 500;
  word-break: break-word;
}

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

.site-footer {
  background: var(--navy);
  color: var(--on-navy-dim);
  padding-top: clamp(48px, 5.4vw, 74px);
}

.site-footer h2,
.site-footer h3 {
  color: #fff;
}

.footer-grid {
  display: grid;
  gap: clamp(28px, 3.4vw, 48px);
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  padding-bottom: clamp(34px, 4vw, 52px);
}

/* Give the contact column room so the support address stays on one line.
   Below this the grid auto-fits to fewer, wider columns instead. */
@media (min-width: 1240px) {
  .footer-grid {
    grid-template-columns: 1.25fr 1.3fr 1fr 0.8fr;
  }
}

.footer-brand img {
  height: 46px;
  width: auto;
  margin-bottom: 18px;
}

.footer-brand p {
  font-size: 14.5px;
  line-height: 1.65;
  max-width: 34ch;
  color: var(--on-navy-dim);
}

.footer-col h3 {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #fff;
  margin-bottom: 12px;
}

/* Contact details sit in their own labelled panels */
.footer-contact {
  display: grid;
  gap: 12px;
}

.footer-contact__box {
  display: block;
  padding: 12px 16px;
  min-height: 62px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--on-navy-line);
  border-radius: var(--r-sm);
  transition:
    border-color 0.2s var(--ease),
    background-color 0.2s var(--ease);
}

a.footer-contact__box:hover {
  border-color: var(--light-wave);
  background: rgba(255, 255, 255, 0.08);
}

.footer-contact__box .label {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-navy-dim);
  margin-bottom: 2px;
}

.footer-contact__box .value {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  overflow-wrap: anywhere;
}

.footer-col li a,
.footer-col p a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  color: var(--on-navy);
  overflow-wrap: anywhere;
}

/* The support address is the longest string in the footer; a touch smaller
   keeps it on one line in most column widths. */
.footer-col a[href^="mailto:"] {
  font-size: 14.5px;
}

.footer-col li a:hover,
.footer-col p a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid var(--on-navy-line);
  padding: 22px 0 28px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.45);
}

/* --- Press feedback -----------------------------------------------------
   Everything clickable gives way slightly under a press. On touch this is the
   only feedback there is — there's no hover state to lean on. */

.btn:active,
.chip:active,
.tile:active,
.pill-card:active,
.network-card:active,
.contact-card:active,
.carousel__dot:active,
.footer-contact__box:active,
a.card:active,
.industry-card:active,
.explorer__item:active,
.mobile-menu__close:active,
.burger:active {
  transform: scale(0.972);
  transition-duration: 0.09s;
  transition-timing-function: var(--press);
}

/* Rows read better collapsing inwards than shrinking */
.explorer__item:active {
  transform: none;
  background: #dceaff;
}

.mobile-menu__links a:active {
  color: var(--light-wave);
  transform: translateX(4px);
  transition: transform 0.09s var(--press);
}

.nav a:active,
.footer-col a:active {
  opacity: 0.65;
}

/* Icon tiles react to their card, not just to their own hover */
.icon-tile {
  transition:
    transform 0.28s var(--spring),
    background-color 0.2s var(--ease),
    color 0.2s var(--ease);
}

a.card:hover .icon-tile,
.card--interactive:hover .icon-tile,
.industry-card:hover .icon-tile,
.contact-card:hover .icon-tile,
.feature-rows li:hover .icon-tile {
  transform: scale(1.12) rotate(-6deg);
}

.tile:hover svg,
.chip:hover svg,
.pill-card:hover svg {
  transform: scale(1.15);
}

.tile svg,
.chip svg,
.pill-card svg {
  transition: transform 0.28s var(--spring);
}

/* Feature rows are not links, but they should still acknowledge a pointer */
.feature-rows li {
  transition: transform 0.25s var(--ease);
}

.feature-rows li:hover {
  transform: translateX(4px);
}

.rail__dot {
  transition:
    transform 0.28s var(--spring),
    border-color 0.2s var(--ease),
    background-color 0.2s var(--ease);
}

.rail__node:hover .rail__dot {
  transform: scale(1.12);
  border-color: var(--light-wave);
  background: #0a4a9e;
}

/* --- Scroll reveal ------------------------------------------------------
   [data-reveal] hides the element until it scrolls into view, then plays one
   of the entrances below. [data-anim] is the same trigger without the hide —
   for elements that animate their own internals (the rail, the chart).
   Every one of them is switched off under prefers-reduced-motion. */

[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
}

[data-reveal="scale"] {
  transform: scale(0.94);
}

[data-reveal="fade"] {
  transform: none;
}

/* The directional slides only make sense once the layout is side by side.
   In a single column they read oddly and their offset widens the page. */
@media (min-width: 900px) {
  [data-reveal="left"] {
    transform: translate3d(-34px, 0, 0);
  }

  [data-reveal="right"] {
    transform: translate3d(34px, 0, 0);
  }

  [data-reveal="left"].is-visible {
    animation-name: cw-in-left;
  }

  [data-reveal="right"].is-visible {
    animation-name: cw-in-right;
  }
}

[data-reveal].is-visible {
  animation: cw-rise var(--enter) var(--spring) both;
  animation-delay: var(--reveal-delay, 0ms);
}

[data-reveal="scale"].is-visible {
  animation-name: cw-pop;
}

[data-reveal="fade"].is-visible {
  animation-name: cw-fade-in;
}

@keyframes cw-rise {
  from {
    opacity: 0;
    transform: translate3d(0, 16px, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes cw-pop {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes cw-in-left {
  from {
    opacity: 0;
    transform: translate3d(-34px, 0, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes cw-in-right {
  from {
    opacity: 0;
    transform: translate3d(34px, 0, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes cw-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Icon tiles spring in just behind their card */
.card.is-visible .icon-tile,
.industry-card.is-visible .icon-tile,
.feature-rows li.is-visible .icon-tile,
.contact-card.is-visible .icon-tile {
  animation: cw-tile 0.5s var(--spring) 0.1s both;
}

@keyframes cw-tile {
  from {
    opacity: 0;
    transform: scale(0.6) rotate(-8deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* The rail draws its connecting line, then the nodes land along it */
.rail::before {
  transform: scaleX(0);
  transform-origin: left center;
}

.rail.is-visible::before {
  animation: cw-draw 1.15s var(--ease) 0.1s both;
}

@keyframes cw-draw {
  to {
    transform: scaleX(1);
  }
}

.rail.is-visible .rail__dot {
  animation: cw-node 0.45s var(--spring) both;
  animation-delay: calc(var(--i, 0) * 55ms + 140ms);
}

@keyframes cw-node {
  from {
    opacity: 0;
    transform: scale(0.4);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* The terminal illustration builds itself: body, screen, then the keypad */
.terminal-anim .t-body {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transform: scaleY(0);
}

.terminal-anim.is-visible .t-body {
  animation: cw-bar 0.7s var(--ease) both;
}

.terminal-anim .t-screen,
.terminal-anim .t-line,
.terminal-anim .t-key,
.terminal-anim .t-enter {
  opacity: 0;
}

.terminal-anim.is-visible .t-screen {
  animation: cw-fade-in 0.4s var(--ease) 0.5s both;
}

.terminal-anim.is-visible .t-line {
  transform-box: fill-box;
  transform-origin: left center;
  animation: cw-draw 0.6s var(--ease) 0.7s both, cw-fade-in 0.2s linear 0.7s both;
}

.terminal-anim.is-visible .t-key {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: cw-node 0.4s var(--ease) both;
  animation-delay: calc(var(--k, 0) * 55ms + 0.9s);
}

.terminal-anim.is-visible .t-enter {
  animation: cw-node 0.45s var(--ease) 1.45s both;
}

/* Chart bars grow out of the baseline */
.stat-panel svg rect {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transform: scaleY(0);
}

.stat-panel.is-visible svg rect {
  animation: cw-bar 0.85s var(--ease) both;
}

.stat-panel.is-visible svg rect:nth-of-type(1) { animation-delay: 60ms; }
.stat-panel.is-visible svg rect:nth-of-type(2) { animation-delay: 130ms; }
.stat-panel.is-visible svg rect:nth-of-type(3) { animation-delay: 200ms; }
.stat-panel.is-visible svg rect:nth-of-type(4) { animation-delay: 270ms; }
.stat-panel.is-visible svg rect:nth-of-type(5) { animation-delay: 340ms; }
.stat-panel.is-visible svg rect:nth-of-type(6) { animation-delay: 410ms; }
.stat-panel.is-visible svg rect:nth-of-type(7) { animation-delay: 480ms; }
.stat-panel.is-visible svg rect:nth-of-type(8) { animation-delay: 550ms; }

@keyframes cw-bar {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}

/* The rule under a section heading wipes in */
.rule {
  transform-origin: left center;
}

[data-reveal].is-visible .rule,
.is-visible > .rule {
  animation: cw-draw 0.7s var(--ease) 0.3s both;
}

/* Stars land one after another */
.rating.is-visible .rating__stars svg {
  animation: cw-star 0.42s var(--spring) both;
}

.rating.is-visible .rating__stars svg:nth-child(1) { animation-delay: 80ms; }
.rating.is-visible .rating__stars svg:nth-child(2) { animation-delay: 160ms; }
.rating.is-visible .rating__stars svg:nth-child(3) { animation-delay: 240ms; }
.rating.is-visible .rating__stars svg:nth-child(4) { animation-delay: 320ms; }
.rating.is-visible .rating__stars svg:nth-child(5) { animation-delay: 400ms; }

@keyframes cw-star {
  from {
    opacity: 0;
    transform: scale(0.3) rotate(-30deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Network marks settle into their cards */
.network-card.is-visible img,
.carousel.is-visible .network-card img {
  animation: cw-pop 0.6s var(--ease) 0.15s both;
}

/* JS-off / no-JS safety: never leave content invisible or unstyled */
.no-js [data-reveal] {
  opacity: 1;
  transform: none;
}

.no-js .rail::before,
.no-js .rule {
  transform: none;
}

.no-js .stat-panel svg rect {
  transform: none;
}

/* --- Reduced motion ----------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .rail::before,
  .rule,
  .stat-panel svg rect {
    transform: none;
  }
}

/* --- Print -------------------------------------------------------------- */

@media print {
  .site-header,
  .mobile-menu,
  .swell,
  .hero-media {
    display: none !important;
  }

  body {
    color: #000;
  }
}
