/* ==========================================================
   Samarth Engineering Services – custom styles
   (Tailwind handles layout; this file holds what utilities can't)
   ========================================================== */
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body { font-family: 'Manrope', 'Inter', system-ui, sans-serif; background: #F8FAFC; color: #172033; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid #FFB800; outline-offset: 3px; border-radius: 4px; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: #E8480F; color: #fff; padding: .75rem 1rem; border-radius: .5rem; font-weight: 700; transition: top .2s; }
.skip-link:focus { top: 1rem; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .85rem 1.5rem; border-radius: .5rem; font-weight: 700; font-size: .95rem; line-height: 1.2; transition: background-color .2s, color .2s, transform .15s, box-shadow .2s, border-color .2s; cursor: pointer; border: 1px solid transparent; }
.btn:active { transform: translateY(1px) scale(.98); }
.btn-primary { background: #E8480F; color: #fff; box-shadow: 0 8px 24px -10px rgba(232,72,15,.7); }
.btn-primary:hover { background: #C93A08; }
.btn-ghost { border-color: rgba(255,255,255,.35); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.btn-dark { background: #0B1220; color: #fff; }
.btn-dark:hover { background: #14243A; }
.btn-outline { border-color: #CBD5E1; color: #172033; background: #fff; }
.btn-outline:hover { border-color: #E8480F; color: #E8480F; }
.btn svg { width: 1.1em; height: 1.1em; transition: transform .2s; }
.btn:hover svg { transform: translateX(3px); }

/* ---------- Typography helpers ---------- */
.eyebrow { font-size: .75rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: #E8480F; }
.on-dark .eyebrow, .eyebrow-light { color: #FFB800; }
.section-title { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }

/* ---------- Technical grid pattern ---------- */
.grid-pattern { position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(148,163,184,.10) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.10) 1px, transparent 1px); background-size: 64px 64px; -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%); animation: grid-drift 40s linear infinite; }
@keyframes grid-drift { to { background-position: 64px 64px; } }

/* ---------- Header / navbar ---------- */
#site-header { transition: background-color .3s, box-shadow .3s, border-color .3s; border-bottom: 1px solid transparent; }
#site-header[data-solid="true"] { background: rgba(11,18,32,.96); backdrop-filter: blur(10px); border-color: rgba(255,255,255,.08); box-shadow: 0 10px 30px -15px rgba(0,0,0,.6); }
#site-header .nav-shell { transition: height .3s; }
#site-header[data-solid="true"] .nav-shell { height: 4.25rem; }
.nav-link { position: relative; padding: .6rem .9rem; font-size: .92rem; font-weight: 600; color: rgba(255,255,255,.78); border-radius: .4rem; transition: color .2s; }
.nav-link::after { content: ''; position: absolute; left: .9rem; right: .9rem; bottom: .3rem; height: 2px; background: #FFB800; transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.nav-link:hover, .nav-link[aria-current="page"] { color: #fff; }
.nav-link:hover::after, .nav-link[aria-current="page"]::after { transform: scaleX(1); }
.mobile-panel { max-height: 0; overflow: hidden; visibility: hidden; background: #0B1220; transition: max-height .35s ease, visibility 0s linear .35s; }
.mobile-panel.is-open { max-height: 30rem; visibility: visible; transition: max-height .35s ease; }
.mobile-link { display: block; padding: .9rem 1.25rem; font-weight: 700; color: rgba(255,255,255,.85); border-top: 1px solid rgba(255,255,255,.07); }
.mobile-link[aria-current="page"] { color: #FFB800; }

/* ---------- Hero ---------- */
.hero-fade { opacity: 0; transform: translateY(28px); animation: fade-up .9s cubic-bezier(.2,.7,.2,1) forwards; animation-delay: var(--d, 0ms); }
@keyframes fade-up { to { opacity: 1; transform: none; } }
.scroll-dot { animation: scroll-dot 1.8s ease-in-out infinite; }
@keyframes scroll-dot { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- Reveal on scroll (only hidden when JS is present) ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0ms); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Cards & images ---------- */
.card-lift { transition: transform .3s, box-shadow .3s, border-color .3s; }
.card-lift:hover, .card-lift:focus-within { transform: translateY(-4px); box-shadow: 0 24px 40px -24px rgba(11,18,32,.35); border-color: #E8480F; }
.img-zoom { overflow: hidden; }
.img-zoom img { transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.group:hover .img-zoom img, .img-zoom:hover img { transform: scale(1.06); }
.project-overlay { background: linear-gradient(to top, rgba(11,18,32,.92), rgba(11,18,32,.15) 60%); opacity: .0; transition: opacity .35s; }
.group:hover .project-overlay, .group:focus-within .project-overlay { opacity: 1; }
@media (hover: none) { .project-overlay { opacity: 1; } }

/* ---------- Project filtering ---------- */
.project-card { transition: opacity .28s ease, transform .28s ease; }
.project-card.is-hiding { opacity: 0; transform: scale(.95); }
.filter-btn { padding: .55rem 1.1rem; border-radius: 999px; border: 1px solid #CBD5E1; background: #fff; font-weight: 700; font-size: .88rem; color: #334155; transition: all .2s; }
.filter-btn:hover { border-color: #E8480F; color: #E8480F; }
.filter-btn[aria-pressed="true"] { background: #0B1220; color: #fff; border-color: #0B1220; }

/* ---------- Modal (native <dialog>) ---------- */
dialog#project-modal { border: 0; padding: 0; width: min(56rem, calc(100% - 1.5rem)); max-height: calc(100% - 2rem); border-radius: .75rem; overflow: auto; box-shadow: 0 40px 80px -20px rgba(0,0,0,.6); }
dialog#project-modal::backdrop { background: rgba(11,18,32,.75); backdrop-filter: blur(4px); }
dialog#project-modal[open] { animation: modal-in .3s ease; }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }

/* ---------- Forms ---------- */
.field { width: 100%; padding: .8rem 1rem; border: 1px solid #CBD5E1; border-radius: .5rem; background: #fff; font: inherit; transition: border-color .2s, box-shadow .2s; }
.field:focus { outline: none; border-color: #E8480F; box-shadow: 0 0 0 3px rgba(232,72,15,.2); }
.field[aria-invalid="true"] { border-color: #DC2626; }
.field-error { color: #B91C1C; font-size: .82rem; margin-top: .3rem; min-height: 1.1rem; }

/* ---------- Back to top ---------- */
#back-to-top { opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .3s, transform .3s, visibility .3s; }
#back-to-top.is-shown { opacity: 1; visibility: visible; transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal, .hero-fade { opacity: 1 !important; transform: none !important; }
  .grid-pattern { animation: none; }
}

/* ================= Logo-colour design layer ================= */
.tricolor { background: linear-gradient(90deg, #FF5A2E 0 40%, #FFB800 40% 70%, #22E05A 70% 100%); }
.btn-light { background: #fff; color: #0B1220; }
.btn-light:hover { background: #FFF1E8; }
.eyebrow { display: inline-flex; align-items: center; gap: .7rem; }
.eyebrow::before { content: ''; width: 1.8rem; height: 3px; border-radius: 2px; background: linear-gradient(90deg, #FF5A2E, #FFB800); }
.on-dark .eyebrow { color: #FFB800; }
.text-gradient { background: linear-gradient(95deg, #FF5A2E 0%, #FFB800 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.card-lift { position: relative; overflow: hidden; }
.card-lift::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, #FF5A2E, #FFB800, #22E05A); transform: scaleX(0); transform-origin: left; transition: transform .4s; }
.card-lift:hover::before, .card-lift:focus-within::before { transform: scaleX(1); }
.project-card { transition: opacity .28s ease, transform .28s ease, box-shadow .3s; }
.project-card:hover { box-shadow: 0 0 0 2px #FF5A2E, 0 30px 50px -25px rgba(255,90,46,.5); }
.spin-slow { animation: spin 70s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.float-y { animation: float-y 6s ease-in-out infinite; }
@keyframes float-y { 50% { transform: translateY(-12px); } }
.glass { background: rgba(255,255,255,.07); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.14); }
#site-header::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, #FF5A2E 0 40%, #FFB800 40% 70%, #22E05A 70% 100%); }
.outline-text { -webkit-text-stroke: 1px rgba(255,255,255,.18); color: transparent; }

/* ================= Motion & impact layer ================= */
/* Preloader (first visit per session only – see inline script in <head>) */
#preloader { position: fixed; inset: 0; z-index: 200; display: grid; place-content: center; justify-items: center; gap: 1.5rem; background: #0B1220; animation: preload-out .5s ease .8s forwards; }
#preloader img { width: 112px; height: 112px; border-radius: 50%; background: #fff; animation: pulse-ring 1.2s ease-in-out infinite; }
#preloader span { display: block; width: 150px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, #FF5A2E, #FFB800, #22E05A); transform-origin: left; animation: load-bar .8s ease forwards; }
@keyframes preload-out { to { opacity: 0; visibility: hidden; } }
@keyframes load-bar { from { transform: scaleX(0); } }
@keyframes pulse-ring { 50% { box-shadow: 0 0 0 18px rgba(255,90,46,.18); } }
.no-pre #preloader { display: none; }
.hero-fade { animation-delay: calc(var(--d, 0ms) + 600ms) !important; }
.no-pre .hero-fade { animation-delay: var(--d, 0ms) !important; }

/* Scroll progress bar (replaces the static header stripe) */
#site-header::before { display: none; }
#scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 70; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, #FF5A2E, #FFB800, #22E05A); pointer-events: none; }

/* Word-by-word headline reveal */
.word { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .12em; margin-bottom: -.12em; }
.w { display: inline-block; transform: translateY(115%); animation: word-up .85s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: calc(var(--i, 0) * 70ms + 700ms); }
.no-pre .w { animation-delay: calc(var(--i, 0) * 70ms + 150ms); }
@keyframes word-up { to { transform: none; } }
.text-gradient, .w.text-gradient { background-image: linear-gradient(95deg, #FF5A2E, #FFB800, #FF5A2E); background-size: 200% auto; animation: shine 5s linear infinite; }
.w.text-gradient { animation: word-up .85s cubic-bezier(.2,.8,.2,1) forwards, shine 5s linear infinite; animation-delay: calc(var(--i, 0) * 70ms + 700ms), 0s; }
@keyframes shine { to { background-position: 200% center; } }

/* Directional reveals + image curtain */
.js .reveal-left { transform: translateX(-48px); }
.js .reveal-right { transform: translateX(48px); }
.js .curtain { position: relative; overflow: hidden; }
.js .curtain::before { content: ''; position: absolute; inset: 0; z-index: 2; background: #0B1220; transform-origin: right; transition: transform 1.1s cubic-bezier(.77,0,.18,1) .15s; pointer-events: none; }
.js .curtain.is-visible::before { transform: scaleX(0); }

/* Marquee / ticker */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.marquee-track { display: flex; align-items: center; gap: 1rem; width: max-content; animation: marquee var(--dur, 55s) linear infinite; }
.marquee-track.rev { animation-direction: reverse; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - .5rem)); } }

/* Cursor spotlight on cards + hero glow + magnetic buttons */
.spot::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(255,90,46,.20), transparent 45%); }
.spot:hover::after { opacity: 1; }
.hero-glow { background: radial-gradient(650px circle at var(--mx, 72%) var(--my, 30%), rgba(255,90,46,.26), transparent 60%); }
.btn { position: relative; overflow: hidden; transition: background-color .2s, color .2s, transform .15s, box-shadow .2s, border-color .2s, translate .25s cubic-bezier(.2,.8,.2,1); }
.btn::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s; pointer-events: none; }
.btn:hover::after { transform: translateX(120%); }

/* Decorative */
.dots { background-image: radial-gradient(#CBD5E1 1.2px, transparent 1.2px); background-size: 24px 24px; }
.drift { animation: drift 14s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translateX(-40px); } }
.corner { position: absolute; width: 44px; height: 44px; border-color: #FF5A2E; pointer-events: none; }
.corner.tl { top: -10px; left: -10px; border-top: 3px solid #FF5A2E; border-left: 3px solid #FF5A2E; }
.corner.br { bottom: -10px; right: -10px; border-bottom: 3px solid #FF5A2E; border-right: 3px solid #FF5A2E; }

/* Page transition */
body { transition: opacity .25s ease; }
body.leaving { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  #preloader { display: none; }
  .w { transform: none !important; }
  .js .curtain::before { display: none; }
  .marquee-track { flex-wrap: wrap; width: auto; animation: none; justify-content: center; }
  .marquee-track [aria-hidden="true"] { display: none; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
}

/* =====================================================================
   v2 DESIGN LAYER – white navbar, richer visuals, new animations
   ===================================================================== */

/* ---------- WHITE NAVBAR ---------- */
#site-header { background: #fff; border-bottom: 1px solid #E8EDF3; animation: nav-in .7s cubic-bezier(.2,.8,.2,1) both; }
#site-header[data-solid="true"] { background: rgba(255,255,255,.94); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-color: #E8EDF3; box-shadow: 0 14px 30px -20px rgba(15,23,42,.35); }
#site-header::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, #FF5A2E 0 40%, #FFB800 40% 70%, #22E05A 70% 100%); transform: scaleX(0); transform-origin: left; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
#site-header[data-solid="true"]::after { transform: scaleX(1); }
@keyframes nav-in { from { transform: translateY(-100%); } }
.logo-link img { transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.logo-link:hover img { transform: rotate(360deg) scale(1.05); }
.nav-link { color: #334155; padding: .55rem 1rem; border-radius: 999px; transition: color .2s, background-color .25s; }
.nav-link::after { left: 50%; right: auto; width: 0; height: 3px; bottom: .1rem; border-radius: 3px; transform: translateX(-50%) scaleX(1); background: linear-gradient(90deg, #FF5A2E, #FFB800); transition: width .3s cubic-bezier(.2,.8,.2,1); }
.nav-link:hover { color: #E8480F; background: #FFF3EC; }
.nav-link[aria-current="page"] { color: #E8480F; }
.nav-link:hover::after, .nav-link[aria-current="page"]::after { width: 1.4rem; transform: translateX(-50%) scaleX(1); }
.mobile-panel { background: #fff; border-top: 1px solid #EEF2F6; }
.mobile-link { color: #172033; border-top: 1px solid #F1F5F9; transition: background-color .2s, padding-left .25s, color .2s; }
.mobile-link:hover { background: #FFF3EC; padding-left: 1.75rem; color: #E8480F; }
.mobile-link[aria-current="page"] { color: #E8480F; background: #FFF8F4; }
.mobile-panel.is-open .mobile-link { animation: link-in .45s cubic-bezier(.2,.8,.2,1) both; }
.mobile-panel.is-open li:nth-child(2) .mobile-link { animation-delay: .05s; } .mobile-panel.is-open li:nth-child(3) .mobile-link { animation-delay: .1s; }
.mobile-panel.is-open li:nth-child(4) .mobile-link { animation-delay: .15s; } .mobile-panel.is-open li:nth-child(5) .mobile-link { animation-delay: .2s; }
@keyframes link-in { from { opacity: 0; transform: translateX(-18px); } }
#site-header .btn-primary { animation: cta-pulse 2.8s ease-in-out infinite; }
@keyframes cta-pulse { 0%,100% { box-shadow: 0 8px 24px -10px rgba(232,72,15,.7), 0 0 0 0 rgba(255,90,46,.35); } 50% { box-shadow: 0 8px 24px -10px rgba(232,72,15,.7), 0 0 0 10px rgba(255,90,46,0); } }

/* ---------- HERO: self-drawing steel truss + floating sparks ---------- */
main > section.on-dark:first-child { isolation: isolate; }
.truss { position: absolute; right: -4%; bottom: 4%; width: min(62%, 52rem); z-index: -5; pointer-events: none; opacity: .55; }
.truss .chord, .truss .web { fill: none; stroke: #FFB800; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s cubic-bezier(.4,0,.2,1) forwards; animation-delay: calc(var(--n) * 90ms + 900ms); }
.truss .chord { stroke-width: 3; } .truss .web { stroke-width: 1.5; stroke: rgba(255,255,255,.55); }
.truss .node { fill: #FF5A2E; opacity: 0; animation: node-pop .5s ease forwards, node-glow 3s ease-in-out infinite; animation-delay: calc(var(--n) * 60ms + 1600ms), calc(var(--n) * 120ms + 2600ms); transform-box: fill-box; transform-origin: center; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes node-pop { from { transform: scale(0); } to { opacity: 1; transform: scale(1); } }
@keyframes node-glow { 50% { opacity: .35; } }
.sparks { position: absolute; inset: 0; z-index: -5; overflow: hidden; pointer-events: none; }
.sparks i { position: absolute; bottom: -20px; width: var(--s); height: var(--s); background: var(--c); opacity: 0; transform: rotate(45deg); border-radius: 2px; animation: spark var(--t) linear var(--dl) infinite; }
@keyframes spark { 0% { opacity: 0; transform: translateY(0) rotate(45deg); } 12% { opacity: .55; } 85% { opacity: .35; } 100% { opacity: 0; transform: translateY(-105vh) rotate(405deg); } }
@media (max-width: 1023px) { .truss { width: 120%; right: -30%; opacity: .3; } }

/* ---------- Better section headings (animated underline) ---------- */
.section-title::after { content: ''; display: block; width: 0; height: 4px; margin-top: 1rem; border-radius: 4px; background: linear-gradient(90deg, #FF5A2E, #FFB800, #22E05A); transition: width .9s cubic-bezier(.2,.8,.2,1) .35s; }
.is-visible .section-title::after, .section-title.is-visible::after { width: 4.5rem; }
#cta-h::after { margin-inline: auto; }
.eyebrow { letter-spacing: .22em; }

/* ---------- Richer cards ---------- */
.card-lift { border-radius: 1.1rem !important; }
.card-lift:hover, .card-lift:focus-within { box-shadow: 0 30px 50px -28px rgba(232,72,15,.45); }
#services-grid article > span:first-child { background: linear-gradient(135deg, #0B1220, #1E3555); border-radius: .9rem; width: 3.4rem; height: 3.4rem; transition: transform .45s cubic-bezier(.2,.8,.2,1), background .3s, color .3s, box-shadow .3s; }
#services-grid article:hover > span:first-child { background: linear-gradient(135deg, #E8480F, #FF8A2E); color: #fff; transform: rotate(-8deg) scale(1.1); box-shadow: 0 14px 24px -10px rgba(232,72,15,.65); }
#services-grid article h3 { transition: color .25s; } #services-grid article:hover h3 { color: #E8480F; }
.tilt { transform-style: preserve-3d; will-change: transform; }
.js .reveal.tilt.is-visible.tilt-on:hover, .tilt-on.card-lift:hover, .tilt-on.project-card:hover { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-6px); }
.js .reveal.tilt-on.is-visible { transition: transform .18s ease-out, opacity .7s ease, box-shadow .3s, border-color .3s; transition-delay: 0s; }

/* Stats: gradient numerals + hover glow */
#stats dl > div:not(:last-child) dd span { background: linear-gradient(95deg, #0B1220 0%, #E8480F 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
#stats dl > div { position: relative; }
#stats dl > div::after { content: ''; position: absolute; right: -2rem; bottom: -2rem; width: 8rem; height: 8rem; border-radius: 50%; background: radial-gradient(circle, rgba(255,90,46,.14), transparent 70%); transition: transform .6s; }
#stats dl > div:hover::after { transform: scale(1.8); }

/* Project cards: rounder, scale-in reveal, sliding caption */
.project-card { border-radius: 1.1rem !important; }
.js .project-card.reveal:not(.is-visible) { transform: translateY(34px) scale(.94); }
.project-card .project-overlay span { transform: translateY(14px); transition: transform .4s cubic-bezier(.2,.8,.2,1); }
.project-card:hover .project-overlay span { transform: none; }
.project-card::before { content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.18) 50%, transparent 65%); transform: translateX(-130%); transition: transform .9s; }
.project-card:hover::before { transform: translateX(130%); }

/* Images: soft frame + glow */
.curtain, .img-zoom { border-radius: 1.1rem; }
figure.reveal-left .corner { animation: corner-pulse 3s ease-in-out infinite; }
@keyframes corner-pulse { 50% { transform: translate(-4px, -4px); } }
figure.reveal-left .corner.br { animation-name: corner-pulse-br; } @keyframes corner-pulse-br { 50% { transform: translate(4px, 4px); } }

/* Sections: layered backgrounds */
.bg-paper { background-image: radial-gradient(900px circle at 100% 0%, rgba(255,184,0,.07), transparent 55%), radial-gradient(700px circle at 0% 100%, rgba(255,90,46,.06), transparent 55%); }
.bg-ink.on-dark { background-image: radial-gradient(800px circle at 90% 10%, rgba(255,90,46,.14), transparent 55%), radial-gradient(600px circle at 5% 95%, rgba(34,224,90,.07), transparent 55%); }

/* Buttons: bolder */
.btn { border-radius: .75rem; padding: .95rem 1.7rem; }
.btn-primary { background: linear-gradient(135deg, #E8480F, #FF6B35); }
.btn-primary:hover { background: linear-gradient(135deg, #C93A08, #E8480F); box-shadow: 0 16px 30px -12px rgba(232,72,15,.75); }
.btn-dark:hover { background: #E8480F; }

/* Expertise list hover slide */
#expertise-list li { transition: padding-left .3s cubic-bezier(.2,.8,.2,1), background-color .3s; border-radius: .5rem; }
#expertise-list li:hover { padding-left: 1rem; background: linear-gradient(90deg, #FFF3EC, transparent); }
#expertise-list li:hover > i { color: #E8480F; transform: rotate(12deg) scale(1.2); } #expertise-list li > i { transition: transform .3s, color .3s; }

/* Software + client chips */
#software-grid li { border-radius: 1rem; position: relative; }
#software-grid li p:first-child { transition: color .25s; } #software-grid li:hover p:first-child { color: #E8480F; }
.marquee-track li { transition: background-color .25s, color .25s, transform .25s, border-color .25s; }
.marquee-track li:hover { background: #E8480F; color: #fff; border-color: #E8480F; transform: translateY(-3px); }

/* Back-to-top + footer links */
#back-to-top { border-radius: 999px; }
#site-footer a { transition: color .2s, transform .2s; }
#site-footer ul a:hover { transform: translateX(4px); display: inline-block; }

@media (prefers-reduced-motion: reduce) {
  .truss .chord, .truss .web { stroke-dashoffset: 0; animation: none; } .truss .node { opacity: 1; animation: none; }
  .sparks { display: none; } #site-header, #site-header .btn-primary { animation: none; }
  .section-title::after { width: 4.5rem; transition: none; }
}

/* ---------- Hero photo backgrounds + service card images ---------- */
.hero-bg { transform: scale(1.08); animation: hero-kenburns 22s ease-in-out infinite alternate; filter: saturate(1.1) contrast(1.05); }
@keyframes hero-kenburns { to { transform: scale(1.2) translate(-1.5%, -1%); } }
.hero-shade { background: linear-gradient(100deg, rgba(11,18,32,.94) 0%, rgba(11,18,32,.82) 45%, rgba(11,18,32,.5) 100%), radial-gradient(700px circle at 85% 20%, rgba(255,90,46,.28), transparent 60%); }
main > section.on-dark:first-child .hero-bg { z-index: -20; }
.svc-card { padding: 0 !important; }
.svc-img { border-radius: 1.1rem 1.1rem 0 0 !important; }
.svc-img img { transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.svc-card:hover .svc-img img { transform: scale(1.1); }
.svc-shade { background: linear-gradient(to top, rgba(11,18,32,.75), transparent 60%); }
.svc-card .svc-icon { position: absolute; left: 1.25rem; bottom: -1.5rem; z-index: 2; box-shadow: 0 12px 24px -10px rgba(0,0,0,.5); border: 3px solid #fff; }
#services-grid .svc-card:hover .svc-icon { background: linear-gradient(135deg, #E8480F, #FF8A2E); color: #fff; transform: rotate(-8deg) scale(1.1); }
@media (prefers-reduced-motion: reduce) { .hero-bg { animation: none; transform: none; } }

/* Hero without emblem: let the truss fill the right side */
.truss { opacity: .7; width: min(58%, 56rem); right: -2%; bottom: 8%; }
@media (max-width: 1023px) { .truss { opacity: .35; } }

/* ---------- v2.4 fixes ---------- */
/* 1) Truss + sparks removed from heroes */
.truss, .sparks { display: none !important; }
/* 2) Headline: stop descenders (g, y, p) being clipped / overlapped */
.word { padding-bottom: .28em; margin-bottom: -.28em; }
.w { padding-bottom: .24em; margin-bottom: -.24em; }
h1[data-split] { line-height: 1.12 !important; }

/* =====================================================================
   v2.5 – NEW IMAGE ANIMATION (replaces the black curtain slide)
   Diagonal-free "unveil": image wipes in from the bottom while zooming
   out from a dim, desaturated state, then a light sheen sweeps across.
   Plus scroll parallax inside the frame. Applies to ALL pages.
   ===================================================================== */
.js .curtain { position: relative; overflow: hidden; }
.js .curtain::before { background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.38) 50%, transparent 70%); transform: translateX(-130%); transition: none; }
.js .curtain.is-visible::before { transform: translateX(-130%); animation: img-sheen 1.5s cubic-bezier(.4,0,.2,1) 1s 1 both; }
@keyframes img-sheen { from { transform: translateX(-130%); } to { transform: translateX(130%); } }
.js .curtain img {
  clip-path: inset(100% 0 0 0 round 1.1rem); transform: scale(1.45); filter: brightness(.55) saturate(.4) blur(6px);
  transition: clip-path 1.25s cubic-bezier(.77,0,.18,1), transform 2s cubic-bezier(.2,.7,.2,1), filter 1.5s ease;
  translate: 0 var(--py, 0px); will-change: transform, clip-path;
}
.js .curtain.is-visible img { clip-path: inset(0 0 0 0 round 1.1rem); transform: scale(1.12); filter: none; }
.js .curtain.is-visible:hover img { transform: scale(1.19); transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.js .curtain::after { content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 0 0 rgba(255,90,46,.0); transition: box-shadow .5s; }
.js .curtain:hover::after { box-shadow: inset 0 0 0 4px rgba(255,90,46,.85), inset 0 -80px 80px -60px rgba(11,18,32,.45); }
.js .curtain { transition-duration: .9s; }

/* Soft blur-in for every reveal on every page */
.js .reveal:not(.is-visible) { filter: blur(5px); }
.js .reveal { transition-property: opacity, transform, filter; }
.js .reveal.tilt-on.is-visible { transition-property: transform, opacity, box-shadow, border-color, filter; }

/* Mouse spotlight in dark sections / heroes */
.spot::before { content: ''; position: absolute; inset: 0; z-index: -4; pointer-events: none; background: radial-gradient(420px circle at var(--mx, 70%) var(--my, 30%), rgba(255,138,46,.22), transparent 65%); opacity: .9; transition: opacity .4s; }

@media (prefers-reduced-motion: reduce) {
  .js .curtain img { clip-path: none; transform: none; filter: none; translate: none; transition: none; }
  .js .curtain::before { display: none; } .js .reveal:not(.is-visible) { filter: none; } .spot::before { display: none; }
}

/* =====================================================================
   v2.6 – PREMIUM DESIGN POLISH (all pages)
   ===================================================================== */
::selection { background: #FF5A2E; color: #fff; }
html { scrollbar-color: #E8480F #F1F5F9; }
::-webkit-scrollbar { width: 11px; } ::-webkit-scrollbar-track { background: #F1F5F9; }
::-webkit-scrollbar-thumb { background: linear-gradient(#FF5A2E, #FFB800); border-radius: 10px; border: 2px solid #F1F5F9; }

/* Diagonal hero edge on inner pages */
main > section.on-dark:first-child:not([aria-labelledby="hero-h"]) { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 3.2vw), 0 100%); padding-bottom: calc(5rem + 3vw); }
main > section.on-dark:first-child .hero-bg { animation-duration: 18s; }

/* Word-by-word section headings */
.sw-ready .sw { display: inline-block; opacity: 0; transform: translateY(.55em) rotateX(-55deg) scale(.96); transform-origin: 50% 100%; filter: blur(4px);
  transition: opacity .7s ease, transform .8s cubic-bezier(.2,.8,.2,1), filter .7s ease; transition-delay: calc(var(--i) * 70ms + .1s); }
.sw-ready.sw-in .sw { opacity: 1; transform: none; filter: none; }
.section-title { perspective: 700px; }

/* Cursor-following glow inside cards */
.card-lift::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(320px circle at var(--gx, 50%) var(--gy, 50%), rgba(255,138,46,.16), transparent 65%); }
.card-lift:hover::after { opacity: 1; }

/* Animated CTA band: drifting gradient + floating shapes */
section[aria-labelledby="cta-h"] { background-size: 220% 220%; animation: grad-drift 14s ease-in-out infinite; isolation: isolate; }
@keyframes grad-drift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
section[aria-labelledby="cta-h"]::before, section[aria-labelledby="cta-h"]::after { content: ''; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
section[aria-labelledby="cta-h"]::before { width: 26rem; height: 26rem; left: -8rem; top: -10rem; background: radial-gradient(circle, rgba(255,255,255,.22), transparent 70%); animation: blob 11s ease-in-out infinite; }
section[aria-labelledby="cta-h"]::after { width: 30rem; height: 30rem; right: -10rem; bottom: -14rem; background: radial-gradient(circle, rgba(255,184,0,.4), transparent 70%); animation: blob 13s ease-in-out infinite reverse; }
@keyframes blob { 50% { transform: translate(40px, 30px) scale(1.18); } }

/* Dark navy stats band + dark sections: subtle moving sheen */
.bg-navy.on-dark, section.on-dark.bg-ink:not(:first-child) { position: relative; }
.bg-navy.on-dark::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 40%, rgba(255,184,0,.07) 50%, transparent 60%); background-size: 250% 100%; animation: band-sheen 9s linear infinite; }
@keyframes band-sheen { from { background-position: 150% 0; } to { background-position: -50% 0; } }

/* Forms */
.field { border-radius: .8rem; border-width: 1.5px; background: #FBFCFE; }
.field:hover { border-color: #94A3B8; }
.field:focus { background: #fff; box-shadow: 0 0 0 4px rgba(232,72,15,.16), 0 10px 24px -14px rgba(232,72,15,.5); transform: translateY(-1px); }

/* Content links get an animated underline */
main p a:not(.btn), main li a:not(.btn):not(.mobile-link) { background: linear-gradient(#E8480F, #E8480F) 0 100% / 0 2px no-repeat; transition: background-size .3s, color .2s; }
main p a:not(.btn):hover, main li a:not(.btn):hover { background-size: 100% 2px; }

/* Footer */
#site-footer { position: relative; background-image: radial-gradient(700px circle at 85% 0%, rgba(255,90,46,.16), transparent 60%), radial-gradient(500px circle at 0% 100%, rgba(34,224,90,.08), transparent 60%); }
#site-footer::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, #FF5A2E, #FFB800, #22E05A, #FFB800, #FF5A2E); background-size: 200% 100%; animation: band-sheen 6s linear infinite; }

/* Stagger helper: grids of reveal cards cascade in */
.grid > .reveal:nth-child(2) { transition-delay: .08s; } .grid > .reveal:nth-child(3) { transition-delay: .16s; }
.grid > .reveal:nth-child(4) { transition-delay: .24s; } .grid > .reveal:nth-child(5) { transition-delay: .32s; } .grid > .reveal:nth-child(6) { transition-delay: .4s; }

@media (prefers-reduced-motion: reduce) {
  .sw-ready .sw { opacity: 1; transform: none; filter: none; transition: none; }
  section[aria-labelledby="cta-h"], section[aria-labelledby="cta-h"]::before, section[aria-labelledby="cta-h"]::after, .bg-navy.on-dark::after, #site-footer::before { animation: none; }
}
