/* ═══════════════════════════════════════════════════════════════
   WodenSoft — wodensoft.co.uk
   Design system & styles — light theme
   ═══════════════════════════════════════════════════════════════ */

/* ── Self-hosted fonts (no third-party requests, CSP: self only) ── */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/Inter-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/Inter-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/Inter-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/Inter-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/Inter-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/Inter-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/Inter-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/Inter-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/SpaceGrotesk-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/SpaceGrotesk-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/SpaceGrotesk-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/SpaceGrotesk-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/SpaceGrotesk-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/SpaceGrotesk-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/SpaceGrotesk-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/SpaceGrotesk-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Colour */
  --bg: #f7f9fc;
  --bg-2: #eef2f7;
  --surface: #ffffff;
  --surface-2: #f2f5fa;
  --border: #e3e8f0;
  --border-strong: #cdd6e4;
  --text: #0d1526;
  --muted: #55627a;
  --accent: #0891b2;        /* cyan-600 */
  --accent-deep: #0e7490;   /* cyan-700 — small text on light */
  --accent-2: #6d28d9;      /* violet-700 */
  --accent-3: #db2777;      /* pink-600 */
  --grad: linear-gradient(100deg, var(--accent-deep), var(--accent-2) 55%, var(--accent-3));
  --shadow-sm: 0 1px 2px rgba(13, 21, 38, 0.05), 0 4px 14px rgba(13, 21, 38, 0.06);
  --shadow-md: 0 6px 24px rgba(13, 21, 38, 0.09);
  --shadow-lg: 0 18px 50px rgba(13, 21, 38, 0.14);

  /* Screens (deliberately dark panels: console, seismo display) */
  --screen-bg: #0a0f1e;
  --screen-border: #232c44;

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

  /* Rhythm */
  --container: 1180px;
  --section-pad: clamp(4.5rem, 10vw, 8.5rem);
  --radius: 18px;
  --radius-lg: 28px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.7s;
}

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
address { font-style: normal; }
::selection { background: rgba(8, 145, 178, 0.18); }

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

.container {
  width: min(var(--container), 100% - 2.5rem);
  margin-inline: auto;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead { font-size: 1.2rem; color: var(--text); font-weight: 500; }

/* ── Focus visibility ──────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Preloader ─────────────────────────────────────────────────── */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 0.6s ease, visibility 0.6s ease;
  /* Pure-CSS safety net: even if main.js never runs (blocked, parse
     error), the overlay removes itself — JS normally wins the race. */
  animation: preloaderAutoHide 0.6s ease 3.2s forwards;
}

.preloader.is-done { opacity: 0; visibility: hidden; }

@keyframes preloaderAutoHide {
  to { opacity: 0; visibility: hidden; }
}

.preloader__path {
  stroke-dasharray: 160;
  stroke-dashoffset: 160;
  animation: draw 1.1s var(--ease-out) forwards;
}

@keyframes draw { to { stroke-dashoffset: 0; } }

/* ── Scroll progress ───────────────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  background: var(--grad);
  transform-origin: left;
  transform: scaleX(0);
  z-index: 150;
}

/* ── Header ────────────────────────────────────────────────────── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.1rem 0;
  transition: padding 0.35s ease, background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  border-bottom: 1px solid transparent;
}

.header.is-scrolled {
  padding: 0.65rem 0;
  background: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom-color: var(--border);
  box-shadow: 0 1px 12px rgba(13, 21, 38, 0.05);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand__name em { font-style: normal; color: var(--accent-deep); }

.nav {
  display: flex;
  align-items: center;
  gap: 1.9rem;
}

.nav__link {
  position: relative;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.25s ease;
  padding: 0.3rem 0;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: var(--grad);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}

.nav__link:hover,
.nav__link.is-active { color: var(--text); }

.nav__link:hover::after,
.nav__link.is-active::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  z-index: 110;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  will-change: transform;
}

.btn--large { padding: 1.05rem 2.1rem; font-size: 1.05rem; }
.btn--small { padding: 0.6rem 1.25rem; font-size: 0.9rem; }

.btn--primary {
  color: #ffffff;
  background: linear-gradient(100deg, #0e7490, #2563eb 60%, #6d28d9 130%);
  box-shadow: 0 8px 26px rgba(14, 116, 144, 0.35);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 38px rgba(8, 145, 178, 0.45);
}

.btn--ghost {
  color: var(--text);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.btn--ghost:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn svg { transition: transform 0.25s var(--ease-out); }
.btn:hover svg { transform: translateX(4px); }

/* ── Hero ──────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: clamp(7rem, 14vh, 10rem) 0 4rem;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero__canvas,
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__video {
  opacity: 0;
  transition: opacity 1.2s ease;
  /* lift the video's darkest patches so hero text keeps AA contrast */
  filter: brightness(1.05);
}
.hero__video.is-playing { opacity: 1; }

.hero__vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 60% at 50% 8%, rgba(109, 40, 217, 0.05), transparent 60%),
    linear-gradient(to right, rgba(247, 249, 252, 0.94) 0%, rgba(247, 249, 252, 0.62) 46%, rgba(247, 249, 252, 0.45) 100%),
    linear-gradient(to bottom, rgba(247, 249, 252, 0.4), rgba(247, 249, 252, 0.15) 55%, var(--bg) 96%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.4;
  animation: orbFloat 14s ease-in-out infinite alternate;
}

.orb--cyan {
  width: 420px;
  height: 420px;
  background: #a5e8f5;
  top: -8%;
  right: -6%;
}

.orb--violet {
  width: 520px;
  height: 520px;
  background: #ddd0ff;
  bottom: -18%;
  left: -10%;
  animation-delay: -7s;
}

@keyframes orbFloat {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(4%, 6%, 0) scale(1.12); }
}

.hero__content { position: relative; }

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.75);
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  margin-bottom: 1.8rem;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.2s ease-out infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(8, 145, 178, 0.45); }
  70%  { box-shadow: 0 0 0 11px rgba(8, 145, 178, 0); }
  100% { box-shadow: 0 0 0 0 rgba(8, 145, 178, 0); }
}

.hero__title {
  font-size: clamp(2.7rem, 7.2vw, 5.4rem);
  font-weight: 700;
  margin-bottom: 1.6rem;
  max-width: 15ch;
}

.line-reveal {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}

.line-reveal > span {
  display: inline-block;
  transform: translateY(110%);
  animation: lineUp 0.9s var(--ease-out) forwards;
}

.line-reveal:nth-child(2) > span { animation-delay: 0.14s; }

@keyframes lineUp { to { transform: translateY(0); } }

.hero__sub {
  max-width: 54ch;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--muted);
  margin-bottom: 2.4rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: clamp(3rem, 7vh, 5rem);
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: clamp(1.5rem, 5vw, 4rem);
  width: fit-content;
  border-top: 1px solid var(--border-strong);
  padding-top: 2rem;
}

.stat__num {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat__num--text { font-size: clamp(1.3rem, 2.4vw, 1.9rem); padding-top: 0.25em; }

.stat__label {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
}

.hero__scroll-track {
  display: block;
  width: 26px;
  height: 42px;
  border: 1.5px solid var(--border-strong);
  border-radius: 999px;
  position: relative;
  background: rgba(255, 255, 255, 0.6);
}

.hero__scroll-thumb {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--accent);
  animation: scrollHint 1.8s ease-in-out infinite;
}

@keyframes scrollHint {
  0%   { transform: translateY(0); opacity: 1; }
  70%  { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ── Marquee ───────────────────────────────────────────────────── */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--border);
  padding: 1.1rem 0;
  background: var(--bg-2);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}

.marquee__track {
  display: flex;
  align-items: center;
  /* margin-right on children instead of gap: with a trailing margin on
     the last child, -50% equals exactly one content period, so the
     loop wraps seamlessly instead of jumping half a gap. */
  width: max-content;
  animation: marquee 36s linear infinite;
}

.marquee__track > * { margin-right: 2.2rem; }

.marquee__track span {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.marquee__track i {
  font-style: normal;
  font-size: 0.55rem;
  color: var(--accent);
  opacity: 0.7;
}

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

.marquee:hover .marquee__track { animation-play-state: paused; }

/* ── Sections ──────────────────────────────────────────────────── */
.section { padding: var(--section-pad) 0; position: relative; }

.section-head { margin-bottom: clamp(2.8rem, 6vw, 4.5rem); }

.section-head--center {
  text-align: center;
  margin-inline: auto;
  max-width: 720px;
}

.section-head__eyebrow {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 1rem;
}

.section-head__title {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
}

.section-head__sub {
  margin-top: 1.3rem;
  color: var(--muted);
  font-size: 1.1rem;
}

/* ── Reveal on scroll ────────────────────────────────────────────
   Hidden state is scoped to .js (set by main.js as its first act):
   if the script is disabled, blocked or fails to load, every section
   stays visible instead of the page appearing empty. */
.js .reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* stagger siblings */
.is-visible:nth-child(2) { transition-delay: 0.08s; }
.is-visible:nth-child(3) { transition-delay: 0.16s; }
.is-visible:nth-child(4) { transition-delay: 0.24s; }
.is-visible:nth-child(5) { transition-delay: 0.32s; }
.is-visible:nth-child(6) { transition-delay: 0.4s; }

/* ── About ─────────────────────────────────────────────────────── */
.about__grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.about__text p + p { margin-top: 1.2rem; color: var(--muted); }
.about__text .lead { margin-bottom: 0.4rem; }

.about__badges {
  display: grid;
  gap: 1.1rem;
}

.badge-card {
  padding: 1.6rem 1.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s var(--ease-out);
}

.badge-card:hover {
  border-color: rgba(8, 145, 178, 0.45);
  box-shadow: var(--shadow-md);
}

.badge-card__icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  color: var(--accent-deep);
  background: rgba(8, 145, 178, 0.1);
  margin-bottom: 1rem;
}

.badge-card h3 { font-size: 1.12rem; margin-bottom: 0.45rem; }
.badge-card p { font-size: 0.95rem; color: var(--muted); }

/* ── UK Licensed Sponsor — Union Jack treatment ──────────────────── */
.badge-card--uk {
  position: relative;
  overflow: hidden;
  border-color: rgba(1, 33, 105, 0.22);
  background:
    radial-gradient(150px circle at 100% 0%, rgba(200, 16, 46, 0.09), transparent 62%),
    radial-gradient(170px circle at 0% 100%, rgba(1, 33, 105, 0.09), transparent 62%),
    var(--surface);
}

.badge-card--uk:hover {
  border-color: rgba(1, 33, 105, 0.42);
}

.badge-card--uk .badge-card__icon {
  color: #ffffff;
  background: #012169;
  box-shadow: 0 6px 16px rgba(1, 33, 105, 0.28);
}

.badge-card__flag {
  position: absolute;
  top: 1.5rem;
  right: 1.6rem;
  width: 46px;
  height: 23px;
  border-radius: 4px;
  overflow: hidden;
  line-height: 0;
  box-shadow: 0 3px 10px rgba(1, 33, 105, 0.28);
  outline: 1px solid rgba(255, 255, 255, 0.7);
  outline-offset: -1px;
}

.badge-card__flag svg { width: 100%; height: 100%; }

/* ── AI section ────────────────────────────────────────────────── */
.ai {
  background: var(--bg-2);
  border-block: 1px solid var(--border);
  overflow: hidden;
}

.ai__bg {
  position: absolute;
  inset: 0;
  opacity: 0.55;
  pointer-events: none;
}

.ai__bg canvas { width: 100%; height: 100%; }

.ai .container { position: relative; }

.ai__layout {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

/* console — deliberately a dark "screen" on the light page */
.ai-console {
  position: sticky;
  top: 110px;
  border-radius: var(--radius);
  border: 1px solid var(--screen-border);
  background: var(--screen-bg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, monospace;
}

.ai-console__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid var(--screen-border);
  background: rgba(255, 255, 255, 0.04);
}

.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot--r { background: #ff5f57; }
.dot--y { background: #febc2e; }
.dot--g { background: #28c840; }

.ai-console__title {
  margin-left: 0.7rem;
  font-size: 0.78rem;
  color: #8b98b3;
}

.ai-console__body {
  padding: 1.2rem 1.3rem 1.5rem;
  font-size: 0.86rem;
  line-height: 1.75;
  min-height: 260px;
}

.ai-console__line--user { color: #38cfe8; margin-bottom: 0.9rem; }
.ai-console__line--ai { color: #c6cede; white-space: pre-wrap; }

.ai-console__line--ai::after {
  content: "▊";
  color: #38cfe8;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* AI cards */
.ai__cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
}

.ai-card {
  padding: 1.7rem 1.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s var(--ease-out);
}

.ai-card:hover {
  border-color: rgba(109, 40, 217, 0.4);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.ai-card__icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  color: var(--accent-2);
  background: rgba(109, 40, 217, 0.09);
  margin-bottom: 1rem;
}

.ai-card h3 { font-size: 1.08rem; margin-bottom: 0.5rem; }
.ai-card p { font-size: 0.93rem; color: var(--muted); }

/* ── Services ──────────────────────────────────────────────────── */
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.service-card {
  position: relative;
  padding: 2rem 1.8rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.35s var(--ease-out);
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(8, 145, 178, 0.07), transparent 45%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.service-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}
.service-card:hover::before { opacity: 1; }

.service-card__num {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent-deep);
}

.service-card h3 { font-size: 1.22rem; margin: 0.9rem 0 0.6rem; }
.service-card p { font-size: 0.95rem; color: var(--muted); margin-bottom: 1.3rem; }

.service-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.service-card__tags li {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--border);
  background: var(--surface-2);
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
}

/* ── SeismoCalc ────────────────────────────────────────────────── */
.seismo__card {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding: clamp(2rem, 5vw, 4rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background:
    radial-gradient(700px circle at 85% 20%, rgba(109, 40, 217, 0.06), transparent 55%),
    var(--surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.seismo__info p { color: var(--muted); margin-bottom: 1.2rem; }
.seismo__info .lead { color: var(--text); margin-top: 1rem; }
.seismo__info .section-head__title { margin-bottom: 0.4rem; }

/* the display itself stays dark — it reads as an instrument screen */
.seismo__visual {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--screen-border);
  background: var(--screen-bg);
  min-height: 300px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.seismo__visual canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.seismo__readout {
  position: absolute;
  bottom: 0.9rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  gap: 1.4rem;
  font-family: ui-monospace, "Cascadia Code", Menlo, monospace;
  font-size: 0.8rem;
  color: #8b98b3;
}

.seismo__readout b { color: #38cfe8; font-weight: 600; }

/* ── Process ───────────────────────────────────────────────────── */
.process { background: var(--bg-2); border-block: 1px solid var(--border); }

.process__steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
  counter-reset: step;
}

.process-step {
  position: relative;
  padding: 2rem 1.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.process-step__num {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 700;
  color: #ffffff;
  background: var(--grad);
  margin-bottom: 1.1rem;
}

.process-step h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.process-step p { font-size: 0.93rem; color: var(--muted); }

/* ── Woden? ────────────────────────────────────────────────────── */
.woden__inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.woden__rune {
  padding: 2.2rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  animation: runeGlow 5s ease-in-out infinite alternate;
}

@keyframes runeGlow {
  from { box-shadow: 0 0 30px rgba(8, 145, 178, 0.1); }
  to   { box-shadow: 0 0 60px rgba(109, 40, 217, 0.22); }
}

.woden__text p { color: var(--muted); }
.woden__text .lead { color: var(--text); margin: 1.2rem 0 1rem; }

/* ── CTA band ──────────────────────────────────────────────────── */
.cta-band {
  padding: clamp(4rem, 9vw, 7rem) 0;
  background:
    radial-gradient(800px circle at 30% 50%, rgba(8, 145, 178, 0.08), transparent 55%),
    radial-gradient(800px circle at 75% 50%, rgba(109, 40, 217, 0.08), transparent 55%),
    var(--bg-2);
  border-block: 1px solid var(--border);
}

.cta-band__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}

.cta-band h2 { font-size: clamp(1.8rem, 4vw, 2.9rem); }

/* ── Contact ───────────────────────────────────────────────────── */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.contact__info > p { color: var(--muted); margin-top: 1rem; }

.contact__details {
  margin-top: 2.2rem;
  display: grid;
  gap: 1.1rem;
}

.contact__details li {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  color: var(--muted);
}

.contact__details svg { flex-shrink: 0; color: var(--accent-deep); margin-top: 3px; }
.contact__details a:hover { color: var(--text); }

.contact__hours {
  margin-top: 2.4rem;
  padding: 1.3rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.contact__hours h3 { font-size: 1rem; margin-bottom: 0.3rem; }
.contact__hours p { font-size: 0.92rem; color: var(--muted); }

/* form */
.contact-form {
  padding: clamp(1.6rem, 4vw, 2.6rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.form-field { margin-bottom: 1.1rem; }

.form-field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
}

.form-field .optional { color: var(--muted); font-weight: 400; }

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font: inherit;
  font-size: 0.98rem;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.form-field input::placeholder,
.form-field textarea::placeholder { color: #64748b; }

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.14);
}

.form-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2355627a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

.form-field select option { background: #ffffff; color: var(--text); }

.form-field textarea { resize: vertical; min-height: 130px; }

/* honeypot — visually removed, still in DOM for bots */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* CAPTCHA widget */
.captcha {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.captcha__challenge {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  height: 60px;
  padding: 0 0.5rem;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: #f4f7fb;
  overflow: hidden;
}

.captcha__img { height: 60px; width: auto; display: block; border-radius: 10px; }

.captcha__math {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text);
  -webkit-user-select: none;
  user-select: none;
}

.captcha__loading,
.captcha__error { font-size: 0.9rem; color: var(--muted); }

.captcha__retry {
  color: var(--accent-deep);
  text-decoration: underline;
  font: inherit;
  padding: 0;
}

.captcha__refresh {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--muted);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.4s var(--ease-out);
}

.captcha__refresh:hover { color: var(--accent-deep); border-color: var(--accent); }
.captcha__refresh:active svg { transform: rotate(-180deg); }

.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0.4rem 0 1.5rem;
  cursor: pointer;
}

.form-consent input {
  margin-top: 4px;
  width: 16px;
  height: 16px;
  accent-color: var(--accent-deep);
  flex-shrink: 0;
}

.contact-form__submit { width: 100%; }

.contact-form__spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.contact-form.is-sending .contact-form__spinner { display: inline-block; }
.contact-form.is-sending .contact-form__submit { pointer-events: none; opacity: 0.75; }

.form-status {
  margin-top: 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  min-height: 1.4em;
}

.form-status.is-success { color: #047857; }
.form-status.is-error { color: #be123c; }

/* ── Footer ────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  padding: clamp(3rem, 6vw, 4.5rem) 0 2rem;
}

.footer__top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
  padding-bottom: 2.8rem;
  border-bottom: 1px solid var(--border);
}

.footer__brand p {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 1rem 0 1.4rem;
  max-width: 30ch;
}

.footer__social { display: flex; gap: 0.7rem; }

.footer__social a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--muted);
  transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.footer__social a:hover {
  color: var(--text);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.footer__col h3 {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.1rem;
}

.footer__col a {
  display: block;
  color: var(--muted);
  font-size: 0.96rem;
  padding: 0.28rem 0;
  transition: color 0.2s ease;
}

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

.footer__col address { color: var(--muted); font-size: 0.96rem; line-height: 1.8; }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
  padding-top: 1.8rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .ai__layout { grid-template-columns: 1fr; }
  .ai-console { position: static; max-width: 640px; }
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .process__steps { grid-template-columns: repeat(2, 1fr); }
  .footer__top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  html { scroll-padding-top: 76px; }

  .nav {
    position: fixed;
    inset: 0;
    z-index: 105;
    flex-direction: column;
    justify-content: center;
    gap: 1.6rem;
    background: rgba(247, 249, 252, 0.97);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    /* closing: keep visible until the fade finishes */
    transition: opacity 0.35s ease, visibility 0s linear 0.35s;
  }

  .nav.is-open {
    opacity: 1;
    visibility: visible;
    /* opening: snap visibility immediately so focus() on the first
       link works in the same task as the class toggle */
    transition: opacity 0.35s ease, visibility 0s;
  }

  .nav__link { font-size: 1.5rem; font-family: var(--font-display); }
  .nav__cta { margin-top: 0.8rem; }
  .nav-toggle { display: flex; }

  .about__grid,
  .contact__grid,
  .seismo__card { grid-template-columns: 1fr; }

  .woden__inner { grid-template-columns: 1fr; justify-items: start; }

  .hero__stats { grid-template-columns: repeat(2, auto); }

  .cta-band__inner { justify-content: center; text-align: center; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }

  .services__grid,
  .process__steps,
  .ai__cards,
  .form-row,
  .footer__top { grid-template-columns: 1fr; }

  .hero { padding-top: 6.5rem; }
  .hero__actions .btn { width: 100%; }
  .hero__scroll { display: none; }

  .seismo__visual { min-height: 230px; }
}

/* ── Reduced motion ────────────────────────────────────────────── */
@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;
  }

  .reveal,
  .js .reveal { opacity: 1; transform: none; }
  .line-reveal > span { transform: none; animation: none; }
  .marquee__track { animation: none; }
  .hero__video { display: none; }
}
