/* ==========================================================
   CHRONOS — custom layer on top of Tailwind
   Palette: ink #1C1C1C · cream #F4F1EA · gold #B49A63 · navy #101B2D · emerald #0E4A43
   ========================================================== */

:root {
    /* RGB channels — the Tailwind colours in head.php read these, so a theme only swaps them */
    --c-ink: 28 28 28;        --c-ink-soft: 42 42 42;
    --c-cream: 244 241 234;   --c-cream-dark: 233 228 216;
    --c-gold: 180 154 99;     --c-gold-light: 205 184 138;  --c-gold-dark: 151 127 75;
    --c-navy: 16 27 45;       --c-navy-light: 26 41 64;
    --c-emerald: 14 74 67;    --c-emerald-light: 21 99 90;

    --ink: rgb(var(--c-ink));
    --cream: rgb(var(--c-cream));
    --cream-dark: rgb(var(--c-cream-dark));
    --gold: rgb(var(--c-gold));
    --gold-dark: rgb(var(--c-gold-dark));
    --navy: rgb(var(--c-navy));
    --emerald: rgb(var(--c-emerald));
    --ease: cubic-bezier(.22, .61, .36, 1);
}

/* Simple black & white theme (toggled from the header icon) */
html[data-theme="mono"] {
    --c-ink: 17 17 17;        --c-ink-soft: 38 38 38;
    --c-cream: 255 255 255;   --c-cream-dark: 237 237 237;
    --c-gold: 119 119 119;    --c-gold-light: 163 163 163;  --c-gold-dark: 85 85 85;
    --c-navy: 0 0 0;          --c-navy-light: 26 26 26;
    --c-emerald: 43 43 43;    --c-emerald-light: 61 61 61;
}

html { scroll-behavior: smooth; }
body.no-scroll { overflow: hidden; }
::selection { background: var(--gold); color: var(--navy); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--gold); border: 2px solid var(--cream); border-radius: 10px; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- Typography helpers ---------- */
.eyebrow {
    font-size: 11px;
    letter-spacing: .35em;
    text-transform: uppercase;
    color: var(--gold);
    display: inline-flex;
    align-items: center;
    gap: .75rem;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.eyebrow.center::after { content: ""; width: 28px; height: 1px; background: currentColor; }

.section-title { font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; font-weight: 500; }

/* ---------- Buttons ---------- */
.btn-gold, .btn-dark, .btn-outline, .btn-light {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .95rem 2rem;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .22em;
    text-transform: uppercase;
    transition: all .35s var(--ease);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    cursor: pointer;
}
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--cream); color: var(--navy); }
.btn-dark { background: var(--navy); color: var(--cream); }
.btn-dark:hover { background: var(--gold); color: var(--navy); }
.btn-outline { border: 1px solid currentColor; }
.btn-outline:hover { background: var(--navy); color: var(--cream); border-color: var(--navy); }
.btn-light { border: 1px solid rgb(var(--c-cream) / .5); color: var(--cream); }
.btn-light:hover { background: var(--cream); color: var(--navy); }
button:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Header ---------- */
#siteHeader.scrolled { box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5); }

.nav-link { position: relative; padding: .5rem 0; transition: color .3s; }
.nav-link::after {
    content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
    background: var(--gold); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease);
}
.nav-link:hover { color: var(--gold); }
.nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); transform-origin: left; }

.badge-count {
    position: absolute; top: 0; right: -2px;
    min-width: 18px; height: 18px; padding: 0 4px;
    border-radius: 9px; background: var(--gold); color: var(--navy);
    font-size: 10px; font-weight: 600; line-height: 18px; text-align: center;
    transform: scale(0); transition: transform .3s var(--ease);
}
.badge-count.has { transform: scale(1); }
.badge-count.bump { animation: bump .4s var(--ease); }
@keyframes bump { 50% { transform: scale(1.4); } }

/* Announcement ticker */
.announce-item {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    opacity: 0; transform: translateY(100%); transition: all .6s var(--ease); white-space: nowrap;
}
.announce-item.active { opacity: 1; transform: translateY(0); }
.announce-item.leave { opacity: 0; transform: translateY(-100%); }

/* ---------- Drawers ---------- */
.drawer {
    position: fixed; top: 0; bottom: 0; z-index: 60;
    width: min(420px, 90vw);
    display: flex; flex-direction: column;
    transition: transform .5s var(--ease);
    box-shadow: 0 0 60px rgba(0, 0, 0, .3);
}
.drawer-left { left: 0; transform: translateX(-105%); }
.drawer-right { right: 0; transform: translateX(105%); }
.drawer.open { transform: translateX(0); }
#backdrop.show { opacity: 1; pointer-events: auto; }

/* ---------- Hero slider ---------- */
.hero { position: relative; height: calc(100vh - 116px); min-height: 560px; max-height: 860px; overflow: hidden; }
.hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1.2s var(--ease), visibility 1.2s; }
.hero-slide.active { opacity: 1; visibility: visible; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); transition: transform 7s linear; }
.hero-slide.active img { transform: scale(1); }
.hero-slide .hero-copy > * { opacity: 0; transform: translateY(30px); transition: all .9s var(--ease); }
.hero-slide.active .hero-copy > * { opacity: 1; transform: none; }
.hero-slide.active .hero-copy > *:nth-child(2) { transition-delay: .15s; }
.hero-slide.active .hero-copy > *:nth-child(3) { transition-delay: .3s; }
.hero-slide.active .hero-copy > *:nth-child(4) { transition-delay: .45s; }
.hero-dot { width: 36px; height: 2px; background: rgb(var(--c-cream) / .35); position: relative; overflow: hidden; }
.hero-dot span { position: absolute; inset: 0; background: var(--gold); transform: scaleX(0); transform-origin: left; }
.hero-dot.active span { animation: dotfill 6s linear forwards; }
@keyframes dotfill { to { transform: scaleX(1); } }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; white-space: nowrap; }
.marquee-track { display: inline-flex; animation: marquee 35s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Category tile ---------- */
.cat-tile img { transition: transform 1.2s var(--ease); }
.cat-tile:hover img { transform: scale(1.08); }
.cat-tile .cat-line { width: 0; transition: width .5s var(--ease); }
.cat-tile:hover .cat-line { width: 48px; }

/* ---------- Product card ---------- */

/* list view on the shop page */
.list-view { grid-template-columns: 1fr !important; }
.list-view .product-card { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; align-items: center; background: #fff; padding: 1rem; }
.list-view .product-card .card-body { text-align: left; padding-top: 0; }
.list-view .product-card .card-price { justify-content: flex-start; }
.list-view .product-card .card-desc { display: block; }
@media (max-width: 640px) {
    .list-view .product-card { grid-template-columns: 120px 1fr; gap: 1rem; }
    .list-view .product-card .card-desc { display: none; }
}

/* ---------- Forms ---------- */
.field {
    width: 100%; background: #fff; border: 1px solid rgb(var(--c-ink) / .15);
    padding: .9rem 1rem; outline: none; transition: border-color .3s, box-shadow .3s;
}
.field:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgb(var(--c-gold) / .15); }
.field.error { border-color: #b3261e; }
.field-error { color: #b3261e; font-size: 12px; margin-top: 4px; }
.label { display: block; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; margin-bottom: .5rem; color: rgb(var(--c-ink) / .7); }

input[type=range] { accent-color: var(--gold); }
input[type=checkbox], input[type=radio] { accent-color: var(--emerald); width: 16px; height: 16px; }

/* ---------- Qty stepper ---------- */
.qty { display: inline-flex; align-items: center; border: 1px solid rgb(var(--c-ink) / .2); }
.qty button { width: 38px; height: 42px; display: grid; place-items: center; transition: background .2s; }
.qty button:hover { background: var(--cream-dark); }
.qty input { width: 44px; text-align: center; background: transparent; outline: none; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty.sm button { width: 30px; height: 32px; }
.qty.sm input { width: 34px; font-size: 14px; }

/* ---------- Tabs & accordion ---------- */
.tab-btn { position: relative; padding: 1rem 0; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: rgb(var(--c-ink) / .5); transition: color .3s; }
.tab-btn::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--gold); transform: scaleX(0); transition: transform .4s var(--ease); }
.tab-btn.active { color: var(--ink); }
.tab-btn.active::after { transform: scaleX(1); }
.tab-panel { display: none; animation: fade .5s var(--ease); }
.tab-panel.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } }

.acc-item { border-bottom: 1px solid rgb(var(--c-ink) / .12); }
.acc-head { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.4rem 0; text-align: left; font-family: "Cormorant Garamond", serif; font-size: 1.35rem; transition: color .3s; }
.acc-head:hover { color: var(--gold-dark); }
.acc-head .acc-icon { transition: transform .4s var(--ease); flex-shrink: 0; }
.acc-item.open .acc-icon { transform: rotate(45deg); color: var(--gold); }
.acc-body { display: none; padding-bottom: 1.4rem; color: rgb(var(--c-ink) / .7); line-height: 1.8; }

/* ---------- Product gallery zoom ---------- */
.zoom-wrap { overflow: hidden; cursor: zoom-in; }
.zoom-wrap img { transition: transform .3s ease; }
.zoom-wrap.zooming img { transform: scale(2); }
.thumb { opacity: .55; transition: opacity .3s, border-color .3s; border: 1px solid transparent; }
.thumb.active, .thumb:hover { opacity: 1; border-color: var(--gold); }

/* ---------- Toast ---------- */
.toast {
    display: flex; gap: .75rem; align-items: center;
    background: var(--navy); color: var(--cream); padding: 1rem 1.2rem;
    border-left: 3px solid var(--gold); box-shadow: 0 15px 40px -10px rgba(0, 0, 0, .5);
    font-size: 14px; animation: toastIn .45s var(--ease);
}
.toast.out { animation: toastOut .4s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }

#toTop.show { opacity: 1; pointer-events: auto; }

/* ---------- Footer ---------- */
.footer-title { color: var(--cream); font-family: "Cormorant Garamond", serif; font-size: 1.4rem; margin-bottom: 1.25rem; }
.footer-link { transition: color .3s, padding .3s; }
.footer-link:hover { color: var(--gold); padding-left: 4px; }

/* ---------- Page banner ---------- */
.page-banner { background: var(--navy); color: var(--cream); position: relative; overflow: hidden; }
.page-banner::after {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(circle at 85% 50%, rgb(var(--c-gold) / .18), transparent 55%);
}

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; padding: 1rem; background: rgb(var(--c-navy) / .75); backdrop-filter: blur(4px); }
.modal.show { display: flex; }
.modal > div { animation: toastIn .5s var(--ease); }

/* ---------- Policies prose ---------- */
.prose-lux h3 { font-family: "Cormorant Garamond", serif; font-size: 1.6rem; margin: 2rem 0 .75rem; color: var(--navy); }
.prose-lux p, .prose-lux li { color: rgb(var(--c-ink) / .75); line-height: 1.85; }
.prose-lux ul { list-style: none; padding: 0; margin: 1rem 0; }
.prose-lux li { padding-left: 1.5rem; position: relative; margin: .5rem 0; }
.prose-lux li::before { content: ""; position: absolute; left: 0; top: .75em; width: 8px; height: 1px; background: var(--gold); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
    .reveal { opacity: 1; transform: none; }
}

/* ---------- Transparent product cut-outs (assets/products/*.png) ---------- */
.cutout { filter: drop-shadow(0 18px 22px rgb(var(--c-ink) / .18)); }
