/* ==========================================================================
   Dreamweave — design system
   One file, four layers: tokens → base → components → sections.
   Every page loads only this stylesheet.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Color — cool ink on cool paper, deep navy, one cyan accent (from the logo) */
  --ink: #12202c;
  --muted: #566573;

  --brand-900: #0f1a24;      /* footer, deepest surfaces */
  --brand-800: #16242f;      /* primary dark surface — matches the logo chip */
  --brand-700: #1e3646;      /* gradient partner */
  --brand-600: #27506a;      /* interactive tints on dark */

  --accent: #16c6e6;         /* cyan — marks, rules, CTAs on dark. Never body text on light. */
  --accent-strong: #0fb4d4;  /* cyan hover */
  --accent-deep: #0a8ba3;    /* deeper cyan — icons/marks on light */
  --accent-ink: #0a6274;     /* teal text that passes AA on light bg (eyebrows, checks) */

  --bg: #f4f8fa;             /* cool off-white page */
  --surface: #e9f1f4;        /* soft panel */
  --card: #ffffff;
  --line: #dbe6ea;           /* hairlines */
  --line-strong: #c4d3d9;    /* input borders */

  /* Themed slots — dark sections flip these, components read only these */
  --t-bg: var(--bg);
  --t-surface: var(--surface);
  --t-text: var(--ink);
  --t-muted: var(--muted);
  --t-heading: var(--brand-800);
  --t-eyebrow: var(--accent-ink);
  --t-line: var(--line);
  --t-focus: var(--brand-800);

  /* Type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;

  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1.0625rem;
  --text-lg: 1.1875rem;
  --text-xl: clamp(1.25rem, 1.12rem + 0.55vw, 1.5rem);
  --text-2xl: clamp(1.4375rem, 1.26rem + 0.8vw, 1.8125rem);
  --text-3xl: clamp(1.75rem, 1.42rem + 1.5vw, 2.4375rem);
  --text-4xl: clamp(2.25rem, 1.65rem + 2.7vw, 3.5rem);

  /* Space — 8px scale */
  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2rem;
  --s-5: 3rem;
  --s-6: 4rem;
  --s-7: 6rem;

  --container: 73.75rem;      /* 1180px */
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 0.875rem;
  --radius-sm: 0.625rem;

  --shadow-card: 0 1px 2px rgba(15, 26, 36, 0.06);
  --shadow-lift: 0 14px 32px -16px rgba(15, 26, 36, 0.32);
  --shadow-pop: 0 20px 48px -14px rgba(15, 26, 36, 0.30);
  --shadow-cyan: 0 12px 30px -12px rgba(22, 198, 230, 0.45);

  --header-h: 4.5rem;
}

/* Dark sections: flip the themed slots, everything inside adapts */
.theme-dark {
  --t-bg: var(--brand-800);
  --t-surface: rgba(255, 255, 255, 0.055);
  --t-text: #e7f1f5;
  --t-muted: #a7bcc6;
  --t-heading: #f2f9fb;
  --t-eyebrow: var(--accent);
  --t-line: rgba(255, 255, 255, 0.14);
  --t-focus: var(--accent);
  background-color: var(--t-bg);
  color: var(--t-text);
}

/* --------------------------------------------------------------------------
   2. FONTS (self-hosted, latin subsets, variable)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 650;
  font-display: swap;
  src: url("../fonts/fraunces-latin-var.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/inter-latin-var.woff2") format("woff2");
}

/* --------------------------------------------------------------------------
   3. BASE
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 560;
  line-height: 1.14;
  letter-spacing: -0.015em;
  color: var(--t-heading);
  margin: 0 0 var(--s-2);
  text-wrap: balance;
  font-variation-settings: "opsz" 60;
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-xl); line-height: 1.25; }

h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 600;
  line-height: 1.35;
  color: var(--t-heading);
  margin: 0 0 var(--s-1);
}

p {
  margin: 0 0 var(--s-2);
  color: var(--t-text);
}

ul, ol {
  margin: 0 0 var(--s-2);
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.375rem;
}

a {
  color: var(--brand-700);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

a:hover {
  color: var(--brand-800);
  text-decoration-color: currentColor;
}

.theme-dark a {
  color: var(--t-text);
}

.theme-dark a:hover {
  color: #ffffff;
}

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

strong { font-weight: 600; }

address { font-style: normal; }

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

::selection {
  background: var(--accent);
  color: var(--ink);
}

.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;
  top: -100%;
  left: 1rem;
  z-index: 100;
  padding: 0.625rem 1rem;
  background: var(--brand-800);
  color: #fff;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-sm);
}

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

/* --------------------------------------------------------------------------
   4. LAYOUT PRIMITIVES
   -------------------------------------------------------------------------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(3.5rem, 5vw + 2rem, 6.5rem);
}

.section-tight {
  padding-block: clamp(2.5rem, 4vw + 1rem, 4rem);
}

.section + .section-flush,
.section-flush {
  padding-top: 0;
}

.section-head {
  max-width: 44rem;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: block;
  font-size: var(--text-xs);
  font-weight: 650;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--t-eyebrow);
  margin-bottom: 0.875rem;
}

.lede {
  font-size: var(--text-lg);
  line-height: 1.65;
  color: var(--t-muted);
  max-width: 40rem;
}

.grid-2,
.grid-3 {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.75rem);
}

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

@media (min-width: 880px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split > * { min-width: 0; }
}

/* --------------------------------------------------------------------------
   5. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8125rem 1.5rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease,
    color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--ink);
}

.btn-primary:hover {
  background: var(--accent-strong);
  color: var(--ink);
  box-shadow: var(--shadow-lift);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--t-heading);
}

.btn-ghost:hover {
  border-color: var(--brand-800);
  color: var(--brand-800);
}

.theme-dark .btn-ghost {
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--t-text);
}

.theme-dark .btn-ghost:hover {
  border-color: #fff;
  color: #fff;
}

.btn .btn-arrow {
  width: 1em;
  height: 1em;
  transition: transform 180ms ease;
}

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

/* --------------------------------------------------------------------------
   6. HEADER + NAV
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 244, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 220ms ease;
}

.site-header.is-scrolled {
  box-shadow: 0 6px 24px -18px rgba(12, 42, 57, 0.45);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  min-height: var(--header-h);
  padding-block: 0.875rem;
  transition: padding 220ms ease;
}

.site-header.is-scrolled .header-inner {
  padding-block: 0.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--brand-800);
}

.brand-mark {
  width: 2.375rem;
  height: 2.375rem;
  flex: none;
}

.brand-name {
  font-family: var(--font-body);
  font-size: 1.375rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1;
}

.brand-name-accent {
  color: var(--accent-deep);
}

.theme-dark .brand-name-accent,
.footer-brand .brand-name-accent {
  color: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--s-4);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.5vw, 2rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list li { margin: 0; }

.nav-list > li > a,
.nav-sub-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.375rem 0;
  font-size: var(--text-sm);
  font-weight: 550;
  color: var(--ink);
  text-decoration: none;
  background: none;
  border: 0;
  font-family: var(--font-body);
  cursor: pointer;
}

.nav-list > li > a::after,
.nav-sub-toggle::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms ease;
}

.nav-list > li > a:hover,
.nav-sub-toggle:hover {
  color: var(--brand-800);
}

.nav-list > li > a:hover::after,
.nav-list > li > a[aria-current="page"]::after,
.nav-item-sub.open .nav-sub-toggle::after {
  transform: scaleX(1);
}

.nav-sub-toggle .chev {
  width: 0.7em;
  height: 0.7em;
  transition: transform 200ms ease;
}

.nav-item-sub { position: relative; }

.nav-item-sub.open .nav-sub-toggle .chev {
  transform: rotate(180deg);
}

.nav-sub {
  list-style: none;
  margin: 0;
  padding: 0.5rem;
}

.nav-sub a {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.nav-sub a:hover,
.nav-sub a[aria-current="page"] {
  background: var(--surface);
  color: var(--brand-800);
}

.menu-btn {
  display: none;
  position: relative;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
}

.menu-btn .bar {
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-800);
  transition: transform 220ms ease, opacity 180ms ease, top 220ms ease;
}

.menu-btn .bar:nth-child(1) { top: 0.95rem; }
.menu-btn .bar:nth-child(2) { top: 1.32rem; }
.menu-btn .bar:nth-child(3) { top: 1.69rem; }

.menu-btn[aria-expanded="true"] .bar:nth-child(1) {
  top: 1.32rem;
  transform: rotate(45deg);
}
.menu-btn[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .bar:nth-child(3) {
  top: 1.32rem;
  transform: rotate(-45deg);
}

/* Desktop dropdown */
@media (min-width: 921px) {
  .nav-sub {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 50%;
    translate: -50% 0;
    min-width: 19rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-pop);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
  }

  .nav-item-sub.open .nav-sub,
  .nav-item-sub:hover .nav-sub,
  .nav-item-sub:focus-within .nav-sub {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

/* Mobile nav */
@media (max-width: 920px) {
  .menu-btn { display: block; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: var(--s-2);
    padding: var(--s-2) var(--gutter) var(--s-4);
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgba(12, 42, 57, 0.35);
  }

  /* JS present: menu is a toggled panel. JS absent: nav renders in flow so
     the site stays navigable. */
  html.js .site-nav { display: none; }
  html.js .site-nav.open { display: flex; }

  html:not(.js) .site-nav {
    position: static;
    box-shadow: none;
    border-bottom: 0;
    padding-inline: 0;
  }

  html:not(.js) .menu-btn { display: none; }
  html:not(.js) .nav-sub { display: block; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-list > li {
    border-bottom: 1px solid var(--line);
  }

  .nav-list > li:last-child { border-bottom: 0; }

  .nav-list > li > a,
  .nav-sub-toggle {
    display: flex;
    width: 100%;
    justify-content: space-between;
    padding: 0.875rem 0.25rem;
    font-size: var(--text-base);
  }

  .nav-list > li > a::after,
  .nav-sub-toggle::after { content: none; }

  .nav-list > li > a[aria-current="page"],
  .nav-sub a[aria-current="page"] {
    color: var(--brand-800);
    font-weight: 650;
  }

  .nav-sub {
    display: none;
    padding: 0 0 0.75rem 0.75rem;
  }

  .nav-item-sub.open .nav-sub { display: block; }

  .nav-sub a {
    white-space: normal;
    padding: 0.55rem 0.5rem;
  }

  .nav-cta {
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
   7. HEROES
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(52rem 30rem at 85% -12%, rgba(22, 198, 230, 0.16), transparent 60%),
    linear-gradient(135deg, var(--brand-900) 0%, var(--brand-800) 52%, var(--brand-700) 100%);
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-weave {
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: #fff;
}

.hero-home {
  padding-block: clamp(4.5rem, 9vw, 8.5rem) clamp(4rem, 8vw, 7.5rem);
}

.hero-home h1 {
  max-width: 15ch;
  margin-bottom: var(--s-3);
}

.hero-home .lede {
  max-width: 36rem;
  margin-bottom: var(--s-4);
}

.hero-accent {
  color: var(--accent);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  align-items: center;
}

.hero-note {
  margin-top: var(--s-3);
  font-size: var(--text-sm);
  color: var(--t-muted);
}

.hero-note a {
  color: var(--t-text);
  font-weight: 550;
}

/* Inner-page hero */
.page-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-block: clamp(3.5rem, 7vw, 6rem) clamp(3rem, 6vw, 5rem);
}

.page-hero .container { position: relative; z-index: 1; }

/* Keep the decorative knot consistent on inner-page heroes regardless of
   any inline positioning, and let it drift like the home hero. */
.page-hero .knot-deco {
  top: -2.5rem;
  right: -2.5rem;
  width: clamp(13rem, 26vw, 22rem);
  height: clamp(13rem, 26vw, 22rem);
  opacity: 0.15;
}
@media (prefers-reduced-motion: no-preference) {
  .page-hero .knot-deco { animation: dw-float 9s ease-in-out infinite; }
}

.page-hero h1 {
  max-width: 22ch;
  margin-bottom: var(--s-2);
}

.page-hero .lede {
  max-width: 42rem;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  list-style: none;
  margin: 0 0 var(--s-3);
  padding: 0;
  font-size: var(--text-xs);
  font-weight: 550;
  letter-spacing: 0.02em;
}

.crumbs li {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--t-muted);
}

.crumbs li + li::before {
  content: "/";
  opacity: 0.5;
}

.crumbs a {
  color: var(--t-muted);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--t-text);
}

/* --------------------------------------------------------------------------
   8. CARDS + LISTS
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.375rem, 2.5vw, 1.875rem);
  box-shadow: var(--shadow-card);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

a.card { text-decoration: none; color: inherit; }

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  border-color: color-mix(in srgb, var(--brand-800) 30%, var(--line));
}

.card h3 {
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.6;
  margin-bottom: 0;
}

.card-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: var(--s-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--brand-800);
}

.card-more svg {
  width: 0.9em;
  height: 0.9em;
  transition: transform 200ms ease;
}

.card:hover .card-more svg {
  transform: translateX(4px);
}

.icon-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--brand-800);
  margin-bottom: var(--s-2);
}

.icon-chip svg {
  width: 1.375rem;
  height: 1.375rem;
}

.theme-dark .card {
  background: var(--t-surface);
  border-color: var(--t-line);
  box-shadow: none;
}

.theme-dark .card p { color: var(--t-muted); }
.theme-dark .card h3 { color: var(--t-heading); }
.theme-dark .icon-chip { background: rgba(255, 255, 255, 0.1); color: var(--accent); }

/* Check list */
.list-check {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--s-2);
}

.list-check li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.75rem;
}

.list-check li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.28em;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50%;
  background: var(--accent);
  -webkit-mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10" fill="black" stroke="none"/><path d="M8 12.5l2.6 2.6L16 9.5" stroke="white"/></svg>') center / contain no-repeat;
          mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10" fill="black" stroke="none"/><path d="M8 12.5l2.6 2.6L16 9.5" stroke="white"/></svg>') center / contain no-repeat;
}

.theme-dark .list-check li::before { background: var(--accent); }

/* Tag / pill row (industries) */
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pill-row li { margin: 0; }

.pill {
  display: inline-block;
  padding: 0.5rem 1.05rem;
  border-radius: 999px;
  border: 1px solid var(--t-line);
  background: var(--t-surface);
  font-size: var(--text-sm);
  font-weight: 550;
  color: var(--t-text);
}

/* --------------------------------------------------------------------------
   9. LONG-FORM CONTENT (service pages)
   -------------------------------------------------------------------------- */
.prose {
  max-width: 46rem;
}

.prose h2 {
  font-size: var(--text-2xl);
  margin-top: var(--s-5);
}

.prose h2:first-child { margin-top: 0; }

.prose h3 {
  font-size: var(--text-xl);
  margin-top: var(--s-4);
}

.prose p,
.prose li {
  color: #3c4650;
}

.prose > p:first-of-type {
  font-size: var(--text-lg);
  color: var(--muted);
}

/* Aside card that sits next to prose */
.aside-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.375rem, 2.5vw, 1.75rem);
}

.aside-card h2,
.aside-card h3 {
  font-size: var(--text-lg);
  font-family: var(--font-body);
  font-weight: 650;
  letter-spacing: 0;
}

.aside-card .list-check li {
  font-size: var(--text-sm);
  margin-bottom: 0.625rem;
}

/* --------------------------------------------------------------------------
   10. BANDS + STRIPS
   -------------------------------------------------------------------------- */
.fact-strip {
  border-block: 1px solid var(--line);
  background: var(--surface);
}

.fact-strip .container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  justify-content: center;
  padding-block: var(--s-3);
}

.fact {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-size: var(--text-sm);
  font-weight: 550;
  color: var(--brand-800);
}

.fact svg {
  width: 1.125rem;
  height: 1.125rem;
  color: var(--accent-ink);
  flex: none;
}

.cta-band {
  position: relative;
  overflow: hidden;
}

.cta-band .container {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--s-4);
  align-items: center;
}

@media (min-width: 880px) {
  .cta-band .container {
    grid-template-columns: 1.4fr 1fr;
  }
}

.cta-band h2 {
  max-width: 20ch;
  margin-bottom: var(--s-2);
}

.cta-contact {
  display: grid;
  gap: var(--s-2);
  font-size: var(--text-sm);
}

.cta-contact .contact-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.cta-contact svg {
  width: 1.125rem;
  height: 1.125rem;
  flex: none;
  margin-top: 0.2em;
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   11. FORMS
   -------------------------------------------------------------------------- */
.form-grid {
  display: grid;
  gap: var(--s-2);
}

@media (min-width: 640px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .field-full { grid-column: 1 / -1; }
}

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

.field label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--brand-800);
}

.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: var(--text-sm);
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.875rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
  width: 100%;
}

.field textarea {
  resize: vertical;
  min-height: 8.5rem;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand-700);
  box-shadow: 0 0 0 3px rgba(12, 42, 57, 0.14);
}

.field-hint {
  font-size: var(--text-xs);
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   12. FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--brand-900);
  color: #cfd9df;
  font-size: var(--text-sm);
}

.footer-main {
  display: grid;
  gap: var(--s-5);
  padding-block: clamp(3rem, 6vw, 4.5rem) var(--s-5);
}

@media (min-width: 760px) {
  .footer-main {
    grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
    gap: var(--s-4);
  }
}

.footer-brand .brand {
  color: #eaf3f6;
  margin-bottom: var(--s-2);
}

.footer-brand p {
  color: #a9b8c1;
  max-width: 26rem;
  line-height: 1.65;
}

.footer-social {
  display: flex;
  gap: 0.625rem;
  list-style: none;
  padding: 0;
  margin: var(--s-3) 0 0;
}

.footer-social li { margin: 0; }

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #cfd9df;
  transition: border-color 180ms ease, color 180ms ease, background-color 180ms ease;
}

.footer-social a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.footer-social svg {
  width: 1.05rem;
  height: 1.05rem;
}

.footer-col h2 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 650;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #8fa2ad;
  margin-bottom: var(--s-2);
}

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

.footer-col li {
  margin-bottom: 0.625rem;
}

.footer-col a {
  color: #cfd9df;
  text-decoration: none;
}

.footer-col a:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.footer-contact .contact-row {
  display: flex;
  gap: 0.7rem;
  margin-bottom: 0.875rem;
  line-height: 1.55;
}

.footer-contact svg {
  width: 1.05rem;
  height: 1.05rem;
  flex: none;
  margin-top: 0.22em;
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-block: var(--s-3);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1) var(--s-3);
  justify-content: space-between;
  color: #8fa2ad;
  font-size: var(--text-xs);
}

.footer-bottom p { margin: 0; color: inherit; }

/* --------------------------------------------------------------------------
   13. MOTION — reveals gated to JS + motion-OK
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  html.js [data-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 450ms ease-out, transform 450ms ease-out;
    transition-delay: var(--reveal-delay, 0ms);
  }

  html.js [data-reveal].is-revealed {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   14. VISUAL SYSTEM — woven texture, motif, stats, marquee, steps, motion
   The woven-knot is the brand; this section turns it into a visual language.
   -------------------------------------------------------------------------- */

/* Woven-fabric texture — a real over/under lattice, kept faint.
   Use as a decorative layer behind sections so nothing reads as flat. */
.weave-tex {
  position: relative;
  isolation: isolate;
}
.weave-tex::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(45deg, currentColor 0 1.5px, transparent 1.5px 16px),
    repeating-linear-gradient(-45deg, currentColor 0 1.5px, transparent 1.5px 16px);
  color: var(--brand-800);
  opacity: 0.05;
  -webkit-mask-image: radial-gradient(120% 100% at 50% 0, #000, transparent 78%);
          mask-image: radial-gradient(120% 100% at 50% 0, #000, transparent 78%);
}
.theme-dark.weave-tex::before,
.theme-dark .weave-tex::before { color: var(--accent); opacity: 0.08; }

/* A large decorative knot, for hero corners and section accents */
.knot-deco {
  position: absolute;
  pointer-events: none;
  color: var(--accent);
  opacity: 0.5;
  z-index: 0;
}
.knot-deco svg { width: 100%; height: 100%; display: block; }

/* Hero: layered depth + slow living motion on the weave ribbons */
.hero-weave { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero-weave path { will-change: transform; }
@media (prefers-reduced-motion: no-preference) {
  .hero-weave { animation: dw-drift 26s ease-in-out infinite alternate; }
  .hero-home .knot-deco { animation: dw-float 9s ease-in-out infinite; }
}
.hero-home .knot-deco {
  top: -3rem; right: -3rem;
  width: clamp(16rem, 34vw, 30rem); height: clamp(16rem, 34vw, 30rem);
  color: var(--accent); opacity: 0.16;
}

@keyframes dw-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-14px, 10px, 0) scale(1.04); }
}
@keyframes dw-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(14px) rotate(6deg); }
}
@keyframes dw-spin { to { transform: rotate(360deg); } }

/* Animated stroke-draw for hero knot (draws itself in on load) */
@media (prefers-reduced-motion: no-preference) {
  html.js .draw-knot rect {
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: dw-draw 1.4s ease-out forwards;
  }
  html.js .draw-knot rect:nth-of-type(2) { animation-delay: 0.12s; }
  html.js .draw-knot rect:nth-of-type(5) { animation-delay: 0.24s; }
  html.js .draw-knot rect:nth-of-type(6) { animation-delay: 0.36s; }
}
@keyframes dw-draw { to { stroke-dashoffset: 0; } }

/* --- Stat band — honest facts, presented graphically --------------------- */
.stat-band { position: relative; }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-3);
}
@media (min-width: 640px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat {
  position: relative;
  padding: var(--s-3) var(--s-2);
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.stat::after {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(var(--accent), var(--accent-deep));
}
.theme-dark .stat { background: var(--t-surface); border-color: var(--t-line); box-shadow: none; }
.stat-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 1.3rem + 2.6vw, 2.9rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--t-heading, var(--brand-800));
  display: flex;
  align-items: baseline;
  gap: 0.1em;
}
.stat-num .unit { color: var(--accent-deep); font-size: 0.7em; }
.theme-dark .stat-num .unit { color: var(--accent); }
.stat-num--sm { font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2rem); }
.stat-label {
  margin-top: 0.5rem;
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.45;
}
.theme-dark .stat-label { color: var(--t-muted); }

/* --- Section divider — a woven seam between sections --------------------- */
.divider-weave {
  height: 22px;
  width: 100%;
  color: var(--accent);
  opacity: 0.5;
  background-image:
    repeating-linear-gradient(45deg, currentColor 0 2px, transparent 2px 12px),
    repeating-linear-gradient(-45deg, currentColor 0 2px, transparent 2px 12px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
  opacity: 0.22;
}

/* --- Richer cards -------------------------------------------------------- */
.card::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-deep));
  border-radius: var(--radius) var(--radius) 0 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 260ms ease;
}
.card:hover::before,
.card:focus-within::before { transform: scaleX(1); }
.theme-dark .card::before { background: linear-gradient(90deg, var(--accent), transparent); }

.icon-chip {
  background: color-mix(in srgb, var(--accent) 14%, var(--card));
  color: var(--accent-deep);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent);
  transition: transform 220ms ease, background 220ms ease;
}
.card:hover .icon-chip { transform: rotate(-6deg) scale(1.06); }
.theme-dark .icon-chip { background: rgba(22, 198, 230, 0.14); color: var(--accent); }

/* Feature card — one hero card per grid, with motif */
.card--feature {
  background:
    radial-gradient(80% 120% at 100% 0, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%),
    var(--card);
}

/* --- Process steps — numbered nodes joined by a woven thread ------------- */
.steps { display: grid; gap: var(--s-3); counter-reset: step; }
@media (min-width: 780px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { position: relative; padding-top: 3.6rem; }
.step-num {
  counter-increment: step;
  position: absolute; top: 0; left: 0;
  width: 2.75rem; height: 2.75rem;
  display: grid; place-items: center;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--brand-800);
  background: var(--card);
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-card);
  z-index: 1;
}
.step-num::before { content: counter(step); }
.theme-dark .step-num { color: var(--accent); background: var(--t-surface); }
@media (min-width: 780px) {
  .step:not(:last-child)::before {
    content: "";
    position: absolute; top: 1.3rem; left: 2.75rem; right: -0.75rem; height: 2px;
    background: repeating-linear-gradient(90deg, var(--accent) 0 6px, transparent 6px 12px);
    opacity: 0.5;
  }
}
.step h3 { margin-bottom: 0.4rem; font-size: var(--text-lg); }
.step p { color: var(--muted); font-size: var(--text-sm); line-height: 1.6; margin: 0; }
.theme-dark .step p { color: var(--t-muted); }

/* --- Partner marquee — infinite belt of real client/partner logos ------- */
.partners { text-align: center; }
.partners .eyebrow { justify-content: center; }
.marquee {
  --marquee-gap: clamp(2.5rem, 6vw, 5rem);
  position: relative;
  overflow: hidden;
  padding-block: var(--s-2);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: dw-marquee 45s linear infinite;
}
.marquee:hover .marquee-track,
.marquee:focus-within .marquee-track { animation-play-state: paused; }
.marquee-item {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 3rem;
  margin-inline-end: var(--marquee-gap);
}
.marquee-item img {
  max-height: 2.6rem;
  max-width: 10rem;
  width: auto;
  object-fit: contain;
  filter: grayscale(1) opacity(0.65);
  transition: filter 220ms ease;
}
.marquee-item img:hover { filter: grayscale(0) opacity(1); }
.marquee-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xl);
  color: var(--muted);
  white-space: nowrap;
}
@keyframes dw-marquee { to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; }
  .marquee-track { animation: none; }
  .hero-weave { animation: none; }
}

/* --- Reveal variants (extend the existing [data-reveal] system) --------- */
@media (prefers-reduced-motion: no-preference) {
  html.js [data-reveal="scale"] { transform: translateY(16px) scale(0.97); }
  html.js [data-reveal="scale"].is-revealed { transform: none; }
  html.js [data-reveal="left"] { transform: translateX(-22px); }
  html.js [data-reveal="left"].is-revealed { transform: none; }
  html.js [data-reveal="right"] { transform: translateX(22px); }
  html.js [data-reveal="right"].is-revealed { transform: none; }
}
