:root {
  --bg: #0b0b0d;
  --panel: #141419;
  --ink: #f6f3ec;
  --muted: #9a968d;
  --accent: #c9a24b;      /* heritage gold */
  --accent-soft: rgba(201, 162, 75, 0.14);
  --line: rgba(246, 243, 236, 0.10);
  --verified: #6fbf73;
  --fs: 1;                 /* text-size multiplier, driven by the A- / A+ control */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
/* The hidden attribute must always win over element display rules (e.g. #story{display:flex}). */
[hidden] { display: none !important; }

/* Text-size control (A- / A+). Fixed in the corner, sizes itself in px so it stays
   constant while it scales the root font-size (and thus the rem-based card text). */
.zoombar {
  position: fixed; top: 12px; right: 14px; z-index: 30;
  display: flex; gap: 6px; opacity: 0.35; transition: opacity 0.2s;
}
.zoombar:hover { opacity: 1; }
.zoombar button {
  min-width: 40px; height: 34px; padding: 0 10px; border-radius: 8px;
  background: rgba(20, 20, 25, 0.72); border: 1px solid rgba(246, 243, 236, 0.16);
  color: #f6f3ec; font-weight: 700; cursor: pointer; font-family: inherit; line-height: 1;
}
.zoombar button:hover { background: rgba(201, 162, 75, 0.22); border-color: rgba(201, 162, 75, 0.5); }
.zoombar #zoomOut { font-size: 13px; }
.zoombar #zoomIn { font-size: 17px; }

html, body { height: 100%; }

body {
  background: radial-gradient(120% 90% at 50% -10%, #17171d 0%, var(--bg) 60%);
  color: var(--ink);
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden; /* the window itself never scrolls */
}

/* No visible scrollbars anywhere in the story window — it is a display, not a page. */
::-webkit-scrollbar { width: 0; height: 0; }
* { scrollbar-width: none; }

#card {
  height: 100vh;
  overflow: hidden; /* fill the window exactly; the bullets area scrolls inside if needed */
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 4vw, 56px);
}

/* ---------- idle ---------- */
.idle-screen {
  margin: auto;
  text-align: center;
  max-width: 520px;
}
.brand {
  letter-spacing: 0.42em;
  font-size: 0.86rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 18px;
}
.idle-title { font-size: 2.2rem; font-weight: 800; margin-bottom: 14px; }
.idle-sub { color: var(--muted); font-size: 1.05rem; line-height: 1.6; }

/* ---------- story ---------- */
#story { height: 100%; display: flex; flex-direction: column; }

.story-head { display: flex; gap: clamp(18px, 3vw, 36px); align-items: flex-start; }
.head-text { flex: 1; min-width: 0; }
.photowrap {
  flex: 0 0 auto;
  width: clamp(150px, 26vw, 260px);
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(201,162,75,0.35);
  background: var(--panel);
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
}
.photowrap img { width: 100%; height: 100%; object-fit: cover; display: block; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  letter-spacing: 0.28em; font-size: 0.82rem; font-weight: 700;
  color: var(--accent); text-transform: uppercase;
}
.dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(201,162,75,0.5); }
  70% { box-shadow: 0 0 0 14px rgba(201,162,75,0); }
  100% { box-shadow: 0 0 0 0 rgba(201,162,75,0); }
}

/* Eyebrow row holds the NOW PINNED line plus the jersey-type highlight badge. */
.eyebrow-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.typebadge {
  font-size: 0.86rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 5px 13px; border-radius: 999px; white-space: nowrap;
  background: var(--accent); color: #14140f; /* filled heritage gold, dark text — it pops */
  box-shadow: 0 2px 10px rgba(201, 162, 75, 0.35);
}

#headline {
  margin-top: 14px;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.05;
  font-weight: 850;
  letter-spacing: -0.01em;
  /* Hard cap so a long product name can never eat the window and clip the story. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta {
  margin-top: 18px;
  display: flex; flex-wrap: wrap; gap: 10px;
}
.chip {
  background: var(--accent-soft);
  border: 1px solid rgba(201,162,75,0.35);
  color: var(--ink);
  padding: 7px 14px; border-radius: 999px;
  font-size: 0.98rem; font-weight: 600;
}
.chip b { color: var(--accent); font-weight: 700; margin-right: 6px; }

.story-body {
  margin-top: clamp(22px, 3.5vh, 40px);
  flex: 1; min-height: 0;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  overflow: auto;
}
.story-label {
  letter-spacing: 0.24em; font-size: 0.78rem; font-weight: 700;
  color: var(--muted); text-transform: uppercase; margin-bottom: 18px;
}
.bullets { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.bullets li {
  position: relative;
  padding-left: 30px;
  font-size: calc(clamp(1.15rem, 2.3vw, 1.7rem) * var(--fs));
  line-height: 1.4;
  font-weight: 500;
  opacity: 0;
  transform: translateY(8px);
  animation: rise 0.5s forwards;
}
.bullets li::before {
  content: "";
  position: absolute; left: 0; top: 0.55em;
  width: 12px; height: 12px;
  background: var(--accent);
  transform: rotate(45deg);
}
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

.story-foot {
  margin-top: 20px; padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.producttitle { color: var(--muted); font-size: 0.98rem; font-weight: 500; }
.tag {
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 700; padding: 5px 10px; border-radius: 6px;
  border: 1px solid var(--line); color: var(--muted); white-space: nowrap;
}
.tag.verified { color: var(--verified); border-color: rgba(111,191,115,0.4); }

/* new-pin flash on the whole card */
#card.flash { animation: flash 0.6s ease; }
@keyframes flash { 0% { background-color: rgba(201,162,75,0.10); } 100% { background-color: transparent; } }
