/*
Theme Name: MMT Performance Daventry
Theme URI: https://daventryremaps.co.uk
Author: MMT Performance
Description: Custom performance-tuning theme for MMT Performance Daventry. Dark, fast, 3D-depth landing with anime.js motion. No builders, no bloat.
Version: 1.0.0
Requires PHP: 8.1
Text Domain: mmt-daventry
*/

/* ---------------------------------------------------------------- tokens */
:root {
    --bg: #05070d;
    --panel: #0b1220;
    --panel-2: #101a2c;
    --line: rgba(255, 255, 255, 0.08);
    --ink: #eef2fb;
    --muted: #8b97ad;
    --dim: #5d6a82;
    --brand: #ff6b1a;
    --brand-d: #cc4d0a;
    --brand-glow: rgba(255, 107, 26, 0.35);
    --cyan: #00d9ff;
    --ok: #22e88c;
    --r: 14px;
    --sp: clamp(56px, 9vw, 110px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }
body {
    font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
img { max-width: 100%; height: auto; }
a { color: var(--brand); }
h1, h2, h3, h4 { line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 14px; }
h1 { font-size: clamp(38px, 6.4vw, 68px); font-weight: 800; }
h2 { font-size: clamp(26px, 3.8vw, 40px); font-weight: 800; }
h3 { font-size: clamp(17px, 2vw, 20px); font-weight: 700; }
.grad {
    background: linear-gradient(100deg, #ff8a3d, var(--brand) 45%, #ffb257);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.skip {
    position: absolute; left: -9999px; top: 0; background: var(--brand);
    color: #fff; padding: 10px 16px; z-index: 200;
}
.skip:focus { left: 12px; top: 12px; }
.center { text-align: center; }

/* --------------------------------------------------------------- buttons */
.btn {
    display: inline-block; border: 0; border-radius: 10px; cursor: pointer;
    font-weight: 700; font-size: 14.5px; padding: 12px 22px;
    text-decoration: none; transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.btn--brand {
    background: linear-gradient(135deg, var(--brand), var(--brand-d)); color: #fff;
    box-shadow: 0 8px 26px -10px var(--brand-glow);
}
.btn--brand:hover { filter: brightness(1.08); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn--ghost:hover { border-color: var(--cyan); transform: translateY(-2px); }
.btn--big { padding: 15px 30px; font-size: 16px; }

/* ---------------------------------------------------------------- header */
.top {
    position: sticky; top: 0; z-index: 90;
    background: rgba(5, 7, 13, 0.86);
    backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--line);
}
.top__in { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 18px; }
.logo { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.logo__badge {
    display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
    background: linear-gradient(135deg, var(--brand), var(--brand-d));
    color: #fff; font-weight: 900; font-size: 13px; letter-spacing: 0.02em;
    box-shadow: 0 6px 18px -8px var(--brand-glow);
}
.logo__img {
    display: block; width: 44px; height: 44px; object-fit: contain; border-radius: 10px;
    filter: drop-shadow(0 6px 18px var(--brand-glow));
}
.logo__text { color: var(--ink); font-weight: 800; font-size: 14px; letter-spacing: 0.14em; line-height: 1.15; }
.logo__text em { display: block; font-style: normal; color: var(--brand); font-size: 10.5px; letter-spacing: 0.34em; }
.nav { display: flex; gap: 26px; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 13.5px; }
.nav a:hover { color: var(--ink); }
@media (max-width: 860px) { .nav { display: none; } }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; padding: calc(var(--sp) * 1.1) 0 var(--sp); overflow: hidden; perspective: 900px; }
.hero__scene { position: absolute; inset: 0; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(64px); opacity: 0.5; will-change: transform; }
.orb--a { width: 420px; height: 420px; right: -80px; top: -120px; background: radial-gradient(circle, var(--brand-glow), transparent 65%); }
.orb--b { width: 340px; height: 340px; left: -120px; bottom: -60px; background: radial-gradient(circle, rgba(0, 217, 255, 0.16), transparent 65%); }
.orb--c { width: 220px; height: 220px; left: 42%; top: 8%; background: radial-gradient(circle, rgba(255, 107, 26, 0.14), transparent 65%); }
.hero__grid {
    position: absolute; left: -10%; right: -10%; bottom: -6%; height: 46%;
    background:
        linear-gradient(transparent, var(--bg) 92%),
        repeating-linear-gradient(90deg, rgba(255, 107, 26, 0.10) 0 1px, transparent 1px 64px),
        repeating-linear-gradient(0deg, rgba(255, 107, 26, 0.10) 0 1px, transparent 1px 44px);
    transform: rotateX(62deg);
    transform-origin: bottom center;
    mask-image: linear-gradient(transparent, #000 25%);
}
.hero__in { position: relative; z-index: 2; }
.kicker {
    display: inline-flex; align-items: center; gap: 9px; margin: 0 0 18px;
    font-size: 11.5px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; color: #ff9a52;
}
.kicker i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.hero__sub { max-width: 590px; color: #aeb8ca; font-size: clamp(15.5px, 2vw, 17.5px); margin: 0 0 30px; }
.hero__ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__stats { display: flex; gap: clamp(24px, 5vw, 52px); margin-top: 52px; flex-wrap: wrap; }
.stat b { display: block; font-size: clamp(24px, 3.4vw, 32px); font-weight: 800; letter-spacing: -0.02em; }
.stat span { color: var(--dim); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }

/* ------------------------------------------------------------- trust band */
.band { border-block: 1px solid var(--line); background: rgba(255, 255, 255, 0.018); }
.band__in {
    display: flex; flex-wrap: wrap; gap: 14px 38px; justify-content: space-between;
    padding: 18px 22px; color: var(--muted); font-size: 13.5px; font-weight: 600;
}
.band strong { color: var(--ink); }

/* --------------------------------------------------------------- sections */
.sec { padding: var(--sp) 0; }
.sec--alt { background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 70%); border-top: 1px solid var(--line); }
.sec--tight { padding: clamp(30px, 5vw, 54px) 0 var(--sp); }
.sechead { margin-bottom: 40px; max-width: 640px; }
.sechead p:not(.seckick) { color: var(--muted); margin: 0; }
.seckick { font-size: 11.5px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--brand); margin: 0 0 8px; }
.sec__note { color: var(--muted); margin-top: 30px; max-width: 640px; }

/* ------------------------------------------------------------------ cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cards--three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .cards, .cards--three { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cards, .cards--three { grid-template-columns: 1fr; } }
.card {
    background: linear-gradient(160deg, var(--panel), var(--panel-2));
    border: 1px solid var(--line); border-radius: var(--r); padding: 26px 24px;
    transform-style: preserve-3d; will-change: transform;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { border-color: rgba(255, 107, 26, 0.35); box-shadow: 0 18px 44px -22px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 107, 26, 0.08); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); margin: 0; font-size: 14.5px; }

/* ------------------------------------------------------------------ steps */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 0 0 40px; padding: 0; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.step {
    position: relative; background: linear-gradient(160deg, var(--panel), var(--panel-2));
    border: 1px solid var(--line); border-radius: var(--r); padding: 30px 24px 26px;
    transform-style: preserve-3d;
}
.step b {
    position: absolute; top: -16px; left: 22px; display: grid; place-items: center;
    width: 34px; height: 34px; border-radius: 10px; font-size: 15px;
    background: linear-gradient(135deg, var(--brand), var(--brand-d)); color: #fff;
    box-shadow: 0 8px 18px -8px var(--brand-glow);
}
.step h3 { margin: 6px 0 8px; }
.step p { color: var(--muted); margin: 0; font-size: 14.5px; }

/* ------------------------------------------------------------- split rows */
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.split > div > p { color: var(--muted); }
.panel {
    background: linear-gradient(160deg, var(--panel), var(--panel-2));
    border: 1px solid var(--line); border-radius: var(--r); padding: 28px;
    transform-style: preserve-3d; will-change: transform;
}
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding: 7px 0 7px 30px; color: var(--muted); font-size: 14.5px; }
.ticks li::before { content: "✓"; position: absolute; left: 2px; color: var(--ok); font-weight: 800; }
.addr { font-size: 16.5px; line-height: 1.7; }
.hours { width: 100%; border-collapse: collapse; margin: 6px 0 22px; }
.hours td { padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 14.5px; }
.hours td:last-child { text-align: right; color: var(--ink); font-weight: 600; }

/* -------------------------------------------------------------- page hero */
.pagehero { position: relative; padding: calc(var(--sp) * 0.8) 0 clamp(28px, 4vw, 44px); overflow: hidden; }
.pagehero::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(700px 300px at 85% -20%, var(--brand-glow), transparent 65%);
    opacity: 0.5;
}
.pagehero .wrap { position: relative; z-index: 2; }
.pagehero__sub { max-width: 590px; color: #aeb8ca; margin: 0; }
.widgetwrap { min-height: 420px; }

/* ------------------------------------------------------------------ prose */
.prose { max-width: 760px; }
.prose p, .prose li { color: var(--muted); }
.prose h2, .prose h3 { margin-top: 34px; }

/* ----------------------------------------------------------------- footer */
.foot { border-top: 1px solid var(--line); background: #04060b; padding: 54px 0 26px; margin-top: var(--sp); }
.foot__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 860px) { .foot__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .foot__grid { grid-template-columns: 1fr; } }
.foot h4 { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--dim); margin-bottom: 12px; }
.foot__muted { color: var(--muted); font-size: 14px; line-height: 1.8; margin: 0; }
.foot__links a { color: var(--muted); text-decoration: none; font-size: 14px; line-height: 2; }
.foot__links a:hover { color: var(--brand); }
.logo--foot { margin-bottom: 14px; }
.foot__legal {
    display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line);
    color: var(--dim); font-size: 12.5px;
}

/* ------------------------------------------- motion states (JS-driven) --- */
.js .js-hero, .js .js-reveal, .js .js-card { opacity: 0; }

/* Reduced motion: everything visible, nothing moves. The brand still reads. */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js .js-hero, .js .js-reveal, .js .js-card { opacity: 1 !important; transform: none !important; }
    .orb { display: none; }
    * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
