:root {
    --ink: #f8fafc;
    --muted: #a8b0c2;
    --surface: #12182a;
    --surface-raised: #1a2238;
    --line: rgba(255, 255, 255, 0.12);
    --brand: #7c83ff;
    --brand-strong: #a78bfa;
    --success: #4ade80;
    --max-width: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background:
        radial-gradient(circle at 80% 0%, rgba(124, 131, 255, .16), transparent 32rem),
        #0b1020;
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}
a { color: inherit; }
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(11, 16, 32, .9);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}
.site-header-inner, main, .site-footer-inner {
    width: min(var(--max-width), calc(100% - 2rem));
    margin: 0 auto;
}
.site-header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}
.brand {
    color: var(--ink);
    text-decoration: none;
    font-weight: 800;
    letter-spacing: -.03em;
    font-size: 1.1rem;
}
.brand-logo {
    display: block;
    width: clamp(54px, 8vw, 78px);
    height: clamp(34px, 5vw, 48px);
    max-width: 100%;
    max-height: 48px;
    object-fit: contain;
    object-position: center;
    border-radius: .55rem;
    background: #fff;
    padding: .15rem;
}
.footer-brand-logo { width: 72px; height: 48px; max-width: 72px; max-height: 48px; margin: 0 auto 1rem; }
.brand-mark { color: var(--brand-strong); margin-right: .35rem; }
.site-nav { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: .92rem; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--ink); }
.cart-link {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: .45rem .8rem;
    color: var(--ink) !important;
}
.page-hero { padding: 7rem 0 4rem; max-width: 760px; }
.eyebrow {
    color: var(--brand-strong);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}
h1, h2, h3 { line-height: 1.15; letter-spacing: -.035em; }
h1 { font-size: clamp(2.5rem, 7vw, 5rem); margin: .75rem 0 1rem; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 0 0 .65rem; }
h3 { font-size: 1.2rem; margin: 0 0 .5rem; }
.lede, .section-intro { color: var(--muted); max-width: 650px; }
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    border: 0;
    border-radius: .7rem;
    padding: .75rem 1rem;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    color: white;
    font: inherit;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
}
.button.secondary { background: transparent; border: 1px solid var(--line); }
.button[disabled] { opacity: .55; cursor: not-allowed; }
.section { padding: 4rem 0; }
.section-heading { margin-bottom: 1.5rem; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.card {
    background: linear-gradient(145deg, rgba(26, 34, 56, .94), rgba(18, 24, 42, .94));
    border: 1px solid var(--line);
    border-radius: 1.1rem;
    padding: 1.3rem;
}
.card p, .card li { color: var(--muted); }
.card ul { padding-left: 1.1rem; }
.product-card { display: flex; flex-direction: column; gap: .8rem; }
.product-art {
    min-height: 150px;
    display: grid;
    place-items: center;
    border-radius: .8rem;
    background: linear-gradient(135deg, rgba(124, 131, 255, .2), rgba(167, 139, 250, .1));
    font-size: 3rem;
}
.product-meta { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.product-price { color: var(--brand-strong); font-weight: 800; font-size: 1.25rem; }
.product-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: auto; }
.availability { color: var(--success); font-size: .82rem; font-weight: 700; }
.availability.sold-out { color: var(--muted); }
.form-card { max-width: 720px; }
label { display: block; margin: .8rem 0 .3rem; font-weight: 700; }
input, textarea, select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: .65rem;
    padding: .75rem;
    background: rgba(255,255,255,.05);
    color: var(--ink);
    font: inherit;
}
textarea { min-height: 140px; resize: vertical; }
.site-footer { margin-top: 4rem; border-top: 1px solid var(--line); color: var(--muted); }
.site-footer-inner { padding: 2rem 0; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 20; background: var(--ink); color: #111827; padding: .5rem; }
@media (max-width: 800px) {
    .site-header-inner { align-items: flex-start; padding: 1rem 0; flex-direction: column; }
    .site-nav { gap: .75rem; }
    .page-hero { padding-top: 4rem; }
    .card-grid { grid-template-columns: 1fr; }
}

/* Homepage storefront layer. Loaded after the legacy inline theme so the
   production homepage and secondary pages share the same visual system. */
body {
    background:
        radial-gradient(circle at 85% 0%, rgba(124, 131, 255, .2), transparent 34rem),
        radial-gradient(circle at 0% 35%, rgba(167, 139, 250, .08), transparent 28rem),
        #0b1020;
}
nav {
    background: rgba(11, 16, 32, .88) !important;
    border-bottom-color: rgba(255,255,255,.1) !important;
    padding: .85rem 0 !important;
}
.nav-container { max-width: var(--max-width); }
nav .nav-container {
    width: min(var(--max-width), calc(100% - 2rem));
    padding-left: 0;
    padding-right: 0;
}
.logo {
    font-size: 1.15rem;
    letter-spacing: -.03em;
}
.logo.brand-logo {
    width: clamp(52px, 6vw, 68px);
    height: clamp(32px, 4.5vw, 42px);
    max-width: 68px;
    max-height: 42px;
    overflow: hidden;
    background: #fff;
}
.logo.brand-logo img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.nav-links { gap: 1.05rem; align-items: center; }
.nav-links a {
    color: var(--muted);
    font-size: .86rem;
}
.nav-links a:hover, .nav-links a:focus-visible { color: var(--ink); }
.cart-link {
    color: var(--ink) !important;
    background: rgba(124,131,255,.14);
    border-color: rgba(167,139,250,.45);
    font: inherit;
    font-weight: 700;
}
.hero {
    min-height: 76vh;
    padding-top: 9rem;
    padding-bottom: 5rem;
    background:
        linear-gradient(180deg, rgba(11,16,32,.15), rgba(11,16,32,.9)),
        radial-gradient(circle at 50% 30%, rgba(124,131,255,.18), transparent 32rem);
}
.hero-content { max-width: 900px; text-align: left; }
.hero-badge {
    border-color: rgba(167,139,250,.42);
    background: rgba(124,131,255,.1);
    color: var(--brand-strong);
}
.hero h1 { max-width: 800px; font-size: clamp(3rem, 7vw, 6.2rem); }
.hero-subtitle { max-width: 630px; color: var(--muted); font-size: 1.08rem; }
.hero-buttons { justify-content: flex-start; }
.btn {
    border-radius: .7rem;
    box-shadow: none;
}
.btn-primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
}
.btn-secondary {
    border-color: rgba(255,255,255,.18);
    background: rgba(255,255,255,.035);
}
.shop-hero {
    max-width: var(--max-width);
    padding: 5rem 2rem;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 1.4rem;
    background: rgba(18,24,42,.58);
}
.shop-heading-row h2 { max-width: 540px; }
.shop-heading-row h2 span { color: var(--brand-strong); }
.shop-card {
    background: rgba(13,19,36,.9);
    border-color: rgba(255,255,255,.1);
    border-radius: 1rem;
}
.shop-card-art {
    min-height: 190px;
    background:
        linear-gradient(145deg, rgba(124,131,255,.22), rgba(167,139,250,.04)),
        #0d1324;
}
.shop-card-body { padding: 1.25rem; }
.shop-card h3 { font-size: 1.12rem; }
.shop-card-price { color: var(--brand-strong); }
.shop-card .btn { padding: .78rem 1rem; }
.shop-note a { color: var(--brand-strong); }
.review-strip {
    max-width: var(--max-width);
    padding: 5rem 2rem;
}
.review-strip .section-header { margin-bottom: 2rem; }
.review-card {
    background: rgba(18,24,42,.7);
    border-color: rgba(255,255,255,.1);
}
.review-card blockquote { line-height: 1.6; }
.configurator {
    max-width: 1120px;
    margin: 0 auto;
    padding: 4rem 2rem;
}
.configurator-grid { display: grid; grid-template-columns: 1.35fr .85fr; gap: 1rem; align-items: start; }
.configurator-panel, .configurator-summary { background: rgba(18,24,42,.78); border: 1px solid var(--line); border-radius: 1rem; padding: 1.35rem; }
.configurator-panel fieldset { border: 0; padding: 0; margin: 0 0 1.35rem; }
.configurator-panel legend { font-weight: 800; margin-bottom: .7rem; }
.configurator-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: .65rem; }
.configurator-option { display: block; position: relative; border: 1px solid var(--line); border-radius: .7rem; padding: .8rem; cursor: pointer; color: var(--muted); }
.configurator-option:has(input:checked) { border-color: var(--brand-strong); background: rgba(124,131,255,.12); color: var(--ink); }
.configurator-option input { position: absolute; opacity: 0; pointer-events: none; }
.configurator-option strong, .configurator-option span { display: block; }
.configurator-option strong { color: inherit; font-size: .92rem; }
.configurator-option span { font-size: .78rem; margin-top: .2rem; }
.configurator-select { margin-bottom: 1.2rem; }
.configurator-select label { margin-top: 0; }
.configurator-summary { position: sticky; top: 6rem; }
.configurator-total { font-size: 2.2rem; color: var(--brand-strong); font-weight: 850; margin: .35rem 0; }
.configurator-summary-note { color: var(--muted); font-size: .8rem; }
.configurator-breakdown { list-style: none; padding: 0; margin: 1rem 0 1.25rem; border-top: 1px solid var(--line); }
.configurator-breakdown li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid rgba(255,255,255,.06); color: var(--muted); font-size: .86rem; }
.configurator-breakdown li strong { color: var(--ink); text-align: right; }
.configurator-cta { width: 100%; }
@media(max-width:800px) { .configurator { padding-left: 1.25rem; padding-right: 1.25rem; } .configurator-grid { grid-template-columns: 1fr; } .configurator-summary { position: static; } }
@media(max-width:520px) { .configurator-options { grid-template-columns: 1fr; } }
@media (max-width: 800px) {
    .nav-links {
        width: 100%;
        display: none;
    }
    .nav-links.active { display: flex; }
    .hero { min-height: auto; padding-top: 7rem; }
    .hero-content { text-align: center; }
    .hero-buttons { justify-content: center; }
    .shop-hero, .review-strip { padding-left: 1.25rem; padding-right: 1.25rem; }
    .site-header-inner { min-height: 62px; }
    nav .nav-container { width: calc(100% - 1.25rem); }
    .brand-logo, .logo.brand-logo { width: 52px; height: 32px; max-width: 52px; max-height: 32px; }
}

/* Final mobile pass for the homepage's legacy inline theme. */
@media (max-width: 600px) {
    html, body { max-width: 100%; overflow-x: hidden; }
    .site-header-inner, nav .nav-container {
        width: calc(100% - 1rem);
        min-height: 58px;
        padding-top: .65rem;
        padding-bottom: .65rem;
    }
    .nav-container { flex-wrap: wrap; }
    .mobile-menu-btn {
        display: block !important;
        margin-left: auto;
        padding: .35rem .55rem;
        border: 1px solid var(--line);
        border-radius: .55rem;
        background: rgba(255,255,255,.05);
        color: var(--ink);
        line-height: 1;
    }
    .nav-links {
        order: 3;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: .15rem;
        padding: .65rem 0 0;
        margin: 0;
    }
    .nav-links:not(.active) { display: none; }
    .nav-links.active { display: flex; }
    .nav-links li { width: 100%; }
    .nav-links a, .nav-links .cart-link {
        display: block;
        width: 100%;
        padding: .65rem .75rem;
        text-align: left;
    }
    .hero {
        min-height: auto;
        padding: 6.5rem .85rem 3rem;
    }
    .hero-content { width: 100%; }
    .hero h1 {
        font-size: clamp(2.15rem, 12vw, 3.3rem);
        overflow-wrap: anywhere;
    }
    .hero-subtitle { font-size: .98rem; }
    .hero-buttons {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }
    .hero-buttons .btn { width: 100%; }
    section, .configurator, .review-strip, .shop-hero {
        width: 100%;
        padding: 3rem .85rem;
    }
    .section-header h2, .shop-heading-row h2 {
        font-size: clamp(1.7rem, 9vw, 2.35rem);
        overflow-wrap: anywhere;
    }
    .shop-heading-row { margin-bottom: 1.35rem; }
    .shop-grid, .review-grid, .services-grid, .builds-grid, .gallery-grid, .pricing-grid {
        grid-template-columns: 1fr !important;
    }
    .shop-card-art, .product-art { min-height: 130px; }
    .shop-card-body, .card, .quote-form-container, .quiz-container { padding: 1rem; }
    .product-meta, .pricing-row { flex-direction: column; gap: .35rem; }
    .product-price, .pricing-price { align-self: flex-start; }
    .configurator-panel, .configurator-summary { padding: 1rem; }
    .configurator-total { font-size: 1.9rem; }
    .configurator-breakdown li {
        flex-direction: column;
        gap: .2rem;
    }
    .form-row { grid-template-columns: 1fr !important; }
    input, textarea, select, button { max-width: 100%; }
    .newsletter-form { width: 100%; }
    .newsletter-form input { min-width: 0; width: 100%; }
    .contact-links { flex-direction: column; align-items: stretch; }
    .contact-link { justify-content: center; }
    .gallery-item, .gallery-card { min-height: 220px; }
    video, img { max-width: 100%; }
}
