/* Metropoly — site styles
   Zine/risograph: cream stock, flat spot colours, hard offset shadows,
   chunky outlines, tilted stickers, heavy display type. */

:root {
  --paper: #fbf3e4;
  --ink: #17224d;
  --ink-2: #5b6486;
  --pink: #ff4f79;
  --blue: #3d5aff;
  --yellow: #ffc53d;
  --green: #16c79a;
  --line: 3px solid var(--ink);
  --display: "Georgia", "Iowan Old Style", "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  background-color: var(--paper);
  background-image:
    radial-gradient(rgba(23,34,77,0.06) 1px, transparent 1px),
    radial-gradient(rgba(255,79,121,0.05) 1px, transparent 1px);
  background-size: 5px 5px, 5px 5px;
  background-position: 0 0, 2px 3px;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2 { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; margin: 0; }
a { color: inherit; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; z-index: 60;
}
.skip:focus { left: 10px; top: 10px; }

.page { max-width: 1080px; margin: 0 auto; padding: 0 20px 60px; }

/* ---------- top ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 0 10px;
}
.logo { display: flex; align-items: center; gap: 13px; }
.logo img { width: 48px; border: var(--line); border-radius: 12px; }
.logo-text { font-family: var(--mono); display: flex; flex-direction: column; }
.logo-text b { font-size: 26px; font-weight: 700; letter-spacing: 0.01em; line-height: 1.1; }
.logo-text small { font-size: 10px; font-weight: 500; letter-spacing: 0.02em; color: var(--ink-2); }

.sticker {
  display: inline-block;
  background: var(--yellow);
  border: var(--line);
  border-radius: 999px;
  padding: 7px 16px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: 4px 4px 0 var(--ink);
}

/* ---------- hero ---------- */

.hero { padding: 72px 0 20px; position: relative; }

h1 {
  font-size: clamp(42px, 8.4vw, 96px);
  line-height: 0.98;
  max-width: 16ch;
  text-wrap: balance;
}
h1 em {
  font-style: italic;
  color: var(--pink);
  text-decoration: underline;
  text-decoration-thickness: 5px;
  text-underline-offset: 8px;
  text-decoration-color: var(--yellow);
}
.sub {
  font-size: clamp(17px, 2vw, 21px);
  max-width: 56ch;
  margin: 24px 0 56px;
  color: var(--ink-2);
  text-wrap: pretty;
}

.hero-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }

.badge-wrap { position: relative; display: inline-block; }

.badge {
  display: inline-block;
  line-height: 0;
  border-radius: 9px;
  cursor: pointer;
}
.badge img { width: 168px; }
.badge-lg img { width: 200px; }
.badge:focus-visible { outline: 3px solid var(--pink); outline-offset: 4px; }
.badge[aria-disabled="true"] { cursor: default; }

/* App Store link isn't live yet: a permanent sticker sets the expectation up front,
   the tap note reassures anyone who clicks anyway. */
.sticker-soon {
  position: absolute;
  right: -14px;
  top: -18px;
  transform: rotate(8deg);
  background: var(--pink);
  color: var(--paper);
  z-index: 1;
}
.badge-wrap-lg .sticker-soon { right: -10px; top: -22px; }

.badge-note {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(6px);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 12px;
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.badge-note::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--ink);
}
.badge-wrap.is-tapped .badge-note {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.fineprint { font-family: var(--mono); font-size: 12px; line-height: 1.5; color: var(--ink-2); }

/* ---------- ticker ---------- */

.ticker {
  margin: 70px -20px 60px;
  border-top: var(--line);
  border-bottom: var(--line);
  background: var(--blue);
  color: var(--paper);
  overflow: hidden;
  padding: 12px 0;
}
.ticker-in {
  display: flex;
  /* shrink-to-fit the duplicated content, otherwise the -50% below is half the
     viewport instead of half the strip and the loop jumps */
  width: max-content;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.1em;
  animation: slide 26s linear infinite;
}
/* trailing margin rather than gap, so half the width is exactly half the list */
.ticker-in > span { margin-right: 26px; }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- cards ---------- */

.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.card {
  border: var(--line);
  border-radius: 22px;
  padding: 30px 28px 32px;
  box-shadow: 8px 8px 0 var(--ink);
  background: var(--paper);
}
.card.wide { grid-column: 1 / -1; }
.card-pink { background: var(--pink); color: #fff; }
.card-blue { background: var(--blue); color: #fff; }
.card-yellow { background: var(--yellow); }
.card-dark { background: var(--ink); color: var(--paper); }
.card-pink .tag, .card-blue .tag { background: var(--paper); color: var(--ink); }
.card-dark .tag { background: var(--green); color: var(--ink); }

.tag {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  padding: 4px 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.card h2 { font-size: clamp(25px, 3vw, 34px); line-height: 1.1; margin-bottom: 14px; }
.card p { margin: 0 0 14px; }
.card p:last-child { margin-bottom: 0; }
.card .aside {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  border-top: 2px solid currentColor;
  padding-top: 14px;
  opacity: 0.9;
}

.wide-body { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; }
.wide-body p:last-child { margin-bottom: 0; }

.sheet {
  border: var(--line);
  border-radius: 14px;
  background: var(--paper);
}
.card > .sheet { margin-top: 20px; }

.dots { list-style: none; display: flex; flex-wrap: wrap; gap: 9px; padding: 0; margin: 20px 0 0; }
.dots li {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--c);
  border: 2px solid var(--ink);
}

.theme-fan { display: flex; gap: 12px; margin-top: 24px; }
.theme-fan img {
  width: 25%;
  border: 2px solid var(--paper);
  border-radius: 12px;
}
.theme-fan img:nth-child(1) { transform: rotate(-5deg); }
.theme-fan img:nth-child(2) { transform: rotate(-1.5deg); }
.theme-fan img:nth-child(3) { transform: rotate(2deg); }
.theme-fan img:nth-child(4) { transform: rotate(5.5deg); }

/* ---------- hero shot ---------- */

.bigshot { position: relative; margin: 80px 0 0; }

.shot-play {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  position: relative;
}
.shot-play img,
.shot-video {
  display: block;
  width: 100%;
  border: var(--line);
  border-radius: 20px;
  box-shadow: 12px 12px 0 var(--pink);
  /* Paper fills the transparency at the window's own rounded corners. */
  background: var(--paper);
}
/* Reserves the box before metadata loads, so the swap cannot collapse. */
.shot-video { aspect-ratio: 1280 / 1022; height: auto; }
.shot-play img { display: block; }
/* display:block above would otherwise beat the hidden attribute. */
.shot-play[hidden], .shot-video[hidden] { display: none; }

/* Scrim sits inside the ink border so the frame stays crisp. */
.shot-play::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 17px;
  background: rgba(23, 34, 77, 0.55);
  opacity: 0;
  transition: opacity 200ms ease;
}
.shot-play:hover::after,
.shot-play:focus-visible::after { opacity: 1; }

.shot-cue {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 26px 14px 22px;
  border: var(--line);
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 6px 6px 0 var(--ink);
  opacity: 0;
  transition: transform 200ms ease, opacity 200ms ease;
  z-index: 1;
}
.shot-play:hover .shot-cue,
.shot-play:focus-visible .shot-cue {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}
.shot-cue-glyph {
  width: 0;
  height: 0;
  border-left: 14px solid currentColor;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
}

/* Touch devices never hover, so the cue has to stay put. */
@media (hover: none) {
  .shot-play::after { opacity: 1; }
  .shot-cue { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.sticker-shot {
  position: absolute;
  right: -8px;
  top: -20px;
  transform: rotate(-6deg);
}

/* ---------- features ---------- */

.features { margin-bottom: 10px; }
.features h2 { font-size: clamp(28px, 4vw, 44px); margin-bottom: 22px; }
.features dl { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; margin: 0; }
.features dl > div { border-top: 2px dashed var(--ink); padding: 16px 0; }
.features dt { font-weight: 700; }
.features dd { margin: 4px 0 0; color: var(--ink-2); }

/* ---------- buy ---------- */

.buy {
  margin-top: 80px;
  border: var(--line);
  border-radius: 26px;
  background: var(--yellow);
  box-shadow: 10px 10px 0 var(--ink);
  padding: clamp(40px, 6vw, 70px) 30px;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 22px;
}
.buy-icon { width: 90px; border: var(--line); border-radius: 20px; }
.buy h2 { font-size: clamp(32px, 5.6vw, 60px); line-height: 1.02; }

/* ---------- foot ---------- */

.foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 44px;
  padding-top: 22px;
  border-top: 2px dashed var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-2);
}
.foot p { margin: 0; }
.foot nav { display: flex; gap: 22px; }
.foot a { text-decoration: none; border-bottom: 2px solid var(--pink); }

/* ---------- responsive ---------- */

@media (max-width: 820px) {
  .cards { grid-template-columns: 1fr; }
  .wide-body { grid-template-columns: 1fr; }
  .features dl { grid-template-columns: 1fr; }
  .shot-play img, .shot-video { box-shadow: 6px 6px 0 var(--pink); }
  .shot-cue { font-size: 12px; padding: 11px 20px 11px 17px; }
  .sticker-shot { right: 6px; top: -16px; font-size: 11px; }
}
