/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ========== Variables ========== */
:root {
    --gradient-1: linear-gradient(135deg, #4f46e5, #0ea5e9);
    --gradient-2: linear-gradient(135deg, #10b981, #0ea5e9);
    --background: #f8fafc;
    --primary: #4f46e5;
    --white: #fff;
    --black: #000;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    --accent: #00bcd4;
    --accent-2: #06b6d4;
    --border: rgba(2,6,23,0.06);
    --border-light: #f3f4f6;
    --color-secondary: #059669;
    --color-accent: #0ea5e9;
    --color-info: #1d4ed8;
    --color-danger: #dc2626;
    --color-warning: #ea580c;
    --color-bg-tertiary: #f3f4f6;
    --color-border: #e5e7eb;
    --color-border-light: #f3f4f6;
    --shadow-sm: 0 6px 18px rgba(2,6,23,0.04);
    --radius-sm: 8px;
    --radius-md: 12px;
    --container: 1200px;
    --header-height: 72px;
}

/* ========== Base ========== */
:root { --serif-fallback: "Bookman Old Style", "Book Antiqua", Palatino, Georgia, serif; }
html, body {
    margin: 0;
    min-height: 100%;
    background: var(--background);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.45;
    font-family: var(--serif-fallback);
}

body.use-web-serif { font-family: "Old Standard TT", var(--serif-fallback); }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 16px;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

/* ========== Top bar & header ========== */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    font-size: 0.9rem;
}

.top-bar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.35rem 16px;
    gap: 0.5rem;
}

body {
    padding-top: calc(var(--header-height));
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: var(--header-height);
}

.navbar {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.nav-link {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    color: var(--text-primary);
    font-weight: 600;
    transition: background 0.15s ease;
}

.nav-link:hover,
.nav-link:focus {
    background: rgba(2,6,23,0.03);
    outline: none;
}

.nav-link.active {
    color: var(--accent);
    box-shadow: inset 0 -3px 0 var(--accent);
}

.nav-toggle {
    display: none;
    background: none;
    border: 0;
    padding: 0.35rem;
    cursor: pointer;
}

.hamburger {
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    position: relative;
    display: block;
    border-radius: 2px;
}

.hamburger::before,
.hamburger::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
}

.hamburger::before {
    top: -7px;
}

.hamburger::after {
    bottom: -7px;
}

.nav-item {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    min-width: 220px;
    background: var(--background);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 0.25rem 0;
    display: none;
    z-index: 60;
}

.dropdown-toggle[aria-expanded="true"] + .dropdown-menu {
    display: block;
}

/* ========== Section shell ========== */
.section {
    padding: 3rem 0;
    background: transparent;
}

.section .container {
    padding: 0 16px;
}

.section-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    margin: 0 0 0.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.section-subtitle {
    margin: 0 auto;
    max-width: 72ch;
    color: var(--text-secondary);
}

/* ========== Hero ========== */
.hero {
    display: flex;
    gap: 2rem;
    align-items: center;
    padding: 6rem 0 4rem;
}

.hero-left {
    flex: 1;
}

.hero-figure {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========== Features ========== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.feature-card {
    background: linear-gradient(180deg, #fff, #fbfdff);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.14s ease;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

/* ========== Testimonials ========== */
.testimonials {
    padding: 3rem 0;
    background: rgba(0,0,0,0.02);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.testimonial {
    background: var(--background);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.testimonial-quote {
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.testimonial-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

/* ========== Product list ========== */
.product-list-section {
    padding: 3rem 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: transform 0.14s ease;
}

.product-figure {
    width: 100%;
    aspect-ratio: 16/10;
    background: #f7fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-body {
    padding: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.product-title {
    font-weight: 700;
    margin: 0;
}

.product-desc {
    color: var(--text-secondary);
    margin: 0;
}

/* ========== Contact / Forms ========== */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    font-size: 0.95rem;
}

/* ========== Footer ========== */
.footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    color: var(--text-secondary);
    background: transparent;
}

.footer .footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

/* ========== Utilities ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.9rem;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    font-weight: 700;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 6px 18px rgba(0,188,212,0.12);
}

.kicker {
    color: var(--accent);
    font-weight: 700;
    font-size: 0.9rem;
}

/* ========== Responsive ========== */
@media (max-width: 1100px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 880px) {
    .nav-toggle {
        display: block;
    }

    .nav-list {
        position: absolute;
        top: calc(var(--header-height) + 8px);
        left: 12px;
        right: 12px;
        flex-direction: column;
        gap: 0;
        background: var(--background);
        padding: 0.5rem;
        border-radius: 12px;
        box-shadow: var(--shadow-lg);
        display: none;
    }

    .nav-list.show {
        display: flex;
    }

    .hero {
        flex-direction: column;
        padding: 4rem 0;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .nav-link,
    .dropdown-toggle {
        padding: 0.7rem 1rem;
    }

    .section {
        padding: 2rem 0;
    }
}

/* ========== Accessibility ========== */
:focus {
    outline: 3px solid rgba(0,188,212,0.12);
    outline-offset: 3px;
}

/* ========== Small migration helpers ========== */