/* =========================================================
   Invacore Limited, one-page site
   Dark, editorial. Near-black base, hairline structure,
   brand blue used sparingly as an accent.
   ========================================================= */

:root {
  /* Surfaces */
  --bg:        #08090B;
  --bg-2:      #0C0E12;
  --bg-3:      #111419;

  /* Hairlines */
  --line:      rgba(255, 255, 255, .08);
  --line-2:    rgba(255, 255, 255, .14);
  --line-3:    rgba(255, 255, 255, .22);

  /* Type */
  --text:      #F4F5F7;
  --text-2:    #A1A7B0;
  --text-3:    #7A8290;

  /* Accent: brand electric blue.
     #2563EB is 3.86:1 on --bg: fine for graphics and large text (WCAG needs 3:1),
     short of the 4.5:1 small text needs, so --accent-text carries that job. */
  --accent:      #2563EB;
  --accent-text: #4A7DF0;
  --accent-soft: rgba(37, 99, 235, .16);
  --accent-line: rgba(37, 99, 235, .45);

  /* Shape: small radii read as crafted, not template */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;

  /* Layout */
  --container: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --section-y: clamp(80px, 10vw, 152px);
  --header-h: 68px;

  /* Motion */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --t-fast: .16s var(--ease);
  --t-med: .28s var(--ease);

  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* ---------------------------------------------------------
   Base
   --------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  font-feature-settings: "cv05" 1, "cv11" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

h1, h2, h3 {
  margin: 0;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -.028em;
  line-height: 1.12;
  text-wrap: balance;
}

p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
svg { display: block; }

a {
  color: var(--accent-text);
  text-decoration: none;
  transition: color var(--t-fast);
}

::selection {
  background: rgba(37, 99, 235, .38);
  color: #fff;
}

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

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

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 200;
  transform: translate(-50%, -200%);
  padding: 10px 18px;
  border-radius: var(--r-sm);
  background: var(--text);
  color: var(--bg);
  font-size: .875rem;
  font-weight: 500;
  transition: transform var(--t-med);
}
.skip-link:focus-visible { transform: translate(-50%, 0); }

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

/* Small uppercase mono label, used above every section heading */
.label {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.label::before {
  content: "";
  /* keeps the dot on the first line when the label wraps */
  margin-top: .58em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  flex: none;
}

/* ---------------------------------------------------------
   Buttons: squared, not pills
   --------------------------------------------------------- */

.btn {
  --btn-y: 12px;
  --btn-x: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: var(--btn-y) var(--btn-x);
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-size: .9375rem;
  font-weight: 500;
  letter-spacing: -.008em;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--t-fast), border-color var(--t-fast),
              color var(--t-fast), transform var(--t-fast);
}
.btn:active { transform: translateY(1px); }

.btn-sm { --btn-y: 8px; --btn-x: 16px; font-size: .875rem; }

.btn-icon { flex: none; transition: transform var(--t-med); }
.btn:hover .btn-icon { transform: translateX(3px); }

/* White on near-black: the strongest CTA available on a dark page */
.btn-primary {
  background: var(--text);
  color: var(--bg);
}
.btn-primary:hover { background: #fff; }

/* Opaque, not transparent: the hero figure sits behind these */
.btn-ghost {
  border-color: var(--line-2);
  color: var(--text);
  background: var(--bg-2);
}
.btn-ghost:hover {
  border-color: var(--line-3);
  background: var(--bg-3);
  color: var(--text);
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-med), background-color var(--t-med), backdrop-filter var(--t-med);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(8, 9, 11, .72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  transition: opacity var(--t-fast);
}
.brand:hover { opacity: .7; }

.brand-logo {
  display: block;
  width: 142px;
  height: auto;
  flex: none;
}

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

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-list a {
  position: relative;
  display: block;
  padding: 8px 14px;
  border-radius: var(--r-xs);
  color: var(--text-2);
  font-size: .9375rem;
  font-weight: 450;
  letter-spacing: -.008em;
  transition: color var(--t-fast), background-color var(--t-fast);
}
.nav-list a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .05);
}
.nav-list a[aria-current="true"] { color: var(--text); }
.nav-list a[aria-current="true"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 1px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%);
}

.nav-cta { margin-left: 10px; }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: var(--r-xs);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background-color var(--t-fast), border-color var(--t-fast);
}
.nav-toggle:hover { background: rgba(255, 255, 255, .05); }

.nav-toggle-bars {
  display: block;
  position: relative;
  width: 17px;
  height: 11px;
}
.nav-toggle-bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform var(--t-med), top var(--t-med);
}
.nav-toggle-bars span:first-child { top: 1px; }
.nav-toggle-bars span:last-child  { top: 8px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:first-child {
  top: 4.5px;
  transform: rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:last-child {
  top: 4.5px;
  transform: rotate(-45deg);
}

/* ---------------------------------------------------------
   Hero: left-aligned, type-led
   --------------------------------------------------------- */

.hero {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(72px, 11vw, 140px));
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .038) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .038) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 88% 74% at 22% 8%, #000 0%, transparent 76%);
          mask-image: radial-gradient(ellipse 88% 74% at 22% 8%, #000 0%, transparent 76%);
}

.hero-glow {
  position: absolute;
  top: -18%;
  right: -4%;
  width: min(940px, 76vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, .26) 0%, rgba(37, 99, 235, .07) 44%, transparent 68%);
  filter: blur(28px);
}

.hero-art {
  position: absolute;
  top: 45%;
  right: -14%;
  width: clamp(520px, 64%, 880px);
  height: auto;
  color: var(--accent);
  opacity: .55;
  transform: translateY(-50%);
  /* fade the leading edge so the figure never competes with the headline */
  -webkit-mask-image: linear-gradient(to right, transparent 2%, #000 40%);
          mask-image: linear-gradient(to right, transparent 2%, #000 40%);
}

.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-title {
  max-width: 17ch;
  margin-top: 26px;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -.04em;
  text-wrap: balance;
}

.hero-lead {
  max-width: 54ch;
  margin-top: 26px;
  color: var(--text-2);
  font-size: clamp(1.0625rem, 1.4vw, 1.1875rem);
  line-height: 1.62;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 38px;
}

/* Capability strip closing the hero */
.capabilities {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 14px clamp(24px, 4vw, 56px);
  margin-top: clamp(72px, 10vw, 128px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-family: var(--mono);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.capabilities li {
  transition: color var(--t-fast);
}
.capabilities li:hover { color: var(--text-2); }

/* ---------------------------------------------------------
   Sections
   --------------------------------------------------------- */

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

.section-head {
  max-width: 60ch;
  margin-bottom: clamp(44px, 5vw, 68px);
}

.section-title {
  margin-top: 20px;
  font-size: clamp(1.875rem, 3.6vw, 2.75rem);
  letter-spacing: -.036em;
  line-height: 1.08;
}

.section-lead {
  margin-top: 20px;
  color: var(--text-2);
  font-size: 1.0625rem;
  line-height: 1.62;
  text-wrap: pretty;
}

/* ---------------------------------------------------------
   Services: one bordered panel divided by hairlines
   --------------------------------------------------------- */

.panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-2);
  overflow: hidden;
}

.cell {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 3.2vw, 44px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background-color var(--t-med);
}
.cell:nth-child(2n) { border-right: 0; }
.cell:nth-last-child(-n+2) { border-bottom: 0; }
.cell:hover { background: rgba(255, 255, 255, .022); }

.cell-num {
  color: var(--text-3);
  font-family: var(--mono);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .08em;
  transition: color var(--t-med);
}
.cell:hover .cell-num { color: var(--accent-text); }

.cell-icon {
  margin: 26px 0 22px;
  color: var(--accent);
  transition: transform var(--t-med);
}
.cell:hover .cell-icon { transform: translateY(-2px); }

.cell-title {
  font-size: 1.25rem;
  letter-spacing: -.026em;
}

.cell-text {
  margin-top: 12px;
  max-width: 40ch;
  color: var(--text-2);
  font-size: .9375rem;
  line-height: 1.6;
}

/* Cells sit two abreast above 860px. Pin the description to four line
   heights so the rule beneath it lands at the same y in both cells of a row,
   regardless of whether the copy wraps to three lines or four. */
@media (min-width: 861px) {
  .cell-text { min-height: 6.4em; }
}

/* Fixed offset rather than bottom-aligned, so the rules line up across a row */
.cell-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px 18px;
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.cell-list li {
  position: relative;
  padding-left: 17px;
  color: var(--text-2);
  font-size: .875rem;
}
.cell-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 6px;
  height: 1px;
  background: var(--accent);
}

/* ---------------------------------------------------------
   Why Invacore: three ruled columns
   --------------------------------------------------------- */

.section-why {
  border-block: 1px solid var(--line);
  background: var(--bg-2);
}

.pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
}

.pillar { padding-top: 26px; border-top: 1px solid var(--line-2); }

.pillar-num {
  color: var(--accent-text);
  font-family: var(--mono);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .08em;
}

.pillar-title {
  margin-top: 22px;
  font-size: 1.375rem;
  letter-spacing: -.028em;
}

.pillar-text {
  max-width: 32ch;
  margin-top: 12px;
  color: var(--text-2);
  font-size: 1rem;
  line-height: 1.62;
}

/* ---------------------------------------------------------
   FAQ: native details/summary, so it works without JavaScript
   and the answers stay in the DOM for crawlers
   --------------------------------------------------------- */

.faq {
  max-width: 820px;
  border-top: 1px solid var(--line);
}

.faq-item { border-bottom: 1px solid var(--line); }

.faq-q {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  cursor: pointer;
  list-style: none;
  transition: color var(--t-fast);
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q:hover { color: var(--text); }
.faq-q:focus-visible { outline-offset: -2px; }

.faq-q h3 {
  margin: 0;
  color: inherit;
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -.018em;
  line-height: 1.45;
}

.faq-item:not([open]) .faq-q { color: var(--text-2); }
.faq-item[open] .faq-q { color: var(--text); }

/* Plus that becomes a minus when open */
.faq-icon {
  position: relative;
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 5px;
}
.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 14px;
  height: 1.5px;
  background: var(--accent);
  transform: translateY(-50%);
  transition: transform var(--t-med), opacity var(--t-fast);
}
.faq-icon::after { transform: translateY(-50%) rotate(90deg); }
.faq-item[open] .faq-icon::after { transform: translateY(-50%) rotate(0deg); opacity: 0; }

.faq-a {
  padding: 0 44px 26px 0;
  color: var(--text-2);
  font-size: 1rem;
  line-height: 1.7;
  text-wrap: pretty;
}
.faq-a p { max-width: 68ch; }

@media (prefers-reduced-motion: no-preference) {
  .faq-item[open] .faq-a { animation: faq-open .32s var(--ease) both; }
  @keyframes faq-open {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: none; }
  }
}

/* ---------------------------------------------------------
   About
   --------------------------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  gap: 0 clamp(32px, 6vw, 96px);
  align-items: start;
  padding-top: clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--line);
}

/* no max-width: the column already sets the measure */

/* Years-in-business figure: its own full-width row, split on the same
   column rhythm as the heading and body above it */
.about-stat {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  gap: 0 clamp(32px, 6vw, 96px);
  align-items: baseline;
  margin-top: clamp(44px, 5vw, 72px);
  padding-top: clamp(28px, 3vw, 40px);
  border-top: 1px solid var(--line);
}

.stat-value {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--text);
  font-size: clamp(3rem, 6vw, 4.25rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
}
.stat-unit {
  color: var(--accent-text);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  font-weight: 500;
  letter-spacing: -.02em;
}

.stat-label {
  color: var(--text-3);
  font-family: var(--mono);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.about-body {
  display: flex;
  flex-direction: column;
  gap: 22px;
  color: var(--text-2);
  font-size: clamp(1.0625rem, 1.35vw, 1.1875rem);
  line-height: 1.68;
  text-wrap: pretty;
}
.about-body strong {
  color: var(--text);
  font-weight: 500;
}

/* ---------------------------------------------------------
   Contact
   --------------------------------------------------------- */

.contact-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: clamp(18px, 2vw, 24px);
  background: var(--bg-2);
}

.contact-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 100% at 50% -20%, rgba(76, 125, 255, .3), transparent 62%);
}
.contact-bg::after {
  content: "";
  position: absolute;
  top: 0;
  left: 18%;
  right: 18%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--accent-line), transparent);
}

.contact-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(40px, 5vw, 80px);
  align-items: start;
  padding: clamp(40px, 6vw, 76px) clamp(24px, 4vw, 60px);
}

.contact-title {
  max-width: 14ch;
  margin-top: 22px;
  font-size: clamp(1.875rem, 3.6vw, 2.75rem);
  letter-spacing: -.038em;
  line-height: 1.06;
}

.contact-text {
  max-width: 42ch;
  margin-top: 20px;
  color: var(--text-2);
  font-size: clamp(1rem, 1.3vw, 1.0625rem);
  line-height: 1.62;
  text-wrap: pretty;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-2);
  font-size: .9375rem;
  font-weight: 450;
}
.contact-links a:hover { color: var(--text); }
.contact-links svg { color: var(--text-3); transition: color var(--t-fast); }
.contact-links a:hover svg { color: var(--accent); }

/* ---------------------------------------------------------
   Contact form
   --------------------------------------------------------- */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Honeypot: positioned away rather than display:none, which some bots skip */
.form-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

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

.field label {
  color: var(--text-2);
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: -.005em;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: rgba(0, 0, 0, .28);
  color: var(--text);
  font-family: inherit;
  font-size: .9375rem;
  line-height: 1.5;
  transition: border-color var(--t-fast), background-color var(--t-fast), box-shadow var(--t-fast);
}
.field textarea { resize: vertical; min-height: 118px; }

.field input:hover,
.field textarea:hover { border-color: var(--line-3); }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0, 0, 0, .42);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Only flag a field once the user has left it in a bad state */
.field input:user-invalid,
.field textarea:user-invalid { border-color: #E0514F; }

.form-submit {
  align-self: flex-start;
  margin-top: 4px;
}

.form-status {
  font-size: .875rem;
  line-height: 1.5;
}
.form-status:empty { display: none; }
.form-status[data-state="ok"] { color: var(--text); }
.form-status[data-state="error"] { color: #F08A88; }

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

.site-footer {
  border-top: 1px solid var(--line);
  padding-top: 34px;
  /* clearance so the fixed back-to-top control never lands on footer content */
  padding-bottom: calc(var(--gutter) + 62px);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 28px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.footer-logo {
  display: block;
  width: 100px;
  height: auto;
  flex: none;
}
.footer-suffix {
  color: var(--text-3);
  font-size: .875rem;
  font-weight: 450;
}

.footer-meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: var(--text-3);
  font-size: .8125rem;
}
.footer-sep { color: var(--line-3); }
.footer-link { color: var(--text-3); }
.footer-link:hover { color: var(--text); }

/* Statutory trading disclosure: required on the site, kept as fine print.
   Held at --text-3 (5.1:1) rather than dimmer, since 12px is not large text. */
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 22px;
  color: var(--text-3);
  font-size: .75rem;
  line-height: 1.5;
}

/* ---------------------------------------------------------
   Legal pages
   --------------------------------------------------------- */

.legal {
  padding-top: calc(var(--header-h) + clamp(56px, 8vw, 96px));
  padding-bottom: clamp(64px, 8vw, 112px);
}

.legal-inner { max-width: 760px; }

.legal-head {
  padding-bottom: clamp(32px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
}

.legal-title {
  margin-top: 20px;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  letter-spacing: -.038em;
  line-height: 1.06;
}

.legal-meta {
  margin-top: 18px;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.legal-block { margin-top: clamp(40px, 5vw, 56px); }

.legal-block h2 {
  font-size: 1.25rem;
  letter-spacing: -.024em;
}

.legal-block h3 {
  margin-top: 28px;
  color: var(--text-2);
  font-size: .9375rem;
  font-weight: 500;
  letter-spacing: -.01em;
}

.legal-block p,
.legal-list {
  margin-top: 16px;
  color: var(--text-2);
  font-size: 1rem;
  line-height: 1.7;
  text-wrap: pretty;
}

.legal-block h2 + p,
.legal-block h3 + p { margin-top: 14px; }

.legal-block strong {
  color: var(--text);
  font-weight: 500;
}

.legal-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-left: 0;
}
.legal-list li {
  position: relative;
  padding-left: 20px;
}
.legal-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .78em;
  width: 7px;
  height: 1px;
  background: var(--accent);
}

.legal-block a { text-decoration: underline; text-underline-offset: 3px; }
.legal-block a:hover { color: var(--text); }

/* Obvious in the page, so it cannot ship unnoticed */
.todo {
  padding: 1px 6px;
  border: 1px dashed var(--accent-line);
  border-radius: var(--r-xs);
  background: var(--accent-soft);
  color: var(--accent-text);
  font-family: var(--mono);
  font-size: .8125em;
}

.legal-back {
  margin-top: clamp(48px, 6vw, 72px);
  padding-top: clamp(28px, 3vw, 36px);
  border-top: 1px solid var(--line);
}
.legal-back a {
  font-size: .9375rem;
  font-weight: 500;
}
.legal-back a:hover { color: var(--text); }

/* ---------------------------------------------------------
   Back to top
   --------------------------------------------------------- */

.to-top {
  position: fixed;
  right: var(--gutter);
  bottom: var(--gutter);
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--bg-2);
  color: var(--text-2);
  transition: color var(--t-fast), border-color var(--t-fast), background-color var(--t-fast),
              opacity var(--t-med), transform var(--t-med), visibility var(--t-med);
}
.to-top:hover {
  color: var(--text);
  border-color: var(--line-3);
  background: var(--bg-3);
}
.to-top:active { transform: translateY(1px); }

/* Hidden until scrolled; without JS it simply stays available */
.js .to-top {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  pointer-events: none;
}
.js .to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

/* ---------------------------------------------------------
   Motion
   --------------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.js .hero-inner > *,
.js .capabilities {
  animation: rise .8s var(--ease) both;
}
.js .hero-title   { animation-delay: .05s; }
.js .hero-lead    { animation-delay: .11s; }
.js .hero-actions { animation-delay: .17s; }
.js .capabilities { animation-delay: .24s; }

.js .hero-art { animation: art-in 1.5s var(--ease) both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
@keyframes art-in {
  from { opacity: 0; transform: translateY(-50%) scale(1.05) rotate(-4deg); }
  to   { opacity: .55; transform: translateY(-50%) scale(1) rotate(0); }
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

@media (max-width: 940px) {
  .pillars { grid-template-columns: 1fr; gap: 0; }
  .pillar { padding-block: 28px; }
  .pillar + .pillar { border-top: 1px solid var(--line); }
  .pillar-text { max-width: 46ch; }

  .about-grid {
    grid-template-columns: 1fr;
    row-gap: clamp(28px, 5vw, 40px);
  }

  /* single column: keep the figure between the heading and the body copy */
  .about-stat {
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: start;
    order: 0;
    margin-top: 0;
  }
  .about-body { order: 1; }
}

@media (max-width: 860px) {
  .contact-content { grid-template-columns: 1fr; gap: 40px; }
  .contact-title { max-width: 18ch; }
  .contact-text { max-width: 52ch; }
  .form-submit { align-self: stretch; }

  .panel { grid-template-columns: 1fr; }
  .cell { border-right: 0; }
  .cell:last-child { border-bottom: 0; }
  .cell:nth-last-child(2) { border-bottom: 1px solid var(--line); }

  .hero-art {
    top: auto;
    bottom: -4%;
    right: -30%;
    width: 108%;
    opacity: .32;
    transform: none;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 30%);
            mask-image: linear-gradient(to right, transparent 0%, #000 30%);
  }
  @keyframes art-in {
    from { opacity: 0; }
    to   { opacity: .32; }
  }
}

@media (max-width: 780px) {
  .nav-toggle { display: inline-flex; }

  .nav {
    position: absolute;
    top: calc(var(--header-h) - 8px);
    left: var(--gutter);
    right: var(--gutter);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px;
    border: 1px solid var(--line-2);
    border-radius: var(--r-md);
    background: var(--bg-3);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--t-med), transform var(--t-med), visibility var(--t-med);
  }
  .site-header.nav-open .nav {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list a {
    padding: 13px 14px;
    font-size: 1rem;
    color: var(--text);
  }
  /* stacked panel: the tint marks the active item, the dot would sit oddly */
  .nav-list a[aria-current="true"] { background: rgba(255, 255, 255, .05); }
  .nav-list a[aria-current="true"]::after { display: none; }

  .nav-cta {
    margin: 8px 0 0;
    width: 100%;
    --btn-y: 12px;
    font-size: .9375rem;
  }
}

@media (max-width: 640px) {
  :root { --header-h: 62px; }

  .brand-logo { width: 124px; }
  .hero-title { max-width: none; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1 1 auto; }
  .cell-list { grid-template-columns: 1fr; gap: 10px; }
  .faq-a { padding-right: 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

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

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

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  .js .reveal { opacity: 1; transform: none; }
  .btn:hover .btn-icon,
  .cell:hover .cell-icon { transform: none; }
}

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

@media print {
  .site-header,
  .hero-bg,
  .to-top,
  .nav { display: none; }

  html, body { background: #fff; color: #000; }
  h1, h2, h3, .contact-title { color: #000; }
  .panel, .cell, .contact-panel { background: #fff; border-color: #ccc; }
  .cell-text, .pillar-text, .about-body, .contact-text, .section-lead, .hero-lead { color: #333; }
}
