/* ============================================================
   CEMROCK CONCRETE & CONSTRUCTION — style.css
   Industrial-rugged, professional redesign
   ============================================================ */

/* === SELF-HOSTED FONTS ===
   Font files live in /fonts/ — see /fonts/README.txt for download instructions.
   These replace the Google Fonts external request entirely.
   ============================================================ */
@font-face {
    font-family: 'Barlow Condensed';
    src: url('/fonts/barlow-condensed-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Barlow Condensed';
    src: url('/fonts/barlow-condensed-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Barlow Condensed';
    src: url('/fonts/barlow-condensed-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Barlow Condensed';
    src: url('/fonts/barlow-condensed-800.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Barlow';
    src: url('/fonts/barlow-300.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Barlow';
    src: url('/fonts/barlow-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Barlow';
    src: url('/fonts/barlow-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Barlow';
    src: url('/fonts/barlow-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* === CUSTOM PROPERTIES === */
:root {
    --color-bg:         #111111;
    --color-bg-mid:     #1c1c1c;
    --color-bg-light:   #252525;
    --color-surface:    #2a2a2a;
    --color-border:     #333333;
    --color-accent:     #D7BC20;
    --color-accent-dark:#a08e10;
    --color-accent-glow:rgba(215, 188, 32, 0.18);
    --color-text:       #d8d8d8;
    --color-text-muted: #8a8a8a;
    --color-text-faint: #555555;
    --color-white:      #f0f0f0;

    --font-heading: 'Barlow Condensed', sans-serif;
    --font-body:    'Barlow', sans-serif;

    --nav-height: 76px;
    --max-width:  1200px;
    --radius:     2px;
    --transition: 0.25s ease;

    /* Concrete texture noise via CSS */
    --texture-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
}

/* === RESET & BASE === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    overflow-x: hidden;
}

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

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover { color: #e8d040; }
a:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
    border-radius: 2px;
}

ul { list-style: none; }

/* === TYPOGRAPHY === */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--color-white);
}

/* === LAYOUT UTILITIES === */
.container {
    max-width: var(--max-width);
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
}

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

/* === NAVIGATION === */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-height);
    background: rgba(10, 10, 10, 0.97);
    border-bottom: 1px solid rgba(215, 188, 32, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: box-shadow var(--transition);
}

.site-header.scrolled {
    box-shadow: 0 4px 40px rgba(0,0,0,0.7), 0 1px 0 rgba(215, 188, 32, 0.2);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 2rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: auto;
}

.nav-logo img {
    height: 56px;
    width: auto;
}

.logo-fallback {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--color-accent);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius);
    transition: color var(--transition), background var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0.85rem;
    right: 0.85rem;
    height: 2px;
    background: var(--color-accent);
    transform: scaleX(0);
    transition: transform var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-white);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.nav-link--cta {
    background: var(--color-accent);
    color: var(--color-bg) !important;
    font-weight: 700;
    padding: 0.5rem 1.25rem;
}

.nav-link--cta::after { display: none; }

.nav-link--cta:hover {
    background: #e8d040;
    color: var(--color-bg) !important;
}

/* Hamburger */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius);
}

.nav-hamburger span {
    display: block;
    height: 2px;
    background: var(--color-white);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-hamburger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-hamburger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* === HERO === */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: var(--nav-height);
    max-width: 100vw;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    /* CSS-only fallback texture shown when no photo is present */
    background:
        var(--texture-noise),
        radial-gradient(ellipse 80% 60% at 60% 40%, rgba(215, 188, 32, 0.07) 0%, transparent 65%),
        linear-gradient(160deg, #0e0e0e 0%, #181818 40%, #111111 100%);
    background-size: 200px 200px, cover, cover;
}

/* The actual photo — fills the hero, no tiling, no distortion */
.hero-photo {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    z-index: 0;
}

/* Dark gradient overlay on top of the photo so text stays readable */
.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to bottom,
        rgba(8, 8, 8, 0.70) 0%,
        rgba(8, 8, 8, 0.48) 50%,
        rgba(8, 8, 8, 0.78) 100%
    );
}

/* Vertical accent bar — left edge of hero */
/* Diagonal accent stripe — always visible */
.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background: repeating-linear-gradient(
        -55deg,
        transparent,
        transparent 40px,
        rgba(215, 188, 32, 0.012) 40px,
        rgba(215, 188, 32, 0.012) 41px
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
    max-width: 900px;
}

.hero-eyebrow {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 1.25rem;
    padding: 0.4rem 1.25rem;
    border: 1px solid rgba(215, 188, 32, 0.4);
}

.hero-heading {
    font-size: clamp(3rem, 9vw, 7rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 0.95;
    color: var(--color-white);
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 40px rgba(0,0,0,0.6);
}

.hero-sub {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    font-weight: 500;
    color: rgba(240, 240, 240, 0.88);
    max-width: 580px;
    margin: 0 auto 2.5rem;
    line-height: 1.75;
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-faint);
    font-family: var(--font-heading);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.scroll-line {
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, var(--color-accent), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.4; transform: scaleY(1); }
    50%       { opacity: 1;   transform: scaleY(1.1); }
}

/* === BUTTONS === */
.btn {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.85rem 2rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    border: 2px solid transparent;
}

.btn--primary {
    background: var(--color-accent);
    color: #0e0e0e;
    border-color: var(--color-accent);
}

.btn--primary:hover {
    background: #e8d040;
    border-color: #e8d040;
    color: #0e0e0e;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(215, 188, 32, 0.45), 0 0 60px rgba(215, 188, 32, 0.15);
}

.btn--outline {
    background: transparent;
    color: var(--color-accent);
    border-color: var(--color-accent);
}

.btn--outline:hover {
    background: var(--color-accent);
    color: #0e0e0e;
    transform: translateY(-2px);
}

.btn--large {
    font-size: 1.1rem;
    padding: 1rem 2.5rem;
}

/* === CONTENT SECTIONS === */
.content-section {
    padding: 7rem 0;
    position: relative;
}

.section--dark {
    background: #0d0d0d;
}

.section--mid {
    background: #1a1a1a;
    box-shadow:
        inset 0 1px 0 rgba(215, 188, 32, 0.08),
        inset 0 -1px 0 rgba(215, 188, 32, 0.08);
}

.section--texture {
    background:
        var(--texture-noise),
        #1e1e1e;
    background-size: 200px 200px, cover;
    box-shadow:
        inset 0 1px 0 rgba(215, 188, 32, 0.08),
        inset 0 -1px 0 rgba(215, 188, 32, 0.08);
}

/* Gold hairline + subtle glow between sections */
.content-section + .content-section {
    border-top: 1px solid rgba(215, 188, 32, 0.15);
}



.section-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 4rem;
    align-items: start;
}

/* === SPLIT SECTIONS (home page slideshow + text) === */
.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 4rem;
    align-items: stretch;
}

/* Reverse: text left, slideshow right */
.split-section--reverse {
    direction: rtl; /* flips column order */
}

.split-section--reverse > * {
    direction: ltr; /* restore normal text direction inside */
}

.split-text {
    display: flex;
    flex-direction: column;
    gap: 0;
    justify-content: center;
    min-width: 0;
}

.split-text .label-tag {
    margin-bottom: 1rem;
}

.split-text .section-heading {
    margin-top: 0.25rem;
}

.split-text p {
    margin-bottom: 1rem;
    color: var(--color-text);
}

.split-media {
    position: relative;
    min-width: 0;
    overflow: hidden;
    /* Fixed display box — always this tall, image fills it with cover */
    min-height: 480px;
}

/* On formwork page, stretch to match section height */
.formwork-section .split-media {
    align-self: stretch;
}

/* When a slideshow is inside a split section, fill the full column height */
.split-media .home-slideshow {
    aspect-ratio: unset;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: unset;
}

.split-media .slideshow-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.split-media-placeholder {
    aspect-ratio: 4/3;
    background: var(--color-surface);
    border: 1px dashed var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.split-media-placeholder span {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-faint);
}

/* === HOME SLIDESHOW === */
.home-slideshow {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--color-surface);
}

/* Taller aspect ratio for section slideshows on formwork page */
.section-slideshow {
    aspect-ratio: 3/2;
}

.slideshow-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.slideshow-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.7s ease;
    pointer-events: none;
}

.slideshow-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.slideshow-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.slideshow-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255,255,255,0.15);
    color: var(--color-white);
    font-size: 1.75rem;
    line-height: 1;
    width: 42px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: var(--radius);
    transition: background var(--transition), border-color var(--transition);
}

.slideshow-btn:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

.slideshow-btn--prev { left: 0.6rem; }
.slideshow-btn--next { right: 0.6rem; }

.slideshow-dots {
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.slideshow-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    transition: background var(--transition), transform var(--transition);
    cursor: pointer;
}

.slideshow-dot.active {
    background: var(--color-accent);
    transform: scale(1.3);
}

.section-label {
    padding-top: 0.5rem;
}

.label-tag {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--color-accent);
    padding: 0.3rem 0.85rem;
    border-left: 3px solid var(--color-accent);
    background: rgba(215, 188, 32, 0.06);
}

.section-heading {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--color-white);
    margin-bottom: 1.5rem;
    text-shadow: 0 0 40px rgba(215, 188, 32, 0.12);
}

.section-lead {
    font-size: 1.1rem;
    color: var(--color-text);
    margin-bottom: 1.25rem;
    line-height: 1.8;
}

.section-sublabel {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
}

.section-body p {
    margin-bottom: 1rem;
    color: var(--color-text);
}

/* === SERVICE LISTS === */
.service-list {
    margin-bottom: 2rem;
}

.service-list li {
    padding: 0.6rem 0 0.6rem 1.5rem;
    position: relative;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
    font-size: 1rem;
}

.service-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 2px;
    background: var(--color-accent);
}

.service-list--two-col {
    columns: 2;
    column-gap: 2rem;
}

/* === FEATURE LIST === */
.feature-list {
    margin-bottom: 2.5rem;
}

.feature-list li {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
}

.feature-icon {
    color: var(--color-accent);
    font-size: 0.6rem;
    margin-top: 0.45rem;
    flex-shrink: 0;
}

/* === PAGE BANNER === */
.page-banner {
    position: relative;
    height: 340px;
    margin-top: var(--nav-height);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-banner--gradient {
    background:
        var(--texture-noise),
        linear-gradient(135deg, #0e0e0e 0%, #1e1e1e 50%, rgba(215,188,32,0.06) 100%);
    background-size: 200px 200px, cover;
    border-bottom: 1px solid var(--color-border);
}

.page-banner--image {
    background-size: cover;
    background-position: center;
}

.page-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.85) 40%, rgba(0,0,0,0.5));
}

.page-banner-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
}

.page-banner-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--color-white);
    margin-bottom: 0.5rem;
}

.page-banner-sub {
    font-family: var(--font-heading);
    font-size: 1rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

/* === PAGE MAIN === */
.page-main {
    min-height: 60vh;
    position: relative;
    z-index: 1;
}

/* === SUB-NAVIGATION === */
.subnav {
    position: sticky;
    top: var(--nav-height);
    z-index: 900;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    overflow-x: auto;
}

.subnav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 0;
}

.subnav-link {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    padding: 1rem 1.25rem;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color var(--transition), border-color var(--transition);
}

.subnav-link:hover {
    color: var(--color-white);
    border-bottom-color: var(--color-accent);
}

/* === FORMWORK SECTIONS === */
.formwork-section {
    padding: 6rem 0;
    border-top: 1px solid rgba(215, 188, 32, 0.12);
    display: flex;
    flex-direction: column;
}

.formwork-section > .container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Split section fills the container height */
.formwork-section > .container > .split-section {
    flex: 1;
    align-items: stretch;
}

.section-header {
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(215, 188, 32, 0.1);
}

.section-header .label-tag {
    margin-bottom: 0.75rem;
    display: inline-block;
}

/* === PROJECT GROUPS === */
.project-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
}

.project-group {
    min-width: 200px;
    flex: 1;
}

.project-group-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.project-list li {
    padding: 0.45rem 0 0.45rem 1rem;
    position: relative;
    color: var(--color-text);
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(51,51,51,0.5);
}

.project-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 1px;
    background: var(--color-text-faint);
}

/* Clickable project items */
.project-item--clickable {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-accent) !important;
    user-select: none;
    transition: color var(--transition), background var(--transition);
    padding-right: 0.5rem !important;
}

.project-item--clickable:hover {
    background: rgba(215, 188, 32, 0.06);
    color: var(--color-white) !important;
}

.project-item-icon {
    font-size: 0.55rem;
    opacity: 0.6;
    flex-shrink: 0;
    margin-left: 0.5rem;
    transition: opacity var(--transition), transform var(--transition);
}

.project-item--clickable:hover .project-item-icon {
    opacity: 1;
    transform: scale(1.3);
}

/* === GALLERY === */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
    background: var(--color-surface);
}

/* Video badge — play icon overlay */
.gallery-item--video {
    background: #1a1a1a;
}

.gallery-video-badge {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    color: var(--color-accent);
    font-size: 3rem;
    opacity: 0.8;
    transition: opacity var(--transition), background var(--transition);
    pointer-events: none;
}

.gallery-item--video:hover .gallery-video-badge {
    opacity: 1;
    background: rgba(0, 0, 0, 0.7);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.06);
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.gallery-item:hover::after {
    border-color: rgba(215, 188, 32, 0.5);
    box-shadow: inset 0 0 20px rgba(215, 188, 32, 0.08);
}

.gallery-empty {
    padding: 4rem 2rem;
    text-align: center;
    background: var(--color-surface);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius);
    margin-top: 2rem;
}

.gallery-empty p {
    font-family: var(--font-heading);
    font-size: 1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-faint);
}

/* === LIGHTBOX === */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(5, 5, 5, 0.97);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 4rem calc(78px + 1rem);
}

.lightbox[hidden] { display: none; }

.lightbox-figure {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex: 1;
    min-height: 0;
}

.lightbox-figure img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
    border: 1px solid var(--color-border);
}

.lightbox-video-iframe {
    width: 100%;
    max-width: 90vw;
    max-height: 80vh;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--color-border);
}

.lightbox-figure figcaption {
    display: none;
}

/* Thumbnail strip — fixed at bottom of screen */
.lightbox-thumbs {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 0.75rem 1.5rem;
    background: rgba(8, 8, 8, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    z-index: 10001;
    scrollbar-width: thin;
    scrollbar-color: var(--color-accent) transparent;
}

.lightbox-thumbs::-webkit-scrollbar {
    height: 3px;
}
.lightbox-thumbs::-webkit-scrollbar-track { background: transparent; }
.lightbox-thumbs::-webkit-scrollbar-thumb { background: var(--color-accent); border-radius: 2px; }

.lightbox-thumb {
    flex-shrink: 0;
    width: 72px;
    height: 52px;
    border: 2px solid transparent;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    background: var(--color-surface);
    transition: border-color var(--transition), opacity var(--transition);
    opacity: 0.5;
}

.lightbox-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lightbox-thumb:hover {
    opacity: 0.85;
    border-color: rgba(215, 188, 32, 0.5);
}

.lightbox-thumb.active {
    border-color: var(--color-accent);
    opacity: 1;
}

/* Video thumbnails in lightbox strip */
.lightbox-thumb--video {
    position: relative;
}

.lightbox-thumb--video::after {
    content: '▶';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    color: var(--color-accent);
    font-size: 1.2rem;
    z-index: 1;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: fixed;
    background: rgba(10, 10, 10, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition), opacity var(--transition);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(215, 188, 32, 0.15);
    border-color: rgba(215, 188, 32, 0.4);
    color: var(--color-accent);
}

.lightbox-close svg,
.lightbox-prev svg,
.lightbox-next svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* Close — top right, circular */
.lightbox-close {
    top: 1.25rem;
    right: 1.25rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* Prev / Next — slim vertical pill, centred on sides */
.lightbox-prev,
.lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 80px;
    border-radius: 4px;
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

/* Hide arrows on mobile — swipe handles navigation */
@media (max-width: 768px) {
    .lightbox-prev,
    .lightbox-next {
        display: none;
    }
}

/* === PROSE (safety, careers) === */
.prose {
    margin-bottom: 4rem;
}

.prose p {
    margin-bottom: 1.25rem;
    color: var(--color-text);
    font-size: 1.05rem;
    line-height: 1.8;
}

/* === CERTIFICATIONS === */
.cert-section {
    margin-top: 3rem;
}

.cert-section .section-heading {
    margin-bottom: 2rem;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.cert-card {
    background: var(--color-surface);
    border: 1px solid rgba(215, 188, 32, 0.12);
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    border-left: 3px solid var(--color-accent);
    transition: background var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.cert-card:hover {
    background: var(--color-bg-light);
    box-shadow: 0 4px 24px rgba(0,0,0,0.3), 0 0 20px rgba(215, 188, 32, 0.06);
    border-color: rgba(215, 188, 32, 0.25);
}

.cert-icon {
    color: var(--color-accent);
    font-size: 1.2rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.cert-card p {
    font-size: 0.95rem;
    color: var(--color-text);
    line-height: 1.5;
}

/* === CAREERS CONTACT === */
.contact-card-row {
    display: flex;
    gap: 2rem;
    margin: 2rem 0 2.5rem;
    flex-wrap: wrap;
}

.contact-method {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.contact-method-label {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-text-faint);
}

.contact-method-value {
    font-size: 1.2rem;
    color: var(--color-white);
    font-weight: 500;
}

.cta-block {
    margin-top: 1.5rem;
}

/* === CONTACT OFFICES === */
.contact-intro {
    margin-bottom: 3.5rem;
}

.accent-link {
    color: var(--color-accent);
}

.office-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.office-card {
    background: var(--color-surface);
    border: 1px solid rgba(215, 188, 32, 0.15);
    border-top: 3px solid var(--color-accent);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.office-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 50px rgba(0,0,0,0.5), 0 0 30px rgba(215, 188, 32, 0.08);
    border-color: rgba(215, 188, 32, 0.3);
}

.office-card-header {
    padding: 1.5rem 1.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

.office-flag {
    color: var(--color-accent);
    font-size: 0.5rem;
}

.office-city {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--color-white);
    text-transform: uppercase;
}

.office-card-body {
    padding: 1.25rem 1.75rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.office-detail {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.office-detail-label {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-text-faint);
}

.office-detail-value {
    font-size: 0.95rem;
    color: var(--color-text);
    line-height: 1.5;
    transition: color var(--transition);
}

.office-address {
    font-style: normal;
}

a.office-detail-value:hover {
    color: var(--color-accent);
}

.contact-cta {
    text-align: center;
    padding: 3rem 0;
    border-top: 1px solid var(--color-border);
}

.contact-cta p {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 1.25rem;
}

/* === FOOTER === */
.site-footer {
    background: #0a0a0a;
    border-top: 1px solid var(--color-border);
    padding-top: 4rem;
    position: relative;
    z-index: 1;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem 3rem;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 3rem;
}

.footer-brand {}

.footer-logo img {
    height: 40px;
    width: auto;
    margin-bottom: 1rem;
    opacity: 0.85;
}

.footer-tagline {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    max-width: 240px;
}

.footer-nav h3,
.footer-contact h3 {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--color-text-faint);
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-nav ul {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.footer-nav a {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    transition: color var(--transition);
}

.footer-nav a:hover {
    color: var(--color-accent);
}

.footer-contact p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 0.4rem;
}

.footer-contact a {
    color: var(--color-text-muted);
    transition: color var(--transition);
}

.footer-contact a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    border-top: 1px solid var(--color-border);
    padding: 1.25rem 2rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--color-text-faint);
}

/* === THEME TOGGLE BUTTON === */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    flex-shrink: 0;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
    padding: 0;
}

.theme-toggle:hover {
    background: rgba(215, 188, 32, 0.15);
    border-color: rgba(215, 188, 32, 0.4);
    color: var(--color-accent);
}

.theme-toggle svg {
    width: 15px;
    height: 15px;
    display: block;
}

.theme-toggle .icon-sun  { display: block; }
.theme-toggle .icon-moon { display: none;  }
html.theme-light .theme-toggle .icon-sun  { display: none;  }
html.theme-light .theme-toggle .icon-moon { display: block; }

/* === SCROLL SNAP (desktop only) === */
@media (min-width: 769px) {
    body.home-page {
        scroll-snap-type: y proximity;
    }

    body.home-page .hero,
    body.home-page .content-section {
        scroll-snap-align: start;
        scroll-snap-stop: normal;
    }
}

/* ============================================================
   SCROLL ANIMATIONS — per-element, JS-driven via IntersectionObserver
   Each element gets a data-anim attribute set in HTML/PHP
   and picks up its animation from these classes.
   ============================================================ */

/* Base state — hidden before animation fires */
[data-anim] {
    opacity: 0;
    will-change: opacity, transform, filter;
    transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
    transition-property: opacity, transform, filter;
    transition-duration: 0.8s;
}

[data-anim="fade-up"] {
    transform: translateY(60px);
}

[data-anim="fade-down"] {
    transform: translateY(-40px);
}

[data-anim="fade-left"] {
    transform: translateX(-70px);
    filter: blur(2px);
}

[data-anim="fade-right"] {
    transform: translateX(70px);
    filter: blur(2px);
}

/* On mobile, replace horizontal slides with vertical fades to prevent overflow */
@media (max-width: 768px) {
    [data-anim="fade-left"],
    [data-anim="fade-right"] {
        transform: translateY(40px);
        filter: none;
    }
}

[data-anim="fade-in"] {
    transform: scale(0.97);
    filter: blur(3px);
}

[data-anim="zoom-in"] {
    transform: scale(0.92);
    filter: blur(4px);
}

/* Fired state — JS adds .anim-visible */
[data-anim].anim-visible {
    opacity: 1;
    transform: none;
    filter: none;
}

/* Delay utilities — set via data-anim-delay attribute in JS */
[data-anim-delay="1"] { transition-delay: 0.1s; }
[data-anim-delay="2"] { transition-delay: 0.2s; }
[data-anim-delay="3"] { transition-delay: 0.3s; }
[data-anim-delay="4"] { transition-delay: 0.45s; }
[data-anim-delay="5"] { transition-delay: 0.6s; }
[data-anim-delay="6"] { transition-delay: 0.75s; }

/* Hero content: floats up then fades out on scroll exit */
.hero-content {
    transition: opacity 0.4s ease, transform 0.4s ease;
}
body.home-page .hero-content.hero-exiting {
    opacity: 0;
    transform: translateY(-30px) scale(0.97);
    pointer-events: none;
}

/* === SCROLL PROGRESS BAR === */
.scroll-progress {
    position: fixed;
    left: 0;
    top: var(--nav-height);
    width: 6px;
    height: calc(100% - var(--nav-height));
    z-index: 999;
    pointer-events: none;
    background: rgba(215, 188, 32, 0.06);
}

.scroll-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(
        to bottom,
        var(--color-accent) 0%,
        rgba(215, 188, 32, 0.6) 100%
    );
    box-shadow:
        0 0 8px rgba(215, 188, 32, 0.9),
        0 0 20px rgba(215, 188, 32, 0.5),
        0 0 40px rgba(215, 188, 32, 0.2);
    height: var(--scroll-pct, 0%);
    transition: height 0.08s linear;
}

/* === SCROLL REVEAL ANIMATIONS === */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children inside revealed containers */
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }

/* === RESPONSIVE === */

@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .office-grid {
        grid-template-columns: 1fr 1fr;
    }

    .section-grid {
        grid-template-columns: 160px 1fr;
        gap: 2.5rem;
    }

    .split-section {
        gap: 2.5rem;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-hamburger {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        background: rgba(14,14,14,0.98);
        border-bottom: 1px solid var(--color-border);
        padding: 1rem;
        gap: 0.25rem;
        /* Hidden by default */
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease, padding 0.35s ease;
        padding-top: 0;
        padding-bottom: 0;
    }

    .nav-menu.open {
        max-height: 500px;
        padding: 1rem;
    }

    .nav-link {
        padding: 0.75rem 1rem;
        width: 100%;
    }

    .nav-link::after {
        bottom: 8px;
        left: 1rem;
        right: 1rem;
    }

    .nav-link--cta {
        width: fit-content;
        padding: 0.5rem 1.5rem;
        margin-top: 0.5rem;
        margin-left: auto;
        margin-right: auto;
    }

    .section-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .split-section,
    .split-section--reverse {
        grid-template-columns: 1fr;
        direction: ltr;
    }

    /* On mobile, slideshow always comes first above the text */
    .split-section .split-media    { order: -1; }
    .split-section .split-text     { order: 0; }

    .section-label {
        padding-top: 0;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .office-grid {
        grid-template-columns: 1fr;
    }

    .cert-grid {
        grid-template-columns: 1fr;
    }

    .service-list--two-col {
        columns: 1;
    }

    .project-groups {
        flex-direction: column;
    }

    .content-section {
        padding: 4rem 0;
    }

    .page-banner {
        height: 260px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .hero-heading {
        font-size: 2.5rem;
    }

    .contact-card-row {
        flex-direction: column;
    }

    .lightbox-prev { left: 0.25rem; }
    .lightbox-next { right: 0.25rem; }

    .lightbox {
        padding: 1rem 0.5rem;
    }
}
