*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --brand: #8d352b;
    --brand-lt: #b34438;
    --brand-dim: rgba(141, 53, 43, 0.15);
    --bg: #111010;
    --bg2: #1a1918;
    --bg3: #221f1e;
    --text: #f5f1ed;
    --text-muted: #c8bfb6;
    --border: rgba(240, 235, 229, 0.10);
    --mono: 'Space Mono', monospace;
    --serif: 'Playfair Display', Georgia, serif;
    --sans: 'Lato', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-weight: 400;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--brand);
    border-radius: 2px;
}

/* ── SELECTION ── */
::selection {
    background: var(--brand);
    color: #fff;
}

/* ── NAV ── */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 2.5rem;
    background: rgba(17, 16, 16, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text);
}

.nav-logo img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 6px;
}

.nav-wordmark {
    font-family: var(--sans);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--brand-lt);
}

.nav-cta {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.5rem 1.2rem;
    border: 1px solid var(--brand);
    color: var(--brand-lt);
    text-decoration: none;
    border-radius: 3px;
    transition: background 0.2s, color 0.2s;
}

.nav-cta:hover {
    background: var(--brand);
    color: #fff;
}

/* ── HERO ── */
#hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 0 2.5rem;
    gap: 4rem;
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60vw;
    height: 70vh;
    background: radial-gradient(ellipse at center, rgba(141, 53, 43, 0.18) 0%, transparent 65%);
    pointer-events: none;
}

#hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border) 30%, var(--border) 70%, transparent);
}

.hero-content {
    max-width: 560px;
}

.hero-label {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--brand-lt);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hero-label::before {
    content: '';
    display: block;
    width: 2rem;
    height: 1px;
    background: var(--brand);
}

h1 {
    font-family: var(--serif);
    font-size: clamp(2.8rem, 5vw, 4.2rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

h1 em {
    font-style: italic;
    color: var(--brand-lt);
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 440px;
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-block;
    padding: 0.85rem 2rem;
    background: var(--brand);
    color: #fff;
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 3px;
    transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover {
    background: var(--brand-lt);
    transform: translateY(-1px);
}

.btn-ghost {
    display: inline-block;
    padding: 0.85rem 2rem;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 3px;
    transition: border-color 0.2s, color 0.2s;
}

.btn-ghost:hover {
    border-color: var(--brand);
    color: var(--text);
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hero-photo-wrap {
    position: relative;
    width: 100%;
    height: 520px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(141, 53, 43, 0.3),
        0 32px 80px rgba(0, 0, 0, 0.7),
        0 0 80px rgba(141, 53, 43, 0.12);
}

.hero-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.75) saturate(0.85);
    transition: filter 0.4s;
}

.hero-photo-wrap:hover .hero-photo {
    filter: brightness(0.85) saturate(0.9);
}

.hero-photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(141, 53, 43, 0.2) 0%, transparent 60%);
    pointer-events: none;
}

/* ── SECTION SHARED ── */
section {
    padding: 6rem 2.5rem;
}

.section-label {
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--brand-lt);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-label::before {
    content: '//';
    color: var(--brand);
    font-weight: 700;
}

h2 {
    font-family: var(--serif);
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.section-intro {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 560px;
    margin-bottom: 3.5rem;
    line-height: 1.85;
}

/* ── PRODUCTS ── */
#products {
    background: var(--bg2);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.product-card {
    background: var(--bg2);
    padding: 2.5rem;
    position: relative;
    transition: background 0.2s;
}

.product-card:hover {
    background: var(--bg3);
}

.product-card.featured {
    background: var(--bg3);
    border-left: 3px solid var(--brand);
}

.product-badge {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 0.25rem 0.65rem;
    border: 1px solid var(--brand);
    color: var(--brand-lt);
    border-radius: 2px;
    margin-bottom: 1.25rem;
}

.product-name {
    font-family: var(--serif);
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.product-desc {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.product-features {
    list-style: none;
    margin-bottom: 2rem;
}

.product-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--border);
}

.product-features li:last-child {
    border-bottom: none;
}

.product-features li::before {
    content: '→';
    color: var(--brand);
    flex-shrink: 0;
    margin-top: 0.05rem;
}

.product-link {
    font-family: var(--mono);
    font-size: 0.84rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--brand-lt);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: gap 0.2s;
}

.product-link:hover {
    gap: 0.7rem;
}


/* ── EXPERTISE ── */
#expertise {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: start;
}

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

.expertise-item {
    padding: 1.75rem 0;
    border-bottom: 1px solid var(--border);
    cursor: default;
}

.expertise-item:first-child {
    border-top: 1px solid var(--border);
}

.expertise-num {
    font-family: var(--mono);
    font-size: 0.65rem;
    color: var(--brand);
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.expertise-title {
    font-family: var(--serif);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

.expertise-item:hover .expertise-title {
    color: var(--brand-lt);
}

.expertise-desc {
    font-size: 0.97rem;
    color: var(--text-muted);
    line-height: 1.75;
}

.expertise-aside {
    position: sticky;
    top: 100px;
}

.aside-card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-left: 3px solid var(--brand);
    border-radius: 4px;
    padding: 2rem;
}

.aside-card h3 {
    font-family: var(--serif);
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

.aside-card p {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* ── ABOUT ── */
#about {
    background: var(--bg2);
}

.about-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.about-text p {
    color: var(--text-muted);
    line-height: 1.85;
    margin-bottom: 1.25rem;
    font-size: 1rem;
}

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

.stat-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1.5rem;
}

.stat-number {
    font-family: var(--serif);
    font-size: 2.4rem;
    color: var(--brand-lt);
    line-height: 1;
    margin-bottom: 0.4rem;
}

.stat-label {
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ── CONTACT ── */
#contact {
    text-align: center;
    position: relative;
    overflow: hidden;
}

#contact::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(ellipse at center, rgba(141, 53, 43, 0.12) 0%, transparent 65%);
    pointer-events: none;
}

#contact h2 {
    max-width: 600px;
    margin: 0 auto 1rem;
}

#contact .section-label {
    justify-content: center;
}

#contact .section-intro {
    margin: 0 auto 2.5rem;
}

.contact-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.icon-terraform {
    display: inline-block;
    width: 1em;
    height: 1em;

    background-color: currentColor;
    /* inherits text color */

    -webkit-mask-image: url('/images/icons/terraform.svg');
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    -webkit-mask-position: center;

    mask-image: url('/images/icons/terraform.svg');
    mask-repeat: no-repeat;
    mask-size: contain;
    mask-position: center;

    vertical-align: middle;
}

/* ── FOOTER ── */
footer {
    padding: 2rem 2.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.footer-logo img {
    width: 28px;
    height: 28px;
    border-radius: 4px;
}

.footer-wordmark {
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.footer-copy {
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}


/* ── HAMBURGER ── */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 200;
}

.nav-hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

/* animated X state */
.nav-hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── MOBILE DRAWER ── */
.nav-drawer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99;
    background: rgba(17, 16, 16, 0.97);
    backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.nav-drawer.open {
    opacity: 1;
    transform: none;
    pointer-events: all;
}

.nav-drawer ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.nav-drawer ul a {
    font-family: var(--serif);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    text-transform: none;
    letter-spacing: 0;
    transition: color 0.2s;
}

.nav-drawer ul a:hover {
    color: var(--brand-lt);
}

.nav-drawer-social {
    display: flex;
    gap: 1.5rem;
}

.nav-drawer-social a {
    color: var(--text-muted);
    font-size: 1.4rem;
    text-decoration: none;
    transition: color 0.2s;
}

.nav-drawer-social a:hover {
    color: var(--brand-lt);
}

.nav-drawer-cta {
    font-family: var(--mono);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.85rem 2rem;
    background: var(--brand);
    color: #fff;
    text-decoration: none;
    border-radius: 3px;
    transition: background 0.2s;
}

.nav-drawer-cta:hover {
    background: var(--brand-lt);
}


/* ── SOCIAL ICONS ── */
.nav-links .fa-brands,
.nav-links .fa-solid {
    font-size: 0.95rem;
}

.btn-ghost i,
.btn-primary i {
    margin-right: 0.45rem;
}

.footer-social {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.footer-social a {
    color: var(--text-muted);
    font-size: 1.1rem;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-social a:hover {
    color: var(--brand-lt);
}


/* ── CLIENTS ── */
#clients {
    background: var(--bg);
    padding: 5rem 0;
    overflow: hidden;
}

#clients .clients-header {
    padding: 0 2.5rem;
    margin-bottom: 3rem;
}

.marquee-track {
    position: relative;
    width: 100%;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent 0%, black 8%, black 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 8%, black 92%, transparent 100%);
}

.marquee-inner {
    display: flex;
    gap: 1.5rem;
    width: max-content;
    animation: marqueeScroll 32s linear infinite;
}

.marquee-inner:hover {
    animation-play-state: paused;
}

@keyframes marqueeScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.client-card {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    width: 180px;
    height: 110px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.2rem 1rem;
    transition: border-color 0.25s, background 0.25s;
    cursor: default;
}

.client-card:hover {
    border-color: rgba(141, 53, 43, 0.4);
    background: var(--bg3);
}

.client-logo-wrap {
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.client-logo-wrap img {
    max-width: 120px;
    max-height: 44px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(1) brightness(1.8);
    opacity: 0.75;
    transition: filter 0.25s, opacity 0.25s;
}

.client-card:hover .client-logo-wrap img {
    filter: grayscale(0) brightness(1);
    background-color: #ffffff;
    opacity: 1;
}

/* fallback text shown when logo fails */
.client-logo-fallback {
    display: none;
    font-family: var(--mono);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand-lt);
    text-align: center;
    line-height: 1.4;
}

.client-logo-wrap img.errored+.client-logo-fallback {
    display: block;
}

.client-name {
    font-family: var(--sans);
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.35;
}

/* ── FADE-IN ANIMATIONS ── */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    #hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 7rem;
        padding-bottom: 4rem;
    }

    .hero-visual {
        order: -1;
    }

    .hero-photo-wrap {
        height: 300px;
    }

    .hero-label {
        justify-content: center;
    }

    .hero-actions {
        justify-content: center;
    }

    #expertise {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .expertise-aside {
        position: static;
    }

    .about-inner {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    nav {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        display: none;
    }

    .nav-hamburger {
        display: flex !important;
    }

    .nav-drawer {
        display: flex !important;
    }

    .nav-cta {
        display: none;
    }

    section {
        padding: 4.5rem 1.5rem;
    }
}

@media (max-width: 600px) {
    .stat-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .hero-logo-wrap {
        width: 150px;
        height: 150px;
    }

    .logo-ring::before {
        width: 240px;
        height: 240px;
    }

    .logo-ring::after {
        width: 200px;
        height: 200px;
    }
}

/* ── DETAIL OVERLAY CARD ── */

/* The trigger element — whatever you hover/click */
.detail-trigger {
    position: relative;
    cursor: pointer;
}

/* Subtle hint that there's more */
.detail-trigger::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--brand-lt);
    transition: width 0.25s ease;
}

.detail-trigger:hover::after {
    width: 100%;
}

/* Backdrop */
.detail-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(17, 16, 16, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.detail-overlay.open {
    opacity: 1;
    pointer-events: all;
}

/* The card itself */
.detail-card {
    position: relative;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-top: 3px solid var(--brand);
    border-radius: 6px;
    padding: 2.5rem;
    max-width: 540px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(16px) scale(0.98);
    transition: transform 0.3s ease;
    box-shadow:
        0 32px 80px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(141, 53, 43, 0.2);
}

.detail-overlay.open .detail-card {
    transform: translateY(0) scale(1);
}

/* Close button */
.detail-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    line-height: 1;
    padding: 0;
}

.detail-close:hover {
    border-color: var(--brand);
    color: var(--text);
    background: var(--brand-dim);
}

/* Card content typography — inherits your design system */
.detail-card-label {
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--brand-lt);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-card-label::before {
    content: '//';
    font-weight: 700;
}

.detail-card-title {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.2;
    padding-right: 2rem;
    /* don't flow under close btn */
}

.detail-card-body {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.detail-card-body p+p {
    margin-top: 0.85rem;
}

/* Trap scroll on body while open */
body.overlay-open {
    overflow: hidden;
}

/* RecapTCHA v3 contact form specific styles */
.grecaptcha-badge {
  visibility: hidden;
}

/* If you want to show a custom note about reCAPTCHA, you can style it like this: */
.footer-recaptcha-note {
    font-family: var(--sans);
    font-size: 0.35rem;
    letter-spacing: 0.10em;
    text-transform: none;
    color: #666;
    margin-top: 0.5rem;
}