/* ==========================================================================
   Call of Duty landing theme for PteroCA
   --------------------------------------------------------------------------
   Palette is drawn from the hero artwork: desaturated steel and charcoal with
   near-white highlights, lit by a single amber accent. Structure follows the
   default landing theme's class names so the inherited components (category
   grid, featured products, CTA, store) are reskinned without overriding them.

   Only the landing context loads this file. The panel and email contexts fall
   back to the default theme.
   ========================================================================== */

:root,
[data-bs-theme="dark"] {
    /* Theme tokens (shared with the default theme's variable names) */
    --bg-body: #0b0d10;
    --bg-card: #14181d;
    --bg-card-hover: #1b2129;
    --text-main: #eef1f4;
    --text-muted: #8a949e;
    --primary-color: #e8a33d;
    --primary-hover: #f2b455;
    --secondary-color: #7d93ad;
    --accent-gradient: linear-gradient(135deg, #e8a33d 0%, #b8742a 100%);
    --navbar-bg: rgba(11, 13, 16, 0.85);
    --border-color: #262d35;

    /* Tighter corners read as military hardware rather than a rounded web app. */
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 6px;
    --display-font: 'Oswald', 'Inter', system-ui, sans-serif;

    /* Re-point Bootstrap's own tokens so .bg-primary, .text-primary, .bg-body,
       .text-muted and the dark-mode defaults follow this palette. */
    --bs-primary: #e8a33d;
    --bs-primary-rgb: 232, 163, 61;
    --bs-secondary: #7d93ad;
    --bs-secondary-rgb: 125, 147, 173;
    --bs-body-bg: #0b0d10;
    --bs-body-color: #eef1f4;
    --bs-border-color: #262d35;
    --bs-secondary-color: #8a949e;
    --bs-tertiary-color: #6f7883;
    --bs-link-color: #e8a33d;
    --bs-link-hover-color: #f2b455;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Faint horizontal grain, as if light is raking across brushed steel. */
    background-image:
        radial-gradient(ellipse 80% 55% at 50% -10%, rgba(232, 163, 61, 0.06), transparent 70%),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.014) 0 1px, transparent 1px 3px);
    background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--display-font);
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 1rem;
}

p {
    color: var(--text-muted);
    line-height: 1.7;
}

a {
    text-decoration: none;
    transition: all 0.2s ease;
}

::selection {
    background: var(--primary-color);
    color: #0b0d10;
}

/* Slim, dark scrollbar to match the shell. */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) var(--bg-body);
}

/* --------------------------------------------------------------------------
   Navbar
   -------------------------------------------------------------------------- */

.navbar {
    background-color: var(--navbar-bg) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

/* Amber hairline along the top edge of the fixed bar. */
.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color) 35%, var(--secondary-color) 65%, transparent);
    opacity: 0.7;
}

.navbar-brand {
    font-family: var(--display-font);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-main) !important;
    font-size: 1.45rem;
}

.navbar-brand img {
    filter: drop-shadow(0 0 6px rgba(232, 163, 61, 0.25));
}

.nav-link {
    color: var(--text-muted) !important;
    font-family: var(--display-font);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.9rem;
    margin: 0 0.5rem;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-main) !important;
}

/* Amber underline slides in under plain nav links on hover. */
.nav-item .nav-link::after {
    content: '';
    position: absolute;
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0.1rem;
    height: 2px;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.nav-item .nav-link:hover::after {
    transform: scaleX(1);
}

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

.btn {
    border-radius: var(--radius-md);
    padding: 0.6rem 1.5rem;
    font-family: var(--display-font);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: 1px solid transparent;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background: var(--accent-gradient);
    color: #14100a;
    font-weight: 600;
    box-shadow: 0 4px 14px -4px rgba(232, 163, 61, 0.45);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background: var(--primary-hover);
    color: #14100a;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px -6px rgba(232, 163, 61, 0.6);
}

.btn-outline-light {
    border: 1px solid var(--border-color);
    color: var(--text-main);
    background-color: transparent;
}

.btn-outline-light:hover,
.btn-outline-light:focus-visible {
    background-color: var(--bg-card-hover);
    border-color: var(--primary-color);
    color: var(--text-main);
}

.btn-outline-primary {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background-color: transparent;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus-visible {
    background-color: var(--primary-color);
    color: #14100a;
}

.btn-secondary {
    background-color: var(--bg-card-hover);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
    background-color: var(--border-color);
    color: var(--text-main);
}

.btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

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

.hero-section {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 88vh;
    padding: 9rem 0 6rem;
    isolation: isolate;
}

/* Artwork layer. Plain JPEG first as the fallback, then the format-negotiated
   sets, so a browser that understands image-set overrides the fallback rather
   than the other way round. The unprefixed form is declared last so it wins
   where both prefixed and unprefixed syntaxes are supported. */
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: url('../img/hero-bg.jpg');
    background-image: -webkit-image-set(
        url('../img/hero-bg.webp') type('image/webp'),
        url('../img/hero-bg.jpg') type('image/jpeg')
    );
    background-image: image-set(
        url('../img/hero-bg.webp') type('image/webp'),
        url('../img/hero-bg.jpg') type('image/jpeg')
    );
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
}

/* Dark scrim: heaviest on the left where the copy sits, so the rifle and the
   highlights on the right stay visible. */
.hero-scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(8, 10, 12, 0.94) 0%, rgba(8, 10, 12, 0.78) 42%, rgba(8, 10, 12, 0.38) 100%),
        linear-gradient(180deg, rgba(8, 10, 12, 0.55) 0%, transparent 25%, rgba(8, 10, 12, 0.55) 100%);
}

.hero-inner {
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    font-family: var(--display-font);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--primary-color);
    background-color: rgba(232, 163, 61, 0.08);
    border: 1px solid rgba(232, 163, 61, 0.35);
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.9rem;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(2.6rem, 6vw, 4.5rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    line-height: 1.02;
    margin-bottom: 1.25rem;
    /* Shadow via filter, not text-shadow: the glyph fill is transparent, so a
       text-shadow would paint the shape as a dark blur instead of a glow. */
    filter: drop-shadow(0 2px 16px rgba(0, 0, 0, 0.55));
}

/* Each line carries its own gradient. background-clip: text is only reliable
   on the element that directly holds the text, and these are block-level. */
.hero-title-line,
.hero-title-highlight {
    display: block;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-title-line {
    background-image: linear-gradient(to right, #ffffff 12%, #b9c2cc 100%);
}

.hero-title-highlight {
    background-image: var(--accent-gradient);
    /* Amber glow behind the accent word. */
    filter: drop-shadow(0 0 22px rgba(232, 163, 61, 0.28));
}

.hero-subtitle {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 0 2.5rem;
}

.hero-actions {
    margin-bottom: 0.5rem;
}

/* --------------------------------------------------------------------------
   Section headings
   -------------------------------------------------------------------------- */

.section-title {
    text-align: center;
    position: relative;
    margin-bottom: 3.5rem;
}

.section-title h2 {
    font-family: var(--display-font);
    font-size: 2.25rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
}

/* --------------------------------------------------------------------------
   Cards (categories and products, including the store grid)
   -------------------------------------------------------------------------- */

.custom-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    position: relative;
}

/* Thin amber rail down the left edge, revealed on hover. */
.custom-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent-gradient);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.3s ease;
}

.custom-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    background-color: var(--bg-card-hover);
    box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.85), 0 0 24px -12px rgba(232, 163, 61, 0.55);
}

.custom-card:hover::after {
    transform: scaleY(1);
}

.card-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    background: rgba(232, 163, 61, 0.1);
    border: 1px solid rgba(232, 163, 61, 0.22);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.card-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.product-price {
    font-family: var(--display-font);
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 1.5rem 0;
    line-height: 1;
}

.product-price small {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* --------------------------------------------------------------------------
   Card background images (only rendered when a product or category has one)
   -------------------------------------------------------------------------- */

.custom-card-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    z-index: 1;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

/* Charcoal wash so card text stays readable over any image. Fades on hover by
   lowering opacity, so the declared transition actually animates. */
.custom-card-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(11, 13, 16, 0.96), rgba(11, 13, 16, 0.74));
    opacity: 1;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.custom-card-bg:hover::before {
    opacity: 0.62;
}

.custom-card-bg * {
    z-index: 2;
    position: relative;
}

/* --------------------------------------------------------------------------
   CTA section
   -------------------------------------------------------------------------- */

.cta-section {
    position: relative;
    background:
        linear-gradient(135deg, rgba(27, 33, 41, 0.9) 0%, rgba(11, 13, 16, 0.95) 100%);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 5rem 0;
    overflow: hidden;
}

/* Hazard-stripe panel along the top edge, dimmed. */
.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: repeating-linear-gradient(45deg, var(--primary-color) 0 12px, transparent 12px 24px);
    opacity: 0.5;
}

.letter-spacing-2 {
    letter-spacing: 0.2em;
}

.text-shadow {
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6);
}

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

footer {
    background-color: #05070a;
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 0 !important;
}

footer p {
    font-size: 0.9rem;
    margin: 0;
}

footer a {
    color: var(--primary-color);
}

footer a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Widget slots (used only when a plugin renders widgets into the landing page)
   -------------------------------------------------------------------------- */

.widget-slot {
    width: 100%;
}

.widget-container {
    margin-bottom: 1.5rem;
}

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

@media (max-width: 991.98px) {
    /* Below the lg breakpoint the copy centres and the scrim darkens evenly. */
    .hero-section {
        text-align: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-scrim {
        background:
            linear-gradient(180deg, rgba(8, 10, 12, 0.72) 0%, rgba(8, 10, 12, 0.88) 100%);
    }

    .hero-bg {
        background-position: center;
    }
}

@media (max-width: 575.98px) {
    .hero-section {
        min-height: auto;
        padding: 7rem 0 4rem;
    }

    .hero-title {
        font-size: 2.4rem;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .custom-card {
        padding: 1.5rem;
    }

    .product-price {
        font-size: 2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .custom-card,
    .btn,
    .nav-item .nav-link::after,
    .custom-card::after {
        transition: none;
    }

    .custom-card:hover,
    .btn-primary:hover {
        transform: none;
    }
}
