/* =====================================================================
   SES — DESIGN v8. Loads LAST (after style.css and design-v3.css).
   Pairs with js/design-v8.js. Adds: Space Grotesk display type,
   page banners, breadcrumbs, services sub-navigation, service-section
   index numbers, and final polish.
   Remove this file + js/design-v8.js to revert.
   ===================================================================== */
:root{
  --ink:#0B1220; --navy:#14243A; --brand:#FF5A2E; --accent:#E8480F; --gold:#FFB800;
  --line:#E6EBF2; --muted:#64748B; --radius:1.25rem; --ease:cubic-bezier(.2,.8,.2,1);
  --font-display:"Space Grotesk","Manrope",system-ui,sans-serif;
  --font-body:"Manrope",system-ui,-apple-system,"Segoe UI",sans-serif;
  --subnav-h:3.5rem;
}

/* ---------- Type system: Space Grotesk for display, Manrope for reading ---------- */
body{font-family:var(--font-body)}
h1,h2,h3,.section-title,.btn,.eyebrow,#site-header .nav-link,#v8-subnav a,.v8-crumbs{font-family:var(--font-display)}
h1{font-weight:700}
.section-title{font-weight:700;letter-spacing:-.04em}
h3{font-weight:700;letter-spacing:-.02em}
p,li,dd,dt,small{font-family:var(--font-body)}
.btn{font-weight:600;letter-spacing:0}
.eyebrow{font-weight:600;letter-spacing:.14em}
#stats dd,.v5-badge strong,.v5-pcard span,.v5-stats dd,#v3-process li::before{font-family:var(--font-display)}

/* ---------- Inner-page banner (.v8-hero) ---------- */
.v8-hero{
  min-height:24rem!important;
  display:flex;align-items:flex-end;
  isolation:isolate;
}
.v8-hero>.relative.mx-auto,
.v8-hero>.mx-auto{
  /* flex parent + auto margins shrank and centred this box; force full width, left-aligned */
  width:100%;
  text-align:left;
  padding-top:9rem!important;
  padding-bottom:3.5rem!important;
}
.v8-hero .v8-crumbs{align-self:flex-start}
.v8-hero h1{
  font-size:clamp(2.4rem,6vw,4.4rem);
  line-height:1.02;
  letter-spacing:-.045em;
  max-width:18ch;
}
.v8-hero p:not(.eyebrow){max-width:40rem;color:#CBD5E1}
/* bottom accent rule: brand → gold → green, echoes footer + progress bar */
.v8-hero::after{
  content:"";position:absolute;left:0;right:0;bottom:0;height:4px;z-index:2;
  background:linear-gradient(90deg,#FF5A2E 0 40%,#FFB800 40% 70%,#22E05A 70% 100%);
}
@media(max-width:767px){
  .v8-hero{min-height:20rem!important}
  .v8-hero>.relative.mx-auto,.v8-hero>.mx-auto{padding-top:7.5rem!important;padding-bottom:2.5rem!important}
}

/* ---------- Breadcrumbs ---------- */
.v8-crumbs{
  display:inline-flex;align-items:center;flex-wrap:wrap;gap:.6rem;
  margin-bottom:1.5rem;padding:.45rem 1rem;
  border-radius:999px;
  font-size:.8rem;font-weight:600;
  color:#CBD5E1;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.16);
  backdrop-filter:blur(8px);
}
.v8-crumbs a{color:#fff;text-decoration:none;transition:color .2s}
.v8-crumbs a:hover{color:var(--gold)}
.v8-crumbs span[aria-hidden]{opacity:.45}
.v8-crumbs [aria-current="page"]{color:var(--gold)}

/* ---------- Services sub-navigation (#v8-subnav) ---------- */
#v8-subnav{
  position:sticky;
  top:4.5rem;                 /* sits under the fixed header */
  z-index:40;
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid var(--line);
  box-shadow:0 10px 30px -22px rgba(11,18,32,.35);
}
#v8-subnav ul{
  display:flex;gap:.4rem;
  margin:0;padding:.6rem 0;
  list-style:none;
  overflow-x:auto;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}
#v8-subnav ul::-webkit-scrollbar{display:none}
#v8-subnav li{flex:none}
#v8-subnav a{
  position:relative;
  display:inline-flex;align-items:center;
  min-height:2.4rem;padding:.45rem 1rem;
  border-radius:999px;
  font-size:.86rem;font-weight:600;white-space:nowrap;
  color:var(--navy);
  text-decoration:none;
  transition:background .2s,color .2s;
}
#v8-subnav a:hover{background:#F1F5F9}
#v8-subnav a.on{
  color:#fff;
  background:linear-gradient(135deg,var(--ink),var(--navy));
  box-shadow:0 8px 18px -10px rgba(11,18,32,.6);
}
#v8-subnav a:focus-visible{outline:3px solid var(--gold);outline-offset:2px}
@media(max-width:640px){#v8-subnav{top:4rem}}

/* Anchor targets must clear header + sub-nav */
#service-details>section[id]{scroll-margin-top:9rem}

/* ---------- Service detail sections (numbered via data-n from JS) ---------- */
#service-details>section[data-n]{position:relative}
#service-details>section[data-n]::before{
  content:attr(data-n);
  position:absolute;
  top:1.25rem;right:1.25rem;
  font-family:var(--font-display);
  font-size:clamp(4rem,10vw,8rem);
  font-weight:700;
  line-height:.8;
  letter-spacing:-.06em;
  color:rgba(11,18,32,.05);
  pointer-events:none;
  user-select:none;
}
#service-details>section.on-dark[data-n]::before,
#service-details>section.bg-ink[data-n]::before{color:rgba(255,255,255,.06)}

/* =====================================================================
   v8 ATTRACTIVE LAYER — "engineering drawing" look
   Blueprint grid + dimension-tick corners, steel-orange accents,
   consistent cards, calmer motion. Safe to delete this block to revert.
   ===================================================================== */
:root{--grid-line:rgba(20,36,58,.06);--tick:#E8480F}

/* Blueprint paper: faint engineering grid on light sections */
.bg-paper,#stats{
  background-image:
    linear-gradient(var(--grid-line) 1px,transparent 1px),
    linear-gradient(90deg,var(--grid-line) 1px,transparent 1px);
  background-size:44px 44px;
  background-color:#F8FAFC;
}
#stats{background-image:linear-gradient(var(--grid-line) 1px,transparent 1px),linear-gradient(90deg,var(--grid-line) 1px,transparent 1px)}

/* Section titles: short steel-orange bar */
.section-title{position:relative}
main>section:not(.on-dark):not(#v3-process) .section-title::after{
  content:"";display:block;width:3.5rem;height:5px;margin-top:1rem;border-radius:4px;
  background:linear-gradient(90deg,var(--accent),var(--gold));
}
.section-title[style*="text-align:center"]::after,.text-center .section-title::after{margin-left:auto;margin-right:auto}

/* HERO: stronger depth + dimension-tick corners */
section[aria-labelledby="hero-h"] h1{text-shadow:0 8px 40px rgba(0,0,0,.45)}
/* The headline is split into per-word spans by JS, so the gradient must be applied
   to the words themselves (a parent clip + transparent colour makes them invisible). */
section[aria-labelledby="hero-h"] .text-gradient,
section[aria-labelledby="hero-h"] .text-gradient *{
  color:#FF7A3D;                                   /* visible fallback */
  background-image:linear-gradient(100deg,#FFB800,#FF5A2E 60%,#FF8A4C);
  -webkit-background-clip:text;background-clip:text;
  -webkit-text-fill-color:transparent;
  text-shadow:none;
}
section[aria-labelledby="hero-h"]::before,
section[aria-labelledby="hero-h"]::after{
  content:"";position:absolute;z-index:3;width:3.2rem;height:3.2rem;pointer-events:none;
  border:2px solid rgba(255,255,255,.35);
}
section[aria-labelledby="hero-h"]::before{top:6rem;left:1.25rem;border-right:0;border-bottom:0}
section[aria-labelledby="hero-h"]::after{bottom:1.25rem;right:1.25rem;border-left:0;border-top:0}
@media(min-width:1024px){section[aria-labelledby="hero-h"]::before{left:2rem}section[aria-labelledby="hero-h"]::after{right:2rem}}
section[aria-labelledby="hero-h"] .btn-primary{box-shadow:0 18px 40px -16px rgba(232,72,15,.8)}

/* Ticker band */
.marquee-track span{font-family:var(--font-display);font-weight:600}

/* STATS: top accent rail + big display numbers */
#stats dl>div{position:relative;overflow:hidden;background-color:#fff}
#stats dl>div::before{
  content:"";position:absolute;left:0;top:0;right:0;height:4px;
  background:linear-gradient(90deg,var(--accent),var(--gold));
}
#stats dl>div:last-child::before{background:rgba(255,255,255,.55)}
#stats dd{font-family:var(--font-display);font-weight:700}

/* ABOUT: dimension corners on the photo, icon tiles */
.corner{border-color:var(--tick)!important}
figure.reveal figcaption{font-family:var(--font-display)}
.bg-ink.text-gold{background:linear-gradient(135deg,var(--ink),var(--navy))}

/* SERVICES cards (rendered by main.js) */
#services-grid .svc-card{
  position:relative;overflow:hidden;background:#fff;
  border:1px solid var(--line);
}
#services-grid .svc-card::before{
  content:"";position:absolute;left:0;top:0;bottom:0;width:4px;
  background:linear-gradient(var(--accent),var(--gold));
  transform:scaleY(0);transform-origin:top;transition:transform .45s var(--ease);
}
#services-grid .svc-card:hover::before,#services-grid .svc-card:focus-within::before{transform:scaleY(1)}
#services-grid .svc-card h3{font-family:var(--font-display);font-size:1.2rem}

/* PROJECT cards: clearer overlay + readable captions */
.project-card{position:relative;overflow:hidden;background:var(--ink)}
.project-card::after{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(to top,rgba(11,18,32,.88) 0%,rgba(11,18,32,.15) 55%,transparent 100%);
}
.project-card>*:not(img){position:relative;z-index:2}
.project-card h3{font-family:var(--font-display)}

/* EXPERTISE list: slide-in accent on hover */
#expertise-list li{
  position:relative;padding-left:1rem;border-bottom:1px solid #E2E8F0;
  transition:padding-left .3s var(--ease),background .3s;
}
#expertise-list li::before{
  content:"";position:absolute;left:0;top:20%;bottom:20%;width:3px;border-radius:3px;
  background:var(--accent);opacity:0;transition:opacity .3s;
}
#expertise-list li:hover{padding-left:1.4rem;background:linear-gradient(90deg,#FFF3EC,transparent)}
#expertise-list li:hover::before{opacity:1}

/* SOFTWARE tiles */
#software-grid li{
  display:flex;align-items:center;justify-content:center;text-align:center;
  min-height:4.2rem;padding:1rem;
  background:#fff;border:1px solid var(--line);border-radius:1rem;
  font-family:var(--font-display);font-weight:600;color:var(--navy);
  transition:border-color .25s,transform .25s var(--ease),box-shadow .25s;
}
#software-grid li:hover{border-color:var(--accent);transform:translateY(-3px);box-shadow:0 18px 30px -20px rgba(232,72,15,.5)}

/* CLIENTS */
#clients-grid>*{border-radius:var(--radius)}
#clients-grid span,#clients-grid li{transition:color .2s,border-color .2s}

/* PROCESS (How we work): connecting line on desktop */
@media(min-width:768px){
  #v3-process ol{position:relative}
  #v3-process ol::before{
    content:"";position:absolute;left:8%;right:8%;top:3.6rem;height:2px;
    background:linear-gradient(90deg,var(--brand),var(--gold));opacity:.35;
  }
}

/* CTA band: blueprint grid over gradient */
section[aria-labelledby="cta-h"] .grid-pattern{opacity:.35}
section[aria-labelledby="cta-h"] .btn-light{font-weight:700}

/* Header: cleaner glass when solid */
#site-header[data-solid="true"]{background:rgba(255,255,255,.88);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border-bottom:1px solid var(--line)}

/* Smooth, consistent card hover */
.card-lift{transition:transform .35s var(--ease),box-shadow .35s var(--ease)}

/* ---------- Final polish ---------- */
a,button{-webkit-tap-highlight-color:transparent}
.hero-badge,.v5-chip{font-family:var(--font-display);font-weight:600}
#v3-fab{font-family:var(--font-display);font-weight:700}
#v3-trust li{font-family:var(--font-display)}
#v3-trust small{font-family:var(--font-body)}
#v4-faq summary{font-family:var(--font-display);font-weight:600}

/* Stop the floating CTA colliding with the sub-nav on small screens */
@media(max-width:640px){#v3-top{bottom:5rem}}

/* ---------- Motion + print ---------- */
@media(prefers-reduced-motion:reduce){
  #v8-subnav a{transition:none}
  html{scroll-behavior:auto}
}
@media print{
  #v8-subnav,.v8-crumbs{display:none}
  #service-details>section[data-n]::before{display:none}
}


/* =====================================================================
   v8.1 — STATS FIX + MORE ATTRACTIVE POLISH
   ===================================================================== */

/* ---- Stats: guarantee the 3rd (orange) card and its number show ---- */
#stats dl>div:last-child{
  background-color:#E8480F;
  background-image:linear-gradient(135deg,#B93207 0%,#E8480F 55%,#FF5A2E 100%);
  border-color:transparent;
  box-shadow:0 30px 60px -28px rgba(232,72,15,.65);
}
#stats dl>div:last-child dt{color:rgba(255,255,255,.9)}
#stats dl>div:last-child dd,
#stats dl>div:last-child dd span{
  background:none!important;
  -webkit-background-clip:border-box;background-clip:border-box;
  color:#fff!important;-webkit-text-fill-color:#fff;
}
/* solid, readable numbers on the white cards (dark → orange, no muddy brown) */
#stats dl>div:not(:last-child) dd{
  background:linear-gradient(120deg,#0B1220 0%,#0B1220 45%,#E8480F 100%);
  -webkit-background-clip:text;background-clip:text;color:transparent;
}
#stats dt{font-family:var(--font-display);font-weight:600;letter-spacing:.14em;font-size:.78rem}
#stats dd{font-variant-numeric:tabular-nums;line-height:1}
/* ruler marks under each number: engineering "dimension line" */
#stats dl>div::after{
  content:"";display:block;position:absolute;left:2rem;right:2rem;bottom:1.4rem;height:8px;
  background:repeating-linear-gradient(90deg,currentColor 0 1px,transparent 1px 12px);
  opacity:.14;
}
#stats dl>div{padding-bottom:3.2rem!important}
#stats dl>div:hover{transform:translateY(-6px)}

/* ---- Trust strip: cleaner divider + hover ---- */
#v3-trust li{padding:.4rem .6rem;border-radius:.9rem;transition:background .25s}
#v3-trust li:hover{background:#FFF7F2}

/* ---- Photos: consistent rounded frame, gentle zoom ---- */
.img-zoom img{transition:transform 1.1s var(--ease)}
.img-zoom:hover img{transform:scale(1.06)}
figure.img-zoom{box-shadow:var(--shadow-md)}

/* ---- Project cards: orange glow ring on hover ---- */
.project-card{transition:transform .4s var(--ease),box-shadow .4s var(--ease)}
.project-card:hover{transform:translateY(-6px)}

/* ---- Eyebrow chip: slightly crisper ---- */
.eyebrow{font-family:var(--font-display);font-weight:600;letter-spacing:.14em}

/* ---- Footer: darker, clearer link states ---- */
#site-footer a:hover{color:var(--gold);text-decoration:underline;text-underline-offset:4px}

/* ---- Section spacing rhythm on large screens ---- */
@media(min-width:1280px){
  main>section.py-20{padding-top:6.5rem;padding-bottom:6.5rem}
}
@media(prefers-reduced-motion:reduce){#stats dl>div:hover,.project-card:hover{transform:none}}

/* =====================================================================
   v8.2 — BEST CARDS + ANIMATION (pairs with the v8.2 block in design-v8.js)
   ===================================================================== */

/* ---- Staggered entrance (class added by JS only, so no JS = no hidden content) ---- */
.v8-pre{opacity:0;translate:0 28px;scale:.98}
.v8-in{
  opacity:1;translate:0 0;scale:1;
  transition:opacity .7s var(--ease),translate .8s var(--ease),scale .8s var(--ease);
  transition-delay:calc(var(--si,0) * 70ms);
}

/* ---- 3D tilt (vars set by JS on desktop pointer devices) ---- */
.tilt-on{
  transform:perspective(1000px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg)) translateY(var(--ty,0px))!important;
  transition:transform .25s ease-out,box-shadow .4s var(--ease)!important;
  will-change:transform;
}
.tilt-on:hover{--ty:-6px}

/* ---- Cursor spotlight on light cards ---- */
#services-grid .svc-card,
#software-grid li,
#stats dl>div:not(:last-child){
  background-image:radial-gradient(380px circle at var(--mx,50%) var(--my,50%),rgba(255,90,46,.12),transparent 55%);
  background-repeat:no-repeat;
}
#services-grid .svc-card:not(:hover),
#software-grid li:not(:hover),
#stats dl>div:not(:last-child):not(:hover){background-image:none}
/* dark cards: a soft light follows the cursor */
#v3-process li:hover{
  background-image:radial-gradient(320px circle at var(--mx,50%) var(--my,50%),rgba(255,184,0,.14),transparent 60%);
}

/* ---- Service card: gradient icon tile + arrow reveal ---- */
#services-grid .svc-card{border-radius:1.4rem!important;padding:2.2rem 1.8rem 1.8rem}
#services-grid .svc-card>:first-child:is(span,div){
  background:linear-gradient(135deg,var(--ink),var(--navy))!important;
  color:var(--gold)!important;
  border-radius:1rem;
  box-shadow:0 14px 26px -14px rgba(11,18,32,.7);
  transition:background .35s,transform .45s var(--ease);
}
#services-grid .svc-card:hover>:first-child:is(span,div){
  background:linear-gradient(135deg,var(--accent),var(--brand))!important;color:#fff!important;
  transform:translateY(-3px) rotate(-4deg);
}
#services-grid .svc-card::before{width:5px}

/* ---- Project card: lift, label slides up, subtle brand ring ---- */
.project-card{border-radius:1.4rem!important}
.project-card>*:not(img){transition:transform .45s var(--ease)}
.project-card:hover>*:not(img){transform:translateY(-4px)}
.project-card::before{
  content:"";position:absolute;inset:0;z-index:3;border-radius:inherit;pointer-events:none;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.12);transition:box-shadow .4s;
}
.project-card:hover::before{box-shadow:inset 0 0 0 2px rgba(255,90,46,.9)}

/* ---- Stats number: pop when it comes in ---- */
#stats dd{transition:transform .5s var(--ease)}
#stats dl>div:hover dd{transform:scale(1.04);transform-origin:left center}

/* ---- Hero: one orchestrated moment (gradient text shimmer) ---- */
/* (hero gradient shimmer removed: it hid the split-word headline) */

/* ---- Floating "Get a Quote": soft attention ring ---- */
#v3-fab::before{
  content:"";position:absolute;inset:0;border-radius:inherit;z-index:-1;
  box-shadow:0 0 0 0 rgba(255,90,46,.55);animation:v8-ring 3.2s ease-out infinite;
}
#v3-fab{isolation:isolate}
@keyframes v8-ring{0%{box-shadow:0 0 0 0 rgba(255,90,46,.5)}70%,100%{box-shadow:0 0 0 16px rgba(255,90,46,0)}}

/* ---- Ticker pauses on hover ---- */
.marquee:hover .marquee-track{animation-play-state:paused}

/* ---- Accordion / FAQ-style details open smoothly (if used anywhere) ---- */
details>summary{transition:background .2s}

/* ---- Keep everything calm for reduced-motion users ---- */
@media(prefers-reduced-motion:reduce){
  .v8-pre{opacity:1;translate:none;scale:1}
  .tilt-on{transform:none!important}
  #v3-fab::before{animation:none}
}

/* =====================================================================
   v8.3 — HERO TEXT COLOURS (home + every inner-page banner)
   White headline, soft-white body, gold accents, guaranteed contrast.
   ===================================================================== */
:root{
  --hero-title:#FFFFFF;
  --hero-body:#E2E8F0;      /* readable on dark photo/video */
  --hero-muted:#CBD5E1;
  --hero-accent:#FFB800;    /* gold */
  --hero-accent-2:#FF7A3D;  /* orange */
}

/* Headline */
section[aria-labelledby="hero-h"] h1,
.v8-hero h1,
main>section.on-dark:first-child h1{
  color:var(--hero-title);
  text-shadow:0 2px 24px rgba(0,0,0,.45);
}
/* Orange-gold words inside the headline keep their gradient (no shadow) */
section[aria-labelledby="hero-h"] h1 .text-gradient,
section[aria-labelledby="hero-h"] h1 .text-gradient *,
.v8-hero h1 .text-gradient,.v8-hero h1 .text-gradient *{text-shadow:none}

/* Body copy */
section[aria-labelledby="hero-h"] p:not(.eyebrow):not(.hero-badge),
.v8-hero p:not(.eyebrow){
  color:var(--hero-body);
  text-shadow:0 1px 14px rgba(0,0,0,.4);
}

/* Small label chip above the headline */
section[aria-labelledby="hero-h"] .eyebrow,
.v8-hero .eyebrow{
  color:var(--hero-accent);
  background:rgba(11,18,32,.45);
  border-color:rgba(255,184,0,.4);
  backdrop-filter:blur(8px);
}

/* Fact chips (980+ projects, Steel & RCC …) */
.v8-hero .v5-chip{color:#fff;background:rgba(11,18,32,.5);border-color:rgba(255,255,255,.22)}
.v8-hero .v5-chip b{color:var(--hero-accent)}

/* Breadcrumb */
.v8-crumbs,.v8-hero nav[aria-label="Breadcrumb"]{color:var(--hero-muted)}
.v8-crumbs a,.v8-hero nav[aria-label="Breadcrumb"] a{color:#fff}
.v8-crumbs [aria-current="page"],.v8-hero nav[aria-label="Breadcrumb"] [aria-current="page"]{color:var(--hero-accent)}

/* Buttons stay readable on photos */
section[aria-labelledby="hero-h"] .btn-ghost,.v8-hero .btn-ghost{color:#fff;border-color:rgba(255,255,255,.55);background:rgba(11,18,32,.35)}
section[aria-labelledby="hero-h"] .btn-ghost:hover,.v8-hero .btn-ghost:hover{background:#fff;color:var(--ink)}

/* Contrast insurance: darker left side where the text sits */
.v8-hero .hero-shade{
  background:linear-gradient(100deg,rgba(11,18,32,.94) 10%,rgba(11,18,32,.74) 55%,rgba(11,18,32,.45) 100%)!important;
}
.hero-overlay{
  background:
    linear-gradient(100deg,rgba(11,18,32,.92) 0%,rgba(11,18,32,.74) 45%,rgba(11,18,32,.4) 100%),
    linear-gradient(0deg,rgba(11,18,32,.8) 0%,transparent 35%)!important;
}

/* =====================================================================
   v8.4 — INNER-PAGE HERO: spacing + gradient words (About, Services, …)
   ===================================================================== */
/* the section already has its own pt-/pb- padding; don't stack the container's on top */
.v8-hero>.relative.mx-auto,
.v8-hero>.mx-auto{padding-top:0!important;padding-bottom:0!important}
.v8-hero{align-items:flex-end}

/* gradient words in inner-page headlines (applied per word: the headline is split by JS) */
.v8-hero h1 .text-gradient,
.v8-hero h1 .text-gradient *{
  color:#FF7A3D;
  background-image:linear-gradient(100deg,#FFB800,#FF5A2E 60%,#FF8A4C);
  -webkit-background-clip:text;background-clip:text;
  -webkit-text-fill-color:transparent;
}
