/* ==========================================================
   MEXI GEMS — site styles
   Colours are taken from the logo: deep teal facets + gold.
   ========================================================== */
:root {
  --ivory: #faf7f1;
  --cream: #f3ede3;
  --paper: #ffffff;
  --ink: #17242a;
  --ink-soft: #4a5a61;
  --muted: #7d8a8f;
  --teal-900: #0d2d36;
  --teal-800: #123c47;
  --teal-600: #2b6372;
  --teal-100: #e3eef0;
  --gold: #b08a3e;
  --gold-light: #d8bd85;
  --gold-soft: #f4ead6;
  --line: #e6dfd3;
  --danger: #a33b2b;
  --ok: #2f6b4f;

  --serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(13, 45, 54, .05), 0 8px 28px rgba(13, 45, 54, .07);
  --shadow-lg: 0 24px 60px rgba(13, 45, 54, .22);
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
html, body { overflow-x: clip; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-800); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.15; color: var(--teal-900); margin: 0 0 .5em; letter-spacing: .005em; }
h1, h2, h3 { text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-size: .76rem; letter-spacing: .28em; text-transform: uppercase;
  color: var(--gold); font-weight: 500; margin-bottom: 14px;
}
.eyebrow::before, .eyebrow.both::after { content: ""; width: 28px; height: 1px; background: currentColor; }
.lede { font-size: 1.12rem; color: var(--ink-soft); max-width: 60ch; }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 28px; border-radius: 999px; border: 1px solid var(--teal-900);
  background: var(--teal-900); color: #fff; text-decoration: none; cursor: pointer;
  font-size: .82rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 500;
  transition: background .25s, color .25s, border-color .25s, transform .25s;
}
.btn:hover { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn.ghost { background: transparent; color: var(--teal-900); }
.btn.ghost:hover { background: var(--teal-900); color: #fff; border-color: var(--teal-900); }
.btn.gold { background: var(--gold); border-color: var(--gold); }
.btn.gold:hover { background: var(--teal-900); border-color: var(--teal-900); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Announcement + Header ---------- */
.announce {
  background: var(--teal-900); color: var(--gold-light);
  font-size: .74rem; letter-spacing: .22em; text-transform: uppercase; text-align: center;
  padding: 9px var(--gutter);
}
.announce a { color: #fff; text-decoration: none; }
@media (max-width: 640px) { .announce { letter-spacing: .14em; font-size: .68rem; } .announce .hide-sm { display: none; } }
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(250, 247, 241, .94);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 78px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--teal-900); }
.brand img { width: 40px; height: auto; }
.brand-name {
  font-family: var(--serif); font-size: 1.65rem; letter-spacing: .2em; font-weight: 500;
  background: linear-gradient(180deg, #c9a45a 0%, #a77d32 55%, #8d6526 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; white-space: nowrap;
}
.nav { display: flex; align-items: center; gap: 30px; }
.nav a {
  position: relative; color: var(--ink); text-decoration: none;
  font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 500; padding: 6px 0;
}
.nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: var(--gold); transition: right .3s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--teal-900); }
.nav a:hover::after, .nav a[aria-current="page"]::after { right: 0; }
.nav a.btn, .nav a.btn:hover, .nav a.btn[aria-current="page"] { padding: 11px 20px; color: #fff; }
.nav a.btn[aria-current="page"] { background: var(--gold); border-color: var(--gold); }
.nav a.btn::after { display: none; }
.menu-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--teal-900); }
.menu-toggle svg { width: 28px; height: 28px; }

@media (max-width: 980px) {
  /* backdrop-filter would trap the fixed drawer inside the header, so drop it on small screens */
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--ivory); }
  body.nav-open .site-header { z-index: 70; }
  .menu-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(340px, 86vw); background: var(--ivory);
    flex-direction: column; align-items: stretch; gap: 0; padding: 96px 28px 28px;
    transform: translateX(100%); visibility: hidden; z-index: 60;
    transition: transform .35s ease, visibility 0s linear .35s;
  }
  body.nav-open .nav { visibility: visible; box-shadow: var(--shadow-lg); transition: transform .35s ease; }
  .nav a { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: .86rem; }
  .nav a::after { display: none; }
  .nav a.btn, .nav a.btn[aria-current="page"] { margin-top: 22px; border-bottom: 0; padding: 15px 20px; }
  body.nav-open .nav { transform: none; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(13, 45, 54, .35); z-index: 55; }
  .menu-toggle { position: relative; z-index: 61; }
  .brand-name { font-size: 1.35rem; letter-spacing: .16em; }
  .brand img { width: 34px; }
  .header-inner { height: 68px; }
}

/* ---------- Hero banner ---------- */
.hero { position: relative; background: #f3eee6; }
.hero picture, .hero img { width: 100%; }
.hero img { width: 100%; height: auto; aspect-ratio: 2056 / 765; object-fit: cover; }
.hero-cta {
  position: absolute; left: 50%; bottom: 9%; transform: translateX(-50%);
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
}
@media (max-width: 720px) {
  .hero-cta { position: static; transform: none; padding: 22px var(--gutter) 6px; background: var(--ivory); }
  .hero-cta .btn { flex: 1 1 auto; }
}

/* ---------- Trust strip ---------- */
.trust { border-bottom: 1px solid var(--line); background: var(--paper); }
.trust ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.trust li {
  display: flex; align-items: center; justify-content: center; gap: 12px; padding: 20px 12px;
  font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); text-align: left;
}
.trust li + li { border-left: 1px solid var(--line); }
.trust svg { width: 22px; height: 22px; color: var(--gold); flex: none; }
@media (max-width: 860px) {
  .trust ul { grid-template-columns: repeat(2, 1fr); }
  .trust li:nth-child(3) { border-left: 0; }
  .trust li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .trust li { font-size: .72rem; letter-spacing: .1em; justify-content: flex-start; padding: 16px 14px; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section.tight { padding-top: clamp(40px, 5vw, 64px); }
#collection { scroll-margin-top: 96px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 34px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head p { margin: 8px 0 0; color: var(--ink-soft); }

.page-hero {
  background:
    radial-gradient(1200px 300px at 50% -60px, rgba(176, 138, 62, .12), transparent 70%),
    linear-gradient(180deg, var(--cream), var(--ivory));
  border-bottom: 1px solid var(--line);
  padding: clamp(52px, 8vw, 96px) 0 clamp(40px, 6vw, 72px);
  text-align: center;
}
.page-hero h1 { margin-bottom: 14px; }
.page-hero .lede { margin: 0 auto; }
.crumbs { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--gold); }

/* ---------- Collection toolbar ---------- */
.toolbar {
  display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center; justify-content: space-between;
  padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); margin-bottom: 28px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: var(--ivory); border-radius: 999px; padding: 7px 15px; cursor: pointer;
  font-size: .8rem; letter-spacing: .06em; color: var(--ink-soft); transition: all .2s;
}
.chip:hover { border-color: var(--gold-light); color: var(--teal-900); }
.chip[aria-pressed="true"] { background: var(--teal-900); color: #fff; border-color: var(--teal-900); }
.toolbar-right { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.select {
  appearance: none; -webkit-appearance: none; border: 1px solid var(--line); background: var(--ivory)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2317242a' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 14px center;
  border-radius: 999px; padding: 8px 38px 8px 16px; font-size: .84rem; cursor: pointer;
}
.result-count { font-size: .82rem; color: var(--muted); letter-spacing: .04em; }

/* ---------- Gem grid ---------- */
.gem-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px; }
@media (max-width: 1100px) { .gem-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .gem-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } }

.gem-card {
  position: relative; display: flex; flex-direction: column; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s;
}
.gem-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--gold-light); }
.gem-media {
  position: relative; aspect-ratio: 4 / 5; background: #e9e4dc; overflow: hidden; cursor: pointer; border: 0; padding: 0; width: 100%;
}
.gem-media img, .gem-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gem-media video { opacity: 0; transition: opacity .5s; }
.gem-media video.playing { opacity: 1; }
.gem-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2; background: rgba(255, 255, 255, .92); color: var(--teal-900);
  font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; font-weight: 500;
}
.gem-badge.heat { background: rgba(13, 45, 54, .86); color: var(--gold-light); }
.gem-play {
  position: absolute; right: 12px; bottom: 12px; z-index: 2; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255, 255, 255, .92); display: grid; place-items: center; color: var(--teal-900);
}
.gem-play svg { width: 14px; height: 14px; margin-left: 2px; }
.gem-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.gem-code { font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); font-weight: 500; }
.gem-title { font-family: var(--serif); font-size: 1.35rem; color: var(--teal-900); line-height: 1.2; margin: 0; }
.gem-meta { font-size: .84rem; color: var(--muted); }
.gem-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.gem-price { font-family: var(--serif); font-size: 1.4rem; color: var(--ink); font-weight: 600; }
.gem-view {
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--teal-800); background: none; border: 0; cursor: pointer;
  padding: 6px 0; border-bottom: 1px solid var(--gold-light);
}
.gem-view:hover { color: var(--gold); }
@media (max-width: 760px) {
  .gem-body { padding: 12px 12px 14px; }
  .gem-title { font-size: 1.12rem; }
  .gem-price { font-size: 1.15rem; }
  .gem-meta { font-size: .76rem; }
  .gem-view { font-size: .64rem; letter-spacing: .1em; }
  .gem-badge { font-size: .58rem; padding: 4px 8px; top: 8px; left: 8px; }
}
.empty { text-align: center; padding: 60px 20px; color: var(--muted); grid-column: 1 / -1; }

/* ---------- Gem modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(9, 26, 31, .72); backdrop-filter: blur(4px); }
.modal-panel {
  position: relative; background: var(--paper); border-radius: 20px; width: min(980px, 100%); max-height: calc(100vh - 40px);
  overflow: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); box-shadow: var(--shadow-lg);
  animation: pop .3s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-panel:focus { outline: none; }
.modal-media { position: relative; background: #111; min-height: 520px; }
.modal-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #111; }
.modal-info { padding: clamp(24px, 4vw, 44px); }
.modal-info h2 { margin-bottom: 4px; }
.modal-price { font-family: var(--serif); font-size: 2rem; color: var(--ink); font-weight: 600; margin: 10px 0 22px; }
.spec-table { width: 100%; border-collapse: collapse; margin-bottom: 26px; font-size: .95rem; }
.spec-table th, .spec-table td { text-align: left; padding: 11px 0; border-bottom: 1px solid var(--line); }
.spec-table th { color: var(--muted); font-weight: 400; width: 44%; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.modal-actions { display: grid; gap: 10px; }
.modal-note { font-size: .82rem; color: var(--muted); margin-top: 16px; }
.modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 3; width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .95); cursor: pointer; display: grid; place-items: center; box-shadow: var(--shadow);
}
.modal-close svg { width: 18px; height: 18px; }
@media (max-width: 760px) {
  .modal { padding: 0; align-items: flex-end; }
  .modal-panel { grid-template-columns: 1fr; border-radius: 20px 20px 0 0; max-height: 94vh; }
  .modal-media { min-height: 0; height: 50vh; }
}
body.modal-open { overflow: hidden; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--teal-900); color: #dbe7e9; position: relative; overflow: hidden; }
.cta-band::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(600px 260px at 85% 0%, rgba(216, 189, 133, .18), transparent 70%),
              radial-gradient(500px 240px at 0% 100%, rgba(43, 99, 114, .5), transparent 70%);
}
.cta-band .wrap { position: relative; display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.cta-band h2 { color: #fff; }
.cta-band .eyebrow { color: var(--gold-light); }
.cta-band p { color: #bcd0d4; max-width: 56ch; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.cta-band .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, .5); }
.cta-band .btn.ghost:hover { background: #fff; color: var(--teal-900); }
@media (max-width: 860px) { .cta-band .wrap { grid-template-columns: 1fr; } .cta-actions { justify-content: flex-start; } }

/* ---------- About ---------- */
.about-intro { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.about-logo { background: var(--paper); border: 1px solid var(--line); border-radius: 24px; padding: clamp(28px, 5vw, 60px); box-shadow: var(--shadow); }
.about-logo img { max-width: 340px; width: 100%; margin: 0 auto; }
.about-intro p { font-size: 1.08rem; color: var(--ink-soft); }
.pillars { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.pillar { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.pillar .num { font-family: var(--serif); color: var(--gold); font-size: 1.1rem; letter-spacing: .1em; }
.pillar h3 { margin: 6px 0 10px; font-size: 1.7rem; }
.pillar p { color: var(--ink-soft); margin: 0; }
.quote { text-align: center; font-family: var(--serif); font-size: clamp(1.6rem, 3.4vw, 2.4rem); color: var(--teal-900); line-height: 1.3; max-width: 22ch; margin: 0 auto; font-style: italic; }
@media (max-width: 860px) { .about-intro, .pillars { grid-template-columns: 1fr; } .about-logo { max-width: 360px; margin: 0 auto; } }

/* ---------- Forms ---------- */
.form-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(28px, 5vw, 56px); align-items: start; }
@media (max-width: 920px) { .form-layout { grid-template-columns: 1fr; } }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.form-card { overflow: hidden; }
.form-card-head { background: var(--teal-900); color: #fff; padding: 28px clamp(22px, 4vw, 40px); }
.form-card-head .brandline { display: flex; align-items: center; gap: 10px; color: var(--gold-light); font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 10px; }
.form-card-head .brandline img { width: 22px; filter: brightness(1.1); }
.form-card-head h2 { color: #fff; margin: 0 0 6px; font-size: clamp(1.7rem, 3vw, 2.2rem); }
.form-card-head p { color: #bcd0d4; margin: 0; }
.form-card-head small { display: inline-flex; gap: 8px; align-items: center; margin-top: 12px; color: var(--gold-light); letter-spacing: .04em; }
form.mg-form { padding: clamp(22px, 4vw, 40px); }
fieldset { border: 0; padding: 0; margin: 0 0 30px; min-width: 0; }
fieldset + fieldset { padding-top: 28px; border-top: 1px solid var(--line); }
legend { float: left; width: 100%; font-family: var(--serif); font-size: 1.55rem; color: var(--teal-900); padding: 0; margin-bottom: 4px; }
legend + * { clear: both; }
.fs-help { color: var(--muted); font-size: .92rem; margin: 0 0 18px; }
.field { margin-bottom: 18px; }
.field > label, .group-label { display: block; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px; font-weight: 500; }
.req { color: var(--gold); }
.input, textarea.input {
  width: 100%; border: 1px solid var(--line); background: var(--ivory); border-radius: 10px; padding: 13px 16px; font-size: 1rem;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.input:focus { outline: none; border-color: var(--gold); background: #fff; box-shadow: 0 0 0 4px rgba(176, 138, 62, .14); }
textarea.input { min-height: 140px; resize: vertical; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row-budget { display: grid; grid-template-columns: 1fr 140px; gap: 12px; }
@media (max-width: 560px) { .row-2 { grid-template-columns: 1fr; } }
.options { display: flex; flex-wrap: wrap; gap: 8px; }
.option { position: relative; }
.option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.option span {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--ivory); border-radius: 999px;
  padding: 9px 16px; font-size: .9rem; color: var(--ink-soft); cursor: pointer; transition: all .2s; user-select: none;
}
.option span::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #b9b1a3; background: #fff; transition: all .2s; flex: none; }
.option input:checked + span { border-color: var(--teal-900); background: var(--teal-100); color: var(--teal-900); }
.option input:checked + span::before { border: 4px solid var(--teal-900); }
.option input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.field-error { color: var(--danger); font-size: .84rem; margin-top: 6px; display: none; }
.field.invalid .input { border-color: var(--danger); }
.field.invalid .field-error { display: block; }
.form-foot { display: flex; flex-direction: column; gap: 12px; }
.form-foot small { color: var(--muted); font-size: .84rem; }
.form-status { display: none; border-radius: 12px; padding: 16px 18px; font-size: .96rem; }
.form-status.show { display: block; }
.form-status.ok { background: #e8f3ec; color: var(--ok); border: 1px solid #c6e2d1; }
.form-status.err { background: #f9e9e6; color: var(--danger); border: 1px solid #efcdc6; }
.hp { position: absolute; left: -9999px; }

.side-card { padding: clamp(24px, 3vw, 34px); }
.side-card h3 { font-size: 1.6rem; }
.contact-list { list-style: none; padding: 0; margin: 0 0 8px; }
.contact-list li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-list li:last-child { border-bottom: 0; }
.contact-list svg { width: 20px; height: 20px; color: var(--gold); flex: none; margin-top: 3px; }
.contact-list strong { display: block; font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.contact-list a { text-decoration: none; color: var(--ink); }
.contact-list a:hover { color: var(--gold); }
.map { border: 0; width: 100%; height: 260px; border-radius: var(--radius); margin-top: 18px; filter: grayscale(.25); }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 0 0 18px 46px; color: var(--ink-soft); }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--gold-light); color: var(--gold); display: grid; place-items: center; font-family: var(--serif); font-size: 1.05rem;
}
.steps strong { color: var(--teal-900); display: block; font-weight: 500; }

/* ---------- Policy pages ---------- */
.legal { max-width: 820px; margin: 0 auto; }
.legal .updated { display: inline-block; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 26px; }
.legal h2 { font-size: 1.75rem; margin: 2em 0 .5em; padding-top: 1em; border-top: 1px solid var(--line); }
.legal ul { padding-left: 1.2em; margin: 0 0 1.2em; }
.legal li { margin-bottom: .35em; }
.legal li::marker { color: var(--gold); }
.legal p, .legal li { color: var(--ink-soft); }
.legal-nav { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 24px; }
.legal-nav .chip { text-decoration: none; }
.legal-nav .chip[aria-current="page"] { background: var(--teal-900); border-color: var(--teal-900); color: #fff; }

/* FAQ */
.faq { max-width: 860px; margin: 0 auto; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; transition: border-color .2s; }
.faq details[open] { border-color: var(--gold-light); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 60px 20px 24px; position: relative;
  font-family: var(--serif); font-size: 1.3rem; color: var(--teal-900); line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 24px; top: 50%; width: 12px; height: 12px; margin-top: -8px;
  border-right: 1.5px solid var(--gold); border-bottom: 1.5px solid var(--gold); transform: rotate(45deg); transition: transform .25s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq .answer { padding: 0 24px 18px; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer { background: var(--teal-900); color: #b7c9cd; padding: 72px 0 0; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand img { width: 150px; background: #fff; border-radius: 16px; padding: 12px; }
.footer-brand p { margin-top: 18px; max-width: 30ch; color: #9fb6bb; }
.site-footer h4 { font-family: var(--sans); color: var(--gold-light); font-size: .76rem; letter-spacing: .24em; text-transform: uppercase; font-weight: 500; margin-bottom: 18px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: #dbe7e9; text-decoration: none; }
.site-footer a:hover { color: var(--gold-light); }
.store-name { font-family: var(--serif); font-size: 1.4rem; color: #fff; margin-bottom: 10px; }
.footer-contact li { display: flex; gap: 10px; }
.footer-contact svg { width: 16px; height: 16px; color: var(--gold-light); flex: none; margin-top: 5px; }
.socials { display: flex; flex-direction: column; gap: 10px; }
.social-link { display: inline-flex; align-items: center; gap: 12px; }
.social-link .ico { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(216, 189, 133, .4); display: grid; place-items: center; transition: all .25s; }
.social-link .ico svg { width: 17px; height: 17px; }
.social-link:hover .ico { background: var(--gold); border-color: var(--gold); color: #fff; }
.footer-bottom { margin-top: 56px; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 22px; padding-bottom: 22px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .82rem; color: #8aa3a9; }
.footer-bottom a { color: #8aa3a9; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; gap: 34px; } .site-footer { padding-top: 52px; } }

/* ---------- Reveal on scroll ---------- */
/* Content is always visible at rest; JS adds .pre only to sections that start below the first screen */
.reveal { transition: opacity .7s ease, transform .7s ease; }
.reveal.pre { opacity: 0; transform: translateY(18px); }
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal, .reveal.pre { opacity: 1; transform: none; transition: none; }
  .gem-card, .modal-panel { transition: none; animation: none; }
}

/* Back to top */
.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 46px; height: 46px; border-radius: 50%;
  background: var(--teal-900); color: #fff; border: 0; display: grid; place-items: center; cursor: pointer;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .3s;
}
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top svg { width: 18px; height: 18px; }
.input.select { border-radius: 10px; padding: 13px 38px 13px 14px; background: var(--ivory) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2317242a' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 14px center; }
.map-link { display: grid; place-items: center; height: auto; min-height: 96px; padding: 18px; text-align: center; background: var(--cream); color: var(--teal-800); text-decoration: none; font-size: .9rem; border: 1px solid var(--line); }
.map-link:hover { color: var(--gold); }

/* ==========================================================
   Accounts, admin and saved gems (Node.js version)
   ========================================================== */
.field-help { color: var(--muted); font-size: .84rem; margin: 6px 0 0; }
.optional { text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 400; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.link-btn {
  background: none; border: 0; padding: 4px 0; cursor: pointer; color: var(--teal-800); font-size: .78rem; letter-spacing: .14em;
  text-transform: uppercase; text-decoration: none; border-bottom: 1px solid var(--gold-light); font-weight: 500;
}
.link-btn:hover { color: var(--gold); }
.link-btn[disabled] { opacity: .5; cursor: progress; }
.danger-text { color: var(--danger); border-bottom-color: #e7b9b1; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger:hover { background: #7f2d20; border-color: #7f2d20; }
.btn.ghost.danger { background: transparent; color: var(--danger); border-color: #e2b4ab; }
.btn.ghost.danger:hover { background: var(--danger); color: #fff; }
.btn.ghost.light { color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn.ghost.light:hover { background: #fff; color: var(--teal-900); border-color: #fff; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; color: var(--ink-soft); cursor: pointer; text-transform: none; letter-spacing: 0; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--teal-900); flex: none; }
.checks { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-bottom: 18px; }

[hidden] { display: none !important; }

/* Header account link. The logo never shrinks; on narrower laptop screens the menu gets more compact. */
.brand { flex: none; }
.nav a { white-space: nowrap; }
.nav-account { display: inline-flex !important; align-items: center; gap: 8px; }
.nav-account svg { width: 18px; height: 18px; flex: none; }
@media (max-width: 1279px) and (min-width: 981px) {
  .nav { gap: 18px; }
  .nav a { letter-spacing: .12em; font-size: .74rem; }
  .nav a.btn, .nav a.btn[aria-current="page"] { padding: 10px 14px; }
  .brand-name { font-size: 1.4rem; letter-spacing: .14em; }
}
@media (max-width: 1100px) and (min-width: 981px) {
  .nav { gap: 16px; }
  /* just the person icon here; its name ("Log in" / "My account") is still read out by screen readers */
  .nav-account span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav-account svg { width: 20px; height: 20px; }
}

/* Pop-up messages */
.toast-box { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toast { background: var(--teal-900); color: #fff; padding: 13px 18px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: .95rem; text-align: center; animation: toastIn .25s ease; transition: opacity .35s, transform .35s; }
.toast.err { background: var(--danger); }
.toast.hide { opacity: 0; transform: translateY(8px); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Save (heart) buttons */
.gem-fav {
  position: absolute; top: 10px; right: 10px; z-index: 3; width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .92); color: var(--teal-900); display: grid; place-items: center; box-shadow: 0 2px 8px rgba(13, 45, 54, .12);
  transition: transform .2s, background .2s, color .2s;
}
.gem-fav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.gem-fav:hover { transform: scale(1.08); }
.gem-fav.on { color: #b23a48; }
.gem-fav.on svg { fill: currentColor; }
.gem-fav.wide { position: static; width: 100%; height: auto; border-radius: 999px; padding: 13px 20px; gap: 10px; display: inline-flex; justify-content: center;
  border: 1px solid var(--line); box-shadow: none; font-size: .82rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 500; background: transparent; }
.gem-fav.wide:hover { transform: none; border-color: var(--gold-light); }
@media (max-width: 760px) { .gem-fav { width: 32px; height: 32px; top: 8px; right: 8px; } .gem-fav svg { width: 15px; height: 15px; } }

/* Log in / sign up pages */
.auth-section {
  padding: clamp(40px, 7vw, 90px) 0;
  background: radial-gradient(900px 300px at 50% -80px, rgba(176, 138, 62, .14), transparent 70%), linear-gradient(180deg, var(--cream), var(--ivory));
  min-height: 60vh;
}
.auth-wrap { display: grid; place-items: center; }
.auth-card { width: min(470px, 100%); padding: clamp(26px, 5vw, 44px); }
.auth-brand { display: flex; align-items: center; gap: 10px; color: var(--gold); font-family: var(--serif); font-size: 1.25rem; letter-spacing: .2em; margin-bottom: 18px; }
.auth-title { font-size: clamp(1.9rem, 4vw, 2.4rem); margin-bottom: 6px; }
.auth-sub { color: var(--ink-soft); margin-bottom: 24px; }
.auth-row { margin: -6px 0 18px; font-size: .92rem; }
.auth-switch { margin: 22px 0 0; text-align: center; color: var(--ink-soft); font-size: .95rem; }
.auth-form .form-status { margin-bottom: 14px; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 74px; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; cursor: pointer; color: var(--teal-800);
  font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; padding: 8px; }

/* Customer + admin dashboards */
.dash-hero { background: var(--teal-900); color: #dbe7e9; padding: clamp(34px, 5vw, 56px) 0; position: relative; overflow: hidden; }
.dash-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 240px at 90% 0%, rgba(216, 189, 133, .2), transparent 70%); pointer-events: none; }
.dash-hero-inner { position: relative; display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-end; justify-content: space-between; }
.dash-hero .eyebrow { color: var(--gold-light); }
.dash-title { color: #fff; margin: 0 0 6px; font-size: clamp(2rem, 4.4vw, 3rem); }
.dash-sub { margin: 0; color: #a9c0c5; }
.dash-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 26px; align-items: start; }
@media (max-width: 960px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-main, .dash-side { display: grid; gap: 26px; min-width: 0; }
.dash-card { padding: clamp(20px, 3vw, 30px); min-width: 0; }
.dash-card h2 { font-size: 1.7rem; margin-bottom: 16px; }
.dash-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.dash-card-head h2 { margin: 0; }
.stack-form .btn { margin-top: 4px; }
.stack-form .form-status { margin-bottom: 12px; }
.danger-zone summary { cursor: pointer; font-family: var(--serif); font-size: 1.3rem; color: var(--danger); list-style: none; }
.danger-zone summary::-webkit-details-marker { display: none; }
.danger-zone[open] summary { margin-bottom: 14px; }
.empty-state { text-align: center; padding: 26px 10px; color: var(--ink-soft); }
.empty-state p { margin-bottom: 14px; }

.req-list { display: grid; gap: 12px; }
.req { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; background: var(--ivory); }
.req-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 4px; }
.req-top strong { color: var(--teal-900); font-weight: 500; }
.req-line { margin: 2px 0 0; font-size: .94rem; overflow-wrap: anywhere; }

.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 500; white-space: nowrap;
  background: var(--teal-100); color: var(--teal-800); }
.pill-new { background: var(--gold-soft); color: #7a5a1d; }
.pill-confirmed, .pill-replied { background: #e3f1e8; color: var(--ok); }
.pill-completed, .pill-archived, .pill-read { background: #eceff0; color: #4f5d62; }
.pill-cancelled { background: #f6e3df; color: var(--danger); }
.pill-admin { background: var(--teal-900); color: var(--gold-light); }

.fav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.fav { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--paper); display: flex; flex-direction: column; min-width: 0; }
.fav-media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.fav-body { padding: 10px 12px 12px; display: grid; gap: 2px; }
.fav-title { font-family: var(--serif); font-size: 1.05rem; color: var(--teal-900); text-decoration: none; line-height: 1.25; }
.fav-price { font-weight: 600; font-family: var(--serif); font-size: 1.1rem; }
.fav-actions { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; }
.fav-actions .link-btn { font-size: .66rem; }

/* Admin */
.admin-page .site-header { position: relative; }
.admin-banner { background: #fbf1dc; border-bottom: 1px solid #ecd9ae; color: #6b4e14; padding: 12px 0; font-size: .95rem; }
.admin-tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.admin-tabs button {
  background: none; border: 0; border-bottom: 2px solid transparent; padding: 12px 14px; cursor: pointer; font-size: .8rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-soft); font-weight: 500; display: inline-flex; gap: 8px; align-items: center; margin-bottom: -1px;
}
.admin-tabs button[aria-selected="true"] { color: var(--teal-900); border-bottom-color: var(--gold); }
.admin-tabs .count { background: var(--gold); color: #fff; border-radius: 999px; font-size: .68rem; letter-spacing: 0; padding: 1px 7px; }
.admin-tabs button, .chip, .stat, .gem-fav, .link-btn { -webkit-tap-highlight-color: transparent; }
@media (max-width: 560px) {
  /* phones: the six tabs as a tidy 3 × 2 grid instead of three ragged rows */
  .admin-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
  .admin-tabs button { justify-content: center; padding: 12px 4px; font-size: .7rem; letter-spacing: .08em; gap: 5px; }
  .admin-tabs .count { font-size: .62rem; padding: 1px 6px; }
}
.admin-panel { display: grid; gap: 20px; }
.admin-panel[hidden] { display: none; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-align: left; cursor: pointer; display: grid; gap: 4px; transition: border-color .2s, transform .2s; }
.stat:hover { border-color: var(--gold-light); transform: translateY(-2px); }
.stat-n { font-family: var(--serif); font-size: 2.2rem; color: var(--teal-900); line-height: 1; font-variant-numeric: tabular-nums; }
.stat-l { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.admin-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.admin-toolbar .search { max-width: 320px; flex: 1 1 220px; padding: 10px 14px; }
.chip-n { opacity: .7; font-size: .76em; margin-left: 2px; }
.table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.admin-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.admin-table th { text-align: left; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--ivory); white-space: nowrap; }
.admin-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tr.clickable { cursor: pointer; }
.admin-table tr.clickable:hover, .admin-table tr.clickable:focus-visible { background: var(--ivory); }
.admin-table tr.is-new td:nth-child(2) { font-weight: 600; color: var(--teal-900); }
.admin-table tr.is-hidden td { opacity: .55; }
.admin-table td.clip { max-width: 340px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-table td.nw { white-space: nowrap; }
.thumb { width: 46px; height: 58px; object-fit: cover; border-radius: 6px; background: #e9e4dc; }
.price-input { width: 110px; padding: 8px 10px; }
.row-actions { white-space: nowrap; }
.row-actions .link-btn + .link-btn { margin-left: 14px; }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: #d9d2c5; border-radius: 999px; transition: background .2s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.switch input:checked + span { background: var(--teal-900); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.status-list { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 10px 20px; margin: 0 0 20px; }
.status-list dt { color: var(--muted); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.status-list dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .status-list { grid-template-columns: 1fr; } .status-list dd { margin-bottom: 8px; } }

/* Side panel used for details and the gem form */
.drawer { position: fixed; inset: 0; z-index: 120; display: none; }
.drawer.open { display: block; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(9, 26, 31, .55); }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--paper); overflow-y: auto;
  padding: clamp(24px, 4vw, 40px); padding-top: 64px; box-shadow: var(--shadow-lg); animation: drawerIn .25s ease;
}
.drawer-panel:focus { outline: none; }
@keyframes drawerIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-panel h2 { margin-bottom: 16px; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.detail-list { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr); gap: 8px 16px; margin: 0 0 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.detail-list dt { color: var(--muted); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; padding-top: 2px; }
.detail-list dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.media-pick { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 18px; margin-bottom: 22px; }
@media (max-width: 480px) {
  .media-pick { grid-template-columns: 112px minmax(0, 1fr); gap: 14px; }
  .media-controls .btn { padding: 12px 14px; font-size: .72rem; letter-spacing: .1em; white-space: normal; }
}
.media-preview { aspect-ratio: 9 / 14; background: #111; border-radius: var(--radius-sm); overflow: hidden; display: grid; place-items: center; }
.media-preview video { width: 100%; height: 100%; object-fit: cover; }
.media-preview .muted { color: #9aa7ab; font-size: .85rem; }
.media-controls { display: grid; gap: 10px; align-content: start; }
.file-btn, .file-link { cursor: pointer; position: relative; }
.file-btn:focus-within, .file-link:focus-within { outline: 2px solid var(--gold); outline-offset: 3px; }
.progress { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--gold); transition: width .2s; }
.poster-preview { width: 72px; height: 90px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
