:root {
    --navy: #1A2A4A;
    --gold: #B89C6F;
    --gold-text: #7D6838;
    --off-white: #F8F8F6;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--off-white);
    color: var(--navy);
}

/* Grain texture */
.grain::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px;
    opacity: 0.055;
    pointer-events: none;
    z-index: 0;
}

.grain>* {
    position: relative;
    z-index: 1;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -9999px;
    left: 1rem;
    padding: 0.6rem 1.25rem;
    background: var(--navy);
    color: var(--gold);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-decoration: none;
    z-index: 9999;
    border: 1px solid var(--gold);
}

.skip-link:focus {
    top: 1rem;
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* Screen-reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Gold divider line */
.gold-line {
    width: 2.5rem;
    height: 1px;
    background: var(--gold);
}

.gold-line-full {
    height: 1px;
    background: linear-gradient(to right, var(--gold), rgba(184, 156, 111, 0.15), transparent);
}

/* Button styles */
.btn-fill {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-image: linear-gradient(to right, var(--gold) 50%, var(--navy) 50%);
    background-size: 200%;
    background-position: right center;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-position 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-fill:hover {
    background-position: left center;
}

.btn-buy {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--gold);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: background 0.4s ease, color 0.4s ease;
}

.btn-buy::after {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.45) 50%, transparent 100%);
    transform: skewX(-20deg);
    transition: left 0.65s ease;
}

.btn-buy:hover {
    background: #fff;
    color: var(--navy);
}

.btn-buy:hover::after {
    left: 130%;
}

.btn-outline {
    display: inline-block;
    padding: 0.95rem 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    text-decoration: none;
    transition: border-color 0.3s, color 0.3s;
}

.btn-outline:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.btn-outline-navy {
    display: inline-block;
    padding: 0.95rem 2.5rem;
    border: 1px solid var(--navy);
    color: var(--navy);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.3s, color 0.3s;
}

.btn-outline-navy:hover {
    background: var(--navy);
    color: #fff;
}

/* Eyebrow */
.eyebrow {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.45em;
    text-transform: uppercase;
    color: var(--gold-text);
}

.eyebrow-light {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.45em;
    text-transform: uppercase;
    color: rgba(184, 156, 111, 0.85);
}

/* Feature card */
.feature-card {
    border: 1px solid rgba(184, 156, 111, 0.18);
    background: #fff;
    padding: 2rem;
    transition: box-shadow 0.3s, transform 0.3s;
}

.feature-card:hover {
    box-shadow: 0 12px 40px rgba(26, 42, 74, 0.08);
    transform: translateY(-2px);
}

/* Template card */
.tmpl-card {
    border: 1px solid rgba(184, 156, 111, 0.18);
    background: #fff;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

/* Color swatch */
.swatch-ring {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

/* Stat number */
.stat-num {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 400;
    line-height: 1;
    color: var(--navy);
}

.stat-label {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(26, 42, 74, 0.45);
    margin-top: 0.3rem;
}

/* Nav */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(26, 42, 74, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(184, 156, 111, 0.15);
    padding: 1.1rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Spec table */
.spec-table tr {
    border-bottom: 1px solid rgba(184, 156, 111, 0.15);
}

.spec-table td {
    padding: 0.85rem 0;
}

.spec-table th[scope="row"] {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold-text);
    width: 40%;
    text-align: left;
    font-family: 'Montserrat', sans-serif;
}

.spec-table td:last-child {
    font-size: 0.82rem;
    font-weight: 300;
}

/* Fade-up animation */
.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .site-nav {
        padding: 1rem 1.25rem;
    }

    .stat-num {
        font-size: 1.75rem;
    }
}

/* ── Hero: Feature pills ───────────────────────────────────── */
.hero-pill {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.63rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(184, 156, 111, 0.22);
    padding: 0.3rem 0.8rem;
    border-radius: 2px;
    white-space: nowrap;
}

.hero-pill--gold {
    color: var(--gold);
    border-color: rgba(184, 156, 111, 0.5);
    background: rgba(184, 156, 111, 0.08);
}

/* ── Hero: Floating screenshot animation ────────────────────── */
@keyframes hero-float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-10px); }
}

.hero-img-float {
    animation: hero-float 7s ease-in-out infinite;
}

/* ── Hero: Price badge ──────────────────────────────────────── */
.hero-badge {
    position: absolute;
    bottom: -1.1rem;
    right: -1.1rem;
    background: var(--navy);
    border: 1px solid rgba(184, 156, 111, 0.45);
    color: var(--gold);
    padding: 0.8rem 1.3rem;
    text-align: center;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.45);
    line-height: 1;
}

.hero-badge__label {
    display: block;
    font-size: 0.58rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    opacity: 0.65;
    margin-bottom: 4px;
}

.hero-badge__price {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 400;
}

/* ── Hero: Scroll indicator ─────────────────────────────────── */
@keyframes hero-scroll-fade {
    0%, 100% { opacity: 0.45; transform: translateX(-50%) translateY(0); }
    50%       { opacity: 0.9;  transform: translateX(-50%) translateY(5px); }
}

.hero-scroll {
    animation: hero-scroll-fade 2.4s ease-in-out infinite;
}

/* ── Template card: fixed-height thumbnail ────────────────── */
.tmpl-thumb {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-bottom: 1px solid rgba(184, 156, 111, 0.15);
    cursor: zoom-in;
    position: relative;
}

.tmpl-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.tmpl-thumb:hover img {
    transform: scale(1.04);
}

.tmpl-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(26, 42, 74, 0);
    transition: background 0.3s;
    pointer-events: none;
}

.tmpl-thumb:hover::after {
    background: rgba(26, 42, 74, 0.25);
}

.tmpl-thumb__icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    z-index: 2;
    color: var(--gold);
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    background: rgba(26, 42, 74, 0.75);
    padding: 0.45rem 0.85rem;
    border: 1px solid rgba(184, 156, 111, 0.4);
}

.tmpl-thumb:hover .tmpl-thumb__icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* ── Lightbox ──────────────────────────────────────────────── */
.lb-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 18, 35, 0.93);
    z-index: 9000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    padding: 2rem;
    cursor: zoom-out;
}

.lb-overlay.open {
    display: flex;
}

.lb-overlay img {
    max-width: 90vw;
    max-height: 88vh;
    object-fit: contain;
    display: block;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(184, 156, 111, 0.3);
    animation: lb-in 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lb-in {
    from { opacity: 0; transform: scale(0.94); }
    to   { opacity: 1; transform: scale(1); }
}

.lb-close {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    background: none;
    border: 1px solid rgba(184, 156, 111, 0.35);
    color: rgba(184, 156, 111, 0.8);
    font-size: 1.25rem;
    line-height: 1;
    padding: 0.35rem 0.75rem;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.lb-close:hover {
    color: var(--gold);
    border-color: var(--gold);
}

/* Focus visible — WCAG 2.1 AA */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--gold-text);
    outline-offset: 2px;
}

.btn-fill:focus-visible,
.btn-outline:focus-visible,
.btn-outline-navy:focus-visible,
.btn-buy:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}