/* Theme and base layout */
:root {
    --bg: #f6f2ea;
    --bg-alt: #fcfaf6;
    --ink: #1a1f23;
    --muted: #5b6670;
    --accent: #c65a2d;
    --accent-dark: #9b3e1a;
    --accent-soft: #f4d8c8;
    --steel: #2f3a40;
    --steel-light: #3f4b54;
    --card: #ffffff;
    --border: rgba(26, 31, 35, 0.12);
    --shadow: 0 18px 45px rgba(21, 27, 32, 0.12);
    --shadow-soft: 0 12px 30px rgba(21, 27, 32, 0.08);
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--ink);
    background:
        radial-gradient(1100px 520px at 8% -10%, #f9e8d6 0%, rgba(249, 232, 214, 0) 60%),
        radial-gradient(850px 420px at 95% 0%, #dfeaf2 0%, rgba(223, 234, 242, 0) 55%),
        #f6f2ea;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(26, 31, 35, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(26, 31, 35, 0.04) 1px, transparent 1px);
    background-size: 120px 120px;
    opacity: 0.5;
    z-index: 0;
}

img {
    max-width: 100%;
    display: block;
}

p {
    color: var(--muted);
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--accent-dark);
}

h1, h2, h3, h4, h5, h6,
.navbar-brand,
.footer-brand {
    font-family: 'Teko', sans-serif;
    letter-spacing: 0.02em;
    color: var(--ink);
}

.main-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.section {
    padding: 4rem 0;
}

.section-compact {
    padding: 2.5rem 0;
}

.section-alt {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.page-hero {
    padding: 4.5rem 0 2.5rem;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.6));
    border-bottom: 1px solid var(--border);
}

.page-hero .display-4 {
    font-size: clamp(2.4rem, 3vw, 3.4rem);
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 0.75rem;
    color: var(--steel-light);
    font-weight: 600;
}

.section-title {
    font-size: clamp(2.2rem, 2.8vw, 3rem);
    margin-bottom: 1rem;
}

.section-lead {
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    border-radius: 999px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 10px 20px rgba(198, 90, 45, 0.25);
}

.btn-primary:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--steel);
    border-color: var(--steel);
    color: #fff;
}

.btn-secondary:hover {
    background: #222a2f;
    border-color: #222a2f;
    transform: translateY(-1px);
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.65);
    color: #fff;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    color: #fff;
}

/* Navbar */
.main-nav {
    background: rgba(20, 24, 28, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    z-index: 1030;
}

.main-nav .navbar-brand {
    color: #fef7ed;
    text-transform: uppercase;
}

.brand-mark {
    font-size: 1.9rem;
    letter-spacing: 0.2em;
}

.brand-tagline {
    font-size: 0.7rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    margin-top: -0.35rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.75) !important;
    font-weight: 500;
    position: relative;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.35rem;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: #fff !important;
}

.admin-link {
    color: #f6c178 !important;
}

.nav-cta .btn {
    box-shadow: 0 10px 25px rgba(198, 90, 45, 0.3);
}

/* Hero */
.hero-carousel .carousel-item {
    height: 72vh;
    min-height: 420px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
}

.hero-carousel .carousel-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(12, 15, 18, 0.88), rgba(12, 15, 18, 0.35) 60%);
    z-index: 1;
}

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

.hero-panel {
    background: rgba(12, 15, 18, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    max-width: 640px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(6px);
    animation: heroFade 0.9s ease;
}

.hero-panel h1 {
    color: #fff;
    font-size: clamp(2.4rem, 3.5vw, 3.6rem);
}

.hero-panel p {
    color: rgba(255, 255, 255, 0.85);
}

.hero-panel .eyebrow {
    color: rgba(255, 255, 255, 0.7);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.hero-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.8rem;
}

.hero-metric {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    color: #fff;
    min-width: 150px;
}

.hero-metric span {
    font-family: 'Teko', sans-serif;
    font-size: 1.4rem;
    display: block;
    letter-spacing: 0.03em;
}

.hero-metric small {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-size: 0.6rem;
}

.hero-fallback {
    background: linear-gradient(120deg, #1a2127, #3b4a54);
}

.hero-carousel .carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.hero-carousel .carousel-control-prev-icon,
.hero-carousel .carousel-control-next-icon {
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
}

/* Cards and grids */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.2rem;
    box-shadow: var(--shadow-soft);
}

.stat-card span {
    font-family: 'Teko', sans-serif;
    font-size: 1.6rem;
    display: block;
}

.stat-card small {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.6rem;
    color: var(--steel-light);
}

.feature-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.6rem;
    box-shadow: var(--shadow-soft);
    height: 100%;
}

.feature-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
    font-family: 'Teko', sans-serif;
}

.card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

/* Product cards */
.product-card {
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.product-card .card-img-top {
    height: 210px;
    object-fit: cover;
}

.product-card .card-body {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.product-card .card-title {
    font-size: 1.4rem;
    margin-bottom: 0;
}

.product-card .btn {
    margin-top: auto;
}

.product-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    width: fit-content;
}

/* Forms */
.form-panel {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
}

.form-control,
.form-select {
    border-radius: 12px;
    border: 1px solid rgba(26, 31, 35, 0.15);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.2rem rgba(198, 90, 45, 0.2);
}

/* Product detail */
.product-image-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: var(--shadow-soft);
}

.product-detail-img {
    width: 100%;
    border-radius: var(--radius-md);
}

.product-detail-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-soft);
}

/* Callouts and info cards */
.callout {
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.9), rgba(247, 239, 230, 0.9));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-soft);
}

.info-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 2rem;
    box-shadow: var(--shadow-soft);
}

/* Footer */
.footer {
    background: #14181c;
    color: rgba(255, 255, 255, 0.75);
    position: relative;
    z-index: 1;
}

.footer-cta {
    padding: 3rem 0;
    background: linear-gradient(120deg, #1b2126, #2f3a40);
}

.footer-cta h3 {
    color: #fff;
    font-size: 2.2rem;
}

.footer-main {
    padding: 3rem 0 2.5rem;
}

.footer-brand {
    font-size: 2rem;
    letter-spacing: 0.2em;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.footer h5 {
    color: #fff;
}

.footer p {
    color: rgba(255, 255, 255, 0.75);
}

.footer a {
    color: rgba(255, 255, 255, 0.7);
}

.footer a:hover {
    color: #fff;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.2rem 0;
    font-size: 0.9rem;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(14px);
    animation: reveal 0.8s ease forwards;
    animation-delay: var(--delay, 0s);
}

@keyframes reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroFade {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .hero-carousel .carousel-item {
        height: 70vh;
    }

    .hero-panel {
        padding: 2rem;
    }

    .nav-link::after {
        display: none;
    }

    .page-hero {
        padding: 3.5rem 0 2rem;
    }
}

@media (max-width: 575px) {
    .brand-mark {
        font-size: 1.5rem;
    }

    .brand-tagline {
        letter-spacing: 0.25em;
    }

    .hero-carousel .carousel-item {
        height: 65vh;
        min-height: 360px;
    }

    .hero-panel {
        padding: 1.6rem;
    }

    .hero-metric {
        min-width: 130px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .callout {
        padding: 2rem;
    }
}
