/* comptonscustoms.com — smoked-glass automotive tint theme */

:root {
    --night: #070d16;
    --panel: #0d1624;
    --panel-2: #13203a;
    --ice: #eaf2fb;
    --dim: #8fa3bd;
    --glow: #4aa3ff;
    --navy: #1a2f9e;
    --line: rgba(234, 242, 251, 0.12);
    --font-display: "Chakra Petch", "Avenir Next Condensed", "Arial Narrow", sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

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

body {
    background: var(--night);
    color: var(--ice);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--ice); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.06; text-transform: uppercase; letter-spacing: 0.02em; }

.wrap { max-width: 74rem; margin: 0 auto; padding: 0 1.4rem; }

.kicker {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--glow);
    display: block;
    margin-bottom: 0.5rem;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.8rem 1.6rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    border: 2px solid var(--glow);
    border-radius: 6px;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, color 0.18s ease;
    cursor: pointer;
}
.btn svg { width: 1.1em; height: 1.1em; flex: none; fill: currentColor; }
.btn:hover { transform: translateY(-2px); }
.btn-solid { background: var(--glow); color: #06111f; }
.btn-solid:hover { background: #6cb6ff; border-color: #6cb6ff; }
.btn-ghost { background: rgba(74, 163, 255, 0.08); color: var(--ice); }
.btn-ghost:hover { border-color: #6cb6ff; color: #fff; }

/* ---------- Scroll progress ---------- */

.scroll-progress {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 2px;
    z-index: 70;
    background: linear-gradient(90deg, var(--navy), var(--glow));
    box-shadow: 0 0 12px rgba(74, 163, 255, 0.7);
    transform: scaleX(0);
    transform-origin: left;
    pointer-events: none;
}

/* ---------- Header ---------- */

.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 0.6rem 1.4rem;
    background: linear-gradient(to bottom, rgba(7, 13, 22, 0.95), rgba(7, 13, 22, 0.85));
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}
.brand-mark { width: 2.4rem; height: 1.2rem; color: var(--glow); flex: none; }
.brand em { font-style: normal; color: var(--glow); }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 1.3rem; }
.site-nav a {
    text-decoration: none;
    color: var(--dim);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.15s ease;
}
.site-nav a:hover { color: #fff; }
.site-nav .nav-call {
    color: #fff;
    border: 1.5px solid var(--glow);
    border-radius: 6px;
    padding: 0.4rem 0.9rem;
}
.site-nav .nav-call:hover { background: var(--glow); color: #06111f; }
@media (max-width: 46rem) {
    .site-nav a:not(.nav-call) { display: none; }
    .brand { font-size: 1.05rem; }
}

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

.hero {
    position: relative;
    min-height: min(100svh, 54rem);
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--night);
}
.hero-bg {
    position: absolute;
    inset: -14% 0;
    z-index: 0;
    background:
        linear-gradient(100deg, rgba(7, 13, 22, 0.94) 22%, rgba(7, 13, 22, 0.55) 60%, rgba(7, 13, 22, 0.85)),
        url("/images/hero.webp") center 40% / cover no-repeat;
    will-change: transform;
}
.hero::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 30%;
    background: linear-gradient(to bottom, transparent, var(--night));
    z-index: 1;
}
.hero-inner { position: relative; z-index: 2; max-width: 44rem; }
.hero h1 {
    font-size: clamp(2.9rem, 8.5vw, 5.6rem);
    text-shadow: 0 0 44px rgba(74, 163, 255, 0.35);
}
.hero h1 em { font-style: normal; color: var(--glow); }
.hero .tagline {
    font-size: clamp(1.02rem, 2.2vw, 1.2rem);
    color: var(--ice);
    max-width: 36em;
    margin-top: 1rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }
.hero-meta { margin-top: 2.2rem; color: var(--dim); font-size: 0.95rem; }
.hero-meta strong { color: var(--ice); }

/* ---------- Service marquee ---------- */

.marquee {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--panel);
    overflow: hidden;
    padding: 0.7rem 0;
}
.marquee-track {
    display: flex;
    gap: 3rem;
    width: max-content;
    animation: marquee 30s linear infinite;
}
.marquee span {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.98rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--dim);
    white-space: nowrap;
}
.marquee span::after { content: "•"; color: var(--glow); margin-left: 3rem; }
@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

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

.services { padding: 6rem 0 3rem; }
.section-title { font-size: clamp(2rem, 5vw, 3.1rem); margin-bottom: 1.6rem; }
.section-title::after {
    content: "";
    display: block;
    width: 4.5rem;
    height: 3px;
    margin-top: 0.8rem;
    background: linear-gradient(90deg, var(--glow), transparent);
    transform-origin: left;
}
.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
}
.service-card {
    position: relative;
    background: linear-gradient(160deg, var(--panel), var(--panel-2));
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1.8rem 1.6rem;
    overflow: hidden;
}
.service-card.featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 2rem;
    align-items: center;
    border-color: rgba(74, 163, 255, 0.4);
}
.service-card.featured .service-photo {
    border-radius: 8px;
    border: 1px solid var(--line);
    aspect-ratio: 4 / 3;
    object-fit: cover;
    width: 100%;
    height: auto;
}
.service-card svg.icon { width: 2.6rem; height: 2.6rem; fill: var(--glow); margin-bottom: 0.9rem; }
.service-card h3 { font-size: 1.5rem; margin-bottom: 0.6rem; }
.service-card p { color: var(--dim); font-size: 0.99rem; }
.service-card .card-cta { margin-top: 1.2rem; }
.badge {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #06111f;
    background: var(--glow);
    border-radius: 999px;
    padding: 0.18rem 0.75rem;
    margin-bottom: 0.9rem;
}
@media (max-width: 52rem) {
    .service-grid { grid-template-columns: 1fr; }
    .service-card.featured { grid-template-columns: 1fr; }
}

/* ---------- Story ---------- */

.story { padding: 3.5rem 0 1.5rem; }
.story-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 3rem;
    align-items: center;
}
.story-photo {
    border-radius: 10px;
    border: 1px solid var(--line);
    width: 100%;
    height: auto;
}
.story .aside { color: var(--dim); font-size: 0.98rem; margin-top: 0.8rem; }
@media (max-width: 52rem) {
    .story-grid { grid-template-columns: 1fr; gap: 1.8rem; }
}

/* ---------- Commercial feature band ---------- */

.commercial {
    margin: 4rem 0 2rem;
    padding: 4.5rem 0;
    background:
        radial-gradient(ellipse 75% 90% at 85% 50%, rgba(26, 47, 158, 0.35), transparent 65%),
        var(--panel);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.commercial-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: center;
}
.commercial h2 { font-size: clamp(1.9rem, 4.6vw, 2.9rem); }
.commercial p { color: var(--dim); margin-top: 1rem; }
.commercial p strong { color: var(--ice); }
.cred-list { list-style: none; display: grid; gap: 0.8rem; margin-top: 1.4rem; }
.cred-list li {
    display: flex;
    gap: 0.7rem;
    align-items: baseline;
    color: var(--ice);
    font-size: 1rem;
}
.cred-list li::before { content: "▸"; color: var(--glow); font-size: 1.1rem; }
.commercial .btn { margin-top: 1.8rem; }
.commercial-photo img { border-radius: 10px; border: 1px solid var(--line); width: 100%; height: auto; }
.commercial-photo figcaption { color: var(--dim); font-size: 0.9rem; margin-top: 0.7rem; }
@media (max-width: 52rem) {
    .commercial-grid { grid-template-columns: 1fr; }
}

/* ---------- Gallery ---------- */

.work { padding: 3rem 0; }
.work-section { padding: 2.4rem 0 3.2rem; }
.work-head { display: flex; align-items: baseline; gap: 1.1rem; margin-bottom: 3.2rem; position: relative; z-index: 2; }
.work-head h2 { font-size: clamp(1.9rem, 5vw, 2.8rem); }
.work-head .count {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--dim);
    font-size: 0.95rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.work-grid { columns: 4 15rem; column-gap: 0.9rem; }
.work-grid.cols { columns: unset; display: flex; gap: 0.9rem; align-items: flex-start; }
.work-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.9rem; will-change: transform; }
.work-grid.cols a { margin-bottom: 0; }
.work-grid a {
    position: relative;
    display: block;
    margin-bottom: 0.9rem;
    break-inside: avoid;
    overflow: hidden;
    border-radius: 8px;
    background: var(--panel);
    border: 1px solid var(--line);
}
.work-grid img {
    width: 100%;
    height: auto;
    transition: transform 0.4s ease, opacity 0.4s ease;
}
.work-grid a:hover img { transform: scale(1.04); }
@media (max-width: 46rem) {
    .work-grid { columns: 2; column-gap: 0.6rem; }
    .work-grid a { margin-bottom: 0.6rem; }
}

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

.contact {
    padding: 5.5rem 0;
    background:
        radial-gradient(ellipse 80% 80% at 50% 110%, rgba(26, 47, 158, 0.3), transparent 60%),
        var(--panel);
    border-top: 1px solid var(--line);
}
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.contact h3 {
    font-size: 1.05rem;
    letter-spacing: 0.16em;
    color: var(--glow);
    margin: 1.5rem 0 0.4rem;
}
.contact h3:first-of-type { margin-top: 0; }
.contact address { font-style: normal; }
.contact a { color: var(--ice); text-decoration-color: rgba(74, 163, 255, 0.5); }
.contact a:hover { color: #fff; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.8rem; }
.contact-photo figcaption { color: var(--dim); font-size: 0.9rem; margin-top: 0.7rem; text-align: center; }
.brand-card {
    background: #fff;
    border-radius: 14px;
    padding: clamp(1.4rem, 4vw, 2.6rem);
    box-shadow:
        0 0 0 1px rgba(74, 163, 255, 0.35),
        0 0 44px rgba(74, 163, 255, 0.18),
        0 24px 60px rgba(0, 0, 0, 0.45);
}
.brand-card img { width: 100%; height: auto; }
@media (max-width: 52rem) {
    .contact-grid { grid-template-columns: 1fr; }
}

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

.site-footer {
    border-top: 1px solid var(--line);
    padding: 2.2rem 0 5.5rem;
    color: var(--dim);
    font-size: 0.92rem;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 2rem; }
.site-footer a { color: var(--dim); text-decoration: none; }
.site-footer a:hover { color: #fff; }

/* ---------- Mobile call bar ---------- */

.call-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 60;
    display: none;
}
.call-bar a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.95rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    color: #06111f;
    background: var(--glow);
}
.call-bar svg { width: 1.05em; height: 1.05em; fill: currentColor; }
@media (max-width: 46rem) {
    .call-bar { display: flex; }
}

/* ---------- Lightbox ---------- */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(3, 7, 13, 0.95);
    padding: 2.5rem;
}
.lightbox.open { display: flex; }
.lightbox img {
    max-width: min(92vw, 62rem);
    max-height: 86vh;
    border-radius: 8px;
    border: 1px solid var(--line);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
}
.lightbox button {
    position: absolute;
    background: rgba(234, 242, 251, 0.08);
    color: var(--ice);
    border: 1px solid var(--line);
    border-radius: 50%;
    width: 2.9rem;
    height: 2.9rem;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease;
}
.lightbox button:hover { background: var(--glow); color: #06111f; }
.lb-close { top: 1.1rem; right: 1.1rem; }
.lb-prev { left: 1.1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1.1rem; top: 50%; transform: translateY(-50%); }
.lb-caption {
    position: absolute;
    bottom: 1.1rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--dim);
    font-family: var(--font-display);
    letter-spacing: 0.12em;
    font-size: 0.95rem;
}

/* ---------- Motion (JS + motion-ok only) ---------- */

@media (prefers-reduced-motion: no-preference) {
    html.js .reveal {
        opacity: 0;
        transform: translateY(28px);
        transition: opacity 0.8s ease, transform 0.8s ease;
        transition-delay: var(--d, 0s);
    }
    html.js .reveal.in { opacity: 1; transform: none; }

    html.js .section-title.reveal::after {
        transform: scaleX(0);
        transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.25s;
    }
    html.js .section-title.reveal.in::after { transform: scaleX(1); }

    /* Signature: a sheet of tint film slides off each photo as it reveals */
    html.js .work-item::after {
        content: "";
        position: absolute;
        inset: -2%;
        background: linear-gradient(105deg, rgba(5, 10, 18, 0.35), rgba(4, 8, 15, 0.97) 45%, #05090f);
        transform: translateX(0);
        transition: transform 1s cubic-bezier(0.55, 0, 0.2, 1);
        transition-delay: var(--d, 0s);
    }
    html.js .work-item.in::after { transform: translateX(112%); }
    html.js .work-item.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.7s ease; transition-delay: var(--d, 0s); }
    html.js .work-item.reveal.in { opacity: 1; transform: none; }

    .hero-bg { animation: hero-zoom 2.2s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
    .hero-inner > * { animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
    .hero-inner > :nth-child(2) { animation-delay: 0.12s; }
    .hero-inner > :nth-child(3) { animation-delay: 0.24s; }
    .hero-inner > :nth-child(4) { animation-delay: 0.36s; }
    .hero-inner > :nth-child(5) { animation-delay: 0.48s; }

    .lightbox.open img { animation: lb-pop 0.32s cubic-bezier(0.2, 0.9, 0.3, 1); }

    @keyframes hero-zoom {
        from { transform: scale(1.07); }
        to   { transform: scale(1); }
    }
    @keyframes rise {
        from { opacity: 0; transform: translateY(24px); }
        to   { opacity: 1; transform: none; }
    }
    @keyframes lb-pop {
        from { transform: scale(0.9); opacity: 0; }
        to   { transform: scale(1); opacity: 1; }
    }
}
