/* SUN ICE field reports (/stories): a horizontal flip deck. Cover with an index
   mosaic, one slide per approved store (rep's shelf photo on a dark stage beside
   a yellow spec sheet led by the shelf price), closing patterns slide.
   Single brand look on purpose: SUN ICE yellow and black in every viewer theme. */

:root {
  --sun: #ffcb05;
  --ink: #151210;
  --stage: #221e1a;
  --ink-2: #4a3d00;
  --on-ink: #f3ecd8;
  --on-stage: #b9b0a2;
  --rule-dark: #3a332b;
  --f-display: "Anton", Impact, "Arial Narrow Bold", sans-serif;
  --f-label: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

html {
  height: 100%;
  box-sizing: border-box;
  background: var(--ink);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: border-box; }
body {
  height: 100%;
  margin: 0;
  background: var(--ink);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
button { font: inherit; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }
[hidden] { display: none !important; }

.label {
  font-family: var(--f-label);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- deck ---------- */
.deck {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.deck::-webkit-scrollbar { display: none; }
.slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow-y: auto;
  position: relative;
}
.stripes {
  height: 12px;
  flex: 0 0 auto;
  background: repeating-linear-gradient(-45deg, var(--ink) 0 14px, var(--sun) 14px 28px);
}

/* ---------- cover ---------- */
.cover-slide { background: var(--sun); display: flex; flex-direction: column; }
.cover {
  flex: 1 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 48px;
  align-items: center;
  padding-block: 40px;
  padding-left: max(48px, env(safe-area-inset-left, 0px));
  padding-right: max(48px, env(safe-area-inset-right, 0px));
}
.cover-copy { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.logo { width: 92px; height: auto; display: block; }
.cover h1 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(52px, 7vw, 108px);
  line-height: 0.92;
  text-transform: uppercase;
}
.lede { font-size: 21px; font-weight: 500; max-width: 30ch; border-top: 2px solid var(--ink); padding-top: 16px; }
.hint { color: var(--ink-2); }

.mosaic {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}
.mosaic .loading { grid-column: 1 / -1; color: var(--ink-2); }
.tile {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  background: var(--stage);
  aspect-ratio: 3 / 4;
  max-width: 100%;
  overflow: hidden;
  cursor: pointer;
  border-radius: 4px;
}
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.25s ease; }
.tile:hover img { transform: scale(1.04); }
.tile span {
  position: absolute;
  inset: auto 0 0 0;
  padding: 18px 8px 6px;
  background: linear-gradient(to top, rgba(21, 18, 16, 0.92), rgba(21, 18, 16, 0));
  color: var(--on-ink);
  font-family: var(--f-label);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.1;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tile:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* ---------- store slide ---------- */
.store {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  background: var(--sun);
  overflow: hidden;
}
.shot {
  background: var(--stage);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding-block: 24px 16px;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: 24px;
}
.frame { flex: 1 1 auto; min-height: 0; position: relative; }
.frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.shot-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.shot-foot .label { color: var(--on-stage); font-size: 13px; }
.thumbs { display: flex; gap: 8px; }
.thumbs button {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  background: var(--ink);
  cursor: pointer;
  opacity: 0.6;
}
.thumbs button[aria-pressed="true"] { border-color: var(--sun); opacity: 1; }
.thumbs button:focus-visible { outline: 2px solid var(--on-ink); outline-offset: 2px; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }

.sheet {
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-block: 36px 32px;
  padding-left: max(40px, env(safe-area-inset-left, 0px));
  padding-right: max(48px, env(safe-area-inset-right, 0px));
}
.where { color: var(--ink-2); }
.sheet h2 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(40px, 4.6vw, 68px);
  line-height: 0.95;
  text-transform: uppercase;
  margin-top: 6px;
}
.via { margin-top: 8px; color: var(--ink-2); font-weight: 500; }

.price { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.price .num {
  font-family: var(--f-display);
  font-size: clamp(76px, 8vw, 120px);
  line-height: 0.8;
  font-variant-numeric: tabular-nums;
}
.price .label { font-size: 18px; padding-bottom: 2px; }

.spec {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 20px;
  margin: 0;
  border-top: 2px solid var(--ink);
  padding-top: 14px;
}
.spec dt { color: var(--ink-2); padding-top: 2px; }
.spec dd { margin: 0; font-weight: 500; min-width: 0; }

.quote { margin: 0; display: flex; flex-direction: column; gap: 6px; border-top: 2px solid var(--ink); padding-top: 14px; }
.quote p { font-size: 21px; line-height: 1.32; font-weight: 600; text-wrap: balance; }
.quote p::before { content: "\201C"; }
.quote p::after { content: "\201D"; }
.quote cite { font-style: normal; color: var(--ink-2); }

/* ---------- closing ---------- */
.close-slide { background: var(--ink); color: var(--on-ink); display: flex; flex-direction: column; }
.close {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 32px;
  padding-block: 40px;
  padding-left: max(48px, env(safe-area-inset-left, 0px));
  padding-right: max(48px, env(safe-area-inset-right, 0px));
  max-width: 1180px;
}
.close h2 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(44px, 6vw, 88px);
  line-height: 0.95;
  text-transform: uppercase;
  color: var(--sun);
}
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.fact { border-top: 2px solid var(--sun); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.fact b {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1;
  color: var(--sun);
  font-variant-numeric: tabular-nums;
}

/* ---------- bar ---------- */
.bar {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  background: var(--ink);
  color: var(--on-ink);
  border-top: 1px solid var(--rule-dark);
  padding-block: 10px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.bar button {
  font-family: var(--f-label);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: transparent;
  color: var(--sun);
  border: 2px solid var(--sun);
  border-radius: 999px;
  padding: 7px 16px;
  cursor: pointer;
}
.bar button.primary { background: var(--sun); color: var(--ink); }
.bar button:disabled { opacity: 0.3; cursor: default; }
.bar button:focus-visible { outline: 3px solid var(--on-ink); outline-offset: 2px; }
.count {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--f-label);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.04em;
}
.count b { color: var(--sun); font-variant-numeric: tabular-nums; }

/* ---------- narrow screens: stack, slide scrolls vertically ---------- */
@media (max-width: 860px) {
  .cover { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-block: 28px 32px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .mosaic { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .store { display: block; overflow-x: hidden; overflow-y: auto; }
  .shot { height: 58svh; min-height: 300px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .sheet { overflow: visible; padding-block: 24px 32px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .close { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .count .name { display: none; }
  .bar { gap: 8px; }
  .bar button { padding: 7px 12px; }
}
@media (max-width: 420px) {
  .lede { font-size: 18px; }
  .quote p { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  .tile img { transition: none; }
  .tile:hover img { transform: none; }
}
