/* ==========================================================================
   Terabyte Pvt Ltd — design system
   1. Tokens        5. Buttons        9.  Sections
   2. Reset         6. Header/nav     10. Forms
   3. Typography    7. Hero           11. Footer
   4. Layout        8. Cards          12. Motion & responsive
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */

:root {
  /* Brand — taken from the Terabyte logo: cyan #00AFEF, red #ED3237.
     500 is the logo cyan; 600/700/800 are darkened for text and buttons,
     where the logo cyan alone does not carry enough contrast on white. */
  --brand-50:  #e6f7fe;
  --brand-100: #ccf0fd;
  --brand-200: #99dffb;
  --brand-300: #66cff9;
  --brand-400: #33bff7;
  --brand-500: #00afef;
  --brand-600: #008fc4;
  --brand-700: #00729b;
  --brand-800: #005473;
  --brand-900: #003d54;

  /* Accent — logo red, used sparingly for emphasis marks. */
  --accent-400: #f15c60;
  --accent-500: #ed3237;
  --accent-600: #c8232a;

  /* Cyan glow used on dark sections where contrast is not a concern. */
  --glow: #33bff7;

  /* Neutrals — cool, slightly navy-leaning */
  --ink-950: #05070f;
  --ink-900: #0a0f1e;
  --ink-800: #121a30;
  --ink-700: #1d2842;
  --ink-600: #33405f;
  --ink-500: #566384;
  --ink-400: #7d89a6;
  --ink-300: #a8b2c8;
  --ink-200: #d2d8e5;
  --ink-100: #e8ecf3;
  --ink-50:  #f5f7fb;
  --white: #ffffff;

  /* Semantic */
  --bg: var(--white);
  --bg-muted: var(--ink-50);
  --bg-dark: var(--ink-950);
  --text: var(--ink-900);
  --text-soft: var(--ink-500);
  --text-invert: var(--white);
  --border: var(--ink-200);
  --border-soft: var(--ink-100);
  --focus: var(--brand-700);

  /* Ticks, "live" dots and success marks. Must stay in the cyan family — the brand
     accent is red, which would read as an error in these positions. */
  --affirm: var(--brand-600);
  --affirm-on-dark: var(--brand-300);

  /* Type */
  --font-display: "Sora", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  --fs-xs:   0.8125rem;
  --fs-sm:   0.9375rem;
  --fs-base: clamp(1.0625rem, 1.02rem + 0.22vw, 1.1875rem);
  --fs-lg:   clamp(1.1875rem, 1.11rem + 0.38vw, 1.375rem);
  --fs-xl:   clamp(1.375rem, 1.21rem + 0.72vw, 1.875rem);
  --fs-2xl:  clamp(1.75rem, 1.42rem + 1.45vw, 2.75rem);
  --fs-3xl:  clamp(2.125rem, 1.63rem + 2.2vw, 3.5rem);
  --fs-4xl:  clamp(2.5rem, 1.7rem + 3.6vw, 4.75rem);

  --lh-tight: 1.08;
  --lh-snug: 1.22;
  --lh-normal: 1.65;

  /* Space */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;
  --section-y: clamp(4rem, 2.6rem + 6vw, 8rem);

  /* Shape */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgb(10 15 30 / 0.06), 0 1px 3px rgb(10 15 30 / 0.04);
  --shadow-md: 0 4px 12px rgb(10 15 30 / 0.07), 0 2px 4px rgb(10 15 30 / 0.04);
  --shadow-lg: 0 18px 40px -12px rgb(10 15 30 / 0.18), 0 4px 12px rgb(10 15 30 / 0.05);
  --shadow-xl: 0 32px 70px -20px rgb(10 15 30 / 0.28), 0 8px 20px rgb(10 15 30 / 0.06);

  --container: 1220px;
  --container-narrow: 820px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 260ms;
}

/* 2. Reset ----------------------------------------------------------------- */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }

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

::selection { background: var(--brand-200); color: var(--ink-950); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: var(--sp-3) var(--sp-5);
  background: var(--ink-950);
  color: #fff;
  border-radius: 0 0 var(--r-md) 0;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* 3. Typography ------------------------------------------------------------ */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-snug);
  letter-spacing: -0.022em;
  text-wrap: balance;
}

h1 { font-size: var(--fs-3xl); line-height: var(--lh-tight); letter-spacing: -0.032em; }
h2 { font-size: var(--fs-2xl); letter-spacing: -0.028em; }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

p { text-wrap: pretty; }

.lead {
  font-size: var(--fs-lg);
  line-height: 1.55;
  color: var(--text-soft);
  max-width: 62ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--brand-700);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand-500), var(--accent-400));
}

.text-gradient {
  background: linear-gradient(104deg, #8fdcfd 0%, var(--brand-500) 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.muted { color: var(--text-soft); }

/* 4. Layout ---------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 0.9rem + 1.6vw, 2.5rem);
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(3rem, 2rem + 4vw, 5rem); }
.section--muted { background: var(--bg-muted); }

.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 1.8rem + 3vw, 4rem); }
.section-head > * + * { margin-top: var(--sp-4); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .lead { margin-inline: auto; }

.grid { display: grid; gap: clamp(1.25rem, 0.9rem + 1.4vw, 2rem); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stack > * + * { margin-top: var(--sp-4); }
.stack-lg > * + * { margin-top: var(--sp-6); }

.cluster { display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: center; }

/* 5. Buttons --------------------------------------------------------------- */

.btn {
  --btn-bg: var(--brand-600);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.9em 1.6em;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.005em;
  line-height: 1.2;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              background-color var(--dur) var(--ease), border-color var(--dur) var(--ease),
              color var(--dur) var(--ease);
  white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

/* Dark text on the logo cyan: white on #00afef is only ~2.2:1, which fails at this
   size. Ink on cyan clears 9:1 and keeps the brand colour at full strength. */
.btn--primary {
  background: linear-gradient(135deg, var(--brand-400), var(--brand-500));
  color: var(--ink-950);
  box-shadow: 0 8px 22px -8px rgb(0 175 239 / 0.55);
}
.btn--primary:hover { box-shadow: 0 14px 32px -10px rgb(0 175 239 / 0.65); }

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn--ghost:hover { border-color: var(--ink-400); background: var(--ink-50); }

.btn--light {
  background: rgb(255 255 255 / 0.08);
  color: #fff;
  border-color: rgb(255 255 255 / 0.22);
  backdrop-filter: blur(8px);
}
.btn--light:hover { background: rgb(255 255 255 / 0.15); border-color: rgb(255 255 255 / 0.4); }

.btn--white { background: #fff; color: var(--ink-900); box-shadow: var(--shadow-lg); }
.btn--white:hover { background: var(--ink-50); }

.btn--lg { padding: 1.05em 2em; font-size: var(--fs-base); }
.btn--block { width: 100%; }

.btn .icon { width: 1.05em; height: 1.05em; flex: none; }
.btn:hover .icon--arrow { transform: translateX(3px); }
.icon--arrow { transition: transform var(--dur) var(--ease); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--brand-700);
}
.link-arrow svg { width: 1em; height: 1em; transition: transform var(--dur) var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* 6. Header / nav ---------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgb(255 255 255 / 0.82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.site-header.is-stuck {
  border-bottom-color: var(--border-soft);
  box-shadow: 0 1px 20px rgb(10 15 30 / 0.06);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  min-height: 76px;
}

.brand { display: inline-flex; align-items: center; }

/* Logo. Colours come from the supplied artwork; only the "SINCE 2010" line and its
   rule are re-themed, because the source grey vanishes on the dark footer. */
.logo {
  --logo-muted: #9aa4b2;
  display: block;
  height: 46px;
  width: auto;
}
.logo__arc, .logo__word { fill: #00afef; }
.logo__tee { fill: #ed3237; }
.logo__since, .logo__rule { fill: var(--logo-muted); }

.brand--footer .logo { height: 52px; }
.site-footer .logo { --logo-muted: rgb(255 255 255 / 0.5); }

.site-header__nav { display: flex; align-items: center; gap: var(--sp-5); }

/* The drawer carries its own CTA for mobile; on desktop the one in
   .site-header__actions is the visible copy. */
.site-header__nav > .btn { display: none; }

.nav { display: flex; align-items: center; gap: var(--sp-1); }

.nav__link {
  position: relative;
  padding: 0.6rem 0.95rem;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink-600);
  border-radius: var(--r-pill);
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.nav__link:hover { color: var(--ink-900); background: var(--ink-50); }
.nav__link.is-active { color: var(--brand-700); font-weight: 600; }
.nav__link.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.15rem;
  transform: translateX(-50%);
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand-500), var(--accent-400));
}

.site-header__actions { display: flex; align-items: center; gap: var(--sp-3); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  align-items: center;
  justify-content: center;
  color: var(--ink-800);
}
.nav-toggle:hover { background: var(--ink-50); }
.nav-toggle__bars { display: block; width: 20px; height: 14px; position: relative; }
.nav-toggle__bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav-toggle__bars span:nth-child(1) { top: 0; }
.nav-toggle__bars span:nth-child(2) { top: 6px; }
.nav-toggle__bars span:nth-child(3) { top: 12px; }

body.nav-open .nav-toggle__bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.nav-open .nav-toggle__bars span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle__bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgb(5 7 15 / 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur) var(--ease), visibility var(--dur);
}
body.nav-open .nav-backdrop { opacity: 1; visibility: visible; }

/* 7. Hero ------------------------------------------------------------------ */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--ink-950);
  color: #fff;
  isolation: isolate;
  display: grid;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  z-index: -1;
  pointer-events: none;
}
.hero::before {
  width: 46rem; height: 46rem;
  top: -22rem; right: -14rem;
  background: radial-gradient(circle, rgb(0 175 239 / 0.5), transparent 68%);
}
.hero::after {
  width: 34rem; height: 34rem;
  bottom: -18rem; left: -12rem;
  background: radial-gradient(circle, rgb(0 175 239 / 0.28), transparent 68%);
}

.hero__grid-lines {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 78%);
}

/* --- Slides --------------------------------------------------------------- */

/* Every slide occupies the same grid cell, so the hero is as tall as its tallest
   slide and never jumps height when the carousel advances. */
.hero__slides { display: grid; }
.hero__slides > * { grid-area: 1 / 1; }

.hero__slide {
  position: relative;
  display: grid;
  align-items: center;
  padding-block: clamp(4.5rem, 3rem + 8vw, 9rem) clamp(3rem, 2rem + 5vw, 6rem);
  opacity: 0;
  visibility: hidden;
  transition: opacity 700ms var(--ease), visibility 700ms;
  pointer-events: none;
}
.hero__slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
.hero__media img,
.hero__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Slow drift keeps a still photo from feeling static behind the headline. */
  animation: hero-drift 22s ease-in-out infinite alternate;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgb(5 7 15 / calc(var(--scrim, 0.62) * 1.05)) 0%,
      rgb(5 7 15 / calc(var(--scrim, 0.62) * 0.82)) 45%,
      rgb(5 7 15 / calc(var(--scrim, 0.62) * 1.15)) 100%),
    linear-gradient(100deg, rgb(5 7 15 / 0.5) 0%, transparent 65%);
}

@keyframes hero-drift {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to   { transform: scale(1.12) translate3d(-1.5%, -1%, 0); }
}

.hero__content { text-align: center; }

.hero h1 {
  font-size: var(--fs-4xl);
  font-weight: 600;
  color: #fff;
  max-width: 24ch;
  margin-block: var(--sp-5) var(--sp-5);
  margin-inline: auto;
  text-shadow: 0 2px 30px rgb(5 7 15 / 0.45);
}

.hero .lead {
  color: rgb(255 255 255 / 0.78);
  font-size: var(--fs-lg);
  max-width: 68ch;
  margin-inline: auto;
  text-shadow: 0 1px 20px rgb(5 7 15 / 0.5);
}

.hero .eyebrow {
  color: var(--brand-300);
  padding: 0.45rem 0.95rem 0.45rem 0.75rem;
  border: 1px solid rgb(255 255 255 / 0.16);
  border-radius: var(--r-pill);
  background: rgb(255 255 255 / 0.08);
  backdrop-filter: blur(6px);
}

.hero__actions {
  margin-top: var(--sp-6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  justify-content: center;
}

/* --- Controls ------------------------------------------------------------- */

.hero__controls { position: relative; z-index: 3; }
.hero__controls-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
}

.hero__arrow,
.hero__pause {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  background: rgb(255 255 255 / 0.08);
  border: 1px solid rgb(255 255 255 / 0.18);
  backdrop-filter: blur(8px);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.hero__arrow:hover,
.hero__pause:hover {
  background: rgb(255 255 255 / 0.18);
  border-color: rgb(255 255 255 / 0.4);
  transform: translateY(-2px);
}
.hero__arrow svg { width: 18px; height: 18px; }
.hero__pause svg { width: 15px; height: 15px; }

.hero__pause .icon-play { display: none; }
.hero.is-paused .hero__pause .icon-pause { display: none; }
.hero.is-paused .hero__pause .icon-play { display: block; }

.hero__dots { display: flex; align-items: center; gap: 0.5rem; }

.hero__dot {
  position: relative;
  width: 34px;
  height: 4px;
  border-radius: var(--r-pill);
  background: rgb(255 255 255 / 0.24);
  overflow: hidden;
  transition: background-color var(--dur) var(--ease), width var(--dur) var(--ease);
}
.hero__dot:hover { background: rgb(255 255 255 / 0.45); }
.hero__dot.is-active { width: 56px; background: rgb(255 255 255 / 0.28); }

/* Fills left-to-right over the slide's dwell time, so the wait is visible. */
.hero__dot.is-active::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-400), var(--accent-400));
  transform-origin: left;
  animation: hero-dot var(--slide-duration, 7000ms) linear forwards;
}
.hero.is-paused .hero__dot.is-active::after { animation-play-state: paused; }

@keyframes hero-dot {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* --- Meta ----------------------------------------------------------------- */

.hero__meta {
  position: relative;
  z-index: 2;
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
  padding-bottom: clamp(2.5rem, 2rem + 2vw, 4rem);
  border-top: 1px solid rgb(255 255 255 / 0.12);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-3) var(--sp-6);
  font-size: var(--fs-sm);
  color: rgb(255 255 255 / 0.6);
}
.hero__meta li { display: flex; align-items: center; gap: 0.5rem; }
.hero__meta svg { width: 1.05em; height: 1.05em; color: var(--affirm-on-dark); flex: none; }

/* Plain fallback keeps the original padding when there are no slides. */
.hero--plain .hero__inner { padding-block: clamp(4.5rem, 3rem + 8vw, 9rem) 0; }

@media (max-width: 40rem) {
  .hero__controls-inner { gap: var(--sp-3); }
  .hero__dot { width: 26px; }
  .hero__dot.is-active { width: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__media img,
  .hero__media video { animation: none; transform: scale(1.04); }
  .hero__dot.is-active::after { animation: none; transform: scaleX(1); }
  .hero__slide { transition-duration: 1ms; }
}

/* Page hero (inner pages) */
.page-hero {
  position: relative;
  overflow: hidden;
  background: var(--ink-950);
  color: #fff;
  padding-block: clamp(3.5rem, 2.4rem + 5vw, 6.5rem) clamp(3rem, 2.2rem + 4vw, 5rem);
  isolation: isolate;
}
.page-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 40rem; height: 40rem;
  top: -24rem; right: -10rem;
  border-radius: 50%;
  filter: blur(90px);
  background: radial-gradient(circle, rgb(0 175 239 / 0.42), transparent 68%);
}
.page-hero h1 { color: #fff; margin-block: var(--sp-4) var(--sp-4); }
.page-hero .lead { color: rgb(255 255 255 / 0.7); }
.page-hero .eyebrow { color: var(--brand-300); }

.breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
  font-size: var(--fs-xs);
  color: rgb(255 255 255 / 0.45);
  margin-bottom: var(--sp-5);
}
.breadcrumb a:hover { color: #fff; }
.breadcrumb li:not(:last-child)::after { content: "/"; margin-left: 0.5rem; opacity: 0.5; }
.breadcrumb li { display: flex; align-items: center; }

/* 8. Cards ----------------------------------------------------------------- */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 1.2rem + 1vw, 2.125rem);
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border); }

.card__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: var(--sp-5);
  border-radius: 15px;
  color: var(--brand-600);
  background: linear-gradient(140deg, var(--brand-50), #fff);
  border: 1px solid var(--brand-100);
  flex: none;
}
.card__icon svg { width: 24px; height: 24px; }

.card h3 { margin-bottom: var(--sp-3); font-size: var(--fs-lg); }
.card p { color: var(--text-soft); font-size: var(--fs-sm); line-height: 1.6; }

.card__points { margin-top: var(--sp-5); display: grid; gap: 0.55rem; }
.card__points li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: var(--fs-sm);
  color: var(--ink-600);
}
.card__points svg { width: 1.15em; height: 1.15em; flex: none; margin-top: 0.22em; color: var(--affirm); }

/* Product card */
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.75rem, 1.3rem + 1.4vw, 2.5rem);
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.product-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-500), var(--accent-400));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 400ms var(--ease);
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--border); }
.product-card:hover::before { transform: scaleX(1); }

.product-card--flagship {
  background: linear-gradient(165deg, var(--ink-950), var(--ink-800));
  border-color: var(--ink-700);
  color: #fff;
}
.product-card--flagship::before { transform: scaleX(1); }
.product-card--flagship h3 { color: #fff; }
.product-card--flagship p { color: rgb(255 255 255 / 0.68); }
.product-card--flagship .product-card__icon {
  background: rgb(0 175 239 / 0.18);
  border-color: rgb(255 255 255 / 0.14);
  color: var(--brand-300);
}
.product-card--flagship .tag { background: rgb(255 255 255 / 0.1); color: rgb(255 255 255 / 0.8); border-color: rgb(255 255 255 / 0.16); }
.product-card--flagship .link-arrow { color: var(--brand-300); }

.product-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}
.product-card__icon {
  display: grid;
  place-items: center;
  width: 54px; height: 54px;
  border-radius: 16px;
  color: var(--brand-600);
  background: linear-gradient(140deg, var(--brand-50), #fff);
  border: 1px solid var(--brand-100);
  flex: none;
}
.product-card__icon svg { width: 26px; height: 26px; }

.product-card__cat {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.product-card--flagship .product-card__cat { color: rgb(255 255 255 / 0.55); }

.product-card__body { flex: 1; }
.product-card__foot { margin-top: var(--sp-6); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--r-pill);
  background: linear-gradient(135deg, var(--brand-500), var(--accent-500));
  color: #fff;
}

.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: var(--sp-5); }
.tag {
  padding: 0.35rem 0.75rem;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--ink-600);
  background: var(--ink-50);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-pill);
}

/* Project card */
.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border); }
.project-card__cat {
  align-self: flex-start;
  padding: 0.3rem 0.7rem;
  margin-bottom: var(--sp-4);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--brand-700);
  background: var(--brand-50);
  border-radius: var(--r-pill);
}
.project-card h3 { font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
.project-card__client {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--brand-700);
  margin-bottom: var(--sp-3);
}
.project-card p { font-size: var(--fs-sm); color: var(--text-soft); line-height: 1.6; flex: 1; }
.project-card__link { margin-top: var(--sp-5); }

/* Photos */
.photo {
  margin: 0;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--ink-100);
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease);
}
.photo:hover img { transform: scale(1.03); }

.photo--framed { box-shadow: var(--shadow-lg); border-radius: var(--r-xl); }
.photo--framed img { aspect-ratio: 4 / 3; }

.photo-grid {
  display: grid;
  gap: clamp(0.75rem, 0.5rem + 1vw, 1.25rem);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.photo-grid .photo img { aspect-ratio: 4 / 3; }

/* First photo spans both rows so the group reads as one composition. */
.photo--tall { grid-row: span 2; }
.photo--tall img { aspect-ratio: auto; height: 100%; }

.photo-grid--even { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.photo-grid--even .photo { grid-row: auto; }

@media (max-width: 56rem) {
  .photo-grid--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 40rem) {
  .photo-grid,
  .photo-grid--even { grid-template-columns: minmax(0, 1fr); }
  .photo--tall { grid-row: auto; }
  .photo--tall img { aspect-ratio: 4 / 3; }
}

/* News card */
.news-card {
  display: flex;
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border); }
.news-card__link { display: flex; flex-direction: column; width: 100%; }

.news-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(140deg, var(--brand-50), var(--ink-50));
  overflow: hidden;
}
.news-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease); }
.news-card:hover .news-card__media img { transform: scale(1.04); }

.news-card__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--brand-300);
}
.news-card__placeholder svg { width: 40px; height: 40px; }

.news-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: clamp(1.35rem, 1.1rem + 0.9vw, 1.85rem);
}
.news-card__date {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-700);
}
.news-card__title {
  font-size: var(--fs-lg);
  margin-block: 0.6rem 0.55rem;
  color: var(--ink-900);
}
.news-card__body p { font-size: var(--fs-sm); color: var(--text-soft); line-height: 1.6; flex: 1; }
.news-card__more { margin-top: var(--sp-5); }

/* Article */
.page-hero--article .lead { max-width: none; }

.article-hero { margin: 0 0 clamp(2rem, 1.5rem + 2vw, 3rem); }
.article-hero img {
  width: 100%;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}
.article-hero figcaption {
  margin-top: var(--sp-3);
  font-size: var(--fs-xs);
  color: var(--text-soft);
  text-align: center;
}

/* Rendered Markdown */
.prose { font-size: var(--fs-base); line-height: 1.75; color: var(--ink-800); }
.prose > * + * { margin-top: 1.35em; }
.prose h2 { font-size: var(--fs-xl); margin-top: 2.2em; }
.prose h3 { font-size: var(--fs-lg); margin-top: 1.9em; }
.prose a { color: var(--brand-700); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--brand-800); }
.prose ul, .prose ol { padding-left: 1.4em; display: grid; gap: 0.5em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li::marker { color: var(--brand-500); }
.prose blockquote {
  padding-left: 1.25em;
  border-left: 3px solid var(--brand-200);
  color: var(--text-soft);
  font-style: italic;
}
.prose code {
  padding: 0.15em 0.4em;
  font-size: 0.9em;
  background: var(--ink-50);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
}
.prose pre {
  padding: 1.1em 1.3em;
  overflow-x: auto;
  background: var(--ink-950);
  color: #e8ecf3;
  border-radius: var(--r-md);
}
.prose pre code { background: none; border: 0; padding: 0; color: inherit; }
.prose img { border-radius: var(--r-md); }

/* In-article figures, positioned by the author in the CMS */
.article-figure { margin: 2.25em 0; }
.article-figure img {
  width: 100%;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
}
.article-figure figcaption {
  margin-top: 0.7em;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--text-soft);
  text-align: center;
}

.article-figure--centre {
  max-width: 70%;
  margin-inline: auto;
}

.article-figure--left,
.article-figure--right {
  max-width: 46%;
  margin-top: 0.4em;
}
.article-figure--left { float: left; margin-right: 1.75em; }
.article-figure--right { float: right; margin-left: 1.75em; }

/* Breaks out of the text column on wide screens, staying inside it on small ones. */
.article-figure--wide { width: 100%; }
@media (min-width: 64rem) {
  .article-figure--wide {
    width: calc(100% + 8rem);
    margin-inline: -4rem;
  }
}

/* Headings must not ride up alongside a floated figure. */
.prose h2, .prose h3 { clear: both; }

.article-inline-image {
  display: inline-block;
  max-height: 1.6em;
  width: auto;
  vertical-align: text-bottom;
  border-radius: 4px;
}

/* Floats would otherwise escape the article and disturb what follows. */
.prose::after { content: ""; display: table; clear: both; }

@media (max-width: 46rem) {
  .article-figure--left,
  .article-figure--right,
  .article-figure--centre {
    float: none;
    max-width: 100%;
    margin-inline: 0;
  }
}
.prose table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.prose th, .prose td { padding: 0.6em 0.8em; border: 1px solid var(--border-soft); text-align: left; }
.prose th { background: var(--ink-50); font-weight: 600; }
.prose hr { border: 0; border-top: 1px solid var(--border-soft); }

/* Stats */
.stats { display: grid; gap: 1px; background: var(--border-soft); border-radius: var(--r-lg); overflow: hidden; }
.stats--dark { background: rgb(255 255 255 / 0.09); }

.stat { padding: clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem); background: var(--white); text-align: center; }
.stats--dark .stat { background: var(--ink-950); }

.stat__value {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 1.8rem + 2vw, 3.25rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.045em;
  background: linear-gradient(135deg, var(--brand-700), var(--brand-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat__label {
  margin-top: var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--text-soft);
  line-height: 1.45;
}
.stats--dark .stat__label { color: rgb(255 255 255 / 0.6); }

/* Client marquee */
.marquee {
  position: relative;
  overflow: hidden;
  padding-block: var(--sp-5);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  width: max-content;
  gap: clamp(2rem, 1.5rem + 2vw, 3.5rem);
  animation: marquee 46s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item {
  font-family: var(--font-display);
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink-400);
  white-space: nowrap;
  transition: color var(--dur) var(--ease);
}
.marquee__item:hover { color: var(--ink-800); }

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Feature list (product detail) */
.feature-list { display: grid; gap: clamp(1.25rem, 1rem + 1vw, 1.75rem); }
.feature {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-4);
  padding: clamp(1.25rem, 1rem + 0.8vw, 1.75rem);
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
}
.feature__num {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 11px;
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--brand-600);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
}
.feature h3 { font-size: var(--fs-base); font-weight: 600; margin-bottom: var(--sp-2); }
.feature p { font-size: var(--fs-sm); color: var(--text-soft); line-height: 1.6; }

/* Module chips */
.modules { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.module {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink-700);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.module:hover { border-color: var(--brand-300); color: var(--brand-700); transform: translateY(-2px); }
.module svg { width: 1em; height: 1em; color: var(--affirm); flex: none; }

/* Filter pills */
.filters { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: clamp(2rem, 1.5rem + 2vw, 3rem); }
.filter {
  padding: 0.6rem 1.15rem;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink-600);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  transition: all var(--dur) var(--ease);
}
.filter:hover { border-color: var(--ink-400); color: var(--ink-900); }
.filter.is-active {
  color: #fff;
  background: var(--ink-900);
  border-color: var(--ink-900);
  font-weight: 600;
}

/* 9. Sections -------------------------------------------------------------- */

.split { display: grid; gap: clamp(2.5rem, 1.8rem + 3.5vw, 5rem); align-items: center; }
@media (min-width: 56rem) { .split { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.split--wide-left { }
@media (min-width: 56rem) { .split--wide-left { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); } }

.value-list { display: grid; gap: var(--sp-5); }
.value {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-4);
  align-items: start;
}
.value__icon {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 13px;
  color: var(--brand-600);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  flex: none;
}
.value__icon svg { width: 20px; height: 20px; }
.value h3 { font-size: var(--fs-base); font-weight: 600; margin-bottom: var(--sp-1); }
.value p { font-size: var(--fs-sm); color: var(--text-soft); line-height: 1.6; }

/* CTA band */
.cta-band {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(150deg, var(--ink-950) 0%, var(--brand-900) 58%, var(--brand-800) 100%);
  color: #fff;
  border-radius: var(--r-xl);
  padding: clamp(2.75rem, 2rem + 4vw, 5rem);
  text-align: center;
}
.cta-band::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -40% -10% auto auto;
  width: 34rem; height: 34rem;
  border-radius: 50%;
  filter: blur(80px);
  background: radial-gradient(circle, rgb(0 175 239 / 0.32), transparent 70%);
}
.cta-band h2 { color: #fff; max-width: 20ch; margin-inline: auto; }
.cta-band .lead { color: rgb(255 255 255 / 0.72); margin-inline: auto; margin-top: var(--sp-4); }
.cta-band__actions { margin-top: var(--sp-6); display: flex; flex-wrap: wrap; gap: var(--sp-4); justify-content: center; }

/* Info tiles (contact) */
.info-tile {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  height: 100%;
}
.info-tile__icon {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 13px;
  color: var(--brand-600);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
}
.info-tile__icon svg { width: 20px; height: 20px; }
.info-tile h3 { font-size: var(--fs-base); }
.info-tile a:hover { color: var(--brand-600); }
.info-tile__list { display: grid; gap: 0.4rem; font-size: var(--fs-sm); color: var(--text-soft); }
.info-tile__list strong { color: var(--ink-800); font-weight: 600; }

/* Map (contact page) */
.map {
  margin: 0;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
}
.map__frame {
  display: block;
  width: 100%;
  height: clamp(300px, 22rem + 8vw, 480px);
  border: 0;
}

.map__caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: clamp(1.25rem, 1rem + 0.8vw, 1.75rem);
  border-top: 1px solid var(--border-soft);
  font-size: var(--fs-sm);
  color: var(--text-soft);
  line-height: 1.55;
}
.map__caption strong { color: var(--ink-900); font-weight: 600; }

@media (max-width: 40rem) {
  .map__caption { flex-direction: column; align-items: stretch; }
  .map__caption .btn { width: 100%; }
}

/* 10. Forms ---------------------------------------------------------------- */

.form-card {
  padding: clamp(1.75rem, 1.3rem + 1.6vw, 2.75rem);
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
}

.form-grid { display: grid; gap: var(--sp-5); }
@media (min-width: 40rem) { .form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.field { display: grid; gap: 0.5rem; }
.field label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink-800);
}
.field .hint { font-size: var(--fs-xs); color: var(--text-soft); font-weight: 400; }

.input, .textarea, .select {
  width: 100%;
  padding: 0.85rem 1.05rem;
  font-size: var(--fs-sm);
  color: var(--text);
  background: var(--ink-50);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-400); }
.input:hover, .textarea:hover, .select:hover { border-color: var(--ink-300); }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  background: var(--white);
  border-color: var(--brand-500);
  box-shadow: 0 0 0 4px rgb(0 175 239 / 0.2);
}
.textarea { min-height: 9.5rem; resize: vertical; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23566384' stroke-width='2.5' 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 1rem center;
  padding-right: 2.75rem;
}

.field-validation-error, .validation-message {
  font-size: var(--fs-xs);
  font-weight: 500;
  color: #d02a3c;
}
.input.input-validation-error,
.textarea.input-validation-error,
.select.input-validation-error {
  border-color: #d02a3c;
  background: #fef4f5;
}
.validation-summary-errors {
  padding: var(--sp-4);
  margin-bottom: var(--sp-5);
  background: #fef4f5;
  border: 1px solid #f6c9ce;
  border-radius: var(--r-md);
  color: #a3202f;
  font-size: var(--fs-sm);
}
.validation-summary-errors ul { display: grid; gap: 0.3rem; }
.validation-summary-errors li::before { content: "• "; }
.validation-summary-valid { display: none; }

.honeypot {
  position: absolute !important;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

/* reCAPTCHA renders at a fixed 304x78, which is wider than the card's inner width on
   a small phone. Clip the wrapper and scale the widget down rather than let it spill. */
.captcha { max-width: 100%; overflow: hidden; }
.captcha .g-recaptcha { transform-origin: 0 0; }

@media (max-width: 30rem) {
  .captcha { height: 70px; }
  .captcha .g-recaptcha { transform: scale(0.885); }
}

.alert-success {
  display: grid;
  gap: var(--sp-4);
  place-items: center;
  text-align: center;
  padding: clamp(2.5rem, 2rem + 3vw, 4rem);
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
}
.alert-success__icon {
  display: grid; place-items: center;
  width: 68px; height: 68px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  box-shadow: 0 10px 30px -10px rgb(0 175 239 / 0.6);
}
.alert-success__icon svg { width: 32px; height: 32px; }

/* 11. Footer --------------------------------------------------------------- */

.site-footer {
  background: var(--ink-950);
  color: rgb(255 255 255 / 0.62);
  padding-block: clamp(3.5rem, 2.5rem + 4vw, 5.5rem) var(--sp-6);
  font-size: var(--fs-sm);
}
.site-footer__grid {
  display: grid;
  gap: clamp(2.5rem, 2rem + 2.5vw, 4rem);
}
@media (min-width: 48rem) { .site-footer__grid { grid-template-columns: 1.6fr 1fr 1fr; } }
@media (min-width: 68rem) { .site-footer__grid { grid-template-columns: 2fr 1fr 1fr 1.3fr; } }

.site-footer h4 {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: var(--sp-4);
}
.site-footer a { transition: color var(--dur) var(--ease); }
.site-footer a:hover { color: #fff; }
.footer-links { display: grid; gap: 0.7rem; }
.footer-about { max-width: 34ch; margin-top: var(--sp-5); line-height: 1.6; }

.footer-contact { display: grid; gap: 0.75rem; }
.footer-contact li { display: flex; gap: 0.7rem; align-items: flex-start; }
.footer-contact svg { width: 1.1em; height: 1.1em; margin-top: 0.28em; color: var(--affirm-on-dark); flex: none; }

.socials { display: flex; gap: 0.6rem; margin-top: var(--sp-5); }
.socials a {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  color: rgb(255 255 255 / 0.7);
  background: rgb(255 255 255 / 0.06);
  border: 1px solid rgb(255 255 255 / 0.1);
  transition: all var(--dur) var(--ease);
}
.socials a:hover { color: #fff; background: rgb(0 175 239 / 0.28); border-color: rgb(0 175 239 / 0.5); transform: translateY(-2px); }
.socials svg { width: 18px; height: 18px; }

.site-footer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-top: clamp(3rem, 2.2rem + 3vw, 4.5rem);
  padding-top: var(--sp-5);
  border-top: 1px solid rgb(255 255 255 / 0.1);
  font-size: var(--fs-xs);
  color: rgb(255 255 255 / 0.45);
}
.site-footer__bar ul { display: flex; flex-wrap: wrap; gap: var(--sp-5); }

/* 12. Motion & responsive -------------------------------------------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* Tablet */
@media (max-width: 68rem) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 56rem) {
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Mobile drawer */
  .nav-toggle { display: inline-flex; }

  /* backdrop-filter would make the header a containing block for its fixed-position
     drawer, anchoring the drawer to the header instead of the viewport. That breaks
     100dvh and lets the off-screen drawer widen the page. Drop the blur here and use
     an opaque background instead. */
  .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--white);
  }

  .site-header__nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 95;
    width: min(360px, 88vw);
    height: 100dvh;
    padding: 6.5rem var(--sp-5) var(--sp-6);
    background: var(--white);
    border-left: 1px solid var(--border-soft);
    box-shadow: -20px 0 60px -20px rgb(10 15 30 / 0.3);
    transform: translateX(100%);
    transition: transform 340ms var(--ease);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--sp-6);
  }
  body.nav-open .site-header__nav { transform: translateX(0); }

  .nav { flex-direction: column; align-items: stretch; gap: 0.15rem; }
  .nav__link {
    padding: 0.95rem 1rem;
    font-size: var(--fs-base);
    border-radius: var(--r-md);
  }
  .nav__link.is-active { background: var(--brand-50); }
  .nav__link.is-active::after { display: none; }

  .site-header__nav > .btn { display: inline-flex; width: 100%; }
  .site-header__actions .btn--primary { display: none; }
}

@media (max-width: 40rem) {
  :root { --section-y: clamp(3.25rem, 2.4rem + 5vw, 5rem); }

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

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

  .hero__actions .btn,
  .cta-band__actions .btn { width: 100%; }

  .site-footer__bar { flex-direction: column; align-items: flex-start; }
}

@media (min-width: 40.0625rem) {
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 26rem) {
  .stats { grid-template-columns: minmax(0, 1fr); }
  .logo { height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .marquee__track { animation: none; }
}

@media print {
  .site-header, .site-footer, .cta-band, .nav-backdrop { display: none; }
  body { color: #000; }
}
