:root {
  --paper: #f2ede2;          /* warm cream (paper base) */
  --paper-2: #e8e2d3;
  --sea-tint: #dfe9e8;       /* very pale sea-glass for accents */
  --ink: #0b1416;            /* deep near-black with a touch of ocean */
  --ink-2: #2d3839;
  --muted: #6f6a62;
  --line: #d4cdbb;
  --line-soft: #e0d9c8;
  --teal: #0e7c7b;           /* deep editorial teal — the one accent */
  --teal-deep: #0a5c5b;
  --teal-soft: #7fb8b6;
  --serif: "Instrument Serif", "Times New Roman", ui-serif, Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.005em; }

/* ---------- Header (compact) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 28px;
  background: rgba(242, 237, 226, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.wordmark {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans);
  font-weight: 600; font-size: 14px; letter-spacing: -0.01em;
}
.wordmark .drop { color: var(--teal); }
.wordmark em { font-size: 18px; margin-right: 1px; }
.site-header nav { display: flex; gap: 24px; align-items: center; font-size: 13px; color: var(--muted); }
.site-header nav a:not(.cta):hover { color: var(--ink); }
.site-header .cta {
  background: var(--ink); color: var(--paper);
  padding: 7px 18px; border-radius: 999px; font-weight: 500; font-size: 13px;
  transition: background 150ms ease;
}
.site-header .cta:hover { background: var(--teal-deep); }

/* ---------- Eyebrow ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow.static { color: var(--muted); }
.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(14, 124, 123, 0.18);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

/* ---------- HERO / STAGE (compact so bottle is above fold) ---------- */
.stage {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 24px 32px;
  display: flex; flex-direction: column; align-items: center;
}
.hero-top {
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  max-width: 720px;
  margin-bottom: 8px;
}
.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0;
}
.display em {
  opacity: 0.9;
}
.lede {
  font-size: 15px;
  color: var(--ink-2);
  margin: 2px 0 0;
  max-width: 46ch;
}

/* 3D canvas — big and central */
.canvas-wrap {
  width: 100%;
  max-width: 640px;
  height: min(560px, 62vh);
  position: relative;
  margin: 14px 0 8px;
}
#scene {
  width: 100%; height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}
#scene:active { cursor: grabbing; }
.hint {
  position: absolute; bottom: -20px; left: 0; right: 0;
  text-align: center;
  font-size: 10px; color: var(--muted);
  letter-spacing: 0.18em; text-transform: uppercase;
  margin: 0;
}

/* Hover pill — floats over the canvas at the hovered sticker's screen position */
.hover-pill {
  position: absolute;
  transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-deep) 100%);
  color: white;
  border: 2px solid rgba(255,255,255,0.9);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow:
    0 0 0 4px rgba(14, 124, 123, 0.25),
    0 8px 24px rgba(14, 124, 123, 0.35),
    0 0 40px rgba(94, 234, 212, 0.5);
  /* pointer-events:auto — the pill IS clickable now. Flicker is prevented in
     JS via relatedTarget check on canvas pointerleave (see app.js). */
  pointer-events: auto;
  cursor: pointer;
  z-index: 10;
  animation: pill-glow 1.6s ease-in-out infinite;
  white-space: nowrap;
}
.hover-pill:hover {
  transform: translate(-50%, -50%) scale(1.05);
  transition: transform 100ms ease;
}
.hover-pill[hidden] { display: none; }
.hover-pill .pill-sep { opacity: 0.6; margin: 0 2px; }
.hover-pill .pill-price { font-family: var(--serif); font-size: 16px; letter-spacing: -0.01em; }
@keyframes pill-glow {
  0%, 100% { box-shadow: 0 0 0 4px rgba(14, 124, 123, 0.25), 0 8px 24px rgba(14, 124, 123, 0.35), 0 0 40px rgba(94, 234, 212, 0.5); }
  50%      { box-shadow: 0 0 0 6px rgba(14, 124, 123, 0.35), 0 8px 32px rgba(14, 124, 123, 0.5),  0 0 60px rgba(94, 234, 212, 0.75); }
}

/* Stat row — compact horizontal */
.stat-row {
  display: flex;
  gap: 28px;
  align-items: center;
  padding: 24px 20px 4px;
  width: 100%;
  max-width: 640px;
  justify-content: center;
  margin-top: 12px;
  border-top: 1px solid var(--line-soft);
}
.stat { text-align: center; }
.stat.divider {
  width: 1px; height: 32px; background: var(--line);
  padding: 0; align-self: center;
}
.stat-num {
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.stat-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 6px;
}

/* Wave divider — subtle water motif between hero and grid */
.wave-divider {
  display: block;
  width: 100%;
  height: 36px;
  margin-top: 24px;
}

/* ---------- GRID SECTION ---------- */
.grid-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 72px;
  background: linear-gradient(180deg, var(--sea-tint) 0%, transparent 100%);
}
.grid-section:not(:first-of-type) {
  background: none;
}
.section-head { text-align: center; margin-bottom: 36px; }
.section-head .eyebrow { margin-bottom: 10px; }
.section-h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 4.5vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0;
}

.spot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (min-width: 700px) { .spot-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .spot-grid { grid-template-columns: repeat(4, 1fr); } }

.spot-card {
  background: var(--paper);
  padding: 26px 18px 22px;
  text-align: center;
  cursor: pointer;
  transition: background 160ms ease;
  min-height: 132px;
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
  border: none;
  font-family: inherit;
}
.spot-card:hover { background: var(--paper-2); }
.spot-card:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: -3px;
}
.spot-card .spot-num {
  font-size: 10px; letter-spacing: 0.18em; color: var(--muted);
  text-transform: uppercase; font-weight: 700;
}
.spot-card .spot-bid {
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-top: 4px;
}
.spot-card .spot-bidder { font-size: 12px; color: var(--muted); }
.spot-card .spot-empty { font-size: 13px; color: var(--muted); }
.spot-card .spot-cta {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  margin-top: 4px;
  font-weight: 700;
}
.spot-card.taken {
  background: var(--ink);
  color: var(--paper);
}
.spot-card.taken .spot-num,
.spot-card.taken .spot-bidder { color: rgba(242, 237, 226, 0.55); }
.spot-card.taken .spot-bid { color: var(--paper); }

/* ---------- FAQ ---------- */
.faq-section { padding-top: 32px; }
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-list details {
  border-bottom: 1px solid var(--line-soft); padding: 20px 4px;
}
.faq-list summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--serif);
  font-size: clamp(20px, 2.4vw, 26px);
  letter-spacing: -0.01em;
  color: var(--ink);
}
.faq-list summary::after {
  content: "+"; color: var(--teal); font-size: 22px; font-weight: 300;
  transition: transform 200ms ease;
}
.faq-list details[open] summary::after { content: "−"; }
.faq-list p { color: var(--ink-2); margin: 12px 0 0; font-size: 15px; max-width: 55ch; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line-soft);
  padding: 26px 32px;
  display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 12px;
  color: var(--muted); font-size: 13px;
  background: var(--sea-tint);
}
footer p { margin: 0; }
footer em { font-size: 15px; color: var(--ink); margin-right: 2px; }
footer a { text-decoration: underline; text-underline-offset: 3px; }
footer a:hover { color: var(--teal); }
.footnote { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; }

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0;
  background: rgba(11, 20, 22, 0.55);
  display: grid; place-items: center; padding: 20px; z-index: 100;
  backdrop-filter: blur(6px);
}
.modal[hidden] { display: none; }
.modal-card {
  background: var(--paper);
  padding: 36px 32px 28px;
  max-width: 440px; width: 100%; position: relative;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(11, 20, 22, 0.28);
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  background: none; border: none; font-size: 26px; cursor: pointer;
  color: var(--muted); line-height: 1; padding: 4px 10px;
  font-family: var(--sans);
}
.modal-close:hover { color: var(--ink); }
.modal-card .eyebrow { display: block; margin-bottom: 10px; }
.modal-card h3 {
  font-family: var(--serif); font-weight: 400;
  font-size: 36px; line-height: 1; letter-spacing: -0.02em;
  margin: 0 0 10px;
}
.modal-sub { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.modal-card label {
  display: block; margin-bottom: 16px; font-family: inherit;
}
.modal-card .lbl {
  display: block;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); font-weight: 700; margin-bottom: 6px;
}
.modal-card .lbl-fine {
  letter-spacing: 0.02em; text-transform: none;
  font-weight: 400; color: var(--muted);
}
.modal-card input {
  display: block; width: 100%; padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: white;
  font-size: 15px; color: var(--ink);
  font-family: inherit;
  transition: border-color 120ms ease;
}
.modal-card input:focus {
  outline: none; border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(14, 124, 123, 0.12);
}
.btn-primary {
  width: 100%; padding: 13px;
  background: var(--ink); color: var(--paper);
  border: none; border-radius: 999px;
  font-family: var(--sans);
  font-weight: 500; font-size: 15px;
  cursor: pointer; margin-top: 8px;
  transition: background 150ms ease;
}
.btn-primary:hover { background: var(--teal-deep); }
.modal-fine { font-size: 12px; color: var(--muted); text-align: center; margin: 14px 0 0; }

/* ---------- Rebuilt bid modal (matches reference: image #31) ---------- */
.modal-card-lg {
  max-width: 520px;
  padding: 28px 30px 24px;
  max-height: 90vh;
  overflow-y: auto;
}
.bm-header { margin-bottom: 20px; }
.bm-header h3 {
  font-family: var(--serif); font-weight: 400;
  font-size: 26px; line-height: 1.15; letter-spacing: -0.015em;
  margin: 0 0 4px;
}
.bm-meta { color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.bm-current { color: var(--ink-2); font-size: 14px; margin: 0; }
.bm-current strong { color: var(--ink); font-weight: 700; }
.bm-current #bid-current-bidder { color: var(--muted); }

.bm-form { display: flex; flex-direction: column; gap: 14px; }
.bm-field { display: flex; flex-direction: column; gap: 6px; }
.bm-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.bm-hint { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.bm-hint strong { color: var(--ink); }

/* Suffix input */
.input-with-suffix {
  position: relative;
}
.input-with-suffix .suffix {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted); font-family: var(--serif); font-size: 18px;
  pointer-events: none;
}
.input-with-suffix input { padding-right: 32px !important; }

/* Deposit card */
.bm-deposit {
  background: var(--sea-tint);
  border: 1px solid var(--line-soft);
  padding: 14px 16px;
  margin: 4px 0 6px;
  font-size: 13px;
}
.dep-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 4px 0;
  color: var(--ink-2);
}
.dep-row.dep-strong {
  color: var(--ink); font-weight: 600; font-size: 15px;
  border-top: 1px solid var(--line-soft);
  margin-top: 4px; padding-top: 8px;
}
.dep-row strong { font-family: var(--serif); font-size: 17px; }
.dep-fine { font-size: 12px; color: var(--muted); margin: 10px 0 0; line-height: 1.45; }

/* Logo upload drop zone */
.bm-logo-drop {
  display: block;
  border: 1.5px dashed var(--line);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 150ms ease;
  background: white;
  position: relative;
}
.bm-logo-drop:hover {
  border-color: var(--teal);
  background: var(--sea-tint);
}
.bm-logo-drop.drag {
  border-color: var(--teal); background: var(--sea-tint); border-style: solid;
}
.logo-drop-inner {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--muted);
}
.logo-drop-inner svg { color: var(--ink-2); margin-bottom: 2px; }
.logo-drop-text { font-size: 14px; color: var(--ink); }
.logo-drop-fine { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.logo-preview {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: 96px;
}
.logo-preview img { max-height: 96px; max-width: 100%; object-fit: contain; }
.logo-remove {
  position: absolute; top: 4px; right: 4px;
  background: white; border: 1px solid var(--line);
  width: 24px; height: 24px; border-radius: 50%;
  cursor: pointer; font-size: 16px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 0; color: var(--ink);
}
.logo-remove:hover { background: var(--paper-2); }

.btn-bid-submit {
  margin-top: 6px;
  padding: 14px 16px;
  font-size: 15px;
  background: var(--teal);
  color: white;
}
.btn-bid-submit:hover { background: var(--teal-deep); }
.bm-trust {
  text-align: center; font-size: 12px; color: var(--muted);
  margin: 12px 0 0; font-style: italic;
}

/* Mobile: stack the 2-col rows */
@media (max-width: 520px) {
  .bm-row { grid-template-columns: 1fr; }
}

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

/* Mobile */
@media (max-width: 640px) {
  .site-header { padding: 10px 18px; }
  .site-header nav { gap: 14px; }
  .stage { padding: 18px 18px 24px; }
  .canvas-wrap { height: 440px; margin: 8px 0; }
  .stat-row { gap: 14px; padding-top: 18px; }
  .stat.divider { height: 24px; }
  .grid-section { padding: 40px 18px 56px; }
}
