/* ============================================
   Kelly Metal Working Ltd
   Industrial Bold — Modern Professional
   Brand: #bf1d2d (Red) / #000 / #d9d9d9
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Barlow:wght@300;400;500;600;700&family=Barlow+Condensed:wght@400;600;700&display=swap');

:root {
    --red: #bf1d2d;
    --red-dark: #8a1420;
    --red-light: #e63946;
    --black: #0a0a0a;
    --charcoal: #1a1a1a;
    --dark: #222222;
    --steel: #333333;
    --iron: #555555;
    --grey: #888888;
    --silver: #aaaaaa;
    --light: #d9d9d9;
    --off-white: #f2f0ed;
    --white: #ffffff;

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

    --max-width: 1200px;
    --section-padding: 6rem 0;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-body);
    color: var(--dark);
    background: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
}

a { color: var(--red); text-decoration: none; transition: all 0.2s ease; }
a:hover { color: var(--red-dark); }
img { max-width: 100%; height: auto; display: block; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10,10,10,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: all 0.3s ease;
}
.nav.scrolled {
    background: rgba(10,10,10,0.98);
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}
.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.nav-logo-icon {
    width: 36px;
    height: 36px;
    background: var(--red);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.nav-logo-icon svg { width: 20px; height: 20px; }
.nav-logo-text {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--white);
    letter-spacing: 0.05em;
    line-height: 1;
}
.nav-logo-text span { color: var(--red); }

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}
.nav-links a {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.2s ease;
    position: relative;
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--white);
}
.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--red);
}

.nav-cta {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 10px 24px;
    background: var(--red);
    color: var(--white) !important;
    border-radius: 4px;
    transition: background 0.2s ease, transform 0.1s ease;
}
.nav-cta:hover {
    background: var(--red-dark);
    color: var(--white) !important;
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
}

/* ============================================
   HERO
   ============================================ */
.hero {
    min-height: 100vh;
    background: var(--black);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 72px;
}

/* Diagonal texture overlay */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 40px,
            rgba(191,29,45,0.03) 40px,
            rgba(191,29,45,0.03) 41px
        );
    pointer-events: none;
}

/* Red accent bar */
.hero::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: var(--red);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 4rem 0;
}

.hero-label {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: 0.25em;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}
.hero-label::before {
    content: '';
    width: 40px;
    height: 2px;
    background: var(--red);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 8vw, 7rem);
    color: var(--white);
    line-height: 0.95;
    letter-spacing: 0.02em;
    margin-bottom: 1.5rem;
}
.hero-title em {
    font-style: normal;
    color: var(--red);
    display: block;
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--silver);
    max-width: 520px;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-image {
    position: absolute;
    right: -5%;
    top: 50%;
    transform: translateY(-50%);
    width: 50%;
    height: 80%;
    opacity: 0.15;
    pointer-events: none;
}
.hero-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--steel) 0%, var(--charcoal) 100%);
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 0 100%);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 14px 32px;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--red);
    color: var(--white);
    border-color: var(--red);
}
.btn-primary:hover {
    background: var(--red-dark);
    border-color: var(--red-dark);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,0.3);
}
.btn-outline:hover {
    border-color: var(--white);
    color: var(--white);
}

.btn-outline-dark {
    background: transparent;
    color: var(--dark);
    border-color: var(--light);
}
.btn-outline-dark:hover {
    border-color: var(--red);
    color: var(--red);
}

/* ============================================
   SECTION STYLING
   ============================================ */
section {
    padding: var(--section-padding);
}

.section-dark {
    background: var(--black);
    color: var(--white);
}

.section-grey {
    background: var(--off-white);
}

.section-label {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: 0.25em;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 12px;
}
.section-label::before {
    content: '';
    width: 24px;
    height: 2px;
    background: var(--red);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    letter-spacing: 0.02em;
    line-height: 1;
    margin-bottom: 1.25rem;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--grey);
    max-width: 600px;
    line-height: 1.7;
    font-weight: 300;
}
.section-dark .section-subtitle {
    color: var(--silver);
}

/* ============================================
   STATS STRIP
   ============================================ */
.stats-strip {
    background: var(--red);
    padding: 0;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    max-width: var(--max-width);
    margin: 0 auto;
}
.stat {
    padding: 2.5rem 2rem;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.15);
}
.stat:last-child { border-right: none; }
.stat-value {
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--white);
    line-height: 1;
    margin-bottom: 4px;
}
.stat-label {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

/* ============================================
   SERVICES
   ============================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.service-card {
    background: var(--white);
    border: 1px solid var(--light);
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}
.service-card:hover::before {
    transform: scaleX(1);
}
.service-card:hover {
    border-color: var(--red);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

.service-icon {
    width: 56px;
    height: 56px;
    background: rgba(191,29,45,0.08);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}
.service-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--red);
    fill: none;
    stroke-width: 1.5;
}

.service-card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    color: var(--black);
}

.service-card p {
    font-size: 0.9rem;
    color: var(--iron);
    line-height: 1.7;
}

/* ============================================
   ABOUT / SPLIT SECTION
   ============================================ */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.split-image {
    position: relative;
}
.split-image img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
}

/* Red corner accent on images */
.split-image::before {
    content: '';
    position: absolute;
    top: -12px;
    left: -12px;
    width: 60px;
    height: 60px;
    border-top: 4px solid var(--red);
    border-left: 4px solid var(--red);
    z-index: 1;
}

/* Section titles inside split layouts (About, Agri-Tech). These are
   h2 for a consistent document outline — h3 kept in the selector for
   backwards-compat with any cached/older markup. */
.split-text h2,
.split-text h3 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1;
    color: var(--black);
}

.split-text p {
    font-size: 1rem;
    color: var(--iron);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.feature-list {
    list-style: none;
    margin: 1.5rem 0;
}
.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--steel);
    padding: 8px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.feature-list li::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--red);
    border-radius: 50%;
    margin-top: 8px;
    flex-shrink: 0;
}

/* ============================================
   PORTFOLIO
   ============================================ */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1;
    background: var(--charcoal);
}
.portfolio-item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.portfolio-item:hover .portfolio-item-image {
    transform: scale(1.05);
}
.portfolio-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.portfolio-item:hover .portfolio-item-overlay {
    opacity: 1;
}
.portfolio-item-overlay h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.portfolio-item-overlay p {
    font-size: 0.8rem;
    color: var(--silver);
    margin-top: 4px;
}
.portfolio-item-overlay span {
    display: inline-block;
    margin-top: 8px;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 600;
}

/* Large featured portfolio item */
.portfolio-item.featured {
    grid-column: span 2;
    grid-row: span 2;
    aspect-ratio: auto;
}

/* ============================================
   CAPABILITIES / EQUIPMENT
   ============================================ */
.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: rgba(255,255,255,0.1);
    margin-top: 3rem;
}

.capability {
    padding: 2.5rem;
    background: var(--charcoal);
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    transition: background 0.2s ease;
}
.capability:hover {
    background: var(--dark);
}

.capability-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--red);
    line-height: 1;
    flex-shrink: 0;
    width: 50px;
}

.capability h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.capability p {
    font-size: 0.875rem;
    color: var(--silver);
    line-height: 1.7;
}

/* ============================================
   TESTIMONIALS
   ============================================ */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.testimonial {
    background: var(--white);
    border: 1px solid var(--light);
    padding: 2rem;
    position: relative;
}
.testimonial::before {
    content: '\201C';
    font-family: Georgia, serif;
    font-size: 4rem;
    color: var(--red);
    line-height: 1;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    opacity: 0.15;
}

.testimonial-text {
    font-size: 0.9rem;
    color: var(--iron);
    line-height: 1.7;
    font-style: italic;
    margin-bottom: 1.25rem;
}

.testimonial-author {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--black);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.testimonial-role {
    font-size: 0.75rem;
    color: var(--grey);
}

/* ============================================
   CUSTOMERS / PARTNERS LOGO WALL
   ============================================ */
.customers-grid {
    /* Centred flex wrap so any number of logos stays balanced — two
       logos sit centred rather than stranded in the first columns of a
       wide grid, and it still wraps neatly as more are added. */
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3rem;
}

.customer-logo {
    /* Centred, generous breathing room. Background sits lighter than
       the section so logos read clean on light surroundings. Fixed-ish
       width via flex-basis keeps every logo card the same size. */
    flex: 0 1 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 90px;
    padding: 1.5rem 1.75rem;
    background: var(--white);
    border: 1px solid var(--light);
    border-radius: 4px;
    transition: filter 0.25s ease, opacity 0.25s ease, border-color 0.25s ease;
    /* Grayscale + dimmed by default so a wall of mismatched colours
       reads as a unit; full colour + crisp on hover. */
    filter: grayscale(100%);
    opacity: 0.7;
}

.customer-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
    border-color: var(--silver);
}

/* Real logos (when the user swaps the <span> for an <img>). */
.customer-logo img {
    max-width: 100%;
    max-height: 60px;
    height: auto;
    width: auto;
    object-fit: contain;
    display: block;
}

/* Text placeholder styling — reads as a logo would, neutral and
   typographic. Swap-in of <img> replaces this entirely. */
.customer-logo span {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--iron);
    text-align: center;
    line-height: 1.3;
}

/* ============================================
   CTA BAND
   ============================================ */
.cta-band {
    background: var(--red);
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-band::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 30px,
        rgba(0,0,0,0.04) 30px,
        rgba(0,0,0,0.04) 31px
    );
}
.cta-band .container { position: relative; z-index: 1; }
.cta-band h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--white);
    margin-bottom: 0.5rem;
}
.cta-band p {
    color: rgba(255,255,255,0.8);
    font-size: 1rem;
    margin-bottom: 2rem;
}
.cta-band .btn {
    background: var(--white);
    color: var(--red);
    border-color: var(--white);
}
.cta-band .btn:hover {
    background: transparent;
    color: var(--white);
}

/* ============================================
   CONTACT
   ============================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    margin-top: 3rem;
}

.contact-info-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 2rem;
}
.contact-info-icon {
    width: 48px;
    height: 48px;
    background: rgba(191,29,45,0.08);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.contact-info-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--red);
    fill: none;
    stroke-width: 1.5;
}
.contact-info-label {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--grey);
    margin-bottom: 2px;
}
.contact-info-value {
    font-size: 1rem;
    color: var(--dark);
    font-weight: 500;
}

.contact-form {
    background: var(--off-white);
    padding: 2.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.form-group {
    margin-bottom: 1.25rem;
}
.form-group label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--steel);
    margin-bottom: 6px;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--dark);
    background: var(--white);
    border: 1px solid var(--light);
    border-radius: 0;
    outline: none;
    transition: border-color 0.2s ease;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--red);
}
.form-group textarea {
    min-height: 140px;
    resize: vertical;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--black);
    color: var(--silver);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    font-size: 0.875rem;
    color: var(--grey);
    line-height: 1.7;
    margin-top: 1rem;
    max-width: 300px;
}

.footer h4 {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--white);
    margin-bottom: 1.25rem;
}

.footer-links {
    list-style: none;
}
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a {
    font-size: 0.875rem;
    color: var(--grey);
    transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--white); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--grey);
}

/* ============================================
   eCOMMERCE
   ============================================ */
.ecommerce-content {
    text-align: center;
}
.ecommerce-content .section-label {
    justify-content: center;
}
.ecommerce-content .section-subtitle {
    margin-left: auto;
    margin-right: auto;
    max-width: 650px;
}

.ecommerce-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.ecommerce-feature {
    background: var(--charcoal);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
}
.ecommerce-feature:hover {
    border-color: var(--red);
    transform: translateY(-4px);
}

.ecommerce-feature-icon {
    width: 56px;
    height: 56px;
    background: rgba(191,29,45,0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}
.ecommerce-feature-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--red);
    fill: none;
    stroke-width: 1.5;
}

.ecommerce-feature h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.ecommerce-feature p {
    font-size: 0.875rem;
    color: var(--silver);
    line-height: 1.7;
}

.btn-large {
    padding: 16px 40px;
    font-size: 0.95rem;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scroll-reveal animation.
   Gated on .js so a JS-load failure leaves content visible by default
   rather than hiding entire sections. The IntersectionObserver in
   /js/main.js adds .js to <html> on load, which activates the
   opacity:0 starting state below, then flips .visible on as elements
   enter the viewport. */
.animate-on-scroll {
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
}
.js .animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-content > * {
    animation: fadeInUp 0.8s ease forwards;
}
.hero-content > *:nth-child(1) { animation-delay: 0.1s; }
.hero-content > *:nth-child(2) { animation-delay: 0.25s; }
.hero-content > *:nth-child(3) { animation-delay: 0.4s; }
.hero-content > *:nth-child(4) { animation-delay: 0.55s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 968px) {
    .nav-links { display: none; }
    .nav-toggle { display: block; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--black);
        padding: 2rem;
        gap: 1rem;
        border-top: 1px solid rgba(255,255,255,0.06);
    }

    .split { grid-template-columns: 1fr; gap: 2rem; }
    .split-image { order: -1; }
    .services-grid { grid-template-columns: 1fr; }
    .ecommerce-features { grid-template-columns: 1fr; }
    .portfolio-grid { grid-template-columns: 1fr 1fr; }
    .portfolio-item.featured { grid-column: span 2; grid-row: span 1; }
    .capabilities-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .testimonial-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .portfolio-grid { grid-template-columns: 1fr; }
    .portfolio-item.featured { grid-column: span 1; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
    section { padding: 4rem 0; }
}

/* ============================================
   COOKIE CONSENT BANNER
   ============================================
   Injected by /js/analytics.js. Hidden until shown so it never
   flashes for visitors who've already chosen. Buttons reuse the
   site .btn classes; Decline and Accept get equal visual weight
   (no dark-pattern nudging). */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: none;
    gap: 1.25rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 1rem 1.5rem;
    background: var(--charcoal);
    border-top: 4px solid var(--red);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.25);
}
.cookie-banner--visible {
    display: flex;
}
.cookie-banner-text {
    flex: 1 1 320px;
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--silver);
}
.cookie-banner-text a {
    color: var(--white);
    text-decoration: underline;
}
.cookie-banner-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}
.cookie-banner .cookie-btn {
    padding: 10px 22px;
    cursor: pointer;
}
/* Make the dark-outline button legible on the dark banner. */
.cookie-banner .btn-outline-dark {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.4);
}
.cookie-banner .btn-outline-dark:hover {
    border-color: var(--white);
    color: var(--white);
}

@media (max-width: 600px) {
    .cookie-banner {
        padding: 1rem;
    }
    .cookie-banner-actions {
        width: 100%;
    }
    .cookie-banner .cookie-btn {
        flex: 1 1 auto;
        text-align: center;
    }
}

/* Footer "Cookie preferences" — a <button> (so it can trigger JS
   without an inline handler) styled to read as a plain footer link. */
.footer-cookie-prefs {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    color: var(--grey);
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s ease;
}
.footer-cookie-prefs:hover {
    color: var(--white);
}

/* ============================================
   LEGAL / LONG-FORM CONTENT (privacy, terms)
   ============================================ */
.legal {
    max-width: 780px;
    margin: 0 auto;
    padding: 7rem 2rem 4rem;
    color: var(--steel);
}
.legal h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    line-height: 1;
    color: var(--black);
    margin-bottom: 0.5rem;
}
.legal .legal-updated {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--grey);
    margin-bottom: 2.5rem;
}
.legal h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--black);
    margin: 2.5rem 0 0.75rem;
}
.legal h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--black);
    margin: 1.5rem 0 0.5rem;
}
.legal p,
.legal li {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--iron);
}
.legal ul {
    margin: 0.75rem 0 1rem 1.25rem;
}
.legal li {
    margin-bottom: 0.4rem;
}
.legal a {
    color: var(--red);
    text-decoration: underline;
}
.legal a:hover { color: var(--red-dark); }
.legal table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
    font-size: 0.9rem;
}
.legal th,
.legal td {
    text-align: left;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--light);
    vertical-align: top;
}
.legal th {
    background: var(--off-white);
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
    color: var(--steel);
}
.legal .legal-intro {
    font-size: 1.1rem;
    color: var(--steel);
    line-height: 1.7;
}
.legal-footer {
    border-top: 1px solid var(--light);
    margin-top: 3rem;
    padding-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--grey);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}
