/* =============================================================================
   HDB THRIFT CLOSET — Global stylesheet
   Editorial, minimal, warm. Neutral palette, serif display, sans body.
   ========================================================================== */

/* ---- Design tokens ------------------------------------------------------- */
:root {
    --background:       #f7f4ef;
    --background-light: #fbfaf7;
    --background-alt:   #efe9e0;
    --text:            #111111;
    --muted-text:      #58544f;
    --border:          #d9d3ca;
    --border-light:    #e7e1d7;
    --accent:          #b88738; /* muted champagne / antique gold */
    --accent-soft:     #c9a666;
    --white:           #ffffff;
    --black:           #090909;

    --font-serif: "Cormorant Garamond", "Libre Baskerville", Georgia, "Times New Roman", serif;
    --font-sans:  "Inter", "Helvetica Neue", Arial, sans-serif;

    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 40px;
    --space-xl: 64px;
    --space-2xl: 96px;

    --maxw: 1440px;
    --pad: clamp(20px, 4vw, 64px);
    --header-h: 88px;

    --radius: 2px;
    --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---- Reset --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--background);
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
input, textarea, select { font: inherit; color: inherit; }
ul { list-style: none; padding: 0; }
h1, h2, h3, h4 { font-weight: 400; line-height: 1.12; }

/* ---- Accessibility helpers ---------------------------------------------- */
.visually-hidden, .honeypot {
    position: absolute !important;
    width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 1000;
    background: var(--black); color: var(--white); padding: 10px 16px;
    font-size: .8rem; letter-spacing: .08em; transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---- Layout utilities ---------------------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: clamp(48px, 8vw, var(--space-2xl)); }
.section-sm { padding-block: clamp(36px, 5vw, 64px); }

/* Section eyebrow + centered title with gold rule (matches references) */
.eyebrow {
    font-family: var(--font-sans);
    font-size: .72rem; letter-spacing: .32em; text-transform: uppercase;
    color: var(--muted-text);
}
.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4.5vw, 3rem);
    letter-spacing: .01em;
    text-align: center;
}
.section-title--lg { font-size: clamp(2.6rem, 7vw, 4.6rem); }
.section-sub {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1.05rem, 2.2vw, 1.4rem);
    color: var(--muted-text);
    text-align: center;
    margin-top: var(--space-xs);
}
.rule-gold { width: 64px; height: 1px; background: var(--accent); border: 0; margin: var(--space-md) auto; }
.center { text-align: center; }

/* Title flanked by thin gold lines (Featured On / Shop by Category) */
.rule-title {
    display: flex; align-items: center; justify-content: center; gap: var(--space-md);
    text-align: center;
}
.rule-title::before, .rule-title::after {
    content: ""; height: 1px; width: clamp(30px, 8vw, 90px); background: var(--accent); flex: 0 0 auto;
}

/* ---- Buttons ------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    font-family: var(--font-sans);
    font-size: .74rem; letter-spacing: .18em; text-transform: uppercase;
    padding: 15px 30px; border: 1px solid transparent;
    border-radius: var(--radius);
    transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), opacity .25s var(--ease);
    min-height: 44px;
}
.btn-dark { background: var(--black); color: var(--white); border-color: var(--black); }
.btn-dark:hover { background: #262320; border-color: #262320; }
.btn-outline { background: transparent; color: var(--text); border-color: var(--text); }
.btn-outline:hover { background: var(--text); color: var(--white); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--text); }
.btn-sm { padding: 11px 20px; font-size: .68rem; min-height: 40px; }
.btn-block { width: 100%; }

/* Small text link with arrow */
.text-link {
    font-family: var(--font-sans);
    font-size: .72rem; letter-spacing: .2em; text-transform: uppercase;
    display: inline-flex; align-items: center; gap: .5em;
    border-bottom: 1px solid transparent; padding-bottom: 2px;
    transition: border-color .25s var(--ease);
}
.text-link .arrow { transition: transform .25s var(--ease); }
.text-link:hover { border-color: var(--text); }
.text-link:hover .arrow { transform: translateX(4px); }

/* =============================================================================
   HEADER / NAVIGATION
   ========================================================================== */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: var(--background);
    border-bottom: 1px solid transparent;
    transition: border-color .3s var(--ease), background .3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--border-light); background: rgba(247,244,239,.92); backdrop-filter: blur(6px); }
.header-inner {
    max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad);
    min-height: var(--header-h);
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-md);
}
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.brand-logo { width: auto; height: 62px; }

.primary-nav ul { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 40px); }
.nav-link {
    font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
    color: var(--text); padding: 6px 0; position: relative; white-space: nowrap;
    transition: color .2s var(--ease);
}
.nav-link::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
    background: var(--accent); transform: scaleX(0); transform-origin: center;
    transition: transform .3s var(--ease);
}
.nav-link:hover { color: var(--muted-text); }
.nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); }
.nav-link.is-active { color: var(--text); }

.header-search { flex: 0 0 auto; }
.search-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; color: var(--text); transition: color .2s var(--ease);
}
.search-toggle:hover { color: var(--accent); }

.search-panel { border-top: 1px solid var(--border-light); background: var(--background-light); }
.search-panel[hidden] { display: none; }
.search-form {
    max-width: var(--maxw); margin-inline: auto; padding: 16px var(--pad);
    display: flex; gap: var(--space-sm); align-items: center;
}
.search-form input[type="search"] {
    flex: 1; padding: 12px 14px; background: var(--white);
    border: 1px solid var(--border); border-radius: var(--radius);
    font-size: .95rem;
}
.search-form input[type="search"]:focus { outline: none; border-color: var(--accent); }

/* Hamburger */
.nav-toggle {
    display: none; width: 44px; height: 44px; flex-direction: column;
    align-items: center; justify-content: center; gap: 5px; order: 3;
}
.nav-toggle span { display: block; width: 24px; height: 1.5px; background: var(--text); transition: transform .3s var(--ease), opacity .2s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* =============================================================================
   HERO (homepage)
   ========================================================================== */
.hero { background: var(--background); }

/* Full-bleed hero with a looping crossfade between two images */
.hero--full {
    position: relative; isolation: isolate; overflow: hidden;
    min-height: clamp(460px, 66vh, 720px);
    display: flex; align-items: center;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; background: var(--background-alt); }
.hero-slide {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; object-position: center right;
}
.hero-slide--a { opacity: 1; }
/* Image B sits on top of A and fades in/out, giving A → B → A in a loop */
.hero-slide--b { opacity: 0; animation: heroCross 16s ease-in-out infinite; }
@keyframes heroCross {
    0%, 40%  { opacity: 0; }   /* hold on image A */
    50%, 90% { opacity: 1; }   /* hold on image B */
    100%     { opacity: 0; }   /* fade back to A */
}
/* Soft scrim so the copy stays legible over the photography */
.hero-scrim {
    position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(90deg,
        rgba(247,244,239,.94) 0%, rgba(247,244,239,.80) 26%,
        rgba(247,244,239,.30) 50%, rgba(247,244,239,0) 70%);
}
.hero-overlay { position: relative; z-index: 1; width: 100%; }
.hero-copy {
    max-width: 520px;
    padding-block: clamp(28px, 5vw, 64px);
    display: flex; flex-direction: column; justify-content: center;
}
.hero-mark { max-width: 260px; margin-bottom: var(--space-lg); }
.hero-mark img { width: 100%; height: auto; }
.hero-tagline {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.25; color: var(--text);
    max-width: 20ch; margin-bottom: var(--space-lg);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }

@media (prefers-reduced-motion: reduce) {
    .hero-slide--b { animation: none; opacity: 0; }
}

/* =============================================================================
   FEATURED ON strip
   ========================================================================== */
.featured { background: var(--background-light); border-block: 1px solid var(--border-light); }
.featured .container { padding-block: clamp(28px, 4vw, 44px); }
.featured-title { margin-bottom: var(--space-md); }
.featured-title span { font-size: .72rem; letter-spacing: .28em; text-transform: uppercase; color: var(--muted-text); }
.featured-logos {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
    gap: clamp(24px, 5vw, 64px);
}
.featured-logos img { height: clamp(20px, 2.6vw, 30px); width: auto; opacity: .55; filter: grayscale(1); transition: opacity .25s var(--ease); }
.featured-logos a:hover img { opacity: .85; }
.featured-soon { margin: 0; font-family: var(--font-serif); font-style: italic; font-size: clamp(1rem, 2vw, 1.25rem); color: var(--muted-text); }

/* =============================================================================
   EXPLORE COLLECTIONS (5 cards)
   ========================================================================== */
/* Slow auto-rotating carousel of collection tiles */
.collections-carousel {
    margin-top: var(--space-xl);
    overflow: hidden;
    -webkit-mask: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
    mask: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.collections-track {
    display: flex; width: max-content; will-change: transform;
    animation: collMarquee 60s linear infinite;
}
.collections-carousel:hover .collections-track,
.collections-carousel:focus-within .collections-track { animation-play-state: paused; }
.collections-track .collection-card {
    flex: 0 0 clamp(168px, 20vw, 208px);
    margin-right: clamp(16px, 2vw, 28px);
}
@keyframes collMarquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    .collections-track { animation: none; flex-wrap: wrap; justify-content: center; }
    .collections-track .collection-card[aria-hidden="true"] { display: none; }
}
.collection-card { display: flex; flex-direction: column; }
.collection-card .cc-media { display: block; position: relative; aspect-ratio: 7 / 8; overflow: hidden; background: var(--background-alt); }
.collection-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.collection-card:hover img { transform: scale(1.04); }
.collection-card .cc-title {
    font-family: var(--font-serif); font-size: 1.3rem; letter-spacing: .06em; text-transform: uppercase;
    margin-top: var(--space-md); text-align: center;
}
.collection-card .cc-link { display: flex; justify-content: center; margin-top: 6px; }

/* =============================================================================
   ABOUT split section
   ========================================================================== */
.split {
    display: grid; grid-template-columns: 1fr 1fr; align-items: stretch;
    background: var(--background-light);
}
.split-media { position: relative; min-height: 420px; overflow: hidden; }
.split-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.split-body {
    padding: clamp(40px, 6vw, 96px) clamp(24px, 5vw, 80px);
    display: flex; flex-direction: column; justify-content: center;
}
.split-body .eyebrow { margin-bottom: var(--space-md); }
.split-body h2 { font-family: var(--font-serif); font-size: clamp(2rem, 4vw, 3rem); margin-bottom: var(--space-md); }
.split-body p { color: var(--muted-text); max-width: 46ch; margin-bottom: var(--space-sm); }
.split-body .btn { margin-top: var(--space-md); align-self: flex-start; }
.split-accent { width: 60px; height: 2px; background: var(--accent); margin-bottom: var(--space-md); }

/* About expandable extra copy */
.about-more { max-width: 60ch; margin-top: var(--space-md); }
.about-more[hidden] { display: none; }

/* =============================================================================
   SUSTAINABILITY / HOW IT WORKS
   ========================================================================== */
.conscious { background: var(--background); text-align: center; }
.conscious .lead { max-width: 60ch; margin: var(--space-md) auto 0; color: var(--muted-text); font-size: 1.05rem; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-lg); margin-top: var(--space-xl); }
.step { text-align: center; }
.step-icon { display: flex; justify-content: center; color: var(--accent); margin-bottom: var(--space-sm); }
.step-icon svg { width: 32px; height: 32px; }
.step-num { font-family: var(--font-serif); font-size: 1.7rem; color: var(--accent); line-height: 1; }
.step h3 { font-family: var(--font-serif); font-size: 1.4rem; margin: var(--space-sm) 0 var(--space-xs); }
.step p { color: var(--muted-text); font-size: .95rem; max-width: 26ch; margin-inline: auto; }

/* =============================================================================
   COLLECTION PAGE
   ========================================================================== */
.collection-head { text-align: center; padding-top: clamp(32px, 5vw, 64px); }

.filters {
    display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(18px, 3vw, 44px);
    margin-top: var(--space-lg); padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-light);
}
.filter {
    font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-text);
    padding: 6px 2px; position: relative; background: none; transition: color .2s var(--ease);
}
.filter::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1.5px;
    background: var(--accent); transform: scaleX(0); transition: transform .3s var(--ease);
}
.filter:hover { color: var(--text); }
.filter.is-active { color: var(--text); }
.filter.is-active::after { transform: scaleX(1); }

.product-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    align-items: start;                   /* don't stretch cells — keeps the gap even */
    column-gap: clamp(16px, 2vw, 30px);   /* unchanged horizontal spacing */
    row-gap: clamp(38px, 3.5vw, 52px);    /* even breathing space before the next row */
    margin-top: var(--space-xl);
}
.product-card { text-align: left; width: 100%; display: flex; flex-direction: column; background: none; }
.product-card .pc-media {
    display: block; position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--background-alt);
}
.product-card .pc-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.product-card:hover .pc-media img { transform: scale(1.035); }
/* Sold pieces */
.pc-sold {
    position: absolute; top: 12px; left: 12px; z-index: 2;
    background: rgba(20,17,13,.82); color: #fff;
    font-size: .62rem; letter-spacing: .18em; text-transform: uppercase;
    padding: 5px 11px; border-radius: 2px; font-weight: 500;
}
.product-card.is-sold .pc-media img { opacity: .62; }
.product-card.is-sold:hover .pc-media img { transform: none; }
.product-card.is-sold .pc-name { color: var(--muted-text); }
.modal-sold-tag {
    display: inline-block; align-self: flex-start;
    background: rgba(20,17,13,.9); color: #fff;
    font-size: .64rem; letter-spacing: .2em; text-transform: uppercase;
    padding: 5px 12px; border-radius: 2px; margin: 0;
}
.modal-sold-note { margin: var(--space-xs) 0 0; color: var(--muted-text); font-family: var(--font-serif); font-style: italic; font-size: 1rem; }
.product-card .pc-name {
    font-family: var(--font-serif); font-size: 1.25rem; letter-spacing: .01em;
    margin-top: var(--space-md); color: var(--text);
}
.product-card .pc-cats {
    font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted-text);
    margin-top: 4px;
}
/* Placeholder tile when image missing */
.pc-placeholder, .modal-placeholder {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: repeating-linear-gradient(45deg, var(--background-alt), var(--background-alt) 12px, #e8e1d6 12px, #e8e1d6 24px);
    color: var(--muted-text); font-family: var(--font-serif); font-style: italic; font-size: 1rem; text-align: center; padding: 20px;
}

/* Empty state */
.empty-state { text-align: center; padding: clamp(48px, 10vw, 120px) 0; }
.empty-state h2 { font-family: var(--font-serif); font-size: clamp(1.8rem, 4vw, 2.6rem); }
.empty-state p { color: var(--muted-text); margin: var(--space-sm) 0 var(--space-lg); }
.hidden { display: none !important; }

/* Collection CTA */
.collection-cta { display: grid; grid-template-columns: 1fr 1fr; background: var(--background-light); align-items: stretch; }
.collection-cta .cta-media { position: relative; min-height: 340px; overflow: hidden; }
.collection-cta .cta-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.collection-cta .cta-body { padding: clamp(36px, 5vw, 72px); display: flex; flex-direction: column; justify-content: center; }
.collection-cta h2 { font-family: var(--font-serif); font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.collection-cta p { color: var(--muted-text); margin: var(--space-xs) 0 var(--space-lg); }
.cta-follow { display: flex; flex-wrap: wrap; gap: var(--space-md); align-items: center; }
.cta-follow a { display: inline-flex; align-items: center; gap: .5em; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text); }
.cta-follow a:hover { color: var(--accent); }

/* =============================================================================
   PRODUCT MODAL + ZOOM
   ========================================================================== */
.modal { position: fixed; inset: 0; z-index: 300; display: none; }
.modal.is-open { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(20,17,13,.55); opacity: 0; transition: opacity .3s var(--ease); }
.modal.is-open .modal-backdrop { opacity: 1; }
.modal-scroll { position: absolute; inset: 0; overflow-y: auto; display: flex; align-items: center; justify-content: center; padding: clamp(12px, 3vw, 40px); }
.modal-dialog {
    position: relative; background: var(--background-light); width: 100%; max-width: 1050px; max-height: 90vh;
    display: grid; grid-template-columns: 60% 40%; overflow: hidden; border-radius: var(--radius);
    opacity: 0; transform: translateY(12px) scale(.99); transition: opacity .3s var(--ease), transform .35s var(--ease);
}
.modal.is-open .modal-dialog { opacity: 1; transform: none; }
.modal-gallery { display: flex; flex-direction: column; background: var(--background-alt); min-height: 360px; }
.modal-figure {
    position: relative; background: var(--background-alt); overflow: hidden;
    flex: 1 1 auto; min-height: 320px; cursor: zoom-in;
}
.modal-thumbs { display: flex; gap: 8px; padding: 10px; background: var(--background-light); overflow-x: auto; }
.modal-thumbs[hidden] { display: none; }
.modal-thumb {
    flex: 0 0 auto; width: 52px; height: 66px; padding: 0; overflow: hidden;
    border: 1px solid var(--border); border-radius: 2px; background: var(--background-alt);
    opacity: .65; cursor: pointer;
    transition: opacity .2s var(--ease), border-color .2s var(--ease);
}
.modal-thumb img { width: 100%; height: 100%; object-fit: cover; }
.modal-thumb:hover { opacity: 1; }
.modal-thumb.is-active { opacity: 1; border-color: var(--accent); }
.modal-specs { display: grid; grid-template-columns: auto 1fr; gap: 5px 16px; margin: 0; }
.modal-specs dt { color: var(--muted-text); text-transform: uppercase; letter-spacing: .09em; font-size: .64rem; padding-top: 3px; }
.modal-specs dd { margin: 0; color: var(--text); font-size: .88rem; line-height: 1.5; }
.modal-figure img {
    position: absolute; inset: 0;
    width: 100%; height: 100%; object-fit: cover; transition: transform .35s var(--ease);
    transform-origin: center center; will-change: transform;
}
.modal-figure.is-zooming img { transition: transform .06s linear; }
.modal-details { padding: clamp(28px, 3.4vw, 48px); display: flex; flex-direction: column; justify-content: safe center; gap: var(--space-md); overflow-y: auto; min-height: 0; max-height: 90vh; }
.modal-brand { font-size: .7rem; letter-spacing: .28em; text-transform: uppercase; color: var(--accent); }
.modal-name { font-family: var(--font-serif); font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.1; }
.modal-cats { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-text); }
.modal-sku { font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.pc-rates { display: grid; gap: 3px; margin-top: 8px; font-size: .8rem; line-height: 1.5; color: var(--muted-text); }
.modal-pricing { padding: 14px 18px; border-left: 2px solid var(--accent); background: var(--background-alt); display: grid; gap: 6px; font-size: .95rem; line-height: 1.5; }
.modal-pricing p { margin: 0; }
.modal-desc { color: var(--muted-text); font-size: .96rem; line-height: 1.65; }
.modal-desc.is-placeholder { font-style: italic; opacity: .75; }
.modal-note { color: var(--muted-text); font-size: .95rem; }
.modal-hint { font-size: .72rem; color: var(--muted-text); font-style: italic; font-family: var(--font-serif); }
.modal-actions { display: flex; flex-direction: column; gap: var(--space-sm); margin-top: var(--space-xs); }
.modal-close {
    position: absolute; top: 12px; right: 12px; z-index: 5; width: 42px; height: 42px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.85); border-radius: 50%; font-size: 1.4rem; line-height: 1; color: var(--text);
    transition: background .2s var(--ease);
}
.modal-close:hover { background: #fff; }
body.modal-open { overflow: hidden; }

/* =============================================================================
   CONTACT PAGE
   ========================================================================== */
.contact-head { text-align: center; padding-top: clamp(32px, 5vw, 64px); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: start; margin-top: var(--space-xl); }
.contact-media { position: relative; overflow: hidden; aspect-ratio: 4 / 5; background: var(--background-alt); }
.contact-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.contact-panel h2 { font-family: var(--font-serif); font-size: clamp(1.6rem, 3vw, 2.2rem); }
.contact-panel .intro { color: var(--muted-text); margin: var(--space-sm) 0 var(--space-lg); max-width: 46ch; }

/* Appointment context banner */
.appt-context {
    border: 1px solid var(--border); background: var(--white);
    padding: var(--space-md) var(--space-lg); display: flex; gap: var(--space-md); align-items: center;
    margin-bottom: var(--space-lg);
}
.appt-context .appt-thumb { width: 64px; height: 80px; object-fit: cover; flex: 0 0 auto; background: var(--background-alt); }
.appt-context .appt-label { font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); }
.appt-context .appt-name { font-family: var(--font-serif); font-size: 1.4rem; margin-top: 2px; }

/* Form */
.form-field { margin-bottom: var(--space-md); }
.form-field label { display: block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-text); margin-bottom: 8px; }
.form-field .req { color: var(--accent); }
.form-field input, .form-field textarea {
    width: 100%; padding: 14px 16px; background: var(--white);
    border: 1px solid var(--border); border-radius: var(--radius); font-size: 1rem;
    transition: border-color .2s var(--ease);
}
.form-field textarea { min-height: 150px; resize: vertical; }
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--accent); }
.form-field input[aria-invalid="true"], .form-field textarea[aria-invalid="true"] { border-color: #b3452f; }
.field-error { color: #b3452f; font-size: .82rem; margin-top: 6px; }

.form-alert { padding: var(--space-md) var(--space-lg); border-radius: var(--radius); margin-bottom: var(--space-lg); font-size: .95rem; }
.form-alert--ok { background: #eef1e9; border: 1px solid #c9d3b5; color: #3f4a2c; }
.form-alert--err { background: #f6eae6; border: 1px solid #e0c3b8; color: #7a3322; }

.contact-info { margin-top: var(--space-xl); border-top: 1px solid var(--border-light); padding-top: var(--space-lg); display: grid; gap: var(--space-md); }
.contact-info .ci-row { display: grid; grid-template-columns: 28px 110px 1fr; align-items: center; gap: var(--space-sm); }
.contact-info .ci-icon { color: var(--accent); }
.contact-info .ci-key { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-text); }
.contact-info .ci-val { color: var(--text); }
.contact-info a.ci-val:hover { color: var(--accent); }

/* ---- FAQ accordion ---- */
.container--narrow { max-width: 860px; }
.faq-list { margin-top: var(--space-lg); border-top: 1px solid var(--border-light); }
.faq-item { border-bottom: 1px solid var(--border-light); }
.faq-item summary {
    list-style: none; cursor: pointer; display: flex; align-items: center;
    justify-content: space-between; gap: var(--space-md); padding: var(--space-md) 4px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.faq-q { font-family: var(--font-serif); font-size: clamp(1.15rem, 2.2vw, 1.4rem); color: var(--text); line-height: 1.3; }
.faq-item summary:hover .faq-q { color: var(--muted-text); }
.faq-mark { position: relative; width: 15px; height: 15px; flex: 0 0 auto; }
.faq-mark::before, .faq-mark::after { content: ""; position: absolute; background: var(--accent); transition: transform .25s var(--ease); }
.faq-mark::before { top: 50%; left: 0; right: 0; height: 1.5px; transform: translateY(-50%); }
.faq-mark::after { left: 50%; top: 0; bottom: 0; width: 1.5px; transform: translateX(-50%); }
.faq-item[open] .faq-mark::after { transform: translateX(-50%) scaleY(0); }
.faq-a { padding: 0 4px var(--space-lg); color: var(--muted-text); max-width: 66ch; }
.faq-a p + p { margin-top: var(--space-sm); }
.faq-footnote { margin-top: var(--space-2xl); max-width: 620px; margin-inline: auto; }
.faq-footnote h3 { font-family: var(--font-serif); font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: var(--space-md); }
.faq-footnote p { color: var(--muted-text); margin-bottom: var(--space-sm); }
.faq-footnote .btn { margin-top: var(--space-md); }
@media (prefers-reduced-motion: reduce) { .faq-mark::before, .faq-mark::after { transition: none; } }

/* =============================================================================
   FOOTER
   ========================================================================== */
.site-footer { background: var(--background-alt); border-top: 1px solid var(--border-light); margin-top: var(--space-2xl); }
.footer-inner {
    max-width: var(--maxw); margin-inline: auto; padding: clamp(40px, 6vw, 72px) var(--pad) var(--space-xl);
    display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1.4fr; gap: clamp(24px, 3vw, 48px);
}
.footer-logo { height: 54px; width: auto; margin-bottom: var(--space-md); }
.footer-tagline { color: var(--muted-text); font-size: .9rem; max-width: 30ch; }
.footer-heading { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--text); margin-bottom: var(--space-md); }
.footer-col ul { display: grid; gap: 10px; }
.footer-col a { font-size: .9rem; color: var(--muted-text); transition: color .2s var(--ease); }
.footer-col a:hover { color: var(--text); }
.footer-loop-text { color: var(--muted-text); font-size: .9rem; margin-bottom: var(--space-md); max-width: 28ch; }
.social-row { display: flex; gap: var(--space-sm); }
.social-icon { width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--text); transition: border-color .2s var(--ease), color .2s var(--ease); }
.social-icon:hover { border-color: var(--accent); color: var(--accent); }
.footer-bottom {
    max-width: var(--maxw); margin-inline: auto; padding: var(--space-md) var(--pad);
    border-top: 1px solid var(--border-light);
    display: flex; flex-wrap: wrap; gap: var(--space-sm); justify-content: space-between; align-items: center;
    font-size: .8rem; color: var(--muted-text);
}
.footer-legal { display: flex; gap: var(--space-sm); align-items: center; }
.footer-legal a:hover { color: var(--text); }

/* =============================================================================
   REVEAL ANIMATIONS
   ========================================================================== */
/* Reveals are a progressive enhancement: hidden ONLY when JS is active
   (html.js), so content stays visible if JavaScript is disabled or fails. */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* =============================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1080px) {
    .footer-inner { grid-template-columns: 1fr 1fr 1fr; }
    .footer-brand, .footer-loop { grid-column: span 3; }
}
@media (max-width: 960px) {
    :root { --header-h: 76px; }
    .nav-toggle { display: flex; }
    .header-search { order: 2; }
    .primary-nav {
        position: fixed; inset: var(--header-h) 0 auto 0; background: var(--background-light);
        border-bottom: 1px solid var(--border); transform: translateY(-8px); opacity: 0;
        pointer-events: none; transition: transform .3s var(--ease), opacity .3s var(--ease);
        max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    }
    .primary-nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
    .primary-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: var(--space-sm) var(--pad) var(--space-lg); }
    .primary-nav li { border-bottom: 1px solid var(--border-light); }
    .nav-link { display: block; padding: 16px 0; font-size: .9rem; }
    .nav-link::after { display: none; }
    .nav-link.is-active { color: var(--accent); }

    .hero--full { min-height: clamp(520px, 84vh, 680px); align-items: flex-start; }
    .hero-copy { max-width: 100%; padding-block: clamp(24px, 7vw, 48px); }
    .hero-mark { max-width: 200px; }
    .hero-slide { object-position: 70% center; }
    .hero-scrim {
        background: linear-gradient(180deg,
            rgba(247,244,239,.95) 0%, rgba(247,244,239,.70) 34%,
            rgba(247,244,239,.20) 64%, rgba(247,244,239,0) 100%);
    }

    .split { grid-template-columns: 1fr; }
    .split-media { min-height: 46vh; }
    .collection-cta { grid-template-columns: 1fr; }
    .collection-cta .cta-media { min-height: 40vh; }
    .contact-grid { grid-template-columns: 1fr; }
    .contact-media { aspect-ratio: 16 / 10; }

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

    /* Modal stacks */
    /* Single, page-like scroll on phones (no nested scroll box) so long
       descriptions and the button are never cut off. */
    .modal-dialog { grid-template-columns: 1fr; max-height: none; overflow: visible; }
    .modal-scroll { align-items: flex-start; }
    .modal-gallery { min-height: 0; }
    .modal-figure { aspect-ratio: 4 / 5; min-height: 0; cursor: default; }
    .modal-figure img { position: static; }
    .modal-details { justify-content: flex-start; overflow: visible; max-height: none; }
    /* Keep the close button reachable while scrolling the tall popup. */
    .modal-close { position: fixed; top: 14px; right: 14px; }
}
@media (max-width: 680px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .footer-brand, .footer-loop { grid-column: span 2; }
    .contact-info .ci-row { grid-template-columns: 24px 92px 1fr; }
    .hero-actions .btn { flex: 1 1 auto; }
}
@media (max-width: 430px) {
    .steps { grid-template-columns: 1fr; }
    .featured-logos { gap: 22px 32px; }
    .product-card .pc-name { font-size: 1.1rem; }
}

/* =============================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
    .js .reveal { opacity: 1; transform: none; }
    .collection-card:hover img, .product-card:hover .pc-media img { transform: none; }
}

/* Keep HTML visibility state authoritative for sold badges and booking actions. */
[hidden] { display: none !important; }
