/* ==========================================================================
   Grading Lab Agency (GLA) — Global stylesheet
   Dark chrome-violet luxury system. Tokens → base → layout → components.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Surfaces */
  --bg: #07060d;
  --bg-elevated: #0d0b17;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-strong: rgba(255, 255, 255, 0.06);
  --surface-solid: #12101f;

  /* Brand — chrome violet */
  --violet-100: #ede6ff;
  --violet-200: #d6c4ff;
  --violet-300: #b794ff;
  --violet-400: #9a6bff;
  --violet-500: #7c3aed;
  --violet-600: #6425c9;
  --violet-700: #431a8a;
  --violet-900: #1b0d3a;

  /* Text */
  --text: #f6f4fd;
  --text-secondary: #dcd7ee;   /* lifted for readability over the shader */
  --text-muted: #b1aacb;       /* lifted so small labels stay legible */

  /* Lines */
  --border: rgba(255, 255, 255, 0.09);
  --border-brand: rgba(154, 107, 255, 0.28);

  /* Semantic */
  --success: #34d399;
  --danger: #f87171;
  --warning: #fbbf24;

  /* Accents — deliberately desaturated so they read as rich rather than neon
     on a near-black page. Each one carries meaning somewhere in the site:
     gold = grade and value, cyan = verification, emerald = authenticated. */
  --a-violet: #b794ff;
  --a-gold:   #e2b355;
  --a-cyan:   #4fd1c5;
  --a-rose:   #ef8fb8;
  --a-amber:  #f0a35e;
  --a-sky:    #7cbdf7;
  --a-emerald:#5cd6a0;
  --a-indigo: #98a3ff;

  /* Gradients */
  --chrome: linear-gradient(180deg, #ffffff 0%, #d6c4ff 32%, #9a6bff 58%, #5b23b8 100%);
  --brand-sweep: linear-gradient(120deg, #b794ff 0%, #7c3aed 48%, #4c1d95 100%);
  --glow: radial-gradient(circle at 50% 0%, rgba(124, 58, 237, 0.35), transparent 65%);

  /* Type */
  --font-display: 'Outfit', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  /* Space scale (4pt rhythm) */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-24: 6rem;

  /* Shape */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* Elevation */
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.4);
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  --shadow-brand: 0 20px 60px rgba(124, 58, 237, 0.28);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 240ms;

  /* Layering */
  --z-header: 100;
  --z-menu: 200;

  --container: 1200px;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);   /* base layer + fallback if the shader can't run */
}

body {
  margin: 0;
  min-height: 100dvh;
  background: transparent;  /* let the .silk-bg canvas show through */
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Legibility scrim over the Silk canvas. A dark veil — heavier at the top
   (behind the sticky header) and bottom (behind the footer), lighter through
   the middle so the flow reads clearly — keeps the silk from washing out the
   light UI text. Doubles as the tint over the html base colour when the
   shader is absent. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(180deg,
      rgba(7, 6, 13, 0.74) 0%,
      rgba(7, 6, 13, 0.44) 20%,
      rgba(7, 6, 13, 0.40) 60%,
      rgba(7, 6, 13, 0.80) 100%),
    radial-gradient(120% 85% at 50% 0%, rgba(11, 16, 38, 0.30), transparent 62%);
}

/* Lab-bench grid plus a fine grain. The grain is what stops the big gradients
   from banding, and it is most of why the surfaces read as "material". */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(154, 107, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(154, 107, 255, 0.055) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 0%, transparent 72%);
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 0%, transparent 72%);
  opacity: 0.7;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   1b. Silk shader backdrop + legibility scrim
   assets/js/silk-bg.js mounts a fixed <canvas.silk-bg> that renders the
   animated "Silk" flow shader. The canvas sits at the very back; a scrim
   (repurposed body::before) tones the bright silk down to a deep, moody flow
   so the dark UI and its light text stay readable over it. If WebGL is
   unavailable the canvas removes itself and this same scrim + the html base
   colour become the static fallback background.
   -------------------------------------------------------------------------- */
.silk-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;            /* behind the scrim (body::before) and all content */
  display: block;
  pointer-events: none;
  background: var(--bg);  /* covers the first frame before WebGL paints */
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--text);
  line-height: 1.15;
  margin: 0 0 var(--sp-4);
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.25rem, 6vw, 4rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
h4 { font-size: 1.05rem; }

p { margin: 0 0 var(--sp-4); max-width: 68ch; }

a {
  color: var(--violet-300);
  text-decoration: none;
  transition: color var(--dur) var(--ease-out);
}
a:hover { color: var(--violet-200); }

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

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

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

::selection { background: var(--violet-500); color: #fff; }

/* --------------------------------------------------------------------------
   3. Utilities
   -------------------------------------------------------------------------- */
.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

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

.section { padding-block: clamp(3.5rem, 9vw, 7rem); position: relative; }
.section--tight { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section--alt { background: linear-gradient(180deg, transparent, rgba(124, 58, 237, 0.05), transparent); }
.section--flush-bottom { padding-bottom: 0; }
.section--flush-top { padding-top: 0; }

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -100px;
  z-index: 999;
  background: var(--violet-500);
  color: #fff;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top var(--dur) var(--ease-out);
}
.skip-link:focus { top: var(--sp-4); color: #fff; }

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

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

.text-violet { color: var(--violet-300); }
.text-center { text-align: center; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* Eyebrow label above section titles */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--violet-300);
  margin-bottom: var(--sp-4);
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--violet-400));
}

.section-head { max-width: 760px; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-head.text-center { margin-inline: auto; }
.section-head.text-center .eyebrow::after {
  content: '';
  width: 28px;
  height: 1px;
  background: linear-gradient(270deg, transparent, var(--violet-400));
}
.section-head p { font-size: 1.05rem; }
.section-head.text-center p { margin-inline: auto; }

.lead { font-size: clamp(1.05rem, 2vw, 1.2rem); color: var(--text-secondary); }

.divider {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--border-brand), transparent);
  margin: 0;
}

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 48px;
  padding: 0 var(--sp-6);
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-align: center;
  transition: transform var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              background-color var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out),
              color var(--dur) var(--ease-out);
}

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

.btn--primary {
  background: var(--brand-sweep);
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.btn--primary:hover {
  color: #fff;
  box-shadow: 0 24px 70px rgba(124, 58, 237, 0.45);
  transform: translateY(-2px);
}

.btn--ghost {
  background: var(--surface);
  border-color: var(--border-brand);
  color: var(--text);
  backdrop-filter: blur(12px);
}
.btn--ghost:hover {
  background: var(--surface-strong);
  border-color: var(--violet-400);
  color: #fff;
  transform: translateY(-2px);
}

.btn--block { width: 100%; }
.btn--sm { min-height: 40px; padding: 0 var(--sp-4); font-size: 0.85rem; }

.btn[disabled], .btn[aria-disabled='true'] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

/* Text link with arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  min-height: 44px;
}
.link-arrow svg { transition: transform var(--dur) var(--ease-out); }
.link-arrow:hover svg { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   5. Header / navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(7, 6, 13, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}
.site-header.is-stuck {
  border-bottom-color: var(--border);
  background: rgba(7, 6, 13, 0.92);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  margin-right: auto;
  color: var(--text);
}
.brand:hover { color: var(--text); }
.brand__mark { width: 40px; height: 40px; flex: none; }
/* New GLA logo lockup (transparent PNG) — sits on any background. */
.brand__logo {
  height: 46px;
  width: auto;
  display: block;
}
@media (max-width: 1040px) { .brand__logo { height: 40px; } }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.12em;
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand__tag {
  font-size: 0.6rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-muted);
}

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

.nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--sp-3);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  transition: color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}
.nav__link:hover { color: var(--text); background: var(--surface); }
.nav__link[aria-current='page'] { color: var(--text); }
.nav__link[aria-current='page']::after {
  content: '';
  position: absolute;
  left: var(--sp-3);
  right: var(--sp-3);
  bottom: 6px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-sweep);
}

.nav__cta { margin-left: var(--sp-2); }

/* Language switcher (EN / AZ / RU) — injected into the nav by i18n.js */
.lang-switch {
  display: inline-flex;
  align-items: center;
  margin-left: var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
  background: var(--surface);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.lang-switch__btn {
  min-height: 36px;
  padding: 0 10px;
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}
.lang-switch__btn:hover { color: var(--text); }
.lang-switch__btn.is-active { background: var(--brand-sweep); color: #fff; }

@media (max-width: 1040px) {
  /* Keep the switcher visible in the top bar beside the menu button. */
  .lang-switch { margin-left: auto; margin-right: var(--sp-2); }
}

.nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.nav__toggle:hover { background: var(--surface-strong); }
.nav__toggle svg { width: 22px; height: 22px; }
.nav__toggle .icon-close { display: none; }
.nav__toggle[aria-expanded='true'] .icon-close { display: block; }
.nav__toggle[aria-expanded='true'] .icon-open { display: none; }

@media (max-width: 1040px) {
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: fixed;
    inset: 76px 0 auto;
    z-index: var(--z-menu);
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-1);
    padding: var(--sp-4) 1.25rem calc(var(--sp-8) + env(safe-area-inset-bottom));
    background: rgba(9, 7, 18, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    max-height: calc(100dvh - 76px);
    overflow-y: auto;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out), visibility var(--dur);
  }
  .nav__links.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .nav__link { min-height: 52px; padding: 0 var(--sp-4); font-size: 1rem; }
  .nav__link[aria-current='page']::after { display: none; }
  .nav__link[aria-current='page'] { background: var(--surface); color: var(--violet-200); }
  .nav__cta { margin: var(--sp-3) 0 0; }
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(3.5rem, 10vw, 7.5rem) clamp(3rem, 8vw, 6rem);
  overflow: hidden;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
/* Stop grid tracks being forced wider than the container by min-content. */
.hero__grid > * { min-width: 0; }

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-brand);
  background: var(--surface);
  backdrop-filter: blur(12px);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--violet-200);
  margin-bottom: var(--sp-6);
}
.hero__badge .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--violet-300);
  box-shadow: 0 0 12px var(--violet-400);
}

.hero h1 { margin-bottom: var(--sp-6); }
.hero__title-line { display: block; }

.hero__sub {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  max-width: 54ch;
  margin-bottom: var(--sp-8);
}

/* ---- Hero stage: 3D rotating graded slab ------------------------------- */
.hero__stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 480px;
  perspective: 1500px;
  perspective-origin: 50% 44%;
}
.hero__stage::after {          /* pool of light on the "desk" */
  content: '';
  position: absolute;
  bottom: 6%;
  left: 50%;
  translate: -50% 0;
  width: 320px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(124, 58, 237, 0.55), transparent 70%);
  filter: blur(18px);
}

.slab3d {
  position: relative;
  width: 280px;
  height: 420px;
  transform-style: preserve-3d;
  transform: rotateX(4deg) rotateY(-16deg);
  animation: slabSpin 26s linear infinite;
  will-change: transform;
}
/* Pause so visitors can read the label or the record on the back. */
.hero__stage:hover .slab3d,
.hero__stage:focus-within .slab3d { animation-play-state: paused; }

@keyframes slabSpin {
  from { transform: rotateX(4deg) rotateY(0deg); }
  to   { transform: rotateX(4deg) rotateY(360deg); }
}

.slab3d__face {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  overflow: hidden;
  backface-visibility: hidden;
  background: linear-gradient(158deg, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.04) 46%, rgba(124, 58, 237, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}
.slab3d__face--front { transform: translateZ(9px); }
.slab3d__face--back { transform: rotateY(180deg) translateZ(9px); }

.slab3d__edge {
  position: absolute;
  top: 0;
  left: 50%;
  width: 18px;
  height: 420px;
  margin-left: -9px;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(214, 196, 255, 0.4), rgba(124, 58, 237, 0.2));
}
.slab3d__edge--l { transform: rotateY(-90deg) translateZ(140px); }
.slab3d__edge--r { transform: rotateY(90deg) translateZ(140px); }

/* --- holographic security label --- */
.slab3d__label {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  height: 62px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(120deg, #150e2e, #241548);
  border: 1px solid rgba(214, 196, 255, 0.3);
}
.slab3d__label-text { flex: 1 1 auto; min-width: 0; }
.slab3d__item {
  display: block;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.slab3d__set {
  display: block;
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.slab3d__grade {
  flex: none;
  text-align: right;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.slab3d__grade span {
  display: block;
  font-size: 0.5rem;
  letter-spacing: 0.16em;
  color: var(--violet-200);
  -webkit-text-fill-color: var(--violet-200);
}
/* micro-printed security band along the foot of the label */
.slab3d__micro {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 4px;
  height: 3px;
  background: repeating-linear-gradient(90deg,
    rgba(214, 196, 255, 0.55) 0 1px, transparent 1px 3px);
  opacity: 0.5;
}

.holo {
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.8;
  background: linear-gradient(115deg,
    rgba(255, 0, 128, 0) 0%,
    rgba(255, 0, 128, 0.34) 10%,
    rgba(0, 229, 255, 0.34) 20%,
    rgba(124, 58, 237, 0.34) 30%,
    rgba(255, 214, 0, 0.28) 40%,
    rgba(0, 255, 163, 0.26) 50%,
    rgba(255, 0, 128, 0) 62%,
    rgba(255, 255, 255, 0.26) 70%,
    rgba(255, 0, 128, 0) 82%);
  background-size: 320% 100%;
  animation: holoShift 7s linear infinite;
  will-change: background-position;
}
.holo::after {          /* specular bar sweeping the label */
  content: '';
  position: absolute;
  inset: -50%;
  background: linear-gradient(75deg, transparent 42%, rgba(255, 255, 255, 0.55) 50%, transparent 58%);
  animation: holoSweep 5s ease-in-out infinite;
}
@keyframes holoShift {
  from { background-position: 0% 0; }
  to   { background-position: 320% 0; }
}
@keyframes holoSweep {
  0%        { transform: translateX(-62%); }
  55%, 100% { transform: translateX(62%); }
}

/* --- card window + inspection loupe --- */
.slab3d__window {
  position: absolute;
  top: 86px;
  left: 30px;
  width: 220px;
  height: 300px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(200deg, #2a1a55, #150c33);
}
.slab3d__window > svg { display: block; width: 220px; height: 300px; }

/* Real card photo (assets/img/my-card.jpg). Sits over the SVG fallback and
   fills the holder; the loupe copy is magnified with its parent. */
.slab3d__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.loupe__zoom .slab3d__photo { width: 220px; height: 300px; }

.loupe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow:
    0 0 0 3px rgba(214, 196, 255, 0.85),
    0 0 26px rgba(154, 107, 255, 0.6),
    inset 0 0 26px rgba(0, 0, 0, 0.55);
  /* Base values match the first keyframe, so the static (reduced-motion)
     fallback still shows the lens correctly parked over the card. */
  transform: translate(20px, 32px);
  animation: loupePath 14s ease-in-out infinite;
  will-change: transform;
}
.loupe__zoom {
  position: absolute;
  top: 0;
  left: 0;
  width: 220px;
  height: 300px;
  transform-origin: 0 0;
  transform: translate(-118px, -146.8px) scale(2.4);
  animation: loupeZoom 14s ease-in-out infinite;
  will-change: transform;
}
.loupe__zoom svg { display: block; width: 220px; height: 300px; }
.loupe::after {          /* glass highlight */
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.3), transparent 46%);
}

/* The two tracks share timing: the lens travels, the magnified copy shifts
   under it by the same amount × the zoom factor (2.4). */
@keyframes loupePath {
  0%, 10%   { transform: translate(20px, 32px); }
  32%, 42%  { transform: translate(102px, 98px); }
  64%, 74%  { transform: translate(28px, 182px); }
  96%, 100% { transform: translate(20px, 32px); }
}
@keyframes loupeZoom {
  0%, 10%   { transform: translate(-118px, -146.8px) scale(2.4); }
  32%, 42%  { transform: translate(-314.8px, -305.2px) scale(2.4); }
  64%, 74%  { transform: translate(-137.2px, -506.8px) scale(2.4); }
  96%, 100% { transform: translate(-118px, -146.8px) scale(2.4); }
}

.slab3d__cert {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--violet-200);
}

/* --- back of the slab: the certification record --- */
.slab3d__back {
  position: absolute;
  inset: 0;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
}
.slab3d__back-title {
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--violet-300);
}
.slab3d__specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
}
.slab3d__specs > div {
  padding: 7px 4px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
}
.slab3d__specs dt {
  font-size: 0.52rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.slab3d__specs dd {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--violet-100);
  font-variant-numeric: tabular-nums;
}
.slab3d__qr {
  width: 96px;
  height: 96px;
  margin: 0 auto;
  padding: 7px;
  border-radius: 8px;
  background: rgba(233, 226, 255, 0.92);
}
.slab3d__back-note {
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: auto;
}

/* --- counters --- */
.counters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 1px;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.counter {
  padding: var(--sp-6);
  background: rgba(13, 11, 23, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.counter__value {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.counter__label {
  display: block;
  margin-top: var(--sp-2);
  font-size: 0.92rem;
  color: var(--text-secondary);
}
.counter__note {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__stage { min-height: 420px; scale: 0.9; }
}
@media (max-width: 420px) {
  .hero__stage { min-height: 380px; scale: 0.78; }
}

/* --------------------------------------------------------------------------
   7. Cards & grids
   -------------------------------------------------------------------------- */
.grid { display: grid; gap: var(--sp-4); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); }

.card {
  position: relative;
  padding: var(--sp-6);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out),
              background-color var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out);
}
.card > *:last-child { margin-bottom: 0; }
.card p { color: var(--text-secondary); font-size: 0.95rem; }

a.card, .card--interactive { display: block; color: inherit; }
a.card:hover, .card--interactive:hover {
  transform: translateY(-4px);
  border-color: var(--border-brand);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  color: inherit;
}

.card__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: var(--sp-4);
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(154, 107, 255, 0.22), rgba(124, 58, 237, 0.06));
  border: 1px solid var(--border-brand);
  color: var(--violet-200);
}
.card__icon svg { width: 26px; height: 26px; }

.card h3 { margin-bottom: var(--sp-2); }

.card__meta {
  display: block;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--violet-300);
  margin-bottom: var(--sp-2);
}

/* Feature list with checkmarks */
.check-list { display: grid; gap: var(--sp-3); }
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: 0.95rem;
  color: var(--text-secondary);
}
.check-list svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 4px;
  color: var(--violet-300);
}

/* Simple pill tags */
.tags { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.tag {
  display: inline-flex;
  align-items: center;
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.tag--brand { border-color: var(--border-brand); color: var(--violet-200); }

/* Stat band */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stats__item {
  background: var(--bg-elevated);
  padding: var(--sp-6);
  text-align: center;
}
.stats__value {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
}
.stats__label {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* --------------------------------------------------------------------------
   8. Process timeline
   -------------------------------------------------------------------------- */
.steps {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  counter-reset: step;
}
.step {
  position: relative;
  padding: var(--sp-6);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  transition: border-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.step:hover { border-color: var(--border-brand); transform: translateY(-4px); }
.step__num {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: var(--sp-4);
  border-radius: 50%;
  border: 1px solid var(--border-brand);
  background: rgba(124, 58, 237, 0.14);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--violet-200);
}
.step h3 { font-size: 1.05rem; margin-bottom: var(--sp-2); }
.step p { font-size: 0.92rem; margin-bottom: 0; }

/* Vertical detailed timeline */
.timeline { position: relative; display: grid; gap: var(--sp-6); }
.timeline::before {
  content: '';
  position: absolute;
  left: 21px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: linear-gradient(180deg, var(--violet-400), rgba(124, 58, 237, 0.08));
}
.timeline__item {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: var(--sp-6);
  align-items: start;
}
.timeline__dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-brand);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--violet-200);
}
.timeline__body { padding-top: var(--sp-2); }
.timeline__body h3 { margin-bottom: var(--sp-2); }
.timeline__body p:last-child { margin-bottom: 0; }

@media (max-width: 560px) {
  .timeline__item { gap: var(--sp-4); }
}

/* --------------------------------------------------------------------------
   9. Tables
   -------------------------------------------------------------------------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: blur(12px);
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
  font-size: 0.94rem;
}
caption {
  text-align: left;
  padding: var(--sp-4) var(--sp-6) 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}
th, td {
  padding: var(--sp-4) var(--sp-6);
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
thead th {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--violet-300);
  font-weight: 600;
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color var(--dur) var(--ease-out); }
tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
td strong { color: var(--text); font-family: var(--font-display); }

.grade-chip {
  display: inline-grid;
  place-items: center;
  min-width: 46px;
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-brand);
  background: rgba(124, 58, 237, 0.16);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--violet-100);
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   10. Verification module
   -------------------------------------------------------------------------- */
.verify-panel {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-brand);
  background:
    linear-gradient(150deg, rgba(154, 107, 255, 0.10), rgba(124, 58, 237, 0.02)),
    var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.verify-form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: flex-end;
}
.verify-form .field { flex: 1 1 260px; margin-bottom: 0; }

.field { display: block; margin-bottom: var(--sp-4); }
.field__label {
  display: block;
  margin-bottom: var(--sp-2);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}
.field__req { color: var(--violet-300); }
.field__hint {
  display: block;
  margin-top: var(--sp-2);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.field__error {
  display: none;
  margin-top: var(--sp-2);
  font-size: 0.85rem;
  color: var(--danger);
}
.field__error::before { content: '⚠ '; }
.field.has-error .field__error { display: block; }
.field.has-error .input, .field.has-error .textarea, .field.has-error .select { border-color: var(--danger); }

.input, .textarea, .select {
  width: 100%;
  min-height: 50px;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(6, 5, 12, 0.6);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.input::placeholder, .textarea::placeholder { color: #6f688a; }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--violet-400);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.25);
}
.textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23bdb6d4' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 18px;
  padding-right: 3rem;
}
.input.mono { font-family: var(--font-mono); letter-spacing: 0.08em; }

.form-grid {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}
.form-grid .field--full { grid-column: 1 / -1; }

/* Result area */
.verify-result { margin-top: var(--sp-6); }
.verify-result:empty { margin-top: 0; }

.result-state {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-6);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 0.95rem;
}
.result-state svg { flex: none; width: 20px; height: 20px; margin-top: 2px; }
.result-state--error { border-color: rgba(248, 113, 113, 0.4); background: rgba(248, 113, 113, 0.08); color: #fecaca; }
.result-state--error svg { color: var(--danger); }
.result-state--loading { color: var(--text-secondary); }

/* Certificate card */
.cert {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-brand);
  background: linear-gradient(160deg, rgba(154, 107, 255, 0.12), rgba(9, 7, 18, 0.9));
  overflow: hidden;
  box-shadow: var(--shadow-brand);
}
.cert__top {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-6);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}
.cert__status {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-pill);
  border: 1px solid rgba(52, 211, 153, 0.4);
  background: rgba(52, 211, 153, 0.12);
  color: var(--success);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.cert__status svg { width: 16px; height: 16px; }
.cert__id { font-family: var(--font-mono); font-size: 0.9rem; color: var(--violet-200); letter-spacing: 0.1em; }

.cert__body {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: clamp(1rem, 3vw, 2rem);
  padding: var(--sp-6);
  align-items: start;
}
.cert__grade {
  display: grid;
  place-items: center;
  gap: var(--sp-1);
  padding: var(--sp-6) var(--sp-4);
  border-radius: var(--radius);
  border: 1px solid var(--border-brand);
  background: radial-gradient(circle at 50% 20%, rgba(154, 107, 255, 0.28), rgba(27, 13, 58, 0.6));
  text-align: center;
}
.cert__grade-value {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cert__grade-label {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--violet-100);
}
.cert__grade-scale { font-size: 0.72rem; color: var(--text-muted); }

.cert__details { display: grid; gap: var(--sp-4); }
.cert__title { font-size: 1.35rem; margin-bottom: var(--sp-1); }
.cert__specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: var(--sp-4);
}
.cert__spec dt {
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.cert__spec dd { margin: 0; color: var(--text); font-size: 0.95rem; }
.cert__subgrades {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
}
.subgrade {
  display: grid;
  gap: 2px;
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
  min-width: 84px;
}
.subgrade dt { font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.subgrade dd {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--violet-100);
  font-variant-numeric: tabular-nums;
}

.cert__foot {
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-6);
  justify-content: space-between;
  align-items: center;
}

@media (max-width: 640px) {
  .cert__body { grid-template-columns: 1fr; }
  .cert__grade { padding: var(--sp-4); }
  .cert__grade-value { font-size: 2.75rem; }
}

/* --------------------------------------------------------------------------
   11. Accordion (FAQ)
   -------------------------------------------------------------------------- */
.accordion { display: grid; gap: var(--sp-3); }
.accordion details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease-out);
}
.accordion details[open] { border-color: var(--border-brand); }
.accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-6);
  min-height: 56px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text);
  list-style: none;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: '';
  flex: none;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--violet-300);
  border-bottom: 2px solid var(--violet-300);
  rotate: 45deg;
  translate: 0 -3px;
  transition: rotate var(--dur) var(--ease-out);
}
.accordion details[open] summary::after { rotate: -135deg; translate: 0 3px; }
.accordion summary:hover { background: var(--surface-strong); }
.accordion__content { padding: 0 var(--sp-6) var(--sp-6); }
.accordion__content > *:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   12. CTA band
   -------------------------------------------------------------------------- */
.cta-band {
  position: relative;
  padding: clamp(2.5rem, 6vw, 4.5rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-brand);
  background:
    radial-gradient(60% 100% at 50% 0%, rgba(154, 107, 255, 0.2), transparent 70%),
    linear-gradient(180deg, rgba(27, 13, 58, 0.85), rgba(9, 7, 18, 0.9));
  text-align: center;
  overflow: hidden;
}
.cta-band h2 { margin-bottom: var(--sp-4); }
.cta-band p { margin-inline: auto; margin-bottom: var(--sp-8); }
.cta-band .btn-row { justify-content: center; }

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: clamp(3rem, 8vw, 6rem);
  border-top: 1px solid var(--border);
  background: rgba(9, 7, 18, 0.6);
  padding-block: var(--sp-16) var(--sp-8);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: var(--sp-8);
  margin-bottom: var(--sp-12);
}
.footer__brand p { font-size: 0.92rem; max-width: 34ch; margin-top: var(--sp-4); }
.footer__col h4 {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--violet-300);
  margin-bottom: var(--sp-4);
}
.footer__col li { margin-bottom: var(--sp-1); }
.footer__col a,
.footer__col span {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 36px;
  font-size: 0.92rem;
  color: var(--text-secondary);
}
.footer__col a:hover { color: var(--violet-200); }
.footer__col svg { width: 16px; height: 16px; flex: none; color: var(--violet-300); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  justify-content: space-between;
  align-items: center;
  padding-top: var(--sp-6);
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer__tagline {
  font-family: var(--font-display);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--violet-300);
}

@media (max-width: 860px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--sp-8) var(--sp-4); }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer__grid { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   14. Page header (inner pages)
   -------------------------------------------------------------------------- */
.page-head {
  padding-block: clamp(2.5rem, 7vw, 5rem) clamp(1.5rem, 4vw, 3rem);
  border-bottom: 1px solid var(--border);
}
.page-head h1 { max-width: 18ch; }
.page-head p { font-size: clamp(1rem, 2vw, 1.15rem); max-width: 62ch; margin-bottom: 0; }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: var(--sp-4);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--violet-300); }
.breadcrumb li { display: flex; align-items: center; gap: var(--sp-2); }
.breadcrumb li + li::before { content: '/'; color: var(--border-brand); }

/* Split content block (image/text or list/text) */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.split > * { min-width: 0; }

/* Service detail block */
.service-block { scroll-margin-top: 100px; }
.service-block + .service-block { margin-top: clamp(2rem, 5vw, 3.5rem); }

/* --------------------------------------------------------------------------
   14b. Interactive grading desk
   -------------------------------------------------------------------------- */
.desk {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}

.desk__scene {
  padding: var(--sp-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(154, 107, 255, 0.09), rgba(7, 6, 13, 0.55));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.desk-svg {
  --ink: #cfc6ec;
  --ink-dim: #6f6791;
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  overflow: hidden;
}

.desk-svg .ln {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.desk-svg .ln--thick { stroke-width: 5; }
.desk-svg .ln--thin { fill: none; stroke-width: 1.6; stroke: var(--ink-dim); }
.desk-svg .ln--bright { stroke: var(--violet-200); }
.desk-svg .fill-soft { fill: rgba(154, 107, 255, 0.14); }
.desk-svg .fill-deep { fill: rgba(27, 13, 58, 0.85); }
.desk-svg .shadow { fill: rgba(0, 0, 0, 0.55); }

/* The UV cone brightens only while the lamp is the selected tool. */
.desk-svg .uv-cone {
  opacity: 0.14;
  transition: opacity 320ms var(--ease-out);
}
.desk-svg.is-uv .uv-cone { opacity: 0.6; }

.tool {
  cursor: pointer;
  opacity: 0.72;
  transition: opacity var(--dur) var(--ease-out), filter var(--dur) var(--ease-out);
}
.tool:hover { opacity: 0.92; }
.tool.is-active {
  opacity: 1;
  filter: drop-shadow(0 0 14px rgba(154, 107, 255, 0.5));
}
.tool__hit { fill: transparent; }

.tool__badge circle {
  fill: rgba(124, 58, 237, 0.28);
  stroke: var(--border-brand);
  stroke-width: 1.5;
  transition: fill var(--dur) var(--ease-out), stroke var(--dur) var(--ease-out);
}
.tool__badge text {
  fill: var(--violet-100);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
}
.tool.is-active .tool__badge circle {
  fill: var(--violet-500);
  stroke: var(--violet-200);
}

/* Chip row — the accessible control for the illustration */
.tool-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}
.tool-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 44px;
  padding: 0 var(--sp-4);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease-out),
              background-color var(--dur) var(--ease-out),
              color var(--dur) var(--ease-out);
}
.tool-chip:hover { border-color: var(--border-brand); color: var(--text); }
.tool-chip[aria-pressed='true'] {
  background: rgba(124, 58, 237, 0.2);
  border-color: var(--violet-400);
  color: var(--violet-100);
}
.tool-chip__num {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.7rem;
  font-weight: 700;
}
.tool-chip[aria-pressed='true'] .tool-chip__num { background: var(--violet-500); color: #fff; }

.tool-info { position: sticky; top: 100px; }
.tool-info h3 { margin-bottom: var(--sp-1); }
.tool-info__role {
  display: block;
  font-size: 0.9rem;
  color: var(--violet-300);
  margin-bottom: var(--sp-4);
}
.tool-info h4 {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: var(--sp-6) 0 var(--sp-3);
}

@media (max-width: 940px) {
  .desk { grid-template-columns: 1fr; }
  .tool-info { position: static; }
}
@media (max-width: 620px) {
  .desk__scene { padding: var(--sp-2); }
  .tool-chip { padding: 0 var(--sp-3); font-size: 0.84rem; }
}

/* --------------------------------------------------------------------------
   14c. Accent system
   Every accent is opt-in via [data-accent]. Colour is only ever applied to
   small surfaces — icons, 1px hairlines, chips, borders — never to large
   fills, which is what keeps a dark page from glowing.
   -------------------------------------------------------------------------- */
[data-accent] {
  --accent: var(--a-violet);
  --accent-soft: rgba(183, 148, 255, 0.13);
  --accent-line: rgba(183, 148, 255, 0.32);
  --accent-sheen: rgba(183, 148, 255, 0.12);
}
[data-accent='gold']    { --accent: var(--a-gold);    --accent-soft: rgba(226, 179, 85, 0.13);  --accent-line: rgba(226, 179, 85, 0.34);  --accent-sheen: rgba(226, 179, 85, 0.13); }
[data-accent='cyan']    { --accent: var(--a-cyan);    --accent-soft: rgba(79, 209, 197, 0.12);  --accent-line: rgba(79, 209, 197, 0.32);  --accent-sheen: rgba(79, 209, 197, 0.12); }
[data-accent='rose']    { --accent: var(--a-rose);    --accent-soft: rgba(239, 143, 184, 0.12); --accent-line: rgba(239, 143, 184, 0.32); --accent-sheen: rgba(239, 143, 184, 0.12); }
[data-accent='amber']   { --accent: var(--a-amber);   --accent-soft: rgba(240, 163, 94, 0.12);  --accent-line: rgba(240, 163, 94, 0.32);  --accent-sheen: rgba(240, 163, 94, 0.12); }
[data-accent='sky']     { --accent: var(--a-sky);     --accent-soft: rgba(124, 189, 247, 0.12); --accent-line: rgba(124, 189, 247, 0.32); --accent-sheen: rgba(124, 189, 247, 0.12); }
[data-accent='emerald'] { --accent: var(--a-emerald); --accent-soft: rgba(92, 214, 160, 0.12);  --accent-line: rgba(92, 214, 160, 0.32);  --accent-sheen: rgba(92, 214, 160, 0.12); }
[data-accent='indigo']  { --accent: var(--a-indigo);  --accent-soft: rgba(152, 163, 255, 0.13); --accent-line: rgba(152, 163, 255, 0.32); --accent-sheen: rgba(152, 163, 255, 0.13); }

/* Icons and eyebrows pick the accent up automatically. */
[data-accent] .card__icon {
  color: var(--accent);
  border-color: var(--accent-line);
  background: linear-gradient(150deg, var(--accent-soft), rgba(255, 255, 255, 0.02));
}
[data-accent] .card__meta,
[data-accent] .eyebrow { color: var(--accent); }
[data-accent] .eyebrow::before,
[data-accent] .eyebrow::after { background: linear-gradient(90deg, transparent, var(--accent)); }
[data-accent] .check-list svg { color: var(--accent); }

/* Registration hairline across the top of an accented card. */
.card[data-accent] { overflow: hidden; }
.card[data-accent]::before {
  content: '';
  position: absolute;
  top: 0;
  left: 26%;
  right: 26%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.55;
  transition: left 420ms var(--ease-out), right 420ms var(--ease-out), opacity 420ms var(--ease-out);
}
.card[data-accent]:hover::before { left: 0; right: 0; opacity: 1; }

/* Foil sheen sweeping the card on hover — the collectible-holo motif. */
.card[data-accent]::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, var(--accent-sheen) 50%, transparent 62%);
  background-size: 260% 100%;
  background-position: 130% 0;
  opacity: 0;
  transition: opacity 260ms var(--ease-out), background-position 900ms var(--ease-out);
}
.card[data-accent]:hover::after { opacity: 1; background-position: -30% 0; }
.card[data-accent]:hover { border-color: var(--accent-line); }

/* Iridescent headline. Reads as chrome first, colour second. */
.text-holo {
  background: linear-gradient(100deg,
    #ffffff 0%, #d6c4ff 18%, #f3d9a4 32%, #b794ff 46%,
    #9fe6df 60%, #d6c4ff 74%, #ffffff 88%, #b794ff 100%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: holoText 14s ease-in-out infinite;
}
@keyframes holoText {
  0%, 100% { background-position: 0% 0; }
  50%      { background-position: 100% 0; }
}

/* Grade chips coloured by tier, so the scale reads as a gradient of quality. */
.grade-chip[data-tier='gem']  { color: #f5dfae; border-color: rgba(226, 179, 85, 0.5);  background: rgba(226, 179, 85, 0.17); }
.grade-chip[data-tier='mint'] { color: var(--violet-100); border-color: rgba(183, 148, 255, 0.45); background: rgba(124, 58, 237, 0.2); }
.grade-chip[data-tier='near'] { color: #bfeae5; border-color: rgba(79, 209, 197, 0.4);  background: rgba(79, 209, 197, 0.13); }
.grade-chip[data-tier='mid']  { color: #cfe2f7; border-color: rgba(124, 189, 247, 0.34); background: rgba(124, 189, 247, 0.1); }
.grade-chip[data-tier='low']  { color: var(--text-secondary); border-color: var(--border); background: rgba(255, 255, 255, 0.04); }

/* Counters: one accent each, so the row is not four identical numbers. */
.counter[data-accent] .counter__value {
  background: linear-gradient(180deg, #ffffff 0%, color-mix(in srgb, var(--accent) 65%, #ffffff) 42%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.counter[data-accent] { border-top: 2px solid transparent; border-image: linear-gradient(90deg, var(--accent), transparent) 1; }

/* Corner registration marks on the two "instrument panel" surfaces. */
.verify-panel, .cta-band { position: relative; }
.verify-panel::before, .verify-panel::after,
.cta-band::before, .cta-band::after {
  content: '';
  position: absolute;
  width: 26px;
  height: 26px;
  pointer-events: none;
  opacity: 0.5;
}
.verify-panel::before, .cta-band::before {
  top: 12px; left: 12px;
  border-top: 1px solid var(--a-gold);
  border-left: 1px solid var(--a-gold);
  border-top-left-radius: 6px;
}
.verify-panel::after, .cta-band::after {
  bottom: 12px; right: 12px;
  border-bottom: 1px solid var(--a-cyan);
  border-right: 1px solid var(--a-cyan);
  border-bottom-right-radius: 6px;
}

/* Iridescent rule above the footer and under sticky headers. */
.site-footer { border-top: 0; }
.site-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent, rgba(226, 179, 85, 0.5) 22%, rgba(183, 148, 255, 0.6) 50%,
    rgba(79, 209, 197, 0.5) 78%, transparent);
}
.site-header.is-stuck { border-bottom-color: transparent; }
.site-header.is-stuck::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent, rgba(226, 179, 85, 0.35) 25%, rgba(183, 148, 255, 0.5) 50%,
    rgba(79, 209, 197, 0.35) 75%, transparent);
}

/* Category tags carry their section's hue on the services jump row. */
.tag[data-accent] {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}
.tag[data-accent]:hover { color: var(--accent); background: color-mix(in srgb, var(--accent) 20%, transparent); }

/* Process steps and the timeline run through the palette in order, so the
   journey reads as progress rather than seven identical bullets. */
.steps > .step:nth-child(1) { --dot: var(--a-violet); }
.steps > .step:nth-child(2) { --dot: var(--a-sky); }
.steps > .step:nth-child(3) { --dot: var(--a-cyan); }
.steps > .step:nth-child(4) { --dot: var(--a-emerald); }
.steps > .step:nth-child(5) { --dot: var(--a-gold); }

.timeline > .timeline__item:nth-child(1) { --dot: var(--a-violet); }
.timeline > .timeline__item:nth-child(2) { --dot: var(--a-indigo); }
.timeline > .timeline__item:nth-child(3) { --dot: var(--a-sky); }
.timeline > .timeline__item:nth-child(4) { --dot: var(--a-cyan); }
.timeline > .timeline__item:nth-child(5) { --dot: var(--a-emerald); }
.timeline > .timeline__item:nth-child(6) { --dot: var(--a-gold); }
.timeline > .timeline__item:nth-child(7) { --dot: var(--a-amber); }

.step__num,
.timeline__dot {
  color: var(--dot, var(--violet-200));
  border-color: color-mix(in srgb, var(--dot, var(--a-violet)) 42%, transparent);
  background: color-mix(in srgb, var(--dot, var(--a-violet)) 14%, var(--bg-elevated));
}
.step:hover { border-color: color-mix(in srgb, var(--dot, var(--a-violet)) 34%, transparent); }

.timeline::before {
  background: linear-gradient(180deg,
    var(--a-violet), var(--a-sky) 30%, var(--a-cyan) 48%,
    var(--a-emerald) 66%, var(--a-gold) 84%, rgba(240, 163, 94, 0.15));
  opacity: 0.55;
}

/* Page-head tint: each page opens on its own hue. */
.page-head[data-accent] {
  background:
    radial-gradient(50rem 22rem at 6% -30%, var(--accent-soft), transparent 68%);
  border-bottom-color: var(--accent-line);
}

/* --------------------------------------------------------------------------
   14d. Authentication atmosphere — v1 signature
   A slowly rotating guilloché certification seal (the "authenticated" emblem
   engine-turned like a passport stamp) watermarks the hero and every footer,
   and a periodic light bar scans the stat band. These give the dark build a
   mood of its own, distinct from the light "Archive" edition. Ambient only —
   no text or feature is touched, and reduced-motion freezes all of it.
   -------------------------------------------------------------------------- */
@keyframes sealSpin { to { rotate: 360deg; } }

/* Signature: the seal turning behind the hero, around the graded slab. */
.hero { isolation: isolate; }
.hero::before {
  content: '';
  position: absolute;
  z-index: 0;
  top: 46%;
  right: -8%;
  width: min(52vw, 660px);
  aspect-ratio: 1;
  translate: 0 -50%;
  background: url("../img/seal.svg") center / contain no-repeat;
  opacity: 0.13;
  mix-blend-mode: screen;
  animation: sealSpin 120s linear infinite;
  will-change: rotate;
  pointer-events: none;
}

/* Echo: a faint seal in the corner of the footer, so the emblem recurs on
   every page even where there is no hero. */
.site-footer { overflow: hidden; }
.site-footer > * { position: relative; z-index: 1; }
.site-footer::after {
  content: '';
  position: absolute;
  z-index: 0;
  bottom: -150px;
  right: -110px;
  width: 400px;
  height: 400px;
  background: url("../img/seal.svg") center / contain no-repeat;
  opacity: 0.06;
  mix-blend-mode: screen;
  animation: sealSpin 200s linear infinite;
  will-change: rotate;
  pointer-events: none;
}

/* Inner pages get the emblem beside their title. */
.page-head { position: relative; overflow: hidden; isolation: isolate; }
.page-head > * { position: relative; z-index: 1; }
.page-head::after {
  content: '';
  position: absolute;
  z-index: 0;
  top: 50%;
  right: -130px;
  width: 340px;
  height: 340px;
  translate: 0 -50%;
  background: url("../img/seal.svg") center / contain no-repeat;
  opacity: 0.08;
  mix-blend-mode: screen;
  animation: sealSpin 150s linear infinite;
  will-change: rotate;
  pointer-events: none;
}

/* A slow light bar sweeps the stat band — an "authentication scan". */
.counters { position: relative; }
.counters::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(105deg,
    transparent 42%, rgba(214, 196, 255, 0.12) 50%, transparent 58%);
  background-size: 300% 100%;
  background-position: 130% 0;
  mix-blend-mode: screen;
  animation: scanSweep 9s ease-in-out infinite;
}
@keyframes scanSweep {
  0%        { background-position: 130% 0; }
  60%, 100% { background-position: -30% 0; }
}

@media (max-width: 720px) {
  .hero::before { opacity: 0.08; width: 90vw; right: -20%; }
}

/* --------------------------------------------------------------------------
   15. Scroll reveal
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   16. Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  /* The hero slab, its loupe and the holo sweep all fall back to the base
     values declared alongside their animations, so nothing needs resetting
     here — the slab simply holds a static three-quarter pose. */
}

/* --------------------------------------------------------------------------
   17. Print (certificate lookup)
   -------------------------------------------------------------------------- */
@media print {
  body { background: #fff; color: #000; }
  body::before, .silk-bg, .grain, .hero::before, .page-head::after, .counters::after, .site-header, .site-footer, .verify-form, .cta-band { display: none !important; }
  .cert { border: 1px solid #333; box-shadow: none; background: #fff; }
  .cert__grade-value, .stats__value, .brand__name { color: #000 !important; -webkit-text-fill-color: #000 !important; }
  h1, h2, h3, .cert__title, .cert__spec dd { color: #000; }
}
