/* ==========================================================================
   Compu Tyre - computyre.com
   Brand: red #E51B23 (sampled from logo), off-black, white
   ========================================================================== */

:root {
    --red: #E51B23;
    --red-dark: #C4151C;
    --ink: #141414;
    --ink-2: #1E1E1E;
    --paper: #FFFFFF;
    --grey-bg: #F4F4F5;
    --line: #E4E4E7;
    --line-dark: #2C2C2C;
    --text: #2B2B2E;
    --muted: #63636A;
    --muted-on-dark: #A9A9AE;
    --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
    --font-body: 'Barlow', Arial, sans-serif;
    --radius: 6px;
    --header-h: 146px;
    --header-h-condensed: 90px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: 1.0625rem;
    color: var(--text);
    background: var(--paper);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.05;
    color: var(--ink);
    letter-spacing: 0.01em;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img, svg { max-width: 100%; height: auto; vertical-align: middle; }

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section { padding: 5.5rem 0; }

.section-title {
    font-size: clamp(2.2rem, 4.5vw, 3.2rem);
    margin-bottom: 0.75rem;
}

.section-title::after {
    content: '';
    display: block;
    width: 64px;
    height: 5px;
    background: var(--red);
    margin-top: 0.9rem;
}

.section-intro {
    color: var(--muted);
    max-width: 62ch;
    margin-bottom: 3rem;
}

/* Buttons ---------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.95rem 2.1rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: var(--radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: background-color 0.25s var(--ease), color 0.25s var(--ease),
                border-color 0.25s var(--ease), transform 0.15s var(--ease);
    white-space: nowrap;
    min-height: 48px;
}

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

.btn-red {
    background: var(--red);
    color: #FFFFFF;
    border-color: var(--red);
}

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

.btn-ghost-light {
    background: transparent;
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.55);
}

.btn-ghost-light:hover { background: #FFFFFF; color: var(--ink); border-color: #FFFFFF; }

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

.btn-outline-dark:hover { background: var(--ink); color: #FFFFFF; }

.btn-sm { padding: 0.55rem 1.3rem; font-size: 1rem; min-height: 40px; margin-top: 1.3rem; }

/* Header - white, oversized logo ----------------------------------------- */

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 2px 18px rgba(20, 20, 20, 0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    height: var(--header-h);
    transition: height 0.3s var(--ease);
}

.site-header.condensed .header-inner { height: var(--header-h-condensed); }

.brand-logo { display: flex; align-items: center; height: 100%; padding: 10px 0; }

.brand-logo img {
    height: 100%;
    max-height: 118px;
    width: auto;
    transition: max-height 0.3s var(--ease);
}

.site-header.condensed .brand-logo img { max-height: 66px; }

.main-nav ul {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.main-nav a {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.08rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--ink);
    padding: 0.4rem 0;
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.main-nav a:hover,
.main-nav a.active { color: var(--red); border-bottom-color: var(--red); }

/* Hamburger */
.hamburger {
    display: none;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 0.6rem;
    min-width: 44px;
    min-height: 44px;
}

.hamburger .bar {
    display: block;
    width: 26px;
    height: 3px;
    margin: 5px 0;
    background: var(--ink);
    transition: transform 0.3s var(--ease), opacity 0.3s;
}

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

/* Hero -------------------------------------------------------------------- */

.hero {
    position: relative;
    background:
        linear-gradient(112deg, #101010 0%, #181818 55%, #1F1F1F 100%);
    color: #FFFFFF;
    padding: calc(var(--header-h) + 4rem) 0 5rem;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 6px;
    background: var(--red);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3rem;
    align-items: center;
}

.hero-eyebrow {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--muted-on-dark);
    border-left: 4px solid var(--red);
    padding-left: 0.85rem;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: clamp(3rem, 7vw, 5.4rem);
    color: #FFFFFF;
    margin-bottom: 1.4rem;
}

.hero h1 .accent { color: var(--red); display: block; }

.hero-sub {
    font-size: 1.2rem;
    color: #CFCFD2;
    max-width: 34rem;
    margin-bottom: 2.4rem;
}

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

/* Hero tyre graphic */
.hero-tyre {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.4rem;
}

/* soft studio spotlight so the dark rubber reads against the dark hero */
.hero-tyre::before {
    content: '';
    position: absolute;
    top: 46%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 130%;
    aspect-ratio: 1;
    background: radial-gradient(circle,
        rgba(255, 255, 255, 0.11) 0%,
        rgba(255, 255, 255, 0.05) 42%,
        transparent 68%);
    pointer-events: none;
}

.tyre-spec { position: relative; }

/* Photo-based turntable: several real product-shot angles stacked and
   cross-faded in sequence (driven by js/main.js) to read as a slow rotation,
   rather than a single photo mechanically skewed. */
.tyre-stage {
    position: relative;
    height: min(58vh, 520px);
    aspect-ratio: 620 / 900;
    margin: 0 auto;
}

.spin-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    filter: drop-shadow(0 28px 44px rgba(0, 0, 0, 0.6));
    transition: opacity 1.1s ease-in-out;
}

.spin-frame.is-active { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
    .spin-frame { transition: none; }
}

.tyre-spec {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.02rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted-on-dark);
    border: 1px solid var(--line-dark);
    border-radius: 999px;
    padding: 0.4rem 1.3rem;
}

@media (prefers-reduced-motion: no-preference) {
    .tyre-stage {
        animation: tyre-settle 1.1s var(--ease) both;
    }

    @keyframes tyre-settle {
        from { opacity: 0; transform: translateY(28px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    .reveal {
        opacity: 0;
        transform: translateY(26px);
        transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
    }

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

/* Stats strip -------------------------------------------------------------- */

.stats-strip {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* top/bottom only: horizontal padding must stay inherited from .container
       so the first column lines up with headings like "What We Do" below it */
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.stat {
    padding: 0.4rem 2rem;
    border-left: 1px solid var(--line);
}

.stat:first-child { border-left: 0; padding-left: 0; }

.stat b {
    display: block;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 2.3rem;
    line-height: 1.1;
    color: var(--ink);
    text-transform: uppercase;
}

.stat b em { color: var(--red); font-style: normal; }

.stat span { color: var(--muted); font-size: 0.98rem; }

/* Services ----------------------------------------------------------------- */

.services { background: var(--grey-bg); }

.services-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
}

.service-card {
    grid-column: span 4;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2.4rem 2.2rem;
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 34px rgba(20, 20, 20, 0.10);
}

.service-card.wide { grid-column: span 8; }

.service-card h3 {
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
    padding-top: 1.1rem;
    position: relative;
}

.service-card h3::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 44px;
    height: 5px;
    background: var(--red);
}

.service-card p { color: var(--muted); font-size: 1rem; }

.service-card.emergency {
    background: var(--red);
    border-color: var(--red);
    color: #FFFFFF;
}

.service-card.emergency h3 { color: #FFFFFF; }
.service-card.emergency h3::before { background: #FFFFFF; }
.service-card.emergency p { color: rgba(255, 255, 255, 0.88); }

.service-card.emergency .card-phone {
    display: inline-block;
    margin-top: 1.4rem;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 2rem;
    color: #FFFFFF;
    border-bottom: 3px solid rgba(255, 255, 255, 0.55);
    transition: border-color 0.2s;
}

.service-card.emergency .card-phone:hover { border-color: #FFFFFF; }

/* Specials band -------------------------------------------------------------- */

.specials-band {
    background:
        linear-gradient(100deg, var(--red-dark) 0%, var(--red) 55%, #F0353C 100%);
    color: #FFFFFF;
    padding: 3.2rem 0;
}

.specials-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.specials-band h2 {
    color: #FFFFFF;
    font-size: clamp(1.9rem, 3.5vw, 2.6rem);
    margin-bottom: 0.3rem;
}

.specials-band p { color: rgba(255, 255, 255, 0.92); max-width: 46ch; }

/* Range ladder -------------------------------------------------------------- */

.range-row {
    display: grid;
    grid-template-columns: 220px 1fr 320px;
    gap: 2rem;
    align-items: center;
    padding: 2.4rem 0;
    border-top: 1px solid var(--line);
}

.range-row:last-child { border-bottom: 1px solid var(--line); }

.range-tier {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 2.6rem;
    text-transform: uppercase;
    line-height: 1;
    color: var(--ink);
    transition: color 0.25s var(--ease);
}

.range-row:hover .range-tier { color: var(--red); }

.range-desc { color: var(--muted); max-width: 52ch; }

.range-brands {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.15rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink);
    text-align: right;
}

/* Vehicles band -------------------------------------------------------------- */

.vehicles {
    background: var(--ink);
    color: #FFFFFF;
}

.vehicles .section-title { color: #FFFFFF; }

.vehicles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border: 1px solid var(--line-dark);
}

.vehicle-tile {
    padding: 2.6rem 2rem;
    border-left: 1px solid var(--line-dark);
    transition: background-color 0.3s var(--ease);
}

.vehicle-tile:first-child { border-left: 0; }

.vehicle-tile:hover { background: rgba(229, 27, 35, 0.08); }

.vehicle-tile b {
    display: block;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 2.1rem;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 0.6rem;
    color: #FFFFFF;
}

.vehicle-tile span { color: var(--muted-on-dark); font-size: 0.98rem; }

.vehicles-note {
    margin-top: 1.6rem;
    color: var(--muted-on-dark);
}

.vehicles-note a { color: #FFFFFF; border-bottom: 2px solid var(--red); }
.vehicles-note a:hover { color: var(--red); }

/* Brands ---------------------------------------------------------------------- */

.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 1.25rem;
}

.brand-card {
    width: 100%;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.6rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 110px;
    cursor: pointer;
    font: inherit;
    filter: grayscale(1);
    opacity: 0.78;
    transition: filter 0.3s var(--ease), opacity 0.3s var(--ease),
                transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
                border-color 0.3s var(--ease);
}

.brand-card:hover,
.brand-card:focus-visible {
    filter: grayscale(0);
    opacity: 1;
    transform: translateY(-4px);
    border-color: var(--red);
    box-shadow: 0 10px 24px rgba(20, 20, 20, 0.08);
}

.brand-card img { width: 100%; max-height: 62px; object-fit: contain; }

/* In-house brand feature block */
.inhouse {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2.5rem;
    align-items: center;
    background: var(--grey-bg);
    border: 1px solid var(--line);
    border-left: 5px solid var(--red);
    border-radius: var(--radius);
    padding: 2rem 2.2rem;
    margin-bottom: 3rem;
}

.inhouse-logo {
    min-height: 132px;
    filter: grayscale(0);
    opacity: 1;
    background: var(--paper);
}

.inhouse-logo img { max-height: 84px; }

.inhouse-copy h3 { font-size: 2rem; margin: 0.5rem 0 0.6rem; }

.inhouse-copy p { color: var(--muted); max-width: 60ch; }

/* Tier groups */
.brand-tiers { display: flex; flex-direction: column; gap: 2.4rem; }

.tier-label {
    font-size: 1.35rem;
    color: var(--ink);
    padding-bottom: 0.7rem;
    margin-bottom: 1.3rem;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.tier-label::after {
    content: '';
    flex: 0 0 44px;
    height: 4px;
    background: var(--red);
}

.brand-badge {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #FFFFFF;
    background: var(--red);
    border-radius: 999px;
    padding: 0.2rem 0.85rem;
    white-space: nowrap;
}

/* About / pillars ---------------------------------------------------------------- */

.about { background: var(--grey-bg); }

.about-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 4rem;
    align-items: start;
}

.about-copy p { color: var(--muted); margin-bottom: 1.3rem; }

.about-copy p strong { color: var(--ink); }

.pillars { display: flex; flex-direction: column; gap: 1.1rem; margin-top: 0.5rem; }

.pillar {
    background: var(--paper);
    border: 1px solid var(--line);
    border-left: 5px solid var(--red);
    border-radius: var(--radius);
    padding: 1.4rem 1.6rem;
}

.pillar b {
    display: block;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.45rem;
    text-transform: uppercase;
    color: var(--ink);
    margin-bottom: 0.25rem;
}

.pillar span { color: var(--muted); font-size: 0.98rem; }

/* Contact ---------------------------------------------------------------------- */

.contact { background: var(--ink); color: #FFFFFF; }

.contact .section-title { color: #FFFFFF; }
.contact .section-intro { color: var(--muted-on-dark); }

.contact-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 3rem;
    align-items: start;
}

.contact-details { display: flex; flex-direction: column; gap: 1.8rem; margin-bottom: 2.4rem; }

.contact-item h3 {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--muted-on-dark);
    margin-bottom: 0.3rem;
}

.contact-item p, .contact-item a {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.6rem;
    color: #FFFFFF;
    line-height: 1.25;
}

.contact-item a:hover { color: var(--red); }

.contact-item .sub { display: block; font-family: var(--font-body); font-weight: 400; font-size: 0.95rem; color: var(--muted-on-dark); margin-top: 0.2rem; }

.map-wrap {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line-dark);
    height: 300px;
}

.map-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }

.form-card {
    background: var(--paper);
    border-radius: var(--radius);
    padding: 2.8rem 2.5rem;
    color: var(--text);
}

.form-card h3 { font-size: 1.7rem; margin-bottom: 1.6rem; }

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

.form-group { display: flex; flex-direction: column; gap: 0.45rem; }

.form-group.full { grid-column: span 2; }

.form-group label {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink);
}

.terms-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line-dark);
    border-left: 5px solid var(--red);
    border-radius: var(--radius);
    padding: 1.5rem 1.6rem;
    margin-bottom: 2rem;
}

.terms-box h3 {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: #FFFFFF;
    margin-bottom: 0.5rem;
}

.terms-box p { color: var(--muted-on-dark); font-size: 0.98rem; margin-bottom: 1.2rem; }

.terms-box p a { color: #FFFFFF; text-decoration: underline; text-underline-offset: 2px; }
.terms-box p a:hover { color: var(--red); }

.terms-box .btn-sm { margin-top: 0; }

.terms-divider {
    height: 1px;
    background: var(--line-dark);
    margin: 0.4rem 0 1.4rem;
}

.form-terms {
    grid-column: span 2;
    color: var(--muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--line);
    padding-top: 1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.85rem 1rem;
    border: 1px solid #C9C9CE;
    border-radius: var(--radius);
    background: var(--grey-bg);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--ink);
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.form-group select { cursor: pointer; }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--red);
    background: var(--paper);
    box-shadow: 0 0 0 3px rgba(229, 27, 35, 0.15);
}

.contact-form .btn { grid-column: span 2; justify-self: start; }

/* Honeypot: hidden from humans, visible to bots */
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.form-status {
    grid-column: span 2;
    display: none;
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.98rem;
}

.form-status.success { display: block; background: #E8F6EC; color: #17663A; border: 1px solid #BEE4CB; }
.form-status.error { display: block; background: #FDEBEC; color: #A31219; border: 1px solid #F5C6C9; }

/* Footer ---------------------------------------------------------------------- */

.footer {
    background: #0E0E0E;
    color: #FFFFFF;
    padding: 4rem 0 2rem;
    border-top: 5px solid var(--red);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 1fr;
    gap: 3rem;
    align-items: start;
    margin-bottom: 3rem;
}

.footer-brand img { max-height: 60px; width: auto; background: #FFFFFF; padding: 8px 12px; border-radius: var(--radius); margin-bottom: 1.1rem; }

.footer-brand p { color: var(--muted-on-dark); font-size: 0.98rem; max-width: 34ch; }

.footer h3 {
    color: #FFFFFF;
    font-size: 1.15rem;
    margin-bottom: 1.1rem;
}

.footer-links ul { display: flex; flex-direction: column; gap: 0.6rem; }

.footer-links a { color: var(--muted-on-dark); transition: color 0.2s; }
.footer-links a:hover { color: var(--red); }

.footer-tagline p {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    text-transform: uppercase;
    line-height: 1.2;
}

.footer-tagline .accent { color: var(--red); }

.footer-bottom {
    border-top: 1px solid var(--line-dark);
    padding-top: 1.8rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    color: #7B7B80;
    font-size: 0.92rem;
}

/* Modal (brand tyre examples, Josam sample report) ------------------------------ */

.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal[hidden] { display: none; }

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.72);
}

.modal-dialog {
    position: relative;
    background: var(--paper);
    border-radius: var(--radius);
    border-top: 5px solid var(--red);
    max-width: 880px;
    width: 100%;
    max-height: 86vh;
    overflow-y: auto;
    padding: 2.4rem 2.4rem 2.6rem;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4);
}

@media (prefers-reduced-motion: no-preference) {
    .modal-dialog { animation: modal-in 0.35s var(--ease) both; }

    @keyframes modal-in {
        from { opacity: 0; transform: translateY(22px) scale(0.98); }
        to   { opacity: 1; transform: translateY(0) scale(1); }
    }
}

.modal-dialog h3 {
    font-size: 1.9rem;
    margin-bottom: 0.4rem;
    padding-right: 3rem;
}

.modal-close {
    position: absolute;
    top: 1.1rem;
    right: 1.1rem;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    color: var(--ink);
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.modal-close:hover { background: var(--ink); color: #FFFFFF; border-color: var(--ink); }

.modal-note { color: var(--muted); font-size: 0.98rem; margin-bottom: 1.8rem; }

/* Brand tyre example cards inside the modal */
.tyre-examples {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.4rem;
}

.tyre-example {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.tyre-example .tyre-img {
    background: var(--grey-bg);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem;
}

.tyre-example .tyre-img img { max-height: 100%; object-fit: contain; }

.tyre-example figcaption { padding: 1rem 1.1rem 1.2rem; }

.tyre-example b {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    text-transform: uppercase;
    color: var(--ink);
}

.tyre-example .pos { display: block; color: var(--red); font-weight: 600; font-size: 0.9rem; margin: 0.15rem 0 0.35rem; }

.tyre-example .sizes { display: block; color: var(--muted); font-size: 0.9rem; }

/* Josam gallery inside the modal */
.josam-gallery { display: flex; flex-direction: column; gap: 1.8rem; }

.josam-gallery figure {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.josam-gallery img { width: 100%; display: block; }

.josam-gallery figcaption {
    padding: 0.9rem 1.1rem;
    background: var(--grey-bg);
    border-top: 1px solid var(--line);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--ink);
}

body.modal-open { overflow: hidden; }

/* Reduced motion ---------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}

/* Responsive ---------------------------------------------------------------- */

@media (max-width: 1100px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 2rem; }
    .stat:nth-child(3) { border-left: 0; padding-left: 0; }
    .service-card, .service-card.wide { grid-column: span 6; }
    .vehicles-grid { grid-template-columns: repeat(2, 1fr); }
    .vehicle-tile:nth-child(3) { border-left: 0; }
    .vehicle-tile:nth-child(n+3) { border-top: 1px solid var(--line-dark); }
}

@media (max-width: 900px) {
    :root { --header-h: 104px; }
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-eyebrow { border-left: 0; border-bottom: 3px solid var(--red); padding: 0 0 0.5rem; }
    .hero-sub { margin-inline: auto; }
    .hero-actions { justify-content: center; }
    .hero-tyre { order: -1; }
    .tyre-stage { height: min(42vh, 360px); }
    .about-grid, .contact-grid { grid-template-columns: 1fr; }
    .range-row { grid-template-columns: 1fr; gap: 0.6rem; padding: 1.8rem 0; }
    .range-brands { text-align: left; }
    .inhouse { grid-template-columns: 1fr; gap: 1.6rem; padding: 1.6rem; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-brand p { margin: 0 auto; }
    .footer-bottom { justify-content: center; }
    .footer-tagline p br { display: none; }
}

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

    .main-nav {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: var(--paper);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 18px 30px rgba(20, 20, 20, 0.12);
        transform: translateY(-130%);
        transition: transform 0.35s var(--ease);
        z-index: 99;
    }

    .site-header.condensed + main .main-nav { top: var(--header-h-condensed); }

    .main-nav.open { transform: translateY(0); }

    .main-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 1rem 1.5rem 1.5rem;
    }

    .main-nav a { display: block; padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
    .brand-logo img { max-height: 76px; }

    .service-card, .service-card.wide { grid-column: span 12; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .vehicles-grid { grid-template-columns: 1fr; }
    .vehicle-tile { border-left: 0; }
    .vehicle-tile:nth-child(n+2) { border-top: 1px solid var(--line-dark); }
    .contact-form { grid-template-columns: 1fr; }
    .form-group.full, .contact-form .btn, .form-status, .form-terms { grid-column: auto; }
    .contact-form .btn { width: 100%; }
    .section { padding: 4rem 0; }
    .tyre-examples { grid-template-columns: 1fr; }
    .modal-dialog { padding: 1.8rem 1.4rem 2rem; }
}
