/* =====================================================================
 * home.css — "Precision Instrument" home hero + service grid.
 * Loaded only on index.php (after app.css, so these rules win).
 *
 * Aesthetic: a dark carbon hero panel (kin to the black brand header) with
 * an engineered blueprint texture, a brand-red glow and a scanning hairline,
 * an oversized Archivo Expanded headline and Space Mono technical labels —
 * then the service grid as a light "control panel" of numbered cards.
 *
 * Brand anchors preserved: --red (#EA2127), --ink (#0A0A0A).
 * ================================================================== */

:root {
    --font-display: "Archivo Expanded", "Archivo", system-ui, sans-serif;
    --font-body:    "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono:    "Space Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
    --carbon:       #0B0B0D;
    --carbon-2:     #141117;
}

body {
    font-family: var(--font-body);
}

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

.hero {
    position: relative;
    margin: var(--space-3) 0 var(--space-6);
    padding: clamp(28px, 7vw, 52px) clamp(20px, 5vw, 40px) clamp(30px, 7vw, 48px);
    border-radius: 26px;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(135% 120% at 85% -25%, var(--carbon-2) 0%, var(--carbon) 52%);
    border: 1px solid rgba(255, 255, 255, .07);
    box-shadow:
        0 24px 60px -24px rgba(234, 33, 39, .35),
        0 10px 30px -12px rgba(0, 0, 0, .5);
}

/* Brand-red hairline running along the very top edge of the panel. */
.hero::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--red) 30%, #ff5a5f 50%, var(--red) 70%, transparent);
    opacity: .9;
    z-index: 3;
}

/* Fine grain to kill banding on the dark gradient. */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: .18;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* Workshop photograph — the car-on-a-lift bay. Anchored right so the car
 * and toolbox stay visible while the dark left of the image sits under text. */
.hero__photo {
    position: absolute;
    inset: 0;
    background-color: var(--carbon);
    background-image: image-set(
        url("/service/assets/img/workshop-hero.webp") type("image/webp"),
        url("/service/assets/img/workshop-hero.jpg")  type("image/jpeg"));
    background-image: url("/service/assets/img/workshop-hero.jpg");
    background-image: -webkit-image-set(
        url("/service/assets/img/workshop-hero.webp") 1x,
        url("/service/assets/img/workshop-hero.jpg")  1x);
    background-repeat: no-repeat;
    background-position: center right;
    background-size: cover;
}

/* Legibility shade: heavy carbon on the left/bottom (where the copy lives),
 * fading toward the car on the right with a faint crimson cast. */
.hero__shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(101deg,
            rgba(9, 9, 11, .97) 0%,
            rgba(9, 9, 11, .88) 32%,
            rgba(9, 9, 11, .55) 60%,
            rgba(28, 7, 10, .42) 100%),
        linear-gradient(0deg,
            rgba(9, 9, 11, .88) 0%,
            rgba(9, 9, 11, .12) 46%,
            rgba(9, 9, 11, 0) 70%);
}

/* Warm red glow bleeding in from the top-right, complementing the bay's
 * red rim lighting. */
.hero__glow {
    position: absolute;
    width: 420px;
    height: 420px;
    right: -150px;
    top: -190px;
    background: radial-gradient(circle, rgba(234, 33, 39, .42) 0%, rgba(234, 33, 39, 0) 62%);
    filter: blur(16px);
    mix-blend-mode: screen;
}

/* Scanning red hairline that sweeps down the panel. */
.hero__scan {
    position: absolute;
    left: 6%;
    right: 6%;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 90, 95, .8), transparent);
    box-shadow: 0 0 12px rgba(234, 33, 39, .6);
    opacity: 0;
    animation: heroScan 7s cubic-bezier(.6, 0, .4, 1) infinite;
}
@keyframes heroScan {
    0%   { top: 4%;  opacity: 0; }
    12%  { opacity: 1; }
    88%  { opacity: 1; }
    100% { top: 96%; opacity: 0; }
}

.hero__inner {
    position: relative;
    z-index: 2;
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .82);
}
.hero__eyebrow-mark { color: var(--red); }

.hero__title {
    margin: 18px 0 0;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(34px, 8.5vw, 58px);
    line-height: .96;
    letter-spacing: -.01em;
    color: #fff;
}
.hero__line { display: block; }
.hero__line--red {
    color: var(--red);
    text-shadow: 0 0 28px rgba(234, 33, 39, .45);
}

.hero__subtitle {
    margin: 20px 0 0;
    max-width: 46ch;
    font-size: clamp(14.5px, 2.4vw, 16px);
    line-height: 1.55;
    color: rgba(255, 255, 255, .68);
}

/* Workshop service menu — telegraphs what the bays actually do. */
.hero__menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 0;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .58);
}
.hero__menu li { display: inline-flex; align-items: center; }
.hero__menu li:not(:last-child)::after {
    content: "";
    width: 4px;
    height: 4px;
    margin: 0 10px;
    border-radius: 999px;
    background: var(--red);
    opacity: .85;
}

.hero__specs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
}
.hero__specs li {
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 400;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .85);
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    background: rgba(255, 255, 255, .03);
    backdrop-filter: blur(2px);
}
.hero__specs li::before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-right: 7px;
    border-radius: 999px;
    background: var(--red);
    vertical-align: middle;
}

/* Staggered entrance for the hero content. */
.hero__eyebrow  { animation: heroRise .7s cubic-bezier(.2, .7, .2, 1) both; animation-delay: .05s; }
.hero__title    { animation: heroRise .7s cubic-bezier(.2, .7, .2, 1) both; animation-delay: .14s; }
.hero__subtitle { animation: heroRise .7s cubic-bezier(.2, .7, .2, 1) both; animation-delay: .26s; }
.hero__menu     { animation: heroRise .7s cubic-bezier(.2, .7, .2, 1) both; animation-delay: .34s; }
.hero__specs    { animation: heroRise .7s cubic-bezier(.2, .7, .2, 1) both; animation-delay: .42s; }
@keyframes heroRise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------------
 * Service list — grouped, information-scented rows
 * ------------------------------------------------------------------- */

.svc-list {
    display: block;
    margin: 0 0 var(--space-6);
}

/* Category heading with a dashed rule trailing off to the right. */
.svc-cat {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 2px 10px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ink);
}
.svc-cat:first-child { margin-top: 0; }
.svc-cat::after {
    content: "";
    flex: 1;
    height: 1px;
    background: repeating-linear-gradient(90deg, var(--line) 0 5px, transparent 5px 10px);
}

.svc-row {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px 14px;
    margin-bottom: 8px;
    background: var(--white);
    border: 1px solid var(--line-2);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(20, 20, 20, .04);
    text-decoration: none;
    color: var(--ink);
    transition: transform .16s cubic-bezier(.2, .7, .2, 1), box-shadow .16s ease, border-color .16s ease;
    animation: svcRowIn .45s cubic-bezier(.2, .7, .2, 1) both;
    animation-delay: calc(.26s + var(--i, 0) * 42ms);
}
@keyframes svcRowIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}
.svc-row:hover, .svc-row:focus-visible {
    transform: translateX(3px);
    border-color: rgba(234, 33, 39, .28);
    box-shadow: 0 12px 26px -16px rgba(234, 33, 39, .45), 0 2px 6px rgba(20, 20, 20, .04);
    color: var(--ink);
}

.svc-row__icon {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #F2474D 0%, var(--red) 55%, var(--red-dark) 100%);
    box-shadow: 0 6px 14px -7px rgba(234, 33, 39, .6);
    transition: transform .2s cubic-bezier(.2, .7, .2, 1);
}
.svc-row:hover .svc-row__icon,
.svc-row:focus-visible .svc-row__icon { transform: scale(1.06) rotate(-3deg); }

.svc-row__body { flex: 1; min-width: 0; }
.svc-row__name {
    display: block;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--ink);
}
.svc-row__teaser {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.3;
}

.svc-row__meta {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    text-align: right;
}
.svc-row__price {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--red);
    white-space: nowrap;
}
.svc-row__price.is-quote {
    color: var(--muted-2);
    font-weight: 700;
}
.svc-row__chev {
    color: var(--red);
    display: flex;
    flex: none;
    transition: transform .16s ease;
}
.svc-row:hover .svc-row__chev,
.svc-row:focus-visible .svc-row__chev { transform: translateX(2px); }

/* "Not sure what you need?" — WhatsApp helper for undecided visitors. */
.svc-help {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 14px;
    margin-top: 16px;
    border-radius: 16px;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, #0E0E10, #1b1014);
    border: 1px solid rgba(255, 255, 255, .08);
    transition: border-color .16s ease, transform .16s cubic-bezier(.2, .7, .2, 1);
    animation: svcRowIn .45s cubic-bezier(.2, .7, .2, 1) both;
    animation-delay: calc(.26s + var(--i, 0) * 42ms);
}
.svc-help:hover, .svc-help:focus-visible {
    border-color: rgba(37, 211, 102, .5);
    transform: translateX(3px);
}
.svc-help__icon {
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wa-green);
    color: #fff;
}
.svc-help__body { flex: 1; min-width: 0; }
.svc-help__title { display: block; font-size: 14px; font-weight: 700; }
.svc-help__sub {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: rgba(255, 255, 255, .6);
    line-height: 1.3;
}
.svc-help .svc-row__chev { color: #fff; }

/* ---------------------------------------------------------------------
 * Respect reduced-motion preferences.
 * ------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .hero__scan { animation: none; opacity: 0; }
    .hero__eyebrow, .hero__title, .hero__subtitle, .hero__menu, .hero__specs,
    .svc-row, .svc-help { animation: none; }
    .svc-row:hover, .svc-row:focus-visible,
    .svc-help:hover, .svc-help:focus-visible { transform: none; }
}
