/* ============================================================
   Gem Stealie · David Gem — minimalist storefront
   ============================================================ */
:root {
  --ink: #1b1b1b;
  --ink-2: #4a4a4a;
  --muted: #8a8a86;
  --line: #e7e4de;
  --line-2: #f0ede8;
  --bg: #ffffff;
  --tint: #f7f5f1;
  --tint-2: #f2efe9;
  --accent: #9a7b3c;          /* restrained antique-gold for prices/links */
  --bolt-red: #d8412a;
  --bolt-blue: #2f6fd0;
  --maxw: 1240px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Assistant", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans); color: var(--ink); background: var(--bg);
  line-height: 1.6; font-weight: 400; -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; letter-spacing: 0.01em; }
[hidden] { display: none !important; }

.kicker {
  font-size: 0.72rem; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin-bottom: 1rem;
}
.center { text-align: center; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.85rem 1.9rem; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 600; border-radius: 2px; transition: all 0.3s var(--ease); cursor: pointer;
}
.btn-dark { background: var(--ink); color: #fff; border: 1px solid var(--ink); }
.btn-dark:hover { background: #000; }
.btn-outline { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-block { width: 100%; }

/* ---------- topbar ---------- */
.topbar {
  background: var(--ink); color: #f3efe7; text-align: center;
  font-size: 0.74rem; letter-spacing: 0.08em; padding: 0.5rem 1rem;
}

/* ---------- header ---------- */
.header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,0.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner {
  width: min(var(--maxw), 94vw); margin-inline: auto;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
  padding: 1rem 0;
}
.logo { display: flex; align-items: center; gap: 0.6rem; justify-self: start; grid-column: 1; }
.logo-mark { width: 38px; height: 38px; color: var(--ink); flex: none; }
.logo-bolt { fill: var(--bolt-red); }
.logo-text { display: flex; flex-direction: column; line-height: 1.05; }
.logo-name { font-family: var(--serif); font-size: 1.45rem; font-weight: 600; letter-spacing: 0.01em; }
.logo-sub { font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }

.nav { grid-column: 2; display: flex; gap: 1.7rem; justify-self: center; }
.nav a { font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); position: relative; padding: 0.2rem 0; transition: color 0.25s; }
.nav a::after { content: ""; position: absolute; left: 0; bottom: -2px; height: 1px; width: 0; background: var(--ink); transition: width 0.3s var(--ease); }
.nav a:hover { color: var(--ink); }
.nav a:hover::after { width: 100%; }

.header-icons { grid-column: 3; display: flex; align-items: center; gap: 0.4rem; justify-self: end; }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; transition: background 0.25s; }
.icon-btn:hover { background: var(--tint-2); }
.icon-btn svg { width: 21px; height: 21px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.bag-btn { width: auto; padding: 0 0.85rem; gap: 0.45rem; border-radius: 100px; }
.bag-label { font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; }
.menu-btn { display: none; justify-self: start; }

/* ---------- layout helpers ---------- */
.view { width: min(var(--maxw), 94vw); margin-inline: auto; }
.block { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.block-tint { width: 100vw; margin-left: 50%; transform: translateX(-50%); background: var(--tint); }
.block-tint > * { width: min(var(--maxw), 94vw); margin-inline: auto; }
.block-head { text-align: center; max-width: 38rem; margin: 0 auto clamp(2rem, 4vw, 3rem); }
.block-head h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.block-head p { color: var(--muted); margin-top: 0.6rem; }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center; padding: clamp(2.5rem, 6vw, 5rem) 0;
}
.hero-text h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); margin-bottom: 1.4rem; }
.hero-lede { color: var(--ink-2); font-size: 1.05rem; max-width: 30rem; margin-bottom: 2rem; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.hero-img { aspect-ratio: 4/5; overflow: hidden; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- collection grid ---------- */
.collection-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.collection-card { display: block; text-align: left; cursor: pointer; }
.collection-card .c-img { aspect-ratio: 3/2; overflow: hidden; background: var(--tint); }
.collection-card .c-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.collection-card:hover .c-img img { transform: scale(1.06); }
.collection-card h3 { font-size: 1.4rem; margin-top: 0.9rem; }
.collection-card p { color: var(--muted); font-size: 0.88rem; margin-top: 0.2rem; }
.collection-card .c-link { display: inline-block; margin-top: 0.5rem; font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; border-bottom: 1px solid var(--ink); padding-bottom: 2px; }

/* ---------- product grid / cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6rem 1.4rem; }
.product-card { text-align: left; cursor: pointer; display: block; }
.p-img { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--tint); }
.p-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.product-card:hover .p-img img { transform: scale(1.05); }
.p-badge { position: absolute; top: 10px; left: 10px; background: #fff; color: var(--ink); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; padding: 0.28rem 0.6rem; border: 1px solid var(--line); }
.p-quick { position: absolute; left: 0; right: 0; bottom: 0; background: var(--ink); color: #fff; text-align: center; font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; padding: 0.7rem; transform: translateY(100%); transition: transform 0.35s var(--ease); }
.product-card:hover .p-quick { transform: translateY(0); }
.p-coll { font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-top: 0.85rem; }
.p-name { font-family: var(--serif); font-size: 1.25rem; margin-top: 0.2rem; }
.p-meta { font-size: 0.8rem; color: var(--muted); margin-top: 0.15rem; }
.p-price { font-size: 0.95rem; color: var(--ink); margin-top: 0.5rem; font-weight: 600; }
.p-price .inquire { color: var(--accent); font-weight: 600; }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; padding: clamp(3rem, 7vw, 5.5rem) 0; border-top: 1px solid var(--line); }
.about-img { aspect-ratio: 4/5; overflow: hidden; }
.about-img img { width: 100%; height: 100%; object-fit: cover; }
.about-text h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 1.1rem; }
.about-text p { color: var(--ink-2); margin-bottom: 1rem; }
.ticks { margin-top: 1.4rem; display: grid; gap: 0.6rem; }
.ticks li { position: relative; padding-left: 1.5rem; color: var(--ink-2); font-size: 0.95rem; }
.ticks li::before { content: "✦"; position: absolute; left: 0; color: var(--accent); }

/* ---------- custom ---------- */
.custom { text-align: center; padding: clamp(3rem, 7vw, 5.5rem) 0; border-top: 1px solid var(--line); }
.custom h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.custom-sub { color: var(--muted); max-width: 34rem; margin: 0.7rem auto 2.6rem; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; text-align: left; margin-bottom: 2.6rem; }
.step { padding: 1.6rem; border: 1px solid var(--line); }
.step span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--serif); font-size: 1.1rem; margin-bottom: 0.9rem; }
.step h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.step p { font-size: 0.86rem; color: var(--muted); }

/* ---------- shop view ---------- */
.shop-head { text-align: center; padding: clamp(2rem, 5vw, 3.5rem) 0 1.6rem; }
.shop-head h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
.shop-head p { color: var(--muted); max-width: 38rem; margin: 0.6rem auto 0; }

.shop-controls { position: sticky; top: 73px; z-index: 20; background: rgba(255,255,255,0.97); backdrop-filter: blur(6px); padding: 1.1rem 0; border-bottom: 1px solid var(--line); margin-bottom: 2.4rem; }
.shop-search { position: relative; max-width: 460px; margin: 0 auto 1rem; }
.shop-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.6; }
.shop-search input { width: 100%; padding: 0.7rem 1rem 0.7rem 2.6rem; border: 1px solid var(--line); border-radius: 100px; font-size: 0.92rem; font-family: inherit; color: var(--ink); }
.shop-search input:focus { outline: none; border-color: var(--ink); }
.filter-row { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.filter-row-sub { margin-top: 0.6rem; }
.chip { padding: 0.45rem 1rem; font-size: 0.78rem; letter-spacing: 0.04em; border: 1px solid var(--line); border-radius: 100px; color: var(--ink-2); background: #fff; transition: all 0.25s; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.sub { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; }

/* shop grouped sections */
.material-group { margin-bottom: 3.2rem; }
.material-group > .mg-head { display: flex; align-items: baseline; gap: 1rem; border-bottom: 1px solid var(--ink); padding-bottom: 0.7rem; margin-bottom: 2rem; }
.mg-head h2 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); }
.mg-head span { color: var(--muted); font-size: 0.86rem; }
.style-section { margin-bottom: 2.4rem; }
.style-section h3 { font-size: 1.2rem; letter-spacing: 0.02em; margin-bottom: 1.1rem; display: flex; align-items: center; gap: 0.7rem; color: var(--ink); }
.style-section h3 .count { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.result-count { text-align: center; color: var(--muted); font-size: 0.85rem; margin-bottom: 1.6rem; }
.no-results { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.no-results strong { color: var(--ink); display: block; font-family: var(--serif); font-size: 1.4rem; margin-bottom: 0.5rem; }
.no-results button { color: var(--accent); text-decoration: underline; }

/* ---------- footer ---------- */
.footer { background: var(--ink); color: #d9d5cc; margin-top: 4rem; }
.footer-top { width: min(var(--maxw), 94vw); margin-inline: auto; display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2.4rem; padding: 3.4rem 0 2.4rem; }
.footer .logo-name { color: #fff; font-size: 1.5rem; }
.footer-brand p { color: #b3afa5; font-size: 0.9rem; margin: 0.6rem 0 1.4rem; max-width: 24rem; }
.news label { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: #b3afa5; display: block; margin-bottom: 0.6rem; }
.news-row { display: flex; gap: 0.5rem; max-width: 360px; }
.news-row input { flex: 1; padding: 0.7rem 0.9rem; background: transparent; border: 1px solid #4a463f; color: #fff; font-family: inherit; font-size: 0.9rem; }
.news-row input:focus { outline: none; border-color: #fff; }
.news-row .btn-dark { background: #fff; color: var(--ink); border-color: #fff; }
.news-note { font-size: 0.8rem; margin-top: 0.7rem; color: #c9b98e; min-height: 1em; }
.footer-col h4 { color: #fff; font-family: var(--sans); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 1rem; font-weight: 700; }
.footer-col a { display: block; color: #b3afa5; font-size: 0.9rem; margin-bottom: 0.6rem; transition: color 0.25s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #34302a; }
.footer-bottom { width: min(var(--maxw), 94vw); margin-inline: auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding: 1.4rem 0; font-size: 0.78rem; color: #8f8b82; }
.pay { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pay span { border: 1px solid #34302a; padding: 0.25rem 0.55rem; font-size: 0.66rem; border-radius: 3px; }

/* ---------- drawers ---------- */
.scrim { position: fixed; inset: 0; background: rgba(20,18,14,0.4); z-index: 45; opacity: 0; transition: opacity 0.3s; }
.scrim.show { opacity: 1; }
.drawer { position: fixed; z-index: 50; transition: transform 0.4s var(--ease); }
.drawer[aria-hidden="true"] { pointer-events: none; }

.drawer-top { top: 0; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); transform: translateY(-100%); }
.drawer-top[aria-hidden="false"] { transform: translateY(0); pointer-events: auto; }
.drawer-inner { width: min(var(--maxw), 94vw); margin-inline: auto; padding: 1.4rem 0 1.8rem; }
.search-bar { display: flex; align-items: center; gap: 0.8rem; border-bottom: 1px solid var(--ink); padding-bottom: 0.8rem; }
.search-bar svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.6; flex: none; }
.search-bar input { flex: 1; border: none; font-size: 1.3rem; font-family: var(--serif); color: var(--ink); background: none; }
.search-bar input:focus { outline: none; }
.search-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin-top: 1.4rem; max-height: 56vh; overflow-y: auto; }
.sr-item { display: flex; gap: 0.8rem; align-items: center; padding: 0.5rem; cursor: pointer; transition: background 0.2s; }
.sr-item:hover { background: var(--tint); }
.sr-item img { width: 56px; height: 56px; object-fit: cover; flex: none; background: var(--tint); }
.sr-name { font-family: var(--serif); font-size: 1.05rem; }
.sr-meta { font-size: 0.78rem; color: var(--muted); }
.sr-empty { grid-column: 1/-1; color: var(--muted); padding: 1rem 0; }
.sr-empty a, .sr-empty button { color: var(--accent); text-decoration: underline; }

.drawer-right { top: 0; right: 0; bottom: 0; width: min(420px, 92vw); background: #fff; box-shadow: -10px 0 40px -20px rgba(0,0,0,0.4); transform: translateX(100%); }
.drawer-right[aria-hidden="false"] { transform: translateX(0); pointer-events: auto; }
.drawer-panel { padding: 2.4rem; height: 100%; overflow-y: auto; position: relative; }
.drawer-title { font-size: 2rem; margin-bottom: 0.3rem; }
.drawer-sub { color: var(--muted); margin-bottom: 1.8rem; }
.drawer-close { position: absolute; top: 1.2rem; right: 1.2rem; width: 36px; height: 36px; border-radius: 50%; font-size: 1rem; color: var(--ink); transition: background 0.2s; }
.drawer-top .drawer-close { position: static; flex: none; }
.drawer-close:hover { background: var(--tint-2); }

.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: 0.78rem; letter-spacing: 0.06em; color: var(--ink-2); margin-bottom: 0.4rem; }
.field input { width: 100%; padding: 0.8rem 1rem; border: 1px solid var(--line); font-family: inherit; font-size: 0.95rem; color: var(--ink); border-radius: 2px; }
.field input:focus { outline: none; border-color: var(--ink); }
.login-form .btn { margin-top: 0.4rem; }
.login-note { font-size: 0.85rem; color: var(--accent); margin-top: 0.9rem; min-height: 1em; }
.login-links { display: flex; justify-content: space-between; margin-top: 1.4rem; font-size: 0.85rem; }
.login-links a { color: var(--ink-2); border-bottom: 1px solid var(--line); padding-bottom: 1px; }
.login-links a:hover { color: var(--ink); border-color: var(--ink); }
.account-actions { display: flex; flex-direction: column; gap: 0.7rem; margin-top: 1.8rem; }
.account-note { font-size: 0.85rem; color: var(--muted); margin-top: 1.6rem; line-height: 1.6; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: none; }
.modal.open { display: grid; place-items: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(20,18,14,0.55); }
.modal-card { position: relative; z-index: 1; width: min(900px, 94vw); max-height: 92vh; overflow: auto; background: #fff; display: grid; grid-template-columns: 1fr 1fr; animation: pop 0.35s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.modal-close { position: absolute; top: 12px; right: 12px; z-index: 3; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.9); font-size: 1rem; transition: background 0.2s, transform 0.3s; }
.modal-close:hover { background: var(--tint-2); transform: rotate(90deg); }
.modal-media { padding: 1rem; background: var(--tint); display: flex; flex-direction: column; gap: 0.7rem; }
#mImg { width: 100%; aspect-ratio: 1; object-fit: cover; background: #fff; }
.modal-thumbs { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.modal-thumb { width: 56px; height: 56px; overflow: hidden; border: 1px solid var(--line); opacity: 0.65; transition: opacity 0.2s, border-color 0.2s; }
.modal-thumb img { width: 100%; height: 100%; object-fit: cover; }
.modal-thumb.active, .modal-thumb:hover { opacity: 1; border-color: var(--ink); }
.modal-info { padding: clamp(1.6rem, 3vw, 2.6rem); display: flex; flex-direction: column; }
.m-coll { font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.5rem; }
.modal-info h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 0.4rem; }
.m-by { font-style: italic; color: var(--ink-2); margin-bottom: 0.6rem; }
.m-meta { font-size: 0.85rem; color: var(--muted); padding-bottom: 0.9rem; border-bottom: 1px solid var(--line); margin-bottom: 0.9rem; }
.m-price { font-size: 1.4rem; font-weight: 600; margin-bottom: 1rem; }
.m-price .inquire { color: var(--accent); }
.m-desc { color: var(--ink-2); margin-bottom: 1.4rem; }
.modal-info .btn { margin-top: auto; }
.m-fine { text-align: center; font-size: 0.74rem; color: var(--muted); margin-top: 0.8rem; }

/* ---------- back to top ---------- */
.to-top { position: fixed; bottom: 22px; right: 22px; z-index: 35; width: 46px; height: 46px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 1.1rem; opacity: 0; transform: translateY(16px); pointer-events: none; transition: all 0.35s var(--ease); }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: #000; }

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

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .nav { display: none; }
  .menu-btn { display: grid; }
  .header-inner { grid-template-columns: auto 1fr auto; }
  .logo { grid-column: 2; justify-self: center; }
  .menu-btn { grid-column: 1; }
  .header-icons { grid-column: 3; }
  .logo-sub { display: none; }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .hero, .about { grid-template-columns: 1fr; }
  .hero-img, .about-img { max-width: 460px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }

  /* mobile nav panel */
  .nav.open { display: flex; position: fixed; inset: 0 0 0 auto; width: min(78vw, 300px); flex-direction: column; justify-content: center; gap: 1.4rem; background: #fff; padding: 2rem; border-left: 1px solid var(--line); z-index: 55; }
  .nav.open a { font-size: 1.05rem; }
}
@media (max-width: 620px) {
  .collection-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .bag-label { display: none; }
  .bag-btn { width: 42px; padding: 0; }
  .modal-card { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .shop-controls { top: 65px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
