/* =============================================================
   Velon Energy — Stylesheet
   Engineering-grade editorial. Midnight + copper palette.
   ============================================================= */

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img, svg, video { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---- Design tokens ---- */
:root {
  /* Colour system */
  --ink:        #0b1118;   /* deep midnight, near-black with cool tint */
  --ink-2:      #111a25;   /* one step lighter for surfaces */
  --ink-3:      #18222f;   /* card surfaces on dark */
  --line:       rgba(255,255,255,0.08);
  --line-2:     rgba(255,255,255,0.14);

  --paper:      #f5f2ec;   /* warm off-white */
  --paper-2:    #ebe6dc;   /* one step warmer */
  --paper-line: rgba(11,17,24,0.10);

  --copper:     #c97b3d;   /* primary accent — transformer copper */
  --copper-hi:  #e9a566;   /* lighter copper for hovers */
  --copper-dk:  #8a4f23;   /* deep copper for shadows */

  --signal:     #5dd2a6;   /* secondary accent — instrument signal green */

  --text:       #e8e5df;   /* body text on dark */
  --text-mute:  rgba(232,229,223,0.66);
  --text-dim:   rgba(232,229,223,0.58);

  --text-d:     #1a2230;   /* body text on light */
  --text-d-mute: rgba(26,34,48,0.65);
  --text-d-dim:  rgba(26,34,48,0.65);

  /* Type scale */
  --font-display: 'Geist', 'Geist Fallback', system-ui, -apple-system, sans-serif;
  --font-sans:    'Geist', 'Geist Fallback', system-ui, -apple-system, sans-serif;
  --font-mono:    'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Spacing & radii */
  --radius: 6px;
  --radius-lg: 14px;
  --container: 1320px;
  --gutter: clamp(20px, 4vw, 56px);

  /* Motion */
  --ease: cubic-bezier(0.2, 0.65, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);  /* long, soft settle for entrances */
}

/* ---- Base ---- */
html, body { background: var(--ink); color: var(--text); }
.nowrap { white-space: nowrap; }
/* Visible to screen readers only */
.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; }
body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Selection */
::selection { background: var(--copper); color: var(--ink); }

/* Focus ring */
:focus-visible {
  outline: 2px solid var(--copper-hi);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- Container ---- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

/* ---- Type primitives ---- */
.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--copper-hi);
  margin-bottom: 28px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.section-label::before {
  content: '';
  width: 22px; height: 1px;
  background: var(--copper);
}

/* Geist has no italic cut: <em> in headings is carried by colour, not slant */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.06;
  color: var(--text);
  text-wrap: balance;
}
.section-white h1, .section-white h2, .section-white h3, .section-white h4 { color: var(--text-d); }

h1 { font-size: clamp(40px, 6.6vw, 92px); letter-spacing: -0.035em; }
h2 { font-size: clamp(32px, 4.2vw, 56px); }
h3 { font-size: clamp(22px, 2.3vw, 30px); letter-spacing: -0.025em; }
h4 { font-size: clamp(19px, 1.5vw, 22px); letter-spacing: -0.02em; }
:is(.aud-card, .cap, .cap-cell, .case-pillar, .cons-app, .conv-card, .engine-step, .fail, .fault-card, .mod-card, .out-card,
    .principle, .proc-step, .ptx-ctx, .scope-item, .sw-steps, .tmx-detail, .vcard, .vendor-card) h3 { letter-spacing: -0.02em; }
@media (max-width: 379px) { h2 { font-size: 27px; } }
@media (max-width: 339px) { h2 { font-size: 24px; } }

.lede {
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.55;
  color: var(--text-mute);
  max-width: 39.6em;
  font-weight: 300;
}
.section-white .lede { color: var(--text-d-mute); }

/* No italic cut in Geist: emphasis never uses a faux-slanted face */
em { font-style: normal; }
.lede em { color: var(--text); }
.section-white .lede em { color: var(--text-d); }

/* Mono accent for inline tech terms */
.mono, code, kbd, samp { font-family: var(--font-mono); font-size: 0.92em; }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 80;
  background: rgba(11,17,24,0.94);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.6s;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 78px;
}
.logo { display: flex; align-items: center; }
.logo img { height: 28px; width: auto; }

html { scrollbar-gutter: stable; }

.menu-btn {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text);
  padding: 10px 16px; border: 1px solid var(--line-2);
  border-radius: 999px;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), background 0.3s var(--ease);
}
.menu-btn:hover { border-color: var(--copper); color: var(--copper-hi); }
.menu-btn .bars { display: inline-flex; flex-direction: column; gap: 4px; }
.menu-btn .bars span { display: block; width: 18px; height: 1.5px; background: currentColor; }

/* ---- Header tools + language switcher (all pages) ---- */
.header-tools { display: inline-flex; align-items: center; gap: 10px; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.06em;
  color: var(--text-mute);
  padding: 10px 15px; border: 1px solid var(--line-2);
  border-radius: 999px;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
  white-space: nowrap;
}
.lang-btn:hover { border-color: var(--copper); color: var(--copper-hi); }
.lang-btn svg { display: block; flex: 0 0 auto; }
.lang-btn span { line-height: 1; }

/* ---- Nav overlay ---- */
.nav-overlay {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 100;
  height: 100%; height: 100dvh;
  background: var(--ink);
  display: grid; grid-template-rows: auto 1fr auto;
  padding: 28px var(--gutter) 40px;
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  transform: translateY(-101%); visibility: hidden;
  transition: transform 0.55s var(--ease), visibility 0s linear 0.55s;
}
.nav-overlay.open { transform: translateY(0); visibility: visible; transition: transform 0.55s var(--ease); }
/* keep the cookie banner out of the way while the menu is open */
html.menu-open #velon-consent { display: none !important; }
.nav-top { display: flex; justify-content: space-between; align-items: center; }
.nav-close {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 16px; border: 1px solid var(--line-2); border-radius: 999px;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.nav-close:hover { border-color: var(--copper); color: var(--copper-hi); }
.nav-close .x { font-family: var(--font-sans); font-size: 18px; line-height: 1; }

.nav-main {
  align-self: center;
  display: grid; grid-template-columns: 1fr; gap: 4px;
  max-width: var(--container); margin: 0 auto; width: 100%;
}
.nav-main li { border-top: 1px solid var(--line); }
.nav-main li:last-child { border-bottom: 1px solid var(--line); }
.nav-main a {
  display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 28px;
  padding: 18px 4px;
  font-family: var(--font-display);
  font-size: clamp(23px, 3.6vw, 45px); line-height: 1; letter-spacing: -0.03em;
  color: var(--text);
  transition: color 0.4s var(--ease), padding-left 0.4s var(--ease);
}
.nav-main a .num {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.15em;
  color: var(--text-dim); font-weight: 500; text-transform: uppercase;
}
.nav-main a .arrow {
  font-family: var(--font-sans);
  font-size: 28px; color: var(--text-dim);
  transform: translateX(-12px); opacity: 0;
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease), color 0.4s var(--ease);
}
.nav-main a:hover { color: var(--copper-hi); padding-left: 14px; }
.nav-main a:hover .arrow { transform: translateX(0); opacity: 1; color: var(--copper-hi); }
html[dir="rtl"] .nav-main a:hover { padding-left: 0; padding-right: 14px; }
html[dir="rtl"] .nav-main a .arrow { transform: scaleX(-1) translateX(-12px); }
html[dir="rtl"] .nav-main a:hover .arrow { transform: scaleX(-1); }
.nav-main a.is-current { color: var(--copper-hi); }
.nav-main a.is-current .num { color: var(--copper-hi); }
.nav-main a.is-current .num::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-inline-end: 8px; border-radius: 50%; background: currentColor; vertical-align: 1px; }
/* short screens (small phones, browser bars, landscape): tighter rows so every link fits */
@media (max-height: 720px) {
  .nav-overlay { padding-top: 18px; padding-bottom: 24px; }
  .nav-main a { padding: 13px 4px; font-size: clamp(21px, 3.2vw, 34px); }
}
@media (max-height: 480px) {
  .nav-main { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(4, auto); grid-auto-flow: column; column-gap: 28px; align-self: start; margin-top: 14px; }
  .nav-main li:nth-child(4) { border-bottom: 1px solid var(--line); }
  .nav-main a { padding: 10px 4px; font-size: 19px; grid-template-columns: 34px 1fr auto; gap: 14px; }
}

/* ---- Sections ---- */
.section { padding: clamp(64px, 9.5vw, 124px) 0; position: relative; }
.section-white { background: var(--paper); color: var(--text-d); }
.section-white .eyebrow,
.section-white .section-label { color: var(--copper-dk); }
.section-white .section-label::before { background: var(--copper-dk); }
.section-white .lede { color: var(--text-d-mute); }

/* ---- Hero ---- */
.hero {
  position: relative;
  padding: clamp(80px, 12vw, 160px) 0 clamp(60px, 8vw, 110px);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

/* Hero visual */

/* ---- Pillars ---- */

/* ---- Capabilities grid ---- */
/* 2x2 variant for four-item grids (about: Four principles) */

.cap {
  background: var(--paper);
  padding: clamp(28px, 3vw, 44px);
  display: flex; flex-direction: column; gap: 14px;
  transition: background 0.3s var(--ease);
}
.cap:hover { background: var(--paper-2); }
.cap h3 { color: var(--text-d); margin-bottom: 4px; font-size: clamp(19px, 1.5vw, 22px); }
.cap p { color: var(--text-d-mute); font-size: 15.5px; line-height: 1.6; }
.cap ul { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.cap ul li {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em;
  color: var(--text-d-mute); padding-left: 16px; position: relative;
}
.cap ul li::before {
  content: ''; position: absolute; left: 0; top: 0.7em;
  width: 6px; height: 1px; background: var(--copper-dk);
}

/* ---- Credentials strip ---- */

/* ---- CTA / Contact panel ---- */
.cta {
  padding: clamp(80px, 10vw, 140px) 0;
  background: var(--paper);
  color: var(--text-d);
  position: relative;
  overflow: hidden;
}
.cta::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(60% 80% at 90% 100%, rgba(201,123,61,0.10), transparent 60%);
  pointer-events: none;
}
.cta h2 { color: var(--text-d); }
.cta h2 em { font-style: normal; color: var(--copper-dk); }
.cta .section-label { color: var(--copper-dk); }
.cta p { color: var(--text-d-mute); margin-top: 18px; max-width: 33em; }

/* ---- Button ---- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 24px;
  border-radius: 999px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  border: 1px solid currentColor;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
/* the email address is the longest button label: tighten it on very small phones so it never runs off screen */
@media (max-width: 380px) { .btn[href^="mailto:"] { letter-spacing: 0.06em; padding-inline: 18px; gap: 8px; } }
.btn-primary {
  background: var(--copper); color: var(--ink); border-color: var(--copper);
}
.btn-primary:hover { background: var(--copper-hi); border-color: var(--copper-hi); }
.btn-ghost { color: currentColor; }
.btn-ghost:hover { background: var(--copper); color: var(--ink); border-color: var(--copper); }

/* ---- Breadcrumb ---- */
.breadcrumb {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--text-dim);
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin-bottom: 32px;
}
.breadcrumb a { display: inline-block; padding-block: 3px; color: var(--text-mute); transition: color 0.3s var(--ease); }
.breadcrumb a:hover { color: var(--copper-hi); }
.breadcrumb .sep { color: var(--copper); }

/* ---- Inner page hero ---- */
.page-hero {
  padding: clamp(60px, 9vw, 130px) 0 clamp(40px, 6vw, 80px);
  border-bottom: 1px solid var(--line);
}
.page-hero-grid {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(30px, 5vw, 80px);
  align-items: end;
}
.page-hero h1 { font-size: clamp(34px, 4.8vw, 64px); }
.page-hero .lede { color: var(--text-mute); }

/* ---- About: story + registered details ---- */

/* ---- Service rows (consultancy / training pages) ---- */

/* Dark variant of service row */

/* ---- AI / agentic workflow visual ---- */
.workflow {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(28px, 3vw, 48px);
  background: linear-gradient(180deg, var(--ink-2), var(--ink));
  position: relative; overflow: hidden;
}

/* ---- Locations / contact ---- */
.locations {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  background: var(--paper-line);
  margin-top: clamp(40px, 6vw, 70px);
  border: 1px solid var(--paper-line);
}
.location {
  background: var(--paper);
  padding: clamp(32px, 4vw, 50px);
}
.location h3 { font-size: 27px; margin-bottom: 14px; color: var(--text-d); }
.location p { font-size: 16px; color: var(--text-d-mute); line-height: 1.7; }

/* ---- Form ---- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 720px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--text-d-mute);
}
.field input, .field textarea, .field select {
  width: 100%;
  padding: 14px 16px;
  background: transparent;
  border: 1px solid var(--paper-line);
  border-radius: var(--radius);
  font: inherit; color: var(--text-d);
  transition: border-color 0.3s var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--copper);
}
.field textarea { min-height: 160px; resize: vertical; }

/* ---- Footer ---- */
.site-footer {
  background: var(--ink);
  border-top: 1px solid var(--line);
  padding: clamp(44px, 5vw, 72px) 0 28px;
  color: var(--text-mute);
}
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 50px;
  margin-bottom: 44px;
}
.footer-brand .ft-logo { height: 32px; width: auto; margin-bottom: 22px; }
.footer-brand p {
  font-size: 14px; max-width: 23.8em; color: var(--text-mute);
}
.footer-col h5,
.footer-col .footer-title {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--text-dim);
  margin-bottom: 22px; font-weight: 500;
}
.footer-col ul { display: flex; flex-direction: column; gap: 12px; }
.footer-col a {
  font-size: 14px; color: var(--text); transition: color 0.3s var(--ease);
  display: inline-flex; align-items: center; gap: 8px;
}
.footer-col a { min-height: 24px; }
.footer-col a:hover { color: var(--copper-hi); }
.footer-col a::after {
  content: '→'; font-family: var(--font-sans); opacity: 0;
  transform: translateX(-6px); transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.footer-col a:hover::after { opacity: 1; transform: translateX(0); }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 26px; border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--text-dim);
  flex-wrap: wrap; gap: 14px;
}
.footer-bottom a { color: var(--text-mute); transition: color 0.3s var(--ease); }
.footer-bottom a:hover { color: var(--copper-hi); }

/* ---- Reveal animation ---- */
.reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out);
}
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.7); }
}

/* SVG animation: line draw */

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

/* Hero diagram pulses */
@keyframes flow {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -40; }
}

/* ---- Article / long-form ---- */
.prose { max-width: 46.2em; }
.prose p { color: var(--text-d-mute); margin-bottom: 18px; font-size: 17px; line-height: 1.75; }
.prose h2 { margin-top: 56px; margin-bottom: 22px; color: var(--text-d); }
.prose h3 { margin-top: 36px; margin-bottom: 14px; color: var(--text-d); }
.prose ul { padding-left: 22px; margin-bottom: 22px; color: var(--text-d-mute); }
.prose ul li { list-style: disc; margin-bottom: 8px; }
.prose strong { color: var(--text-d); font-weight: 600; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .page-hero-grid { grid-template-columns: 1fr; }
  .locations { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .header-inner { height: 64px; }
  .logo img { height: 24px; }
  .menu-btn { padding: 8px 14px; font-size: 11px; }
  .menu-btn .label { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px 20px; }   /* link lists side by side, so the footer stays short */
  .footer-brand { grid-column: 1 / -1; }
  .footer-col h5, .footer-col .footer-title { margin-bottom: 16px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* Reduced motion: calm, not off. Content still fades in and builds in sequence (consoles
   type, figures step, lines draw); what goes is travel and pulsing: slides, sweeps, drifting loops. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  .reveal { transform: none !important; transition-property: opacity !important; }
  html .nav-overlay { transform: none; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0s linear 0.3s; }
  html .nav-overlay.open { opacity: 1; visibility: visible; transition: opacity 0.3s ease; }
  .scroll-hint .sh-line::after, .dot-blink, .hero-eyebrow .dot, .wf-tag::before, .hll-dot, .live-ring, .live-scan,
  .wf-step .wf-status::before, .wf-head .wf-h-r::before, .canvas-toolbar .ct-r::before, .flow-pulse,
  .wb-bubble.wb-watch .wb-halo, .th-live, .th-step.th-gate.on, .ba-pipe b, .nrtk .parr { animation: none !important; }
  .cons-panel.active, .trn-panel.active, .sub-panel, .nrtk .view, .an-panel.sw { animation-name: rmFade !important; }
}
@keyframes rmFade { from { opacity: 0; } to { opacity: 1; } }

/* ===== Four-stream layout additions ===== */
.streams {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  background: var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: clamp(50px, 7vw, 90px);
}
.stream {
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--ink);
  padding: clamp(28px, 3.5vw, 50px);
  min-height: clamp(320px, 32vw, 420px);
  position: relative;
  transition: background 0.4s var(--ease);
  overflow: hidden;
}
.stream:hover { background: var(--ink-2); }
.stream h3 { margin-top: 18px; margin-bottom: 16px; font-size: clamp(25px, 2.1vw, 32px); }
.stream p { color: var(--text-mute); font-size: 16px; max-width: 27.7em; }

/* Principles / "How we work" row */
.principles {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--paper-line);
  border-top: 1px solid var(--paper-line);
  border-bottom: 1px solid var(--paper-line);
  margin-top: clamp(40px, 6vw, 70px);
}

/* Selected work cards (homepage proof points) */

@media (max-width: 1024px) {
  .streams { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr; }
}

/* ===== Full-bleed animated hero ===== */

/* ===== Physics-aware AI Workflows page ===== */

/* What this does — three cards */

/* QMerse 3-column adaptation */

/* Interactive workflow canvas */

/* Audit panel below the canvas */

/* DER service stack for Stability Potential */

/* Trust signals */

/* Use case grid */

/* ===== AI page v2 — visual-led ===== */

/* Section labels for visual placeholders */

/* Compressed close section */

@keyframes sgln{from{opacity:0;transform:translateX(-4px)}to{opacity:1;transform:none}}

/* "All work →" style link under a section's cards */
.all-link-row { margin-top: clamp(28px, 3vw, 40px); }
.all-link {
  display: inline-flex; align-items: center; gap: 10px; padding-bottom: 5px;
  border-bottom: 1px solid var(--line-2);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-mute); transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.all-link:hover { color: var(--copper-hi); border-color: var(--copper); }
.section-white .all-link { color: var(--text-d-mute); border-color: var(--paper-line); }
.section-white .all-link:hover { color: var(--copper-dk); border-color: var(--copper-dk); }

/* direct-email line under a closing call to action */

/* ---------- More work: onward links at the end of a case study ---------- */

/* ---- Paper sections: content-led sections ([data-tone="paper"]) sit on warm paper, the rest of the page stays
   dark. The colours are fixed (no change while scrolling), so the light/dark rhythm reads the same every time.
   Tokens outside a paper section fall back to the dark palette; cards inside stay dark. ---- */
@property --tp-bg   { syntax: '<color>'; inherits: true; initial-value: #0b1118; }
@property --tp-ink  { syntax: '<color>'; inherits: true; initial-value: #e8e5df; }
@property --tp-mute { syntax: '<color>'; inherits: true; initial-value: rgba(232,229,223,0.66); }
@property --tp-dim  { syntax: '<color>'; inherits: true; initial-value: rgba(232,229,223,0.58); }
@property --tp-acc  { syntax: '<color>'; inherits: true; initial-value: #e9a566; }
@property --tp-line { syntax: '<color>'; inherits: true; initial-value: rgba(255,255,255,0.14); }
@property --tp-grid { syntax: '<color>'; inherits: true; initial-value: rgba(255,255,255,0.025); }
@property --tp-ok   { syntax: '<color>'; inherits: true; initial-value: #5dd2a6; }
@property --tp-lift { syntax: '<color>'; inherits: true; initial-value: rgba(11,17,24,0); }
@property --tp-card { syntax: '<color>'; inherits: true; initial-value: rgba(255,255,255,0.02); }
[data-tone="paper"] {
  --tp-bg: #f2eee6; --tp-ink: #1a2230; --tp-mute: rgba(26,34,48,0.78); --tp-dim: rgba(26,34,48,0.72);
  --tp-acc: #9a521c; --tp-line: rgba(11,17,24,0.18); --tp-grid: rgba(11,17,24,0.05); --tp-ok: #0f6e4e; --tp-lift: rgba(11,17,24,0.5); --tp-card: rgba(255,255,255,0.55);
  background-color: var(--tp-bg);
}
html [data-tone="paper"] :is(.section-label, .app-eyebrow), .cta-v2[data-tone] .section-label { color: var(--tp-acc); }
html [data-tone="paper"] :is(.section-label, .app-eyebrow)::before, .cta-v2[data-tone] .section-label::before { background: var(--tp-acc); }
html [data-tone="paper"] h2, .cta-v2[data-tone] h2 { color: var(--tp-ink); }
html [data-tone="paper"] h2 em, .cta-v2[data-tone] h2 em { color: var(--tp-acc); }
[data-tone="paper"] .lede, .cta-v2[data-tone] .lede { color: var(--tp-mute); }
[data-tone="paper"] .lede em { color: var(--tp-ink); }

/* Centred closing call (any page); inside a paper zone it follows the tone tokens */
.cta-c { position: relative; padding: clamp(80px, 10vw, 140px) 0; text-align: center; }
.cta-c .section-label { justify-content: center; }
.cta-c h2 { font-size: clamp(34px, 4.6vw, 64px); line-height: 1.04; letter-spacing: -0.03em; color: var(--tp-ink); margin: 0 auto; max-width: 14em; text-wrap: balance; }
.cta-c h2 em { font-style: normal; color: var(--tp-acc); }
.cta-c-actions { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.cta-c .btn-ghost:not(:hover) { color: var(--tp-ink); border-color: var(--tp-line); }

/* "Up next": a full-width link to the next page in the menu, just above the footer */
.up-next { display: block; position: relative; overflow: hidden; text-decoration: none; color: var(--text);
  background: var(--ink-2); border-top: 1px solid var(--line); }
.up-next::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(201,123,61,0.18), rgba(201,123,61,0.04));
  transform: scaleX(0); transform-origin: left; transition: transform 0.6s var(--ease); }
html[dir="rtl"] .up-next::before { transform-origin: right; background: linear-gradient(270deg, rgba(201,123,61,0.18), rgba(201,123,61,0.04)); }
.up-next:hover::before, .up-next:focus-visible::before { transform: scaleX(1); }
.up-next:focus-visible { outline: 2px solid var(--copper-hi); outline-offset: -4px; }
.un-in { position: relative; display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); padding-block: clamp(34px, 5vw, 64px); }
.un-k { flex: none; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--copper-hi); }
.un-t { flex: 1; min-width: 0; font-family: var(--font-display); font-weight: 500; font-size: clamp(26px, 3.6vw, 52px); line-height: 1.05; letter-spacing: -0.03em; text-wrap: balance; }
.un-t em { font-style: normal; color: var(--text-dim); transition: color 0.4s; }
.up-next:hover .un-t em { color: var(--copper-hi); }
.un-go { flex: none; width: clamp(48px, 5vw, 64px); height: clamp(48px, 5vw, 64px); border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-2); font-size: 22px; transition: background 0.4s, border-color 0.4s, color 0.4s, transform 0.4s var(--ease); }
.up-next:hover .un-go { background: var(--copper); border-color: var(--copper); color: var(--ink); transform: translateX(6px); }
html[dir="rtl"] .up-next:hover .un-go { transform: translateX(-6px); }
html[dir="rtl"] .un-k { letter-spacing: 0; font-size: 12.5px; }
@media (max-width: 640px) { .un-in { flex-wrap: wrap; gap: 10px 16px; } .un-k { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .up-next::before, .un-go { transition: none; } }
/* RTL: numbers that scripts rewrite keep their left-to-right order */
html[dir="rtl"] :is(.vs2-s b, .slider-val) { unicode-bidi: plaintext; text-align: right; }
.footer-bottom a { white-space: nowrap; }

/* Arabic: small mono labels are unreadable in Arabic script below ~11px; lift them on every page */
html[dir="rtl"] :is(.footer-title, .wr-row em, .stat-l, .pstep .pk, .legend span, .nr-tc-tag, .ticks span, .qp-n b, .cta-note, .nb-l, .nb-r,
  .nrx-corr-head span, .lvz-l, .lvz-r, .cp-me, .tm-cap, .cons-app-tag, .an-dir, .gs, .bar-l, .bar-r, .read-label, .hint, .nrx-final, .ph-sub,
  .qn-k, .qi-k, .qi-h, .cp-gate span, .cp-ill, .qa-seal, .qp-demo .uk, .qm-steps span, .sc-t, .sc-cap, .vs2-il, .ak-k, .fig-toggle, .tc-go, .backlink) {
  font-size: 11.5px; letter-spacing: 0;
}

/* "More information" links: a small outlined pill so they read as clickable at a glance (they were plain captions).
   The pill fills when you hover the link or the card it belongs to. */
html body :is(.vs2-open, .cs-go, .cons-app-go, .stream-card .sc-link, .cons-apps-row .cons-app-go, .ws-go, .tc-go, .sel-all, .qp-more) {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; width: auto; max-width: 100%;
  padding: 8px 13px 8px 15px; border: 1px solid rgba(233,165,102,0.5); border-radius: 999px; background: rgba(201,123,61,0.12);
  font-family: var(--font-mono); font-size: 11px; font-weight: 500; line-height: 1; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--copper-hi); text-decoration: none; white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
html body :is(.vs2-open, .cs-go, .cons-app-go, .stream-card .sc-link, .ws-go, .tc-go, .sel-all, .qp-more) :is(i, span[aria-hidden], .arr) { font-style: normal; transition: transform 0.25s ease; }
html body :is(.vs2-open:hover, .vs2-open:focus-visible, .ws-go:hover, .ws-go:focus-visible,
  a:hover .cs-go, a:focus-visible .cs-go, a:hover .cons-app-go, a:focus-visible .cons-app-go, a:hover .sc-link, a:focus-visible .sc-link,
  a:hover .tc-go, a:focus-visible .tc-go, a:hover .sel-all, a:focus-visible .sel-all, a:hover .qp-more, a:focus-visible .qp-more) {
  background: var(--copper); border-color: var(--copper); color: var(--ink);
}
html body :is(.vs2-open:hover, .ws-go:hover, a:hover .cs-go, a:hover .cons-app-go, a:hover .sc-link, a:hover .tc-go, a:hover .sel-all, a:hover .qp-more) :is(i, span[aria-hidden], .arr) { transform: translateX(3px); }
html[dir="rtl"] body :is(.vs2-open:hover, .ws-go:hover, a:hover .cs-go, a:hover .cons-app-go, a:hover .sc-link, a:hover .tc-go, a:hover .sel-all, a:hover .qp-more) :is(i, span[aria-hidden], .arr) { transform: translateX(-3px); }
html[dir="rtl"] body :is(.vs2-open, .cs-go, .cons-app-go, .stream-card .sc-link, .cons-apps-row .cons-app-go, .ws-go, .tc-go, .sel-all, .qp-more) { letter-spacing: 0; font-size: 12px; padding: 7px 15px 7px 13px; }
/* on paper cards the pill uses the darker copper so it keeps its contrast */
html body .cs-cc .cs-go { border-color: rgba(154,82,28,0.45); background: rgba(154,82,28,0.08); color: #9a521c; }
html body .cs-cc:is(:hover, :focus-visible) .cs-go { background: #9a521c; border-color: #9a521c; color: #fff; }
@media (prefers-reduced-motion: reduce) { html body :is(.vs2-open, .cs-go, .cons-app-go, .sc-link, .ws-go, .tc-go, .sel-all, .qp-more) :is(i, span[aria-hidden], .arr) { transition: none; transform: none !important; } }
/* phones: in chart headers the read-more pill takes its own line under the title instead of being clipped */
@media (max-width: 600px) {
  .vs2-panel .vs2-ph { flex-wrap: wrap; row-gap: 10px; }
  .vs2-panel .vs2-ph b { flex: 1 1 calc(100% - 64px); }
}
