/* ──────────────────────────────────────────────────────────────
   TopGems unified design system — tokens
   3 widths · 8-step spacing · 7-step type · 5 button variants
   3 borders · 5 card kinds · brand palette (unchanged)
   ────────────────────────────────────────────────────────────── */
:root {
  /* widths */
  --w-wide:    1280px;
  --w-content: 1080px;
  --w-narrow:   720px;

  /* spacing — 8-step + 96 break */
  --s-1:  4px;
  --s-2:  8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  /* type scale — 7 ramps + eyebrow */
  --type-display:  56px;
  --type-h1:       36px;
  --type-h2:       28px;
  --type-h3:       20px;
  --type-body-lg:  17px;
  --type-body:     14px;
  --type-caption:  11px;
  --type-eyebrow:  10px;

  /* neutrals (kept) */
  --n-0:#ffffff; --n-25:#fafafa; --n-50:#f5f5f5; --n-100:#eeeeee;
  --n-150:#e5e7eb; --n-200:#d4d4d4; --n-300:#a3a3a3; --n-400:#737373;
  --n-500:#525252; --n-600:#404040; --n-700:#262626; --n-800:#171717; --n-900:#0a0a0a;

  /* brand (kept) */
  --navy:#1a3a5c;
  --navy-soft:#2c4a6c;
  --navy-50:#eef2f7;
  --gold:#c4a95a;
  --gold-soft:#d9c389;
  --gold-50:#faf6ec;
  --cream:#eeeae2;
  --muted-ink:#4a5d7a;
  --muted-2:#6b7a94;
  --hairline:#d4dde8;

  /* semantic */
  --emerald-700:#065f46; --emerald-600:#059669;
  --rose-50:#fef2f2; --rose-500:#f43f5e; --rose-600:#e11d48;
  --amber-50:#fffbeb; --amber-500:#f59e0b; --amber-700:#b45309; --amber-900:#78350f;
  --green-50:#f0fdf4; --green-600:#16a34a; --green-700:#15803d; --green-900:#14532d;

  /* fonts */
  --font-sans:'Inter','SF Pro Text','Helvetica Neue',sans-serif;
  --font-serif:'Cormorant Garamond','Playfair Display',Georgia,serif;
  --font-display:'Playfair Display','Cormorant Garamond',Georgia,serif;

  /* radii / shadows */
  --r-sm:2px; --r-md:4px;
  --shadow-sm:0 1px 2px rgba(15,23,42,.04);
  --shadow-md:0 6px 24px rgba(15,23,42,.08);
  --shadow-xl:0 20px 60px rgba(15,23,42,.18);

  /* borders (the only 3 allowed) */
  --border-hairline: 1px solid var(--hairline);
  --border-gold:     1px solid var(--gold);
}

* { box-sizing: border-box; }
html, body { margin:0; padding:0; }
body {
  font-family: var(--font-sans);
  color: var(--n-800);
  background: var(--n-0);
  font-size: var(--type-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width:100%; display:block; }
button { font-family: inherit; cursor:pointer; background:none; border:none; padding:0; color:inherit; }
a { color:inherit; text-decoration:none; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ── containers (the 3 widths) ───────────────────────────── */
.shell-wide    { max-width: var(--w-wide);    margin: 0 auto; padding: 0 var(--s-4); }
.shell-content { max-width: var(--w-content); margin: 0 auto; padding: 0 var(--s-4); }
.shell-narrow  { max-width: var(--w-narrow);  margin: 0 auto; padding: 0 var(--s-4); }
@media (min-width: 768px) {
  .shell-wide, .shell-content, .shell-narrow { padding: 0 var(--s-6); }
}
@media (min-width: 1024px) {
  .shell-wide    { padding: 0 var(--s-8); }
  .shell-content { padding: 0 var(--s-6); }
  .shell-narrow  { padding: 0 var(--s-6); }
}

/* ── typography ramps ────────────────────────────────────── */
.t-display {
  font-family: var(--font-display); font-style: normal; font-weight: 500;
  font-size: var(--type-display); line-height: 1.05; letter-spacing: -0.01em;
}
.t-h1 {
  font-family: var(--font-serif); font-weight: 300;
  font-size: var(--type-h1); line-height: 1.15; letter-spacing: 0;
  margin: 0;
}
.t-h2 {
  font-family: var(--font-serif); font-weight: 300;
  font-size: var(--type-h2); line-height: 1.2; margin: 0;
}
.t-h3 {
  font-family: var(--font-serif); font-weight: 500;
  font-size: var(--type-h3); line-height: 1.3; margin: 0;
}
.t-body-lg {
  font-size: var(--type-body-lg); line-height: 1.65;
}
.t-body { font-size: var(--type-body); line-height: 1.6; }
.t-caption { font-size: var(--type-caption); line-height: 1.5; }
.t-eyebrow {
  font-size: var(--type-eyebrow); letter-spacing: 0.25em;
  text-transform: uppercase; font-weight: 500; color: var(--muted-2);
}
.t-num { font-variant-numeric: tabular-nums; }

.text-navy { color: var(--navy); }
.text-gold { color: var(--gold); }
.text-mute { color: var(--muted-ink); }
.text-mute-2 { color: var(--muted-2); }

/* ── BUTTON — the only 5 variants × 3 sizes ─────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s-2);
  font-family: var(--font-sans); font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase;
  border: 1px solid transparent; border-radius: var(--r-sm);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap; cursor: pointer;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: 10px 18px; font-size: var(--type-caption); }
.btn-md { padding: 14px 28px; font-size: 12px; }
.btn-lg { padding: 18px 36px; font-size: 13px; }

.btn-primary { background: var(--navy); color: var(--n-0); border-color: var(--navy); }
.btn-primary:hover:not(:disabled) { background: #14304b; border-color: #14304b; }

.btn-secondary { background: var(--n-0); color: var(--navy); border-color: var(--navy); }
.btn-secondary:hover:not(:disabled) { background: var(--navy); color: var(--n-0); }

.btn-ghost { background: transparent; color: var(--navy); border-color: transparent; padding-left: 0; padding-right: 0; }
.btn-ghost:hover:not(:disabled) { color: var(--gold); }

.btn-wa { background: var(--n-0); color: var(--green-700); border-color: var(--green-600); }
.btn-wa:hover:not(:disabled) { background: var(--green-600); color: var(--n-0); }

.btn-destructive { background: var(--n-0); color: var(--rose-600); border-color: var(--rose-500); }
.btn-destructive:hover:not(:disabled) { background: var(--rose-500); color: var(--n-0); }

/* ── form inputs ────────────────────────────────────────── */
.input, .select, .textarea {
  width: 100%; padding: 11px 14px;
  border: var(--border-hairline); border-radius: var(--r-sm);
  background: var(--n-0); color: var(--n-800);
  font-size: 13px; transition: border-color .15s ease;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--navy); }
.input-error { border-color: var(--rose-500); }
.input::placeholder { color: var(--muted-2); }
.textarea { min-height: 96px; resize: vertical; }

/* ── gem-photo placeholders (unchanged from prototype) ──── */
.gem-photo {
  width: 100%; aspect-ratio: 1/1; border-radius: var(--r-sm); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-size: 28px; letter-spacing: 0.05em;
  position: relative;
}
.gem-photo .gem-mark {
  font-size: var(--type-caption); letter-spacing: 0.3em; text-transform: uppercase;
  position: absolute; bottom: 12px; right: 12px; opacity: 0.55;
}
.gem-photo.ruby { background: radial-gradient(circle at 30% 30%, #fda4af 0%, #be123c 60%, #4c0519 100%); color:#fff; }
.gem-photo.sapphire { background: radial-gradient(circle at 30% 30%, #93c5fd 0%, #1e40af 60%, #0c1338 100%); color:#fff; }
.gem-photo.emerald { background: radial-gradient(circle at 30% 30%, #6ee7b7 0%, #047857 60%, #052e16 100%); color:#fff; }
.gem-photo.spinel { background: radial-gradient(circle at 30% 30%, #fda4af 0%, #9f1239 60%, #4c0519 100%); color:#fff; }
.gem-photo.paraiba { background: radial-gradient(circle at 30% 30%, #5eead4 0%, #0d9488 60%, #042f2e 100%); color:#fff; }
.gem-photo.tanzanite { background: radial-gradient(circle at 30% 30%, #c4b5fd 0%, #6d28d9 60%, #2e1065 100%); color:#fff; }
.gem-photo.alexandrite { background: radial-gradient(circle at 30% 30%, #c4b5fd 0%, #047857 60%, #052e16 100%); color:#fff; }
.gem-photo.tourmaline { background: radial-gradient(circle at 30% 30%, #fdba74 0%, #9a3412 60%, #431407 100%); color:#fff; }
.gem-photo.aquamarine { background: radial-gradient(circle at 30% 30%, #bae6fd 0%, #0284c7 60%, #082f49 100%); color:#fff; }
.gem-photo.garnet { background: radial-gradient(circle at 30% 30%, #fdba74 0%, #b91c1c 60%, #450a0a 100%); color:#fff; }
.gem-photo.morganite { background: radial-gradient(circle at 30% 30%, #fce7f3 0%, #db2777 60%, #500724 100%); color:#fff; }
.gem-photo.peridot { background: radial-gradient(circle at 30% 30%, #d9f99d 0%, #65a30d 60%, #1a2e05 100%); color:#fff; }
.gem-photo.opal { background: radial-gradient(circle at 30% 30%, #fef3c7 0%, #fde68a 30%, #93c5fd 60%, #c4b5fd 100%); color:#374151; }
.gem-photo.amethyst { background: radial-gradient(circle at 30% 30%, #e9d5ff 0%, #7c3aed 60%, #2e1065 100%); color:#fff; }
.gem-photo.citrine { background: radial-gradient(circle at 30% 30%, #fef08a 0%, #ca8a04 60%, #422006 100%); color:#fff; }
.gem-photo.moonstone { background: radial-gradient(circle at 30% 30%, #f1f5f9 0%, #cbd5e1 50%, #64748b 100%); color:#1f2937; }
.gem-photo.topaz { background: radial-gradient(circle at 30% 30%, #fed7aa 0%, #c2410c 60%, #431407 100%); color:#fff; }
.gem-photo.zircon { background: radial-gradient(circle at 30% 30%, #fef9c3 0%, #fbbf24 60%, #78350f 100%); color:#fff; }
.gem-photo.heliodor { background: radial-gradient(circle at 30% 30%, #fef08a 0%, #d97706 60%, #451a03 100%); color:#fff; }
.gem-photo.apatite { background: radial-gradient(circle at 30% 30%, #67e8f9 0%, #0891b2 60%, #083344 100%); color:#fff; }
.gem-photo.beryl { background: radial-gradient(circle at 30% 30%, #bef264 0%, #4d7c0f 60%, #1a2e05 100%); color:#fff; }
.gem-photo.sphene { background: radial-gradient(circle at 30% 30%, #fef08a 0%, #84cc16 60%, #1a2e05 100%); color:#fff; }
.gem-photo.chrysoberyl { background: radial-gradient(circle at 30% 30%, #fef3c7 0%, #a16207 60%, #422006 100%); color:#fff; }
.gem-photo.clinohumite { background: radial-gradient(circle at 30% 30%, #fdba74 0%, #ea580c 60%, #431407 100%); color:#fff; }
.gem-photo.diamond { background: radial-gradient(circle at 30% 30%, #ffffff 0%, #e2e8f0 50%, #475569 100%); color:#1f2937; }
.gem-photo.lab-grown { background: radial-gradient(circle at 30% 30%, #f1f5f9 0%, #cbd5e1 40%, #64748b 80%, #1e293b 100%); color:#fff; }

.gem-tile {
  width: 100%; aspect-ratio: 1/1; border-radius: 9999px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04);
}

/* ── badges ─────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: 4px 8px;
  font-size: var(--type-eyebrow); letter-spacing: 0.18em;
  text-transform: uppercase; font-weight: 500;
  background: var(--navy); color: var(--n-0); border-radius: var(--r-sm);
}
.badge-investment { background: var(--navy); color: var(--n-0); }
.badge-rare { background: var(--amber-700); color: var(--n-0); }
.badge-noheat { background: #d1fae5; color: var(--green-700); padding: 3px 6px; font-size: 9px; }
.badge-sold { background: var(--n-0); color: var(--n-900); padding: 4px 16px; }
.badge-reserved { background: var(--amber-500); color: var(--n-0); }
.badge-new { background: var(--gold); color: var(--n-0); }

.pill {
  display: inline-block; padding: 3px 10px; border-radius: 9999px;
  font-size: var(--type-eyebrow); letter-spacing: 0.15em; text-transform: uppercase; font-weight: 500;
}
.pill-paid, .pill-delivered { background: #d1fae5; color: var(--green-700); }
.pill-pending, .pill-processing { background: #fef3c7; color: var(--amber-700); }
.pill-shipped { background: #dbeafe; color: #1e40af; }
.pill-cancelled { background: #fee2e2; color: var(--rose-600); }
.pill-vip-gold { background: #fef08a; color: #854d0e; }

/* ── hero gradient (HeroImmersive) — overridden in photos.css with real photo ── */

/* ── chip ───────────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: var(--s-1);
  padding: 4px 10px; font-size: var(--type-caption);
  background: var(--navy-50); color: var(--navy); border-radius: 9999px;
}
.chip button { color: var(--muted-2); display:inline-flex; }
.chip button:hover { color: var(--navy); }

/* ── modals & drawers ───────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.4); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: var(--s-4);
}
.modal-card {
  background: var(--n-0); border-radius: var(--r-md); box-shadow: var(--shadow-xl);
  width: 100%; max-width: 480px; max-height: 90vh; overflow: auto;
}
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.4); backdrop-filter: blur(2px); z-index: 100;
}
.drawer-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw);
  background: var(--n-0); box-shadow: var(--shadow-xl); z-index: 101;
  display: flex; flex-direction: column;
}

/* ── tab ────────────────────────────────────────────────── */
.tab {
  cursor: pointer; padding-bottom: var(--s-3); margin-bottom: -1px;
  font-size: var(--type-caption); letter-spacing: 0.2em; text-transform: uppercase;
  border-bottom: 2px solid transparent; color: var(--muted-2);
  transition: color .15s ease, border-color .15s ease;
  font-weight: 500;
}
.tab.active { color: var(--navy); border-bottom-color: var(--navy); }

/* ── spec table (PDP) ───────────────────────────────────── */
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td {
  padding: 10px 12px; font-size: var(--type-body); border-bottom: var(--border-hairline);
  text-align: left;
}
.spec-table th {
  font-weight: 400; color: var(--muted-2); text-transform: uppercase;
  letter-spacing: 0.12em; font-size: var(--type-eyebrow); width: 40%;
}
.spec-table td { color: var(--navy); }

/* ── topbar (announcement) ──────────────────────────────── */
.topbar {
  background: var(--navy); color: var(--n-0);
  font-size: var(--type-caption); letter-spacing: 0.2em; text-transform: uppercase;
  text-align: center; padding: 8px var(--s-4);
}

/* ── page transitions ───────────────────────────────────── */
.page-fade { animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: none; } }

/* ── divider gold (used inside HeroImmersive only) ──────── */
.divider-gold { display: block; width: 50px; height: 2px; background: var(--gold); }
.divider-gold-center { margin: var(--s-4) auto; }

/* ── responsive helpers ─────────────────────────────────── */
.hide-mobile { display: none; }
@media (min-width: 768px) { .hide-mobile { display: revert; } .show-mobile { display: none; } }

/* ── header sticky shadow ───────────────────────────────── */
.shadow-on-scroll { transition: box-shadow .15s ease; }
.shadow-on-scroll.scrolled { box-shadow: var(--shadow-md); }

/* hover lift on stone cards */
.stone-card:hover .gem-photo { transform: scale(1.04); transition: transform .5s ease; }
