/* =========================================================
   CAMBRIDGE CURIO CUBBYHOLE
   Front page
   ========================================================= */

:root {
    --navy: #061522;
    --navy-light: #0b2030;
    --navy-card: #091b29;
    --gold: #c99a43;
    --gold-light: #e0b765;
    --cream: #f1e3c4;
    --paper: #e9d9b5;
    --text: #f4ead5;
    --muted: #c7bda8;
    --border: rgba(201, 154, 67, 0.85);
    --shadow: rgba(0, 0, 0, 0.45);

    --heading-font: "Cormorant Garamond", Georgia, serif;
    --body-font: "Libre Baskerville", Georgia, serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--navy);
    color: var(--text);
    font-family: var(--body-font);
    line-height: 1.6;
}

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

button,
input {
    font: inherit;
}

button {
    color: inherit;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 112px;
    background: rgba(4, 17, 27, 0.97);
    border-bottom: 1px solid var(--gold);
}

.header-inner {
    width: min(1400px, 94%);
    height: 100%;
    margin: auto;
    display: flex;
    align-items: center;
    gap: 40px;
}

.logo {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    line-height: 0;
}

.logo img {
    display: block;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 38px;
    flex: 1;
}

.main-nav a {
    font-family: var(--heading-font);
    font-size: 17px;
    transition: color 0.2s ease;
    position: relative;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 50%;
    right: 50%;
    bottom: -8px;
    height: 1px;
    background: var(--gold-light);
    transition: left 0.2s ease, right 0.2s ease;
}

.main-nav a:hover {
    color: var(--gold-light);
}

.main-nav a:hover::after {
    left: 0;
    right: 0;
}

.header-icons {
    display: flex;
    gap: 14px;
}

@media (min-width: 861px) {
    .site-header .header-inner::after {
        content: "";
        width: 100px;
        flex: 0 0 100px;
    }
}

.icon-button {
    background: none;
    border: 0;
    cursor: pointer;
    color: var(--cream);
    font-size: 25px;
    padding: 4px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.icon-button:hover {
    color: var(--gold-light);
    transform: translateY(-2px);
}

.mobile-menu {
    display: none;
    background: none;
    border: 0;
    font-size: 28px;
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
    min-height: 500px;
    position: relative;
    display: grid;
    place-items: center;
    background:
        linear-gradient(90deg, rgba(5, 19, 28, 0.78), rgba(5, 19, 28, 0.45), rgba(5, 19, 28, 0.72)),
        url("../images/cubbyhole-hero.png") center / cover no-repeat;
    border-bottom: 1px solid var(--gold);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at center, transparent 10%, rgba(3, 13, 20, 0.35) 100%);
}

.hero-content {
    position: relative;
    width: min(900px, calc(100% - 32px));
    min-width: 0;
    text-align: center;
    padding: 70px 0 80px;
}

.ornament {
    color: var(--gold-light);
    letter-spacing: 5px;
    font-family: var(--heading-font);
    font-size: 18px;
}

.eyebrow {
    color: var(--gold-light);
    font-family: var(--heading-font);
    font-size: 14px;
    letter-spacing: 4px;
    margin: 18px 0 0;
}

.hero h1 {
    margin: 8px 0 5px;
    font-family: var(--heading-font);
    font-size: clamp(58px, 7vw, 100px);
    line-height: 0.95;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--cream);
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.65);
}

.hero-tagline {
    font-family: var(--heading-font);
    font-size: clamp(19px, 2vw, 27px);
    font-style: italic;
    line-height: 1.45;
    margin: 20px 0 32px;
}

.search-box {
    height: 52px;
    width: min(650px, 100%);
    margin: auto;
    display: flex;
    border: 1px solid var(--gold-light);
    border-radius: 28px;
    background: rgba(3, 17, 27, 0.88);
    overflow: hidden;
}

.search-box input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: white;
    padding: 0 24px;
}

.search-box input:focus-visible,
.search-box button:focus-visible,
.category-card:focus-visible,
.shelf-card:focus-visible,
a.product-card:focus-visible,
.ornate-button:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 3px;
}

.search-box input::placeholder {
    color: #cfc7b7;
}

.search-box button {
    width: 65px;
    border: 0;
    background: transparent;
    color: var(--gold-light);
    font-size: 27px;
    cursor: pointer;
}


/* =========================================================
   GENERAL SECTIONS
   ========================================================= */

.section {
    width: min(1400px, 92%);
    margin: auto;
    padding: 65px 0;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 20px;
}

.section-heading .line {
    height: 1px;
    background: var(--gold);
    width: 110px;
    max-width: 18%;
    flex: 1 1 36px;
}

.section-heading h2 {
    margin: 0;
    min-width: 0;
    font-family: var(--heading-font);
    color: var(--gold-light);
    font-size: clamp(22px, 5vw, 37px);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    overflow-wrap: break-word;
}

.section-subtitle {
    margin: 4px 0 35px;
    text-align: center;
    font-family: var(--heading-font);
    font-size: 17px;
    font-style: italic;
    color: var(--muted);
}


/* =========================================================
   CATEGORIES
   ========================================================= */

.categories-section {
    padding-bottom: 50px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 18px;
    margin-top: 35px;
}

.category-card {
    border: 1px solid var(--gold);
    padding: 6px;
    background: #071926;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px var(--shadow);
}

.category-image {
    aspect-ratio: 1 / 0.9;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    filter: saturate(0.9);
}

.category-grid,
.product-grid,
.shelf-grid,
.category-card,
.product-card,
.shelf-card {
    min-width: 0;
}

.category-card h3,
.product-info h3,
.shelf-card span {
    overflow-wrap: break-word;
}

.category-card h3 {
    min-height: 52px;
    margin: 0;
    padding: 12px 4px 8px;
    display: grid;
    place-items: center;
    text-align: center;
    font-family: var(--heading-font);
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/* =========================================================
   IMAGE PLACEHOLDERS
   Replace these with your own images in assets/images/
   ========================================================= */

.glass,
.product-1,
.shelf-glass {
    background-image: url("../images/glass.jpg");
}

.ceramics,
.product-2,
.shelf-ceramics {
    background-image: url("../images/ceramics.jpg");
}

.brass,
.product-3,
.shelf-brass {
    background-image: url("../images/brass.jpg");
}

.collectables,
.product-6 {
    background-image: url("../images/collectables.jpg");
}

.decorative,
.product-4 {
    background-image: url("../images/decorative.jpg");
}

.curious {
    background-image: url("../images/curious.jpg");
}

.product-5 {
    background-image: url("../images/crystal-bell.jpg");
}

.product-7 {
    background-image: url("../images/amber-vase.jpg");
}

.product-8 {
    background-image: url("../images/doulton-plate.jpg");
}


/* =========================================================
   PRODUCTS
   ========================================================= */

.discoveries {
    padding-top: 25px;
}

.product-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.product-card {
    display: block;
    background: var(--paper);
    border: 1px solid var(--gold);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
    color: #18120a;
    transition: transform 0.25s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    aspect-ratio: 1 / 0.88;
    background: #0b2030;
    background-size: cover;
    background-position: center;
    position: relative;
    border-bottom: 1px solid #806126;
}

.product-image img,
.product-image .product-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.product-image img {
    object-fit: cover;
}

.product-fallback {
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at center, rgba(224, 183, 101, 0.2), transparent 62%),
        #0b2030;
    color: var(--gold-light);
    font-family: var(--heading-font);
    font-size: 18px;
    letter-spacing: 3px;
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1;
    padding: 3px 8px;
    border: 1px solid var(--gold-light);
    background: rgba(4, 17, 27, 0.82);
    color: var(--cream);
    font-family: var(--heading-font);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.product-card.is-sold .product-image img {
    filter: grayscale(0.35);
}

.heart {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border: 0;
    background: rgba(4, 17, 27, 0.7);
    color: white;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
}

.product-info {
    min-height: 112px;
    padding: 13px 15px 15px;
    text-align: center;
    background:
        linear-gradient(rgba(239, 226, 196, 0.93), rgba(225, 207, 169, 0.97)),
        repeating-linear-gradient(0deg, transparent 0 4px, rgba(70, 45, 20, 0.05) 5px);
}

.product-type {
    margin: 0 0 3px;
    font-family: var(--heading-font);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.home-shop-status {
    margin: 0 0 18px;
    text-align: center;
    font-family: var(--heading-font);
    font-size: 17px;
    font-style: italic;
    color: var(--muted);
}

.home-shop-status:empty {
    display: none;
}

.home-shop-actions {
    margin: 18px 0 0;
    text-align: center;
}

.home-shop-retry {
    margin: 0;
    padding: 0 0 3px;
    border: 0;
    border-bottom: 1px solid var(--gold);
    background: transparent;
    color: var(--gold-light);
    font-family: var(--heading-font);
    font-size: 18px;
    cursor: pointer;
}

.home-shop-retry:hover,
.home-shop-retry:focus-visible {
    color: var(--cream);
}

.product-info h3 {
    margin: 0;
    font-family: var(--heading-font);
    font-size: 18px;
    line-height: 1.15;
    font-weight: 600;
}

.price {
    margin: 7px 0 0;
    font-family: var(--heading-font);
    font-size: 18px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.ornate-button {
    display: block;
    width: fit-content;
    margin: 38px auto 0;
    padding: 11px 30px;
    border: 1px solid var(--gold-light);
    color: var(--cream);
    font-family: var(--heading-font);
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: transparent;
    transition: background 0.2s ease, color 0.2s ease;
}

.ornate-button:hover {
    background: var(--gold);
    color: var(--navy);
}


/* =========================================================
   EXPLORE SECTION
   ========================================================= */

.explore-section {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    border-top: 1px solid var(--gold);
    border-bottom: 1px solid var(--gold);
}

.explore-panel,
.shelves-panel {
    min-height: 380px;
    padding: 55px 6%;
}

.explore-panel {
    display: grid;
    place-items: center;
    text-align: center;
    background:
        linear-gradient(rgba(5, 18, 26, 0.73), rgba(5, 18, 26, 0.73)),
        url("../images/shop-interior.jpg") center / cover;
}

.explore-content h2 {
    margin: 10px 0;
    font-family: var(--heading-font);
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.05;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--gold-light);
}

.explore-content p {
    font-family: var(--heading-font);
    font-style: italic;
    color: var(--cream);
}

.shelves-panel {
    background: #071926;
}

.small-heading {
    gap: 12px;
}

.small-heading .line {
    width: 50px;
}

.small-heading h2 {
    font-size: 24px;
}

.shelf-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 25px;
}

.shelf-card {
    border: 1px solid var(--gold);
    padding: 5px;
    text-align: center;
}

.shelf-image {
    aspect-ratio: 1 / 0.9;
    background-size: cover;
    background-position: center;
}

.shelf-card span {
    display: block;
    padding: 8px 2px;
    font-family: var(--heading-font);
    font-size: 14px;
    text-transform: uppercase;
}

.shelf-card b {
    display: inline-block;
    border: 1px solid var(--gold);
    padding: 4px 15px;
    margin-bottom: 7px;
    font-family: var(--heading-font);
    font-size: 12px;
    font-weight: 400;
    text-transform: uppercase;
}

.shelf-card:hover {
    background: rgba(201, 154, 67, 0.08);
}


/* =========================================================
   FROM THE JOURNAL (home)
   ========================================================= */

.home-news {
    padding-top: 58px;
    padding-bottom: 54px;
    border-bottom: 1px solid var(--gold);
}

.home-news .section-subtitle {
    margin-bottom: 22px;
}

.home-news-status {
    margin: 0 0 22px;
    text-align: center;
    font-family: var(--heading-font);
    font-size: 18px;
    font-style: italic;
    color: var(--muted);
}

.home-news-status:empty {
    display: none;
    margin: 0;
}

.home-news-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin: 0;
    padding: 0;
}

.home-news-grid:has(> :nth-child(2):last-child) {
    max-width: 920px;
    margin-inline: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-news-grid:has(> :nth-child(1):last-child) {
    max-width: 440px;
    margin-inline: auto;
    grid-template-columns: minmax(0, 1fr);
}

.home-news-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    background:
        linear-gradient(180deg, rgba(245, 239, 226, 0.98), rgba(233, 217, 181, 0.98));
    color: #18120a;
    border: 1px solid var(--gold);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.home-news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.35);
    color: #18120a;
}

.home-news-card:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 3px;
}

.home-news-cover,
.home-news-placeholder {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-bottom: 1px solid #806126;
}

.home-news-cover {
    object-fit: cover;
    background: #0b2030;
}

.home-news-placeholder {
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at center, rgba(224, 183, 101, 0.2), transparent 62%),
        #0b2030;
    color: var(--gold-light);
    font-family: var(--heading-font);
    font-size: 18px;
    letter-spacing: 3px;
}

.home-news-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    padding: 14px 16px 16px;
}

.home-news-kicker {
    margin: 0 0 6px;
    font-family: var(--heading-font);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: #7a6233;
    overflow-wrap: anywhere;
}

.home-news-card h3 {
    margin: 0;
    font-family: var(--heading-font);
    font-size: clamp(24px, 2vw, 30px);
    font-weight: 600;
    line-height: 1.08;
    color: #0d1b2a;
    overflow-wrap: anywhere;
}

.home-news-date {
    margin: 8px 0 0;
    font-family: var(--heading-font);
    font-size: 16px;
    font-style: italic;
    color: #6b5c45;
}

.home-news-excerpt {
    margin: 10px 0 0;
    font-size: 14.5px;
    line-height: 1.6;
    color: #3c3226;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-news-read {
    margin-top: auto;
    padding-top: 14px;
    font-family: var(--heading-font);
    font-size: 16px;
    letter-spacing: 0.3px;
    color: #6d5420;
}

.home-news-more {
    margin: 28px 0 0;
    text-align: center;
}

.home-news-retry {
    margin: 0 22px 0 0;
    padding: 0 0 3px;
    border: 0;
    border-bottom: 1px solid var(--gold);
    background: transparent;
    color: var(--gold-light);
    font-family: var(--heading-font);
    font-size: 18px;
    cursor: pointer;
}

.home-news-retry:hover,
.home-news-retry:focus-visible {
    color: var(--cream);
}

.home-news-retry:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 3px;
}


/* =========================================================
   STORY STRIP
   ========================================================= */

.story-strip {
    text-align: center;
    padding: 75px 20px;
    background:
        radial-gradient(circle at center, rgba(201, 154, 67, 0.08), transparent 55%),
        var(--navy);
}

.story-strip h2 {
    margin: 10px 0;
    font-family: var(--heading-font);
    font-size: clamp(38px, 5vw, 58px);
    font-weight: 500;
    color: var(--gold-light);
}

.story-strip > p:not(.eyebrow) {
    max-width: 600px;
    margin: auto;
    color: var(--muted);
}

.text-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--gold-light);
    font-family: var(--heading-font);
    border-bottom: 1px solid var(--gold);
    padding-bottom: 3px;
}


/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    position: relative;
    border-top: 1px solid var(--gold);
    padding: 45px 5% 25px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    gap: 30px;
    background: #04121d;
}

.footer-logo {
    line-height: 0;
}

.footer-logo img {
    display: block;
    width: 112px;
    height: auto;
    border-radius: 50%;
}

.footer-message {
    text-align: center;
    font-family: var(--heading-font);
    font-size: 18px;
    font-style: italic;
}

.footer-message p {
    margin: 0;
    color: var(--cream);
}

.footer-message span {
    color: var(--gold-light);
}

.socials {
    display: flex;
    justify-content: flex-end;
    gap: 22px;
}

.socials a {
    color: var(--gold-light);
    font-size: 24px;
}

.footer-bottom {
    grid-column: 1 / -1;
    padding-top: 22px;
    border-top: 1px solid rgba(201, 154, 67, 0.4);
    display: flex;
    justify-content: space-between;
    color: #928a7a;
    font-family: var(--heading-font);
    font-size: 13px;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {

    .header-inner {
        gap: 20px;
    }

    .main-nav {
        gap: 20px;
    }

    .main-nav a {
        font-size: 15px;
    }

    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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


@media (max-width: 980px) {

    .home-news-grid,
    .home-news-grid:has(> :nth-child(2):last-child) {
        grid-template-columns: 1fr 1fr;
    }

    .home-news-grid > :nth-child(n + 3) {
        display: none;
    }
}


@media (max-width: 760px) {

    .site-header {
        height: 84px;
    }

    .logo img {
        width: 72px;
        height: 72px;
    }

    .main-nav,
    .header-icons {
        display: none;
    }

    .mobile-menu {
        display: block;
        margin-left: auto;
    }

    .hero {
        min-height: 470px;
    }

    .hero-content {
        padding: 60px 0;
    }

    .hero h1 {
        font-size: clamp(34px, 10.5vw, 54px);
        letter-spacing: 1px;
    }

    .ornament {
        max-width: 100%;
        letter-spacing: 2px;
    }

    .eyebrow {
        letter-spacing: 2px;
    }

    .section {
        padding: 48px 0;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-grid {
        grid-template-columns: 1fr 1fr;
        gap: 13px;
    }

    .product-info h3 {
        font-size: 16px;
    }

    .explore-section {
        grid-template-columns: 1fr;
    }

    .explore-panel,
    .shelves-panel {
        min-height: 350px;
        padding: 45px 5%;
    }

    .shelf-grid {
        gap: 10px;
        grid-template-columns: 1fr;
    }

    .shelf-card span {
        font-size: 11px;
    }

    .site-footer {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .socials {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
}


@media (max-width: 480px) {

    .hero-tagline {
        font-size: 18px;
    }

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

    .category-card h3 {
        font-size: 13px;
    }

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

    .home-news-grid,
    .home-news-grid:has(> :nth-child(2):last-child),
    .home-news-grid:has(> :nth-child(1):last-child) {
        grid-template-columns: 1fr;
    }

    .product-image {
        aspect-ratio: 1 / 0.82;
    }

    .section-heading h2 {
        font-size: 25px;
    }

    .section-heading .line {
        width: 35px;
    }

    .home-news .section-heading {
        flex-wrap: nowrap;
        gap: 10px;
    }

    .home-news .section-heading h2 {
        font-size: 22px;
    }
}
