:root {
    --primary: #004b34;
    --primary-dark: #003424;
    --gold: #d0b273;
    --gold-light: #e5d5aa;
    --cream: #f3efe5;
    --surface: #ded5c3;
    --text-dark: #17251f;
    --text-light: #fffdf7;
    --header-height: 80px;
    --footer-height: 56px;
    --font-head: 'Playfair Display', serif;
    --font-body: 'Playfair Display', serif;
    --transition: 220ms ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    background: var(--cream);
    color: var(--text-dark);
    font-family: var(--font-body);
    line-height: 1.5;
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

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

button {
    font: inherit;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-head);
}

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 1000;
    height: var(--header-height);
    padding: 0 4%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 52, 36, 0.96);
    border-bottom: 1px solid rgba(208, 178, 115, 0.35);
    backdrop-filter: blur(12px);
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--gold);
    font-family: var(--font-head);
    font-size: 1.25rem;
    font-weight: 600;
    white-space: nowrap;
}

.site-brand img {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border: 1px solid rgba(208, 178, 115, 0.55);
    border-radius: 50%;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2.4vw, 2.5rem);
}

.site-nav a {
    position: relative;
    color: var(--text-light);
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    white-space: nowrap;
}

.site-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 100%;
    bottom: -7px;
    height: 1px;
    background: var(--gold);
    transition: right var(--transition);
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--gold);
}

.site-nav a:hover::after,
.site-nav a.active::after {
    right: 0;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    color: var(--gold);
    font-size: 1.55rem;
    cursor: pointer;
}

.site-footer {
    position: fixed;
    inset: auto 0 0;
    z-index: 1000;
    height: var(--footer-height);
    padding: 0 4%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--primary-dark);
    color: var(--cream);
    border-top: 1px solid rgba(208, 178, 115, 0.35);
    font-size: 0.72rem;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.footer-brand img {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border: 1px solid rgba(208, 178, 115, 0.45);
    border-radius: 50%;
}

.social-links {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.social-link {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    color: var(--gold-light);
    border: 1px solid rgba(208, 178, 115, 0.55);
    border-radius: 50%;
    transition: color var(--transition), background var(--transition), border-color var(--transition);
}

.social-link:hover {
    color: var(--primary-dark);
    background: var(--gold);
    border-color: var(--gold);
}

.social-link svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.footer-social {
    margin-left: auto;
}

.viewport-main {
    width: 100%;
    height: 110vh;
    padding: var(--header-height) 0 var(--footer-height);
    overflow: hidden;
}

.page-band {
    height: 100%;
    padding: 0.9rem 4%;
    overflow: hidden;
}

.page-heading {
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: clamp(1.55rem, 2.4vw, 2.15rem);
    text-align: center;
}

.page-heading::after {
    content: '';
    width: 54px;
    height: 1px;
    margin-left: 1rem;
    background: var(--gold);
}

.home-main {
    height: 100vh;
}

.home-hero {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-image: url('images/optimized/home-hero.jpg');
    background-position: center 46%;
    background-size: cover;
    background-repeat: no-repeat;
}

.home-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(90deg, rgba(0, 52, 36, 0.8) 0%, rgba(0, 52, 36, 0.56) 34%, rgba(0, 52, 36, 0.14) 68%, rgba(0, 52, 36, 0.04) 100%);
}

.new-arrivals-hero {
    background-image: linear-gradient(115deg, rgba(0, 35, 24, 0.86) 0%, rgba(91, 65, 20, 0.48) 48%, rgba(0, 31, 22, 0.28) 100%), url('images/optimized/new-arrivals-hero.jpg');
    background-position: center;
}

.new-arrivals-hero::after {
    background: linear-gradient(90deg, rgba(0, 30, 21, 0.68) 0%, rgba(208, 178, 115, 0.08) 56%, rgba(0, 20, 14, 0.32) 100%);
    box-shadow: inset 0 0 100px rgba(0, 16, 11, 0.42);
}

.new-arrivals-hero .home-hero-copy {
    align-items: flex-start;
    padding-top: clamp(2rem, 6vh, 4rem);
}

.home-hero-copy {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    padding: clamp(1.5rem, 5vw, 5rem);
}

.home-hero-title {
    color: var(--text-light);
    font-size: clamp(3.1rem, 7.8vw, 7.5rem);
    font-weight: 600;
    line-height: 0.86;
    text-shadow: 0 8px 30px rgba(0, 26, 18, 0.55);
}

.home-hero-title span {
    display: block;
}

.home-hero-title span:first-child {
    color: var(--gold-light);
}

.home-hero-title span:last-child {
    margin-top: 0.18em;
    margin-left: clamp(0rem, 4vw, 3.5rem);
}

.collections-main {
    height: 100vh;
    padding-bottom: calc(var(--footer-height) + 0.75rem);
}

.collections-main .collections-grid {
    height: 100%;
}

body[data-page="collections"]:not([data-category]) .collections-main {
    background: linear-gradient(135deg, #edf4ed 0%, #d9e7db 48%, #b8cebd 100%);
}

body[data-page="featured"] .collections-main {
    background: linear-gradient(135deg, #edf4ed 0%, #d9e7db 48%, #b8cebd 100%);
}

.collections-grid {
    height: calc(100% - 58px);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    background: transparent;
}

.collections-grid .collection-card {
    background: linear-gradient(145deg, #dce9dd 0%, #bdd2c0 58%, #91b09a 100%);
}

.collections-grid .collection-card img {
    mix-blend-mode: multiply;
    filter: saturate(0.94) contrast(1.02) brightness(1.04);
}

.collections-grid .collection-card::after {
    background: linear-gradient(180deg, rgba(229, 241, 230, 0.04) 26%, rgba(197, 220, 201, 0.72) 100%);
    box-shadow: inset 0 0 38px rgba(229, 241, 230, 0.22);
}

.collection-card {
    position: relative;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    isolation: isolate;
    border-radius: 8px;
}

.collection-card::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(0, 52, 36, 0.24);
    transition: background var(--transition);
}

.collection-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 500ms ease;
}

.collection-card h2 {
    position: absolute;
    inset: 50% auto auto 50%;
    z-index: 2;
    max-width: 90%;
    color: var(--text-light);
    font-family: var(--font-head);
    font-size: clamp(1rem, 1.8vw, 1.65rem);
    font-weight: 600;
    line-height: 0.92;
    letter-spacing: 0;
    text-align: center;
    text-shadow: 0 8px 30px rgba(0, 26, 18, 0.62);
    transform: translate(-50%, -50%);
}

.collections-grid .collection-card h2 span {
    display: block;
}

.collections-grid .collection-card h2,
.featured-grid .collection-card h2 {
    inset: auto auto clamp(0.7rem, 1.5vw, 1.25rem) clamp(0.75rem, 1.5vw, 1.25rem);
    max-width: calc(100% - 2rem);
    color: #064832;
    font-family: var(--font-head);
    font-size: clamp(0.88rem, 1.3vw, 1.2rem);
    font-style: normal;
    font-weight: 700;
    line-height: 0.98;
    letter-spacing: 0;
    text-align: left;
    text-shadow: 0 1px 8px rgba(245, 250, 245, 0.78);
    transform: none;
}

.collections-grid .collection-card h2 span:last-child {
    margin-top: 0.24em;
}

.collection-card:hover::after {
    background: linear-gradient(180deg, rgba(213, 231, 216, 0.08) 20%, rgba(160, 195, 168, 0.82) 100%);
}

.collection-card:hover img {
    transform: scale(1.055);
}

.featured-grid {
    height: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    grid-template-areas:
        'gemstone sets'
        'gold-bar sets';
    gap: 0.55rem;
    overflow: hidden;
    background: transparent;
}

body[data-page="featured"] .page-band {
    padding-bottom: 1.4rem;
}

.featured-grid .collection-card:nth-child(1) {
    grid-area: gemstone;
}

.featured-grid .collection-card:nth-child(2) {
    grid-area: sets;
}

.featured-grid .collection-card:nth-child(3) {
    grid-area: gold-bar;
}

.featured-grid .collection-card::after {
    background: linear-gradient(180deg, rgba(229, 241, 230, 0.04) 24%, rgba(188, 214, 194, 0.74) 100%);
    box-shadow: inset 0 0 48px rgba(229, 241, 230, 0.2);
}

.featured-grid .collection-card:nth-child(2)::after {
    background: linear-gradient(180deg, rgba(223, 238, 225, 0.04) 28%, rgba(174, 205, 182, 0.76) 100%);
}

.featured-grid .collection-card img {
    mix-blend-mode: multiply;
    filter: saturate(0.96) contrast(1.03) brightness(1.02);
}

.featured-grid .collection-card {
    background: linear-gradient(145deg, #dce9dd 0%, #bdd2c0 58%, #91b09a 100%);
}

.contact-main {
    height: 100vh;
    padding-bottom: calc(var(--footer-height) + 0.75rem);
}

.contact-layout {
    height: calc(100% - 58px);
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.4fr);
    gap: 1rem;
}

.contact-info {
    min-height: 0;
    padding: clamp(1.25rem, 3vw, 2.5rem);
    overflow: hidden;
    background: var(--primary);
    color: var(--cream);
}

.contact-info img {
    width: clamp(76px, 9vw, 116px);
    aspect-ratio: 1;
    margin-bottom: 1rem;
    object-fit: cover;
    border: 1px solid rgba(208, 178, 115, 0.55);
    border-radius: 50%;
}

.contact-info h2 {
    margin-bottom: 1rem;
    color: var(--gold);
    font-size: clamp(1.35rem, 2vw, 2rem);
}

.contact-info p {
    margin-bottom: 0.65rem;
    font-size: clamp(0.75rem, 1.2vw, 1rem);
}

.contact-info a {
    color: inherit;
}

.contact-social {
    margin-top: 1rem;
}

.contact-social .social-link {
    width: 38px;
    height: 38px;
}

.contact-map {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid rgba(208, 178, 115, 0.55);
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.category-main {
    width: 100%;
    height: 100vh;
    padding: var(--header-height) 0 var(--footer-height);
    overflow-y: auto;
    scrollbar-gutter: stable;
}

.category-content {
    width: min(1400px, 92%);
    margin: 0 auto;
    padding: 1rem 0 2rem;
}

.category-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.category-heading h1 {
    color: var(--primary);
    font-size: clamp(1.6rem, 3vw, 2.6rem);
}

.back-link {
    padding: 0.55rem 0.8rem;
    color: var(--primary);
    border: 1px solid var(--gold);
    font-size: 0.75rem;
    text-transform: uppercase;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
}

.product-card {
    min-width: 0;
    overflow: hidden;
    background: var(--text-light);
    border: 1px solid rgba(208, 178, 115, 0.25);
    content-visibility: auto;
    contain-intrinsic-size: 260px;
}

.product-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

@media (max-width: 1050px) {
    .site-brand span {
        display: none;
    }

    .product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    :root {
        --header-height: 72px;
        --footer-height: 48px;
    }

    .site-header {
        padding-inline: 1rem;
    }

    .site-brand img {
        width: 48px;
        height: 48px;
    }

    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .site-nav {
        position: fixed;
        inset: var(--header-height) 0 auto;
        display: grid;
        gap: 0;
        padding: 0.45rem 1rem 0.75rem;
        background: var(--primary-dark);
        border-bottom: 1px solid rgba(208, 178, 115, 0.35);
        opacity: 0;
        pointer-events: none;
        transform: translateY(-12px);
        transition: opacity var(--transition), transform var(--transition);
    }

    .site-nav.open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .site-nav a {
        padding: 0.6rem 0;
    }

    .site-nav a::after {
        display: none;
    }

    .site-footer {
        padding-inline: 1rem;
        font-size: 0.62rem;
    }

    .footer-brand img {
        width: 30px;
        height: 30px;
    }

    .home-hero {
        background-image: url('images/optimized/home-hero-mobile.jpg');
        background-position: 54% center;
    }

    .new-arrivals-hero {
        background-image: linear-gradient(115deg, rgba(0, 35, 24, 0.86) 0%, rgba(91, 65, 20, 0.48) 48%, rgba(0, 31, 22, 0.28) 100%), url('images/optimized/new-arrivals-hero-mobile.jpg');
    }

    .home-hero::after {
        background: rgba(0, 52, 36, 0.46);
    }

    .home-hero-copy {
        align-items: flex-end;
        padding: 1.5rem 1.25rem 2.5rem;
    }

    .home-hero-title {
        font-size: clamp(2.8rem, 14vw, 4.4rem);
        line-height: 0.9;
    }

    .home-hero-title span:last-child {
        margin-left: 0;
    }

    .page-band {
        padding: 0.55rem 0.65rem;
    }

    .page-heading {
        height: 48px;
        font-size: 1.35rem;
    }

    .page-heading::after {
        width: 36px;
        margin-left: 0.6rem;
    }

    .collections-grid {
        height: calc(100% - 48px);
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: repeat(4, minmax(0, 1fr));
        gap: 0.45rem;
    }

    .collection-card h2 {
        font-size: 0.86rem;
    }

    .featured-grid {
        height: 100%;
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
        grid-template-rows: repeat(2, minmax(0, 1fr));
        gap: 0.45rem;
    }

    body[data-page="featured"] .page-band {
        padding-bottom: 0.9rem;
    }

    .collections-grid .collection-card h2,
    .featured-grid .collection-card h2 {
        inset: auto auto 0.6rem 0.6rem;
        max-width: calc(100% - 1.5rem);
        font-size: clamp(0.76rem, 3.8vw, 1rem);
    }

    .contact-layout {
        height: calc(100% - 48px);
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
        gap: 0.45rem;
    }

    .contact-info {
        padding: 0.75rem 0.9rem;
    }

    .contact-info img {
        width: 48px;
        float: left;
        margin: 0 0.7rem 0.25rem 0;
    }

    .contact-info h2 {
        margin-bottom: 0.25rem;
        font-size: 1rem;
    }

    .contact-info p {
        margin-bottom: 0.18rem;
        font-size: 0.65rem;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
    }

    .category-content {
        width: calc(100% - 1.25rem);
    }

    .category-heading {
        align-items: flex-start;
    }

    .back-link {
        padding: 0.45rem 0.55rem;
        font-size: 0.62rem;
    }
}
