/* ---------- Color scheme (brand green accent, neutral surfaces) ---------- */
/* If you already have these tokens, keep yours; otherwise paste this block near the top */
:root {
    --brand: #0aa65a;
    /* primary accent (brand green) */
    --brand-ink: #087044;
    /* darker brand shade for links */
    --ink: #0b1220;
    /* main text */
    --muted-ink: #475569;
    /* secondary text */
    --bg: #ffffff;
    /* page background */
    --bg-alt: #f6f8f7;
    /* subtle panel/section */
    --border: #e5e7eb;
    /* hairlines */
    --focus: #1d4ed8;
    /* accessible focus ring */

    /* hero */
    --hero-height: clamp(420px, 70vh, 760px);
}

/* ---------- Global layout container ---------- */
.container {
    max-width: 1100px;
    margin-inline: auto;
    padding-inline: 1rem;
}

/* ---------- Header layout ---------- */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-weight: 800;
    color: var(--ink);
    text-decoration: none;
    font-size: 1.125rem;
    letter-spacing: 0.2px;
}

.brand-logo {
    height: 28px;
    width: auto;
    display: block;
}

/* ---------- Section base ---------- */
.section {
    padding: clamp(2rem, 6vw, 4rem) 0;
}

/* ---------- About section ---------- */
.about h2 {
    margin: 0 0 .5rem;
    font-size: clamp(1.25rem, 2.5vw + .5rem, 2rem);
    text-wrap: balance;
}

.about-body {
    max-width: 75ch;
}

.about-body p {
    color: var(--muted-ink);
    line-height: 1.7;
}

/* Two-column, readable layout on desktop */
@media (min-width: 1024px) {
    .about-body {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        max-width: 100%;
    }
    .about-body p {
        margin: 0;
    }
}

/* Slightly tighter flow on small phones */
@media (max-width: 480px) {
    .about-body {
        gap: .75rem;
    }
}

/* ---------- Work section ---------- */
.work {
    border-top: 1px solid var(--border);
}

.work-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: clamp(1rem, 4vw, 2rem);
    align-items: center;
}

/* ---------- Expertise section ---------- */
.expertise {
    border-top: 1px solid var(--border);
}

.expertise h2 {
    margin: 0 0 1rem;
    font-size: clamp(1.25rem, 2.5vw + .5rem, 2rem);
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: clamp(1rem, 3vw, 1.5rem);
}

.expertise-card {
    display: grid;
    gap: .75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 6px 18px rgba(0,0,0,.04);
}

.expertise-card h3 {
    margin: 0;
    font-size: 1.05rem;
}

.expertise-card p {
    margin: 0;
    color: var(--muted-ink);
}

.expertise-card .btn {
    display: inline-flex;
    align-items: center;
    height: 44px;
    /* Keep original horizontal padding from base `.btn`, remove vertical */
    padding-block: 0;
    padding-inline: 1rem;
    line-height: 1;
    white-space: nowrap;
    justify-self: start;
    align-self: start;
}

/* ---------- Service pages helpers ---------- */
.service-media img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,.04);
}

/* ---------- Service detail hero ---------- */
.service-hero {
    padding: clamp(2rem, 7vw, 5rem) 0;
    background: var(--bg-alt);
}

.service-hero-grid {
    display: grid;
    gap: clamp(1.75rem, 5vw, 3.5rem);
    align-items: center;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
}

.service-hero-media {
    position: relative;
    z-index: 1;
    transform: translateX(clamp(-12%, -9vw, -6%));
}

.service-hero-media img {
    display: block;
    width: clamp(360px, 52vw, 720px);
    height: auto;
    object-fit: cover;
    border-radius: 22px;
    box-shadow: 0 32px 60px rgba(11, 18, 32, 0.18);
}

.service-hero-copy {
    position: relative;
    z-index: 2;
    background: linear-gradient(160deg, rgba(10, 166, 90, 0.95), rgba(8, 112, 68, 0.88));
    color: #f5fbf8;
    border-radius: 26px;
    padding: clamp(1.75rem, 4vw, 3rem);
    display: grid;
    gap: 1.25rem;
    box-shadow: 0 32px 70px rgba(11, 18, 32, 0.2);
    max-width: 560px;
}

.service-hero-copy h1 {
    margin: 0;
    font-size: clamp(2rem, 3vw + 1rem, 3.1rem);
    letter-spacing: -0.02em;
}

.service-hero-text {
    margin: 0;
    line-height: 1.65;
}

.service-hero-copy .countdown {
    justify-content: flex-start;
    gap: .6rem;
}

.service-hero-copy .countdown-segment {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.28);
}

.service-hero-copy .btn {
    justify-self: start;
}

.service-hero-copy .btn-primary {
    background: #fff;
    color: var(--brand-ink);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 10px 30px rgba(11, 18, 32, 0.15);
}

.service-hero-copy .btn-primary:hover {
    background: #f3f6f4;
    border-color: rgba(255, 255, 255, 0.8);
    color: var(--brand-ink);
}

@media (min-width: 900px) {
    .service-hero-copy {
        margin-left: clamp(-7rem, -12vw, -3.5rem);
    }
}

@media (max-width: 900px) {
    .service-hero-grid {
        grid-template-columns: 1fr;
    }

    .service-hero-media {
        order: 2;
        transform: none;
        justify-self: center;
        margin-top: 1.5rem;
    }

    .service-hero-media img {
        width: min(85%, 460px);
    }

    .service-hero-copy {
        margin-left: 0;
        text-align: center;
    }

    .service-hero-copy .countdown {
        justify-content: center;
    }

    .service-hero-copy .btn {
        justify-self: center;
    }
}

@media (max-width: 640px) {
    .service-hero-media {
        display: none;
    }

    .service-hero-copy {
        text-align: left;
    }

    .service-hero-copy .countdown {
        justify-content: flex-start;
    }

    .service-hero-copy .btn {
        justify-self: start;
    }
}

.list-2col {
    list-style: disc inside;
    margin: 0;
    padding: 0;
    columns: 2;
    column-gap: 1.5rem;
}

.list-2col li {
    break-inside: avoid;
    padding: .25rem 0;
}

@media (max-width: 700px) {
    .list-2col { columns: 1; }
}

/* ---------- ITC page styles ---------- */
.itc-hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: clamp(1rem, 4vw, 2rem);
    align-items: center;
}

.pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem .6rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.pill {
    display: inline-block;
    padding: .3rem .6rem;
    border: 1px solid var(--border);
    background: var(--bg-alt);
    color: var(--muted-ink);
    border-radius: 999px;
    font-size: .9rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: clamp(1rem, 3vw, 1.5rem);
}

.feature-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 6px 18px rgba(0,0,0,.04);
}

@media (max-width: 900px) {
    .itc-hero-grid { grid-template-columns: 1fr; }
}

/* ---------- Defense & Security helpers ---------- */
.accent-panel {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
}

.badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem .6rem;
    list-style: none;
    margin: .75rem 0 0;
    padding: 0;
}

.badge {
    display: inline-block;
    padding: .25rem .55rem;
    border: 1px dashed var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--muted-ink);
    font-size: .85rem;
}

.work-copy h2 {
    margin: 0 0 .5rem;
    font-size: clamp(1.25rem, 2.5vw + .5rem, 2rem);
}

.work-copy p {
    margin: 0;
    color: var(--muted-ink);
    line-height: 1.6;
}

.inline-link {
    color: var(--brand-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.inline-link:hover {
    color: var(--brand);
}

.work-media img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,.06);
}

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

/* Prefer side-by-side on landscape phones too */
@media (orientation: landscape) and (max-width: 900px) {
    .work-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ---------- Footer layout ---------- */
.footer-compact {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
}

.footer-bar {
    display: grid;
    grid-template-columns: auto 1fr;
    /* left: button, right: links */
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
}

/* Footer meta (copyright) */
.footer-meta {
    text-align: center;
    color: var(--muted-ink);
    padding: 0 0 1rem;
    font-size: 0.875rem;
}

.legal-nav {
    justify-self: end;
}

.legal-links {
    display: flex;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.legal-links a {
    color: var(--muted-ink);
    text-decoration: none;
    padding: .5rem .25rem;
    /* larger touch targets */
    border-radius: 8px;
}

.legal-links a:hover {
    text-decoration: underline;
}

.legal-links a:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

/* Buttons (uses your existing .btn styles if present; otherwise this is a safe default) */
.btn {
    display: inline-block;
    padding: .7rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-weight: 600;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .05s ease;
}

.btn-primary {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.btn-primary:hover {
    background: var(--brand-ink);
    border-color: var(--brand-ink);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

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

.btn-outline:hover {
    background: var(--bg-alt);
    border-color: var(--brand-ink);
}

.btn:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.btn:active {
    transform: translateY(1px);
}

/* ---------- Forms ---------- */
.form {
    margin-top: 1rem;
}

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

.field {
    display: grid;
    gap: .35rem;
    /* Prevent grid items from forcing horizontal overflow */
    min-width: 0;
}

.field-span-2 {
    grid-column: span 2;
}

.input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: .7rem .8rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}

.input:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.textarea {
    resize: vertical;
}

.checkbox-row {
    align-items: center;
}

.checkbox {
    display: inline-flex;
    align-items: flex-start;
    gap: .5rem;
}

.checkbox input[type="checkbox"] {
    margin-top: .25rem;
}

.actions {
    display: flex;
    align-items: center;
    gap: .75rem;
}

@media (max-width: 700px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .field-span-2 {
        grid-column: span 1;
    }
    /* Stack action buttons in narrow contexts where marked */
    .actions-stack {
        flex-direction: column;
        align-items: center; /* center buttons horizontally */
        gap: .5rem;
        padding-inline: 1rem; /* equal gutter on both sides */
        margin-inline: 0;
    }
    .actions-stack .btn {
        width: 100%;           /* equal width buttons */
        max-width: 28rem;      /* keep a pleasant max size */
        justify-content: center;
        align-self: center;
    }
}

/* ---------- People directory (contact) ---------- */
.people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: clamp(1rem, 3vw, 1.5rem);
}

.person-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 6px 18px rgba(0,0,0,.04);
    display: grid;
    gap: .5rem;
}

.person-name { margin: 0; }
.person-role { margin: 0; color: var(--muted-ink); }
.person-actions { margin-top: .25rem; }

/* Responsive stacking */
@media (max-width: 700px) {
    /* Expertise cards: single column on mobile for readability */
    .expertise-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        /* If provided, prefer a mobile-optimised image */
        --hero-image: var(--hero-image-mobile, var(--hero-image));
    }

    /* Add a bit more side padding on small screens */
    .hero-content {
        padding-inline: 1.25rem;
    }

    .countdown {
        gap: .5rem;
    }

    .countdown-segment {
        min-width: 64px;
        padding: .4rem .6rem;
    }

    .header-bar {
        padding: .75rem 0;
    }

    .footer-bar {
        grid-template-columns: 1fr;
        justify-items: center;
        row-gap: .75rem;
    }

    .legal-nav {
        justify-self: center;
    }

    .legal-links {
        flex-wrap: wrap;
        gap: .75rem 1rem;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-content {
        gap: .75rem;
    }

    .countdown-label {
        font-size: .7rem;
    }

    .countdown-segment {
        min-width: 56px;
        flex-basis: 56px; /* encourage wrapping in tighter rows */
    }
}

@media (min-width: 1024px) {
    .hero-content {
        max-width: 900px;
        gap: 1.25rem;
    }
}

/* Screen reader utility (if you don't already have one) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Hero section ---------- */
.hero {
    position: relative;
    min-height: var(--hero-height);
    display: grid;
    place-items: center;
    /* Fallback gradient if no image is set via CSS */
    background: radial-gradient(1200px 600px at 10% 10%, rgba(10, 166, 90, 0.15), transparent 60%),
        linear-gradient(180deg, rgba(11, 18, 32, 0.6), rgba(11, 18, 32, 0.7));
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: -10px; /* extra to hide blur edges */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-image: var(--hero-image);
    filter: blur(6px) brightness(0.6);
    transform: scale(1.05);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 1rem;
    text-align: center;
    color: #fff;
    max-width: 760px;
    /* vertical padding only; keep container side gutters */
    padding-block: clamp(1rem, 5vh, 3rem);
}

.hero h1 {
    font-size: clamp(1.75rem, 4vw + 0.5rem, 3rem);
    line-height: 1.1;
    margin: 0;
}

.hero-subtitle {
    font-size: clamp(1rem, 1.2vw + 0.5rem, 1.125rem);
    color: #e6f7ee;
    margin: 0.25rem 0 0.5rem;
}

.countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    flex-wrap: wrap;
}

.countdown-segment {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    min-width: 72px;
    padding: .5rem .75rem;
    text-align: center;
    flex: 1 1 72px;
}

.countdown-value {
    display: block;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    font-size: clamp(1.25rem, 3vw + .25rem, 2rem);
}

.countdown-label {
    display: block;
    font-size: .75rem;
    opacity: .9;
}
