/* =============================================================
   AR Infra Consultancy — overhaul.css (v3 visual overhaul)
   User-approved scope, 2026-09-30:
   - Hybrid hero: v3 dark full-viewport opening (centered extruded
     mark3d, reuse of hero.js + main.js parallax) WITH the v2
     docked service strip retained beneath the CTAs.
   - Blue-tint blueprint surfaces + v3 accent triad (#3A7BD5 /
     #7B3FA0 / #C2185B) — see :root in styles.css.
   - Real Unsplash photography in src/assets/images/, all
     "Stock photo" credits purged.
   - Verified v2 cookie-gated map left untouched (no cookie.js
     changes; map markup keeps data-src + #map-placeholder).
   Every token here exists in styles.css :root. No framework.
   ============================================================= */

/* ---------- Gradient section divider ---------- */
.gradient-strip {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--brand-gradient);
}

/* =============================================================
   1. FULL-VIEWPORT LOGO OPENING (dark, centered mark)
   Replaces the light .hero3d shell on index.html. The survey
   plane, mark-stage/mark3d extrusion (hero.js) and svc-strip are
   re-hosted inside this section.
   ============================================================= */
.logo-opening {
  position: relative;
  overflow: hidden;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  /* v5 (AGENT-2): soft blue-white gradient — NOT pure white, NOT dark.
     The particle canvas (#hero-canvas-container) shows through this. */
  background: linear-gradient(135deg, #F0F4FB 0%, #E8EFF9 40%, #EEF0FF 100%);
  color: var(--text);
  padding: calc(var(--header-h) + var(--space-6)) var(--space-4) var(--space-6);
}

.logo-opening::before {
  content: "";
  position: absolute;
  inset: 0;
  /* Brand washes read on the light gradient at a lower alpha than on dark */
  background:
    radial-gradient(ellipse 60% 40% at 30% 60%, rgba(58, 123, 213, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 50% at 70% 40%, rgba(194, 24, 91, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* v5: blueprint floor removed (AGENT-1). This wrapper now only hosts the
   Three.js particle canvas; pointer-events:none keeps it a pure backdrop. */
.logo-opening-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.logo-opening-text {
  position: relative;
  z-index: 10;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: var(--space-4);
  max-width: 50rem;
}

.logo-tagline {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--brand-blue);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0;
}

.logo-opening h1 {
  color: var(--text);
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.12;
  margin: 0;
  max-width: 22ch;
}

/* Entrance choreography — transform/opacity only */
@media (prefers-reduced-motion: no-preference) {
  .logo-tagline   { animation: fade-up 0.7s var(--ease) both; }
  .logo-opening h1 { animation: fade-up 0.7s 0.12s var(--ease) both; }
  .logo-ctas      { animation: fade-up 0.7s 0.24s var(--ease) both; }
  .service-scroll-strip { animation: fade-up 0.7s 0.36s var(--ease) both; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.logo-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
}

/* Ghost button on the light opening */
.logo-opening .btn-outline {
  color: var(--text);
  border-color: rgba(28, 21, 40, 0.4);
}

.logo-opening .btn-outline:hover {
  background: rgba(58, 123, 213, 0.1);
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

/* ---------- Service chips row ---------- */
.service-scroll-strip {
  position: relative;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  max-width: 60rem;
}

.service-chip {
  display: inline-block;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(58, 123, 213, 0.3);
  border-radius: var(--r-full);
  padding: 0.45rem 1.1rem;
  color: var(--text);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  transition: background-color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.service-chip:hover {
  background: rgba(58, 123, 213, 0.16);
  border-color: rgba(58, 123, 213, 0.6);
  color: var(--brand-blue);
}

.service-chip:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 2px;
}

/* ---------- Scroll hint ---------- */
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: rgba(28, 21, 40, 0.5);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  pointer-events: none;
}

/* ---------- Dark-surface overrides for the carried-over pieces ----------
   landing.css styles .mark3d/.svc-strip for the light hero; the opening
   is dark, so text/icon/panel colours are re-pointed here. Structure,
   3D transforms and JS hooks are untouched. */

.logo-opening .mark-stage { min-height: clamp(220px, 34vh, 360px); }

.logo-opening .mark3d { width: clamp(240px, 32vw, 420px); }

/* Back-extrusion layers darken with depth (reads against the light gradient) */
.logo-opening .mark-layer {
  filter: brightness(calc(1 - var(--i) * 0.05)) saturate(calc(1 - var(--i) * 0.06));
}

/* Ground shadow reads on the light gradient: soft neutral drop */
.logo-opening .mark-shadow {
  background: radial-gradient(ellipse at center, rgba(26, 17, 40, 0.3), transparent 70%);
}

/* Docked service strip: light glass panels with the brand top border */
.logo-opening .svc-strip {
  position: relative;
  z-index: 10;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(58, 123, 213, 0.16);
  border-radius: var(--r-md);
  overflow: hidden;
  max-width: var(--max-w);
  width: calc(100% - 2 * var(--space-4));
}

.logo-opening .svc-item { border-left-color: rgba(58, 123, 213, 0.28); color: var(--text); }

.logo-opening .svc-item:hover { background: rgba(58, 123, 213, 0.1); color: var(--text); }

.logo-opening .svc-icon { color: var(--brand-blue); }

.logo-opening .svc-item h3 { color: var(--text); }

.logo-opening .svc-item p { color: var(--text-2); }

/* Plane art re-tints to the blue accent on the dark opening */
.logo-opening [data-anim="dash"] { stroke: var(--brand-blue); }

/* =============================================================
   2. IMG ZOOM WRAP (hover scale, overflow clipped)
   ============================================================= */
.img-zoom-wrap {
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--bg-alt);
}

.img-zoom-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

@media (prefers-reduced-motion: no-preference) {
  .img-zoom-wrap:hover img { transform: scale(1.05); }
}

/* =============================================================
   3. WHAT WE BUILD (three photo panels)
   ============================================================= */
.what-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-5);
}

.what-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.what-card-label h3 {
  font-size: 1.1rem;
  line-height: 1.35;
  margin: var(--space-1) 0 0;
}

.gradient-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-violet);
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
  .gradient-tag {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

/* =============================================================
   4. SERVICE PHOTO GRID (v5 AGENT-3: large images, not small tiles)
   One dominant 16:9 hero image on top, two 4:3 below.
   ============================================================= */
.service-photo-grid {
  display: grid;
  grid-template-areas:
    "main main"
    "sub1 sub2";
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* First image: large hero image */
.service-photo-grid .img-zoom-wrap:first-child {
  grid-area: main;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-md);
}

/* Second and third: side by side below */
.service-photo-grid .img-zoom-wrap:nth-child(2) {
  grid-area: sub1;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-sm);
}
.service-photo-grid .img-zoom-wrap:nth-child(3) {
  grid-area: sub2;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-sm);
}

.service-photo-grid .img-zoom-wrap {
  overflow: hidden;
  border-radius: var(--r-md);
}

.service-photo-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease);
}
.service-photo-grid .img-zoom-wrap:hover img { transform: scale(1.05); }

@media (max-width: 768px) {
  .service-photo-grid {
    grid-template-areas: "main" "sub1" "sub2";
    grid-template-columns: 1fr;
  }
}

/* =============================================================
   5. MASONRY PROJECT GRID (Selected Work)
   ============================================================= */
.project-masonry { columns: 3; column-gap: var(--space-4); }

.project-masonry .project-card {
  break-inside: avoid;
  margin-bottom: var(--space-4);
  display: inline-block;
  width: 100%;
}

.project-card-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
  transition: transform 0.6s var(--ease);
}

@media (prefers-reduced-motion: no-preference) {
  .project-card:hover .project-card-img { transform: scale(1.04); }
}

/* Real-photo card text pieces (complement the v2 .project-card-* set) */
.project-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-violet);
  background: rgba(123, 63, 160, 0.08);
  border-radius: var(--r-full);
  padding: 0.2rem 0.65rem;
  margin-bottom: var(--space-2);
}

.project-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.3;
  margin: 0 0 var(--space-2);
}

.project-desc {
  font-size: var(--fs-sm);
  color: var(--text-2);
  line-height: 1.55;
  margin: 0;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-light);
  font-size: var(--fs-xs);
  color: var(--text-2);
}

/* =============================================================
   6. VIDEO SECTION (reserved for a future full-bleed band)
   ============================================================= */
.video-section {
  position: relative;
  overflow: hidden;
  min-height: 480px;
  display: flex;
  align-items: center;
}

.video-section video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.video-section .video-overlay {
  position: absolute;
  inset: 0;
  background: var(--img-overlay);
  z-index: 1;
}

.video-section .video-content {
  position: relative;
  z-index: 2;
  color: #FFFFFF;
}

/* =============================================================
   7. CONTACT SPLIT LAYOUT
   Left: real photo with gradient overlay + office info.
   Right: the existing v2 form, byte-for-byte (frozen logic).
   ============================================================= */
.contact-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 600px;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 10px 32px rgba(26, 17, 40, 0.12);
  background: var(--bg-card);
}

.contact-split-image {
  position: relative;
  min-height: 400px;
}

.contact-split-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.contact-split-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--img-overlay);
}

.contact-split-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: var(--space-5);
  color: #FFFFFF;
}

.contact-split-info a { color: #FFFFFF; }

.contact-split-form { padding: var(--space-6) var(--space-5); }

/* Glassy office-hours chip variant used on the photo overlay */
.contact-split-info .office-hours {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
}

/* =============================================================
   8. SERVICE DETAIL SECTIONS (services.html)
   Alternating text / photo-grid rows with What/How cards.
   ============================================================= */
.service-detail {
  padding-block: var(--space-7);
  border-bottom: 1px solid var(--border-light);
}

.service-detail:nth-of-type(even) { background: var(--bg-alt); }

.service-detail-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: var(--space-6);
  align-items: start;
}

/* Alternate photo side per service; direction trick keeps DOM order logical */
.service-detail-inner.reverse { direction: rtl; }
.service-detail-inner.reverse > * { direction: ltr; }

.service-detail-text .gradient-tag { margin-bottom: var(--space-2); }

.service-detail-text h2 { margin-bottom: var(--space-3); }

.service-detail-text > p { color: var(--text-2); }

.what-how {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-top: var(--space-5);
}

.what-how-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  padding: var(--space-4);
}

.what-how-card h4 {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-blue);
  margin: 0 0 var(--space-2);
}

.what-how-card p {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.6;
  margin: 0;
}

.service-detail .text-link { display: inline-block; margin-top: var(--space-4); }

/* =============================================================
   9. RESPONSIVE
   ============================================================= */
@media (max-width: 1024px) {
  .project-masonry { columns: 2; }
  .logo-opening .mark3d { width: clamp(220px, 40vw, 360px); }
}

@media (max-width: 900px) {
  .contact-split { grid-template-columns: 1fr; }
  .contact-split-image { min-height: 340px; }
}

@media (max-width: 768px) {
  .what-grid { grid-template-columns: 1fr; }
  .service-detail-inner { grid-template-columns: 1fr; direction: ltr; }
  .what-how { grid-template-columns: 1fr; }
  .logo-opening .svc-strip { grid-template-columns: 1fr; width: 100%; }
  .logo-opening .svc-item { border-left: 0; border-top: 1px solid rgba(58, 123, 213, 0.24); }
  .logo-opening .svc-item:first-child { border-top: 0; }
}

@media (max-width: 640px) {
  /* v5: service photo grid already stacks via the 768px block above */
  .logo-ctas .btn { width: 100%; }
  .scroll-hint { display: none; }
}

/* =============================================================
   10. CENTERED FLOW STACK (inside the dark opening)
   Wraps mark → text → chips so the hero.js scroll easing and the
   docked svc-strip below keep working unchanged.
   ============================================================= */
.logo-opening-flow {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  width: 100%;
  flex: 1;
}

/* =============================================================
   11. V4 ADDITIONS (2026-10-01): auto-scroll photo strips,
   full-width video banner, tabbed service panels, decorative
   parallax text, featured project + 4-up grid, dark home CTA.
   Only real styles.css :root tokens are referenced.
   ============================================================= */

/* ---------- Auto-scroll image strip ---------- */
.scroll-strip {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 12px 0;
  /* Fade both edges so items dissolve in/out of view */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.scroll-strip-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: scroll-x 32s linear infinite;
}

/* Pause for reading when the pointer is over the strip */
.scroll-strip:hover .scroll-strip-track { animation-play-state: paused; }

.scroll-strip-track .scroll-item {
  flex-shrink: 0;
  width: 380px;   /* v5: wider */
  height: 260px;  /* v5: taller */
  border-radius: var(--r-md);
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 24px rgba(26, 17, 40, 0.14);  /* depth */
}

.scroll-strip-track .scroll-item img,
.scroll-strip-track .scroll-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease);
}

@media (prefers-reduced-motion: no-preference) {
  .scroll-strip-track .scroll-item:hover img,
  .scroll-strip-track .scroll-item:hover video { transform: scale(1.06); }
}

/* Caption overlay on each strip item */
.scroll-item-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  background: linear-gradient(to top, rgba(16, 12, 30, 0.78), transparent);
  color: #FFFFFF;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Direction and speed variants */
.scroll-strip.reverse .scroll-strip-track { animation-direction: reverse; }
.scroll-strip.slow .scroll-strip-track { animation-duration: 48s; }
.scroll-strip.fast .scroll-strip-track { animation-duration: 20s; }

/* Compact variant: per-service strips on services.html */
.scroll-strip.compact .scroll-strip-track .scroll-item { width: 280px; height: 190px; }

/* -50% because the track content is duplicated for a seamless loop */
@keyframes scroll-x {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-strip-track { animation: none; }
}

@media (max-width: 640px) {
  .scroll-strip-track .scroll-item { width: 240px; height: 160px; }
  .scroll-strip.compact .scroll-strip-track .scroll-item { width: 180px; height: 120px; }
}

/* ---------- Full-width video banner ---------- */
.video-banner {
  position: relative;
  width: 100%;
  height: 520px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-banner .vb-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(135deg, #100C1E 0%, #1A1A3E 100%);
}

.video-banner video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.video-banner .vb-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(135deg,
    rgba(16, 12, 30, 0.82) 0%,
    rgba(58, 123, 213, 0.48) 50%,
    rgba(123, 63, 160, 0.38) 100%);
}

.video-banner .vb-content {
  position: relative;
  z-index: 3;
  text-align: center;
  color: #FFFFFF;
  padding: 0 24px;
  max-width: 700px;
}

.video-banner .vb-content h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  color: #FFFFFF;
  margin-bottom: 16px;
  line-height: 1.15;
}

.video-banner .vb-content p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 28px;
  line-height: 1.6;
}

.vb-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 16px;
}

@media (max-width: 768px) {
  .video-banner { height: 420px; }
}

/* ---------- Service tab panels (home What We Do) ---------- */
.service-tabs {
  display: flex;
  flex-direction: column;
}

.service-tab-nav {
  display: flex;
  overflow-x: auto;
  gap: 0;
  border-bottom: 2px solid var(--border);
  scrollbar-width: none;
}
.service-tab-nav::-webkit-scrollbar { display: none; }

.stab-btn {
  flex-shrink: 0;
  padding: 14px 24px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-2);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.stab-btn:hover { color: var(--brand-blue); }
.stab-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.stab-btn.active {
  color: var(--brand-blue);
  border-bottom-color: var(--brand-blue);
}

.stab-panel { display: none; padding: 40px 0 0; }
.stab-panel.active { display: block; }
.stab-panel:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }

.stab-inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: start;
}

.stab-text h3 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--text);
  margin-bottom: 14px;
}

.stab-text p {
  font-size: 0.975rem;
  color: var(--text-2);
  line-height: 1.7;
  margin: 0 0 20px;
}

.stab-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-blue);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: gap var(--t-fast) var(--ease);
}
.stab-link:hover { gap: 12px; color: var(--link-hover); }

.stab-image-strip {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Main image + two thumbnails layout */
.stab-img-main {
  width: 100%;
  aspect-ratio: 4/3;  /* v5: taller for more image presence */
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(26, 17, 40, 0.14);
}
.stab-img-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease);
}
@media (prefers-reduced-motion: no-preference) {
  .stab-img-main:hover img { transform: scale(1.04); }
}

.stab-img-thumbs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.stab-img-thumb {
  aspect-ratio: 1/1;  /* v5: square thumbnails */
  border-radius: var(--r-sm);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(26, 17, 40, 0.12);
}
.stab-img-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease);
}
@media (prefers-reduced-motion: no-preference) {
  .stab-img-thumb:hover img { transform: scale(1.06); }
}

@media (max-width: 768px) {
  .stab-inner { grid-template-columns: 1fr; gap: var(--space-4); }
}

/* ---------- Decorative background text (blueprint feel) ---------- */
.parallax-text-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: clamp(80px, 14vw, 200px);
  font-weight: 800;
  color: rgba(58, 123, 213, 0.04);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.04em;
  z-index: 0;
}

/* ---------- Featured project card (large, horizontal) ---------- */
.project-feature {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 10px 32px rgba(26, 17, 40, 0.12);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  margin-bottom: 20px;
}

.project-feature-img { aspect-ratio: 4/3; overflow: hidden; }

.project-feature-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
  display: block;
}

@media (prefers-reduced-motion: no-preference) {
  .project-feature:hover .project-feature-img img { transform: scale(1.04); }
}

.project-feature-body {
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-feature-body h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.3;
}

.project-feature-body p {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 20px;
}

.project-feature .project-meta { margin-top: auto; }

/* Four-up compact project grid (home Selected Work) */
.project-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.work-cta-row { text-align: center; margin-top: 36px; }

@media (max-width: 1024px) {
  .project-feature { grid-template-columns: 1fr; }
  .project-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .project-grid-4 { grid-template-columns: 1fr; }
}

/* ---------- Dark home CTA (split: copy | real form) ----------
   Left: headline and contact details. Right: the real enquiry
   form (same fields and endpoint as contact.html) on a light
   card, so the dark band keeps the form legible. */
.home-cta {
  position: relative;
  background:
    radial-gradient(ellipse 55% 60% at 15% 20%, rgba(58, 123, 213, 0.16) 0%, transparent 70%),
    radial-gradient(ellipse 45% 55% at 85% 80%, rgba(194, 24, 91, 0.10) 0%, transparent 70%),
    linear-gradient(160deg, var(--bg-hero) 0%, var(--bg-deep) 100%);
  color: var(--text-on-dark);
  padding-block: var(--space-8);
}

.home-cta h2 {
  color: #FFFFFF;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  line-height: 1.15;
}

.home-cta-copy > p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.78);
  max-width: 42ch;
  line-height: 1.7;
}

.home-cta-details {
  list-style: none;
  margin: var(--space-5) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.72);
}

.home-cta-details a {
  color: #FFFFFF;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.home-cta-details a:hover { border-bottom-color: #FFFFFF; }

.home-cta-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-7);
  align-items: center;
}

.home-cta-form {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  padding: var(--space-6) var(--space-5);
  box-shadow: 0 24px 60px rgba(13, 8, 32, 0.45);
}

.home-cta-form h3 {
  margin: 0 0 var(--space-4);
  color: var(--text);
  font-size: var(--fs-lg);
}

@media (max-width: 900px) {
  .home-cta-inner { grid-template-columns: 1fr; gap: var(--space-6); }
}

/* =============================================================
   v5 AGENT-6: 3D ENHANCEMENTS (depth/3D feel)
   Note: --shadow-sm/md/lg tokens do not exist in this project,
   so literal shadows are used (consistent with AGENT-3 edits).
   ============================================================= */

/* ── 3D CARD TILT ON HOVER ────────────────────────────────────────
   main.js adds inline transform: rotateX(Ndeg) rotateY(Ndeg). */
.card-3d {
  transform-style: preserve-3d;
  transition: transform 0.4s var(--ease);
  will-change: transform;
}
@media (prefers-reduced-motion: reduce) {
  .card-3d { transition: none; will-change: auto; }
}

/* ── GLASSMORPHISM CARD ────────────────────────────────────────── */
.glass-card {
  background: rgba(255, 255, 255, 0.65);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: var(--r-md);
  box-shadow:
    0 8px 32px rgba(58, 123, 213, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* ── GRADIENT BORDER CARD (3D-feeling depth) ───────────────────── */
.gradient-border-card {
  position: relative;
  border-radius: var(--r-md);
  background: var(--bg-card);
}
.gradient-border-card::before {
  content: "";
  position: absolute;
  inset: -1.5px;
  border-radius: calc(var(--r-md) + 1.5px);
  background: var(--brand-gradient);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.gradient-border-card:hover::before { opacity: 1; }

/* ── FLOATING SHADOW (depth illusion) ──────────────────────────── */
.float-shadow {
  box-shadow: 0 6px 18px rgba(26, 17, 40, 0.10);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.float-shadow:hover {
  box-shadow: 0 20px 60px rgba(58, 123, 213, 0.20), 0 8px 24px rgba(123, 63, 160, 0.12);
  transform: translateY(-6px) scale(1.01);
}
@media (prefers-reduced-motion: reduce) {
  .float-shadow, .float-shadow:hover { transition: none; transform: none; }
}

/* ── SERVICE CHIP 3D FEEL ──────────────────────────────────────── */
.service-chip {
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
              background 0.2s, border-color 0.2s;
}
.service-chip:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 24px rgba(58, 123, 213, 0.25);
}
@media (prefers-reduced-motion: reduce) {
  .service-chip, .service-chip:hover { transition: none; transform: none; box-shadow: none; }
}

/* ── HERO LOGO 3D DEPTH (the mark is .mark3d here; .hero-logo-3d
      kept as an alias for spec compatibility) ─────────────────── */
.hero-logo-3d,
.logo-opening .mark3d {
  filter:
    drop-shadow(0 18px 36px rgba(58, 123, 213, 0.28))
    drop-shadow(0 4px 14px rgba(194, 24, 91, 0.18))
    drop-shadow(0 2px 6px rgba(123, 63, 160, 0.16));
}

/* ── SECTION BACKGROUND DEPTH (even sections get a soft glow) ──── */
.logo-opening + .section:nth-of-type(even),
.section:nth-of-type(even) {
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 50%, rgba(58, 123, 213, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 50%, rgba(123, 63, 160, 0.03) 0%, transparent 60%);
}
