/* Shared colors used throughout the homepage. */
:root {
    color-scheme: light;
    --ink: #20211f;
    --muted: #77766f;
    --paper: #fff;
    --warm-white: #f5f3ef;
    --sand: #eae7e0;
}

/* Keep element sizing predictable when padding and borders are applied. */
* {
    box-sizing: border-box;
}

/* Make in-page links scroll smoothly and leave room for the sticky navigation. */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
}

/* Set the page's base typography, colors, and spacing. */
body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: Arial, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

/* Keep the main navigation visible at the top while scrolling. */
.NavBar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(18px, 3vw, 48px);
    width: 100%;
    min-height: 82px;
    padding: 10px clamp(22px, 5vw, 76px);
    background: rgb(255 255 255 / 96%);
    border-bottom: 1px solid rgb(32 33 31 / 7%);
    backdrop-filter: blur(12px);
}

/* Size and align the brand logo in the navigation. */
.logo-link {
    display: flex;
    align-items: center;
    width: 150px;
    height: 60px;
}

.logo {
    display: block;
    width: 150px;
    height: 60px;
    object-fit: contain;
}

/* Arrange the page links and style their hover underline. */
.main-nav {
    display: flex;
    grid-column: 2;
    align-items: center;
    justify-content: center;
    gap: clamp(16px, 2.3vw, 34px);
}

.main-nav a {
    position: relative;
    padding: 9px 0;
    color: var(--ink);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
}

.main-nav a::after {
    position: absolute;
    right: 0;
    bottom: 2px;
    left: 0;
    height: 1px;
    background: currentColor;
    content: "";
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 180ms ease;
}

.main-nav a:hover::after {
    transform: scaleX(1);
}

.home-link {
    font-weight: 700;
}

/* Align the search, account, and cart controls beside the navigation. */
.nav-tools {
    display: flex;
    align-items: center;
    justify-self: end;
    gap: 11px;
}

/* Style the compact search field and icon controls. */
.search-box {
    display: flex;
    align-items: center;
    padding: 0 2px;
    border-bottom: 1px solid var(--ink);
}

.search-box input {
    width: 95px;
    padding: 8px 2px;
    border: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
    font: inherit;
    font-size: 12px;
}

.search-box input::placeholder {
    color: var(--muted);
}

.search-box button,
.nav-tools > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 34px;
    padding: 4px;
    border: 0;
    color: var(--ink);
    background: transparent;
    cursor: pointer;
}

.search-box svg,
.nav-tools > a svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.search-box button:hover,
.nav-tools > a:hover {
    opacity: 0.58;
}

/* Create the homepage's main promotional banner. */
.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
    align-items: center;
    min-height: min(500px, calc(100svh - 82px));
    overflow: hidden;
    padding: 40px clamp(28px, 10vw, 150px);
    background: var(--sand);
}

.hero-copy {
    position: relative;
    z-index: 2;
    max-width: 590px;
}

/* Style the small uppercase introductory labels above headings. */
.eyebrow {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2em;
    line-height: 1.5;
    text-transform: uppercase;
}

.hero-copy .eyebrow {
    color: #55544e;
}

/* Set the hero headline, supporting copy, and shop call-to-action styles. */
.hero h1 {
    margin: 0;
    font-size: clamp(48px, 6.3vw, 78px);
    font-weight: 500;
    letter-spacing: -0.075em;
    line-height: 0.98;
    text-transform: uppercase;
}

.hero h1 span {
    font-weight: 800;
}

.hero-description {
    max-width: 410px;
    margin: 18px 0 20px;
    color: #56554f;
    font-size: clamp(14px, 1.3vw, 16px);
    line-height: 1.75;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 44px;
    min-width: 230px;
    padding: 16px 19px;
    color: #fff;
    background: var(--ink);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-decoration: none;
    text-transform: uppercase;
    transition: background 180ms ease, transform 180ms ease;
}

.hero-cta:hover {
    background: #55544e;
    transform: translateY(-2px);
}

.hero-cta span,
.text-link span {
    font-size: 16px;
}

.hero-note {
    margin: 24px 0 0;
    color: #77766f;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.2em;
}

/* Position the hero photograph and its decorative brand stamp. */
.hero-visual {
    position: absolute;
    inset: 0 0 0 43%;
    display: flex;
    align-items: end;
    justify-content: end;
    overflow: hidden;
}

.hero-visual::before {
    position: absolute;
    inset: 0 auto 0 0;
    z-index: 1;
    width: 24%;
    background: linear-gradient(90deg, var(--sand), transparent);
    content: "";
    pointer-events: none;
}

.hero-visual img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom right;
}

.hero-stamp {
    position: absolute;
    right: clamp(22px, 5vw, 70px);
    bottom: 34px;
    z-index: 2;
    display: grid;
    place-content: center;
    width: 90px;
    height: 90px;
    border: 1px solid rgb(32 33 31 / 45%);
    border-radius: 50%;
    color: var(--ink);
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    transform: rotate(-10deg);
}

.hero-stamp small {
    margin-top: 5px;
    font-size: 6px;
    font-weight: 600;
    letter-spacing: 0.1em;
}

/* Set the shared width and spacing for the category and arrivals sections. */
.categories-section,
#newArrivals {
    width: min(100%, 1600px);
    margin: 0 auto;
    padding: 86px clamp(22px, 5vw, 76px);
}

/* Align section titles with their related shop links. */
.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
}

.section-heading .eyebrow {
    margin-bottom: 9px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 3.5vw, 42px);
    font-weight: 500;
    letter-spacing: -0.055em;
    line-height: 1.05;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--ink);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-decoration: none;
    white-space: nowrap;
}

.text-link:hover {
    color: var(--muted);
}

/* Display the category shortcut cards in a responsive grid. */
#types {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(12px, 2.3vw, 32px);
}

/* Arrange each category image and label as a single clickable card. */
.category-card {
    display: flex;
    flex: 0 1 180px;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    gap: 13px;
    color: var(--ink);
    text-decoration: none;
}

.category-image {
    display: grid;
    width: 100%;
    aspect-ratio: 1;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: var(--warm-white);
    transition: background 180ms ease, transform 180ms ease;
}

.category-card:hover .category-image {
    background: var(--sand);
    transform: translateY(-4px);
}

.category-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scale(1.12);
}

.productLabel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-align: center;
    text-transform: uppercase;
}

.productLabel span {
    color: var(--muted);
    font-size: 13px;
    transition: transform 180ms ease;
}

.category-card:hover .productLabel span {
    transform: translate(2px, -2px);
}

/* Give the new-arrivals area its contrasting background and spacing. */
#newArrivals {
    max-width: none;
    padding-top: 82px;
    padding-bottom: 94px;
    background: var(--warm-white);
}

.arrivals-heading {
    width: min(100%, 1448px);
    margin: 0 auto 34px;
}

.section-description {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

/* Display featured products as a four-column card grid. */
.arrivals-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px 20px;
    width: min(100%, 1448px);
    margin: 0 auto;
}

.arrivals-empty {
    grid-column: 1 / -1;
    margin: 0;
    padding: 24px 0;
    color: var(--muted);
    font-size: 14px;
}

/* Style each product card, image, and text details. */
.arrivalsbox {
    display: flex;
    min-width: 0;
    flex-direction: column;
    color: var(--ink);
    text-decoration: none;
}

.arrival-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.arrival-image {
    display: block;
    aspect-ratio: 0.92;
    overflow: hidden;
    background: #eeece7;
}

.arrival-image img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 12px;
    object-fit: contain;
    transition: transform 300ms ease;
}

.arrivalsbox:hover .arrival-image img {
    transform: scale(1.045);
}

.arrival-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px 2px 0;
}

.arrival-category {
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.15em;
}

.arrival-name {
    overflow: hidden;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    text-overflow: ellipsis;
}

.arrival-color-picker {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 2px 0;
}

.arrival-color-label {
    color: var(--muted);
    font-size: 10px;
}

.arrival-color-swatches {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.arrival-color-swatch {
    width: 15px;
    height: 15px;
    padding: 0;
    border: 1px solid rgb(32 33 31 / 25%);
    border-radius: 50%;
    background: var(--swatch-color);
    cursor: pointer;
}

.arrival-color-swatch[aria-pressed="true"] {
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--ink);
}

.arrival-color-swatch:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 4px;
}

/* Style the dark footer and align its brand, tagline, and shop link. */
.home-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 30px clamp(22px, 5vw, 76px);
    color: #fff;
    background: var(--ink);
}

.home-footer a {
    color: inherit;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
}

.home-footer a:first-child {
    font-size: 20px;
    letter-spacing: 0.04em;
}

.home-footer p {
    margin: 0;
    color: #c5c3bd;
    font-size: 12px;
}

.home-footer a:last-child span {
    margin-left: 7px;
}

/* Make keyboard focus visible when navigating links and buttons. */
:focus-visible {
    outline: 2px solid #776b58;
    outline-offset: 4px;
}

/* Adjust navigation, hero, and category layout for tablet-width screens. */
@media (max-width: 1040px) {
    .NavBar {
        grid-template-columns: 130px minmax(0, 1fr) auto;
        gap: 18px;
        padding-right: 24px;
        padding-left: 24px;
    }

    .logo-link,
    .logo {
        width: 128px;
    }

    .main-nav {
        gap: clamp(12px, 1.8vw, 20px);
    }

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

    .search-box input {
        width: 72px;
    }

    .hero {
        min-height: 480px;
        padding-left: 7vw;
    }

    #types {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 28px 22px;
    }
}

/* Reflow the header and homepage sections for smaller screens. */
@media (max-width: 760px) {
    .NavBar {
        display: flex;
        min-height: 74px;
        flex-wrap: wrap;
        gap: 8px 16px;
        padding: 8px 20px 12px;
    }

    .logo-link {
        position: static;
        width: 116px;
        height: 48px;
        transform: none;
    }

    .logo {
        width: 116px;
        height: 48px;
    }

    .nav-tools {
        gap: 5px;
        margin-left: auto;
    }

    .search-box input {
        width: 75px;
    }

    .main-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: clamp(12px, 4vw, 24px);
    }

    .main-nav a {
        padding: 6px 0;
        font-size: 9px;
    }

    .hero {
        display: flex;
        min-height: 590px;
        align-items: start;
        padding: 46px 26px 180px;
    }

    .hero-copy {
        max-width: 530px;
    }

    .hero h1 {
        font-size: clamp(48px, 10vw, 76px);
    }

    .hero-description {
        max-width: 360px;
        margin: 18px 0 22px;
    }

    .hero-note {
        margin-top: 23px;
    }

    .hero-visual {
        inset: 27% 0 0 24%;
    }

    .hero-visual::before {
        width: 35%;
        background: linear-gradient(90deg, var(--sand), transparent);
    }

    .hero-stamp {
        right: 20px;
        bottom: 20px;
        width: 72px;
        height: 72px;
        font-size: 16px;
    }

    .categories-section,
    #newArrivals {
        padding: 64px 24px;
    }

    #types {
        gap: 24px 18px;
    }

    .arrivals-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 14px;
    }
}

/* Tighten spacing and typography for narrow mobile screens. */
@media (max-width: 480px) {
    .NavBar {
        padding-right: 14px;
        padding-left: 14px;
    }

    .nav-tools {
        gap: 0;
    }

    .search-box input {
        width: 58px;
        font-size: 11px;
    }

    .search-box button,
    .nav-tools > a {
        width: 29px;
    }

    .main-nav {
        gap: 12px;
    }

    .main-nav a {
        font-size: 8px;
        letter-spacing: 0.07em;
    }

    .hero {
        min-height: 560px;
        padding: 40px 20px 160px;
    }

    .hero h1 {
        font-size: clamp(43px, 11vw, 58px);
    }

    .hero-cta {
        min-width: 210px;
        padding: 14px 16px;
    }

    .hero-visual {
        inset: 40% 0 0 9%;
    }

    .section-heading {
        align-items: start;
    }

    .category-heading {
        margin-bottom: 24px;
    }

    .category-heading .text-link {
        margin-top: 17px;
    }

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

    #types {
        gap: 20px 12px;
    }

    .productLabel {
        gap: 4px;
        font-size: 9px;
        letter-spacing: 0.08em;
    }

    .arrival-name {
        font-size: 12px;
    }

    .home-footer {
        flex-wrap: wrap;
        gap: 12px 20px;
    }

    .home-footer p {
        order: 3;
        width: 100%;
    }
}

/* Reduce animations for visitors who prefer less motion. */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
