/* Toshi Treasures — design tokens + luxury storefront
   Surface: Home = Decide/Learn (editorial split, not a 3-card SaaS hero)
             Shop = Explore
             PDP  = Inspect
             Checkout = Configure
*/

:root {
  --void: #050505;
  --ink: #09090b;
  --elev: #111114;
  --card: #161619;
  --card-2: #1c1c20;
  --line: #2b271c;
  --line-soft: #1d1c18;
  --cream: #f3ead8;
  --cream-2: #d8cfbb;
  --mute: #8d8678;
  --gold: #c6a45a;
  --gold-2: #e6d3a0;
  --btc: #f7931a;
  --btc-2: #c47214;
  --laser: #d93a3a;
  --good: #4aa37a;
  --bad: #c45c4a;
  --serif: "Cormorant Garamond", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Figtree", "Avenir Next", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --max: 1180px;
  --wide: 1360px;
  --pad: clamp(1.15rem, 4vw, 2.5rem);
  --radius: 2px;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--void);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.55;
  letter-spacing: 0.01em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--btc);
  color: #111;
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip:focus { left: 0.6rem; top: 0.6rem; }

/* ---------- chrome ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem var(--pad);
  background: rgba(5, 5, 5, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.brand-seal {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  overflow: hidden;
  background: #f4ead3;
  flex: 0 0 auto;
  box-shadow: 0 0 0 3px rgba(198, 164, 90, 0.12);
}
.brand-seal img { width: 100%; height: 100%; object-fit: cover; }
.brand-word {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand-word strong {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.brand-word span {
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 0.22rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.45rem;
}
.nav a {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream-2);
}
.nav a[aria-current="page"],
.nav a:hover { color: var(--gold-2); }

.icon-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--cream);
  display: grid;
  place-items: center;
}
.icon-btn .badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--btc);
  color: #1a1004;
  font-size: 0.62rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.icon-btn .badge:empty,
.icon-btn .badge[data-n="0"] { display: none; }

.nav-toggle { display: none; }

.site-footer {
  margin-top: 5rem;
  border-top: 1px solid var(--line);
  padding: 3rem var(--pad) 2rem;
  background: #070708;
}
.foot-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
}
.site-footer h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.15rem;
  margin: 0 0 0.8rem;
}
.site-footer p, .site-footer a, .site-footer li {
  color: var(--mute);
  font-size: 0.92rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0.35rem 0; }
.site-footer a:hover { color: var(--gold-2); }
.foot-end {
  max-width: var(--max);
  margin: 2.4rem auto 0;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--mute);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.foot-badge {
  max-width: var(--max);
  margin: 1rem auto 0;
}
.gm-badge {
  display: inline-flex;
  line-height: 0;
  opacity: 0.95;
}
.gm-badge:hover { opacity: 1; }
.gm-badge img {
  display: block;
  height: 24px;
  width: auto;
  background: none;
  padding: 0;
  border: 0;
}
.gm-badge-wrap {
  margin: 0.85rem 0 0;
  text-align: center;
}

/* ---------- type + layout ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); width: 100%; min-width: 0; }
.wrap-wide { max-width: var(--wide); margin: 0 auto; padding: 0 var(--pad); width: 100%; min-width: 0; }

.kicker {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.7rem;
}
.kicker-long {
  letter-spacing: 0.12em;
  max-width: 28rem;
  line-height: 1.45;
}
h1, h2, .display {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 0.95;
  text-wrap: pretty;
}
h1 { font-size: clamp(3.1rem, 8vw, 6.4rem); margin: 0 0 0.6rem; }
h2 { font-size: clamp(2rem, 4.4vw, 3.3rem); margin: 0 0 0.8rem; }
h3 { font-family: var(--serif); font-weight: 500; font-size: 1.45rem; }

.lede {
  font-size: 1.12rem;
  color: var(--cream-2);
  max-width: 38rem;
}
.mute { color: var(--mute); }
.gold { color: var(--gold-2); }
.btc { color: var(--btc); }
.mono { font-family: var(--mono); }

hr.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 3.5rem 0;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0.7rem 1.25rem;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold-2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.74rem;
  transition: 160ms ease;
}
.btn:hover { background: var(--gold); color: #16120a; }
.btn-fill {
  background: var(--btc);
  border-color: var(--btc);
  color: #1a1004;
  font-weight: 650;
}
.btn-fill:hover { background: #ffaa33; border-color: #ffaa33; color: #1a1004; }
.btn-ghost { border-color: var(--line); color: var(--cream-2); }
.btn-ghost:hover { border-color: var(--cream-2); background: transparent; color: var(--cream); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: end;
  padding: clamp(2rem, 6vw, 4.5rem) var(--pad) 2.4rem;
  max-width: var(--wide);
  margin: 0 auto;
  min-height: min(86vh, 760px);
  width: 100%;
  min-width: 0;
}
.hero-copy { min-width: 0; }
.lede, .hero-note { overflow-wrap: anywhere; }
.hero-copy .display-sub {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-style: italic;
  color: var(--cream-2);
  margin: 0.2rem 0 1.2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.6rem; }
.hero-seal-wrap {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
}
.hero-seal {
  width: min(100%, 420px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: #efe4cc;
  overflow: hidden;
  box-shadow:
    0 0 0 10px rgba(198, 164, 90, 0.08),
    0 40px 90px rgba(0, 0, 0, 0.55);
}
.hero-seal img { width: 100%; height: 100%; object-fit: cover; }
.hero-note {
  margin-top: 1.4rem;
  font-size: 0.86rem;
  color: var(--mute);
  max-width: 34rem;
}

/* ---------- rails / cards ---------- */
.section { padding: 3.2rem 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 280px);
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.6rem;
  scroll-snap-type: x mandatory;
  min-width: 0;
  max-width: 100%;
}
.rail::-webkit-scrollbar { height: 6px; }
.rail::-webkit-scrollbar-thumb { background: var(--line); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.15rem 1rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: border-color 160ms ease, transform 160ms ease;
}
.card:hover { border-color: var(--gold); transform: translateY(-2px); }
.card-media {
  aspect-ratio: 1 / 1;
  background: #0d0d0f;
  overflow: hidden;
  position: relative;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #101012;
}
.card-body { padding: 0.9rem 0.95rem 1.05rem; display: flex; flex-direction: column; gap: 0.28rem; flex: 1; }
.card-cat {
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.card-title {
  font-family: var(--serif);
  font-size: 1.18rem;
  line-height: 1.15;
  margin: 0.1rem 0 0.25rem;
}
.card-price {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  padding-top: 0.55rem;
}
.usd { font-variant-numeric: tabular-nums; }
.sats {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--btc);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--line);
  padding: 0.18rem 0.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream-2);
}
.pill-sold { color: var(--bad); border-color: #5a2e28; }
.card-media .pill {
  position: absolute;
  left: 0.55rem;
  top: 0.55rem;
  background: rgba(8, 8, 8, 0.72);
}

/* ---------- editorial ---------- */
.story {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(1.4rem, 4vw, 4rem);
  align-items: start;
}
.story blockquote {
  margin: 1.2rem 0 0;
  padding: 0;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-style: italic;
  line-height: 1.15;
  color: var(--gold-2);
}

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
}
.step {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.step b {
  font-family: var(--mono);
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.08em;
}

.cta-band {
  margin: 2rem var(--pad);
  padding: clamp(2rem, 5vw, 3.4rem);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(247, 147, 26, 0.06), transparent 55%),
    var(--elev);
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1.4rem;
}

/* ---------- shop ---------- */
.shop-head { padding: 2.2rem 0 1rem; }
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin: 1rem 0 1.4rem;
  min-width: 0;
}
[data-chips] {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  flex: 1 1 100%;
  min-width: 0;
}
.search {
  flex: 1 1 220px;
  min-height: 44px;
  background: var(--elev);
  border: 1px solid var(--line);
  padding: 0.6rem 0.8rem;
}
.chip {
  min-height: 40px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--cream-2);
  padding: 0.4rem 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.7rem;
}
.chip[aria-pressed="true"],
.chip:hover { border-color: var(--gold); color: var(--gold-2); }

.empty {
  padding: 3rem 0;
  color: var(--mute);
}

/* ---------- PDP ---------- */
.pdp {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.2rem, 4vw, 3.2rem);
  padding: 1.6rem 0 3rem;
}
.gallery { position: relative; }
.gallery-main {
  position: relative;
  background: #0d0d0f;
  border: 1px solid var(--line-soft);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  cursor: grab;
}
.gallery-main:focus { outline: 1px solid var(--gold); }
.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  -webkit-user-drag: none;
}
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(12, 12, 14, 0.78);
  color: var(--cream);
  font-size: 1.55rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
}
.gallery-nav.prev { left: 0.55rem; }
.gallery-nav.next { right: 0.55rem; }
.gallery-nav:hover { border-color: var(--gold); color: var(--gold-2); }
.gallery-count {
  position: absolute;
  bottom: 0.55rem;
  right: 0.55rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  background: rgba(12, 12, 14, 0.78);
  border: 1px solid var(--line-soft);
  padding: 0.25rem 0.45rem;
  color: var(--cream-2);
  z-index: 2;
}
.gallery-hint {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  color: var(--mute);
}
.thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.45rem;
  margin-top: 0.5rem;
}
.thumbs button {
  border: 1px solid var(--line-soft);
  background: #0d0d0f;
  padding: 0;
  aspect-ratio: 1;
}
.thumbs button[aria-current="true"] { border-color: var(--gold); }
.thumbs img { width: 100%; height: 100%; object-fit: contain; }

.buy-panel {
  position: sticky;
  top: 5.2rem;
  align-self: start;
  border: 1px solid var(--line);
  background: var(--elev);
  padding: 1.3rem 1.25rem 1.4rem;
}
.price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin: 1rem 0 0.4rem;
}
.price-row .usd { font-size: 1.8rem; font-family: var(--serif); }
.meta-list { list-style: none; padding: 0; margin: 1rem 0; }
.meta-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.42rem 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.9rem;
  color: var(--cream-2);
}
.fiat-note {
  font-size: 0.88rem;
  color: var(--cream-2);
  line-height: 1.45;
  margin: 0.35rem 0 0.55rem;
}
.fiat-note a { color: var(--gold-2); text-decoration: underline; text-underline-offset: 2px; }
.ask-box {
  margin-top: 1rem;
  border-top: 1px solid var(--line-soft);
  padding-top: 0.9rem;
}
.ask-box summary {
  cursor: pointer;
  color: var(--gold-2);
  font-size: 0.95rem;
  list-style: none;
}
.ask-box summary::-webkit-details-marker { display: none; }
.ask-form { display: grid; gap: 0.65rem; margin-top: 0.75rem; }
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.desc {
  white-space: pre-wrap;
  color: var(--cream-2);
  max-width: 42rem;
}

/* ---------- cart / checkout ---------- */
.line {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 0.85rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.line img { width: 72px; height: 72px; object-fit: contain; background: #101012; border: 1px solid var(--line-soft); }
.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
}
.qty button { width: 36px; height: 36px; border: 0; background: transparent; color: var(--cream); }
.qty span { min-width: 1.4rem; text-align: center; font-family: var(--mono); font-size: 0.85rem; }

.summary {
  border: 1px solid var(--line);
  background: var(--elev);
  padding: 1.1rem 1.15rem;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0;
}
.summary-row.total {
  border-top: 1px solid var(--line);
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  font-size: 1.05rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.field { display: flex; flex-direction: column; gap: 0.3rem; }
.field.span-2 { grid-column: span 2; }
.field label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
}
.field input, .field select, .field textarea {
  min-height: 44px;
  background: var(--void);
  border: 1px solid var(--line);
  padding: 0.55rem 0.7rem;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 1px solid var(--gold);
  border-color: var(--gold);
}
.err { color: var(--bad); font-size: 0.86rem; }

.checkout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.6rem;
  padding: 1.4rem 0 3rem;
}

.pay-box {
  margin-top: 1.1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  background: #0c0c0e;
  text-align: center;
}
.pay-box canvas, .pay-box img { margin: 0.8rem auto; background: #fff; padding: 8px; }
.addr {
  font-family: var(--mono);
  font-size: 0.78rem;
  word-break: break-all;
  color: var(--cream-2);
}

/* ---------- FAQ / about ---------- */
.faq details {
  border-bottom: 1px solid var(--line-soft);
  padding: 0.9rem 0;
}
.faq summary {
  cursor: pointer;
  font-family: var(--serif);
  font-size: 1.25rem;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq details p { color: var(--cream-2); max-width: 46rem; }

.toast {
  position: fixed;
  bottom: 1.1rem;
  right: 1.1rem;
  background: var(--card-2);
  border: 1px solid var(--gold);
  padding: 0.7rem 0.9rem;
  z-index: 80;
  max-width: min(92vw, 320px);
  font-size: 0.9rem;
}

.loading { color: var(--mute); padding: 2rem 0; }

@media (max-width: 880px) {
  .hero, .story, .pdp, .checkout, .foot-grid, .cta-band, .form-grid {
    grid-template-columns: 1fr;
  }
  .field.span-2 { grid-column: span 1; }
  .hero { min-height: auto; padding-top: 1.2rem; }
  .hero-seal-wrap { justify-content: center; margin-top: 0.4rem; }
  .hero-seal { width: min(68vw, 260px); }
  .hero-note { max-width: 100%; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 58px;
    left: 0;
    right: 0;
    background: #0b0b0c;
    border-bottom: 1px solid var(--line);
    padding: 1rem var(--pad) 1.2rem;
    gap: 0.9rem;
  }
  .nav-toggle { display: grid; }
  .buy-panel { position: static; }
  .cta-band { flex-direction: column; align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
