/* PAQ quarter-zip order site.
   Two pages (index.html, order.html), one stylesheet.
   Tokens first, then layout, then the parts. */

:root {
  --paper: #ffffff;
  --ink: #000000;
  /* Tuned toward the red in the PAQ chest logo (sampled at about #e83a46) so the
     sticker and button don't argue with the photo. */
  --red: #e5303b;
  --red-dark: #c21f29;
  --yellow: #ffe600;
  --panel: #f1f2f4;
  --line: #d6d7d9;
  --mute: #5f5f5f;

  /* Comic Sans on purpose. Phones don't ship Comic Sans, so Comic Neue (Google Fonts) stands in there. */
  --display: "Comic Sans MS", "Comic Sans", "Comic Neue", "Chalkboard SE", cursive;
  --text: "Comic Sans MS", "Comic Sans", "Comic Neue", "Chalkboard SE", cursive;

  --measure: 34rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.5;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }

[hidden] { display: none !important; }

a { color: inherit; }

p, ul, h1, h2, figure { margin: 0; }

.tiny { font-size: 0.875rem; color: var(--mute); }

sup { font-size: 0.7em; line-height: 0; }

:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

/* ---------- Countdown banner (top of both pages) ---------- */

.banner {
  background: var(--yellow);
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
  padding: 0.5rem var(--gutter);
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.35;
}

.banner p {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.2rem 0.5rem;
  max-width: 68rem;
  margin: 0 auto;
}

.clock {
  font-family: var(--display);
  font-size: 1.35rem;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--red);
  white-space: nowrap;
}

.clock b { font-weight: 400; font-variant-numeric: tabular-nums; }

.banner.is-closed { background: var(--panel); }

@media (max-width: 51.99rem) {
  .banner { font-size: 0.8125rem; line-height: 1.3; padding-block: 0.35rem; }
  .clock { font-size: 1.1rem; }
}

/* ---------- Landing (one screen) ---------- */

.hero {
  min-height: calc(100svh - 3.25rem); /* the banner takes the rest */
  display: flex;
  flex-direction: column;
  max-width: 68rem;
  margin: 0 auto;
  padding: clamp(0.75rem, 2vh, 1.5rem) var(--gutter) var(--gutter);
  gap: clamp(0.75rem, 2.5vh, 1.5rem);
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.who { font-weight: 700; }

.hero-body {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.25rem, 4vw, 3.5rem);
  align-content: center;
}

@media (min-width: 52rem) {
  .hero-body {
    grid-template-columns: minmax(0, 11fr) minmax(0, 9fr);
    align-items: center;
  }
}

.hero-foot {
  display: grid;
  gap: 1rem 2.5rem;
  font-size: 0.9375rem;
}

@media (min-width: 52rem) {
  .hero-foot {
    grid-template-columns: 3fr 2fr;
    align-items: start;
    font-size: 0.875rem;
  }
  .hero-foot .facts { font-size: 0.875rem; }
}

.about { display: grid; gap: 0.5rem; max-width: var(--measure); }

/* The reel and the product photo sit side by side.
   Reel is 9:16, photo is 4:5, so 45:64 columns give them equal heights. */

.media {
  display: grid;
  grid-template-columns: 45fr 64fr;
  gap: 0.75rem;
  align-items: start;
}

.reel {
  position: relative;
  display: grid;
  gap: 0.5rem;
}

.reel video { cursor: pointer; }

.reel-sound {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  padding: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.reel-sound svg { width: 1.1rem; height: 1.1rem; display: block; }
.reel-sound .icon-sound,
.reel-sound.has-sound .icon-muted { display: none; }
.reel-sound.has-sound .icon-sound { display: block; }

.optional { font-weight: 400; color: var(--muted, #666); }

.methods.is-invalid legend { color: var(--red); }
.methods.is-invalid .method { border-color: var(--red); }

.reel video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: #000;
  border: 2px solid var(--ink);
}

.product {
  position: relative;
  display: grid;
  gap: 0.5rem;
}

/* Photo + stickers share a frame so the stickers stay put relative to the photo. */
.product-frame { position: relative; }

.product-frame > img {
  width: 100%;
  border: 2px solid var(--ink);
  background: var(--panel);
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

@media (max-width: 51.99rem) {
  .media { gap: 0.5rem; }
  .sticker { top: -0.9rem; right: -0.25rem; }
  .hero { gap: 0.75rem; }
  .hero-top { gap: 0.25rem 1rem; }
  .pitch { gap: 0.75rem; }
  .blurb { font-size: 0.875rem; line-height: 1.4; }
  .media figcaption { font-size: 0.75rem; line-height: 1.3; }

  /* Phones: centre the big price and the BUY NOW row. */
  .price-row { justify-content: center; }
  .price-note { max-width: 11rem; }
  .pitch > .cta-row { justify-content: center; }
}

/* Rotated sticker and arrows must never make phones scroll sideways. */
html { overflow-x: clip; }

/* Bigger tap area for the sound toggle without making the icon bigger. */
.reel-sound::before {
  content: "";
  position: absolute;
  inset: -0.5rem;
}

.sticker {
  position: absolute;
  top: -1.25rem;
  right: -0.75rem;
  width: clamp(5.5rem, 16vw, 7.5rem);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: var(--yellow);
  text-decoration: none;
  transform: rotate(-12deg);
  transition: transform 150ms ease;
  filter: drop-shadow(0 2px 0 var(--ink));
}

.sticker:hover, .sticker:focus-visible { transform: rotate(-6deg) scale(1.06); }

.sticker-burst { position: absolute; inset: 0; width: 100%; height: 100%; }

.sticker-text {
  position: relative;
  font-family: var(--display);
  font-size: clamp(0.95rem, 2.6vw, 1.25rem);
  line-height: 1;
  text-align: center;
  color: var(--red);
  letter-spacing: 0;
  transform: rotate(0deg);
}

/* Second sticker: buy one for a PAQ member. Red circle, bottom-left of the product photo. */
.gift-badge {
  position: absolute;
  left: -0.6rem;
  bottom: 1rem; /* sits on the photo, clear of the caption below it */
  width: clamp(5rem, 11vw, 6.75rem);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 0.55rem;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  text-decoration: none;
  text-align: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(0.72rem, 1.5vw, 0.9rem);
  line-height: 1.05;
  transform: rotate(10deg);
  transition: transform 150ms ease;
}

.gift-badge:hover, .gift-badge:focus-visible { transform: rotate(4deg) scale(1.06); }

@media (max-width: 51.99rem) {
  .gift-badge { width: 4.6rem; font-size: 0.66rem; padding: 0.4rem; left: -0.4rem; bottom: 0.35rem; }
}

/* Color chips float over the photo's top-left corner (clear of the BUY NOW sticker top-right
   and the gift badge bottom-left) so they add no height: the landing page must stay one screen
   on laptops and keep BUY NOW above the fold on phones. Tap to swap grey / black. */
.color-switch {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
}

.color-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font: inherit;
  font-size: 0.8rem;
  line-height: 1;
  padding: 0.3rem 0.5rem;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  cursor: pointer;
}

.color-chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.swatch { width: 0.8rem; height: 0.8rem; border-radius: 50%; border: 1px solid currentColor; flex: none; }
.swatch-grey { background: #8f9094; }
.swatch-black { background: #111111; }

/* Quick fade while the photo swaps color. */
#product-photo { transition: opacity 150ms ease; }
#product-photo.is-swapping { opacity: 0.35; }

/* "NOW IN BLACK!" starburst: bottom-right of the photo, opposite the gift badge. Tapping it shows black. */
.black-sticker {
  position: absolute;
  right: -0.6rem;
  bottom: 1rem;
  width: clamp(4.75rem, 12vw, 6.25rem);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
  transform: rotate(8deg);
  transition: transform 150ms ease;
  filter: drop-shadow(0 2px 0 var(--yellow));
}

.black-sticker:hover, .black-sticker:focus-visible { transform: rotate(2deg) scale(1.06); }

/* Thick yellow outline so the black starburst still stands out when the photo itself is black. */
.black-sticker .sticker-burst { overflow: visible; stroke: var(--yellow); stroke-width: 12; stroke-linejoin: round; paint-order: stroke; }

.black-sticker-text {
  position: relative;
  font-family: var(--display);
  font-size: clamp(0.72rem, 1.6vw, 0.95rem);
  line-height: 1;
  text-align: center;
  color: var(--yellow);
}

/* Phones: smaller chips, tucked closer to the corner. */
@media (max-width: 51.99rem) {
  .color-switch { top: 0.4rem; left: 0.4rem; gap: 0.25rem; }
  .color-chip { font-size: 0.7rem; padding: 0.25rem 0.4rem; gap: 0.25rem; }
  .black-sticker { width: 4.4rem; right: -0.4rem; bottom: 0.35rem; }
  .black-sticker-text { font-size: 0.62rem; }
  .swatch { width: 0.6rem; height: 0.6rem; }
}

/* The pitch: headline, blurb, price, button, facts */

.pitch {
  display: grid;
  gap: 1rem;
  max-width: var(--measure);
}

h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.1rem, 5.2vw, 3.25rem);
  line-height: 1;
  letter-spacing: 0.005em;
}

.blurb { max-width: 32rem; }

.placeholder-copy {
  border: 2px dashed var(--mute);
  padding: 0.75rem 1rem;
  color: var(--mute);
}

.placeholder-inline {
  background: var(--yellow);
  padding: 0 0.25em;
}

.price-row {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.price {
  font-family: var(--display);
  font-size: clamp(3.5rem, 9vw, 5.5rem);
  line-height: 0.9;
}

.price-note {
  display: flex;
  align-items: flex-end;
  gap: 0.25rem;
  padding-bottom: 0.35rem;
  max-width: 14rem;
  font-weight: 500;
  line-height: 1.25;
}

.arrow {
  width: 3.75rem;
  height: 1.9rem;
  color: var(--red);
  flex: none;
}

.arrow-to-price { transform: rotate(-150deg) scaleY(-1); margin-bottom: 0.25rem; }

.arrow-right { transform: scaleX(-1); }

.cta-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.button {
  display: inline-block;
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  color: var(--paper);
  background: var(--red);
  border: 0;
  padding: 0.6em 1.2em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0.25rem 0.25rem 0 var(--ink);
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.button:hover { background: var(--red-dark); }

.button:active { transform: translate(0.15rem, 0.15rem); box-shadow: 0.1rem 0.1rem 0 var(--ink); }

.button-big {
  font-size: clamp(1.5rem, 4vw, 1.9rem);
  padding: 0.45em 1.1em;
}

.facts {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  font-size: 0.9375rem;
}

.facts li {
  padding-left: 1.1rem;
  position: relative;
}

.facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--red);
}

/* ---------- Order page ---------- */

.order {
  max-width: 36rem;
  margin: 0 auto;
  padding: var(--gutter);
  padding-bottom: 4rem;
  display: grid;
  gap: 1.5rem;
}

.order-top { display: grid; gap: 0.5rem; }

.back {
  font-size: 0.9375rem;
  justify-self: start;
}

.summary {
  display: grid;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 2px solid var(--ink);
}

/* Both colors full size, side by side, above the product text. */
.summary-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }

.summary-photos figure { margin: 0; display: grid; gap: 0.25rem; }

.summary img { width: 100%; height: auto; aspect-ratio: 1200 / 1305; object-fit: cover; background: var(--panel); border: 2px solid var(--ink); }

.summary-photos figcaption { font-size: 0.875rem; font-weight: 700; text-align: center; }

.summary-name { font-weight: 700; }

.summary-pickup { margin-top: 0.25rem; }

.form { display: grid; gap: 1rem; }

/* Running total above the button, so the price is never a surprise at the end. */
.order-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 2px solid var(--ink);
  font-weight: 700;
  font-size: 1.0625rem;
}

.order-total strong { font-family: var(--display); font-size: 1.6rem; line-height: 1; }

.order-total s { color: var(--mute); font-weight: 400; margin-right: 0.25rem; }

.field { display: grid; gap: 0.375rem; }

label, legend { font-weight: 700; }

.hint { font-size: 0.875rem; color: var(--mute); }

input[type="text"], input[type="email"], input[type="tel"], input[type="number"], select {
  font: inherit;
  width: 100%;
  min-height: 3rem;
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
}

select {
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10' viewBox='0 0 16 10'%3E%3Cpath d='M1 1l7 7 7-7' fill='none' stroke='%23000' stroke-width='2.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
}

.field.is-invalid input, .field.is-invalid select { border-color: var(--red); }

/* Color and size side by side, one pair per zip. */
.pick-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }

/* Chip-in amounts: preset buttons plus an "other amount" box. */
.field-label { font-weight: 700; }

.amount-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.375rem; }

.amount-chip {
  display: grid;
  place-items: center;
  min-height: 3rem;
  border: 2px solid var(--line);
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 400;
  cursor: pointer;
}

.amount-chip input { position: absolute; opacity: 0; width: 0; height: 0; }

.amount-chip:has(input:checked) { border-color: var(--ink); background: var(--ink); color: var(--paper); }

.amount-chip:has(input:focus-visible) { outline: 3px solid var(--red); outline-offset: 3px; }

.donation-other-label { font-weight: 400; font-size: 0.875rem; color: var(--mute); margin-top: 0.25rem; }

.donation-other { display: flex; align-items: center; gap: 0.4rem; }

.donation-other span { font-family: var(--display); font-size: 1.25rem; flex: none; }

/* Without this the flex wrapper shrinks the box to its content; it should match every other input. */
.donation-other input { flex: 1; min-width: 0; }

/* Coupon feedback under the code box. */
.hint.coupon-ok { color: #1e7b34; font-weight: 700; }
.hint.coupon-bad { color: var(--red); font-weight: 700; }
#coupon { text-transform: uppercase; }

.methods {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.methods legend { padding: 0; margin-bottom: 0.35rem; }

.method {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.55rem 0.6rem;
  border: 2px solid var(--line);
  cursor: pointer;
  font-weight: 400;
}

.method + .method { margin-top: 0.375rem; }

.method:has(input:checked) { border-color: var(--ink); background: var(--panel); }

.method input {
  margin: 0.3rem 0 0;
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--red);
  flex: none;
}

.method-body { display: grid; gap: 0.15rem; }

.method-name { font-weight: 700; }

.method-detail { font-size: 0.8125rem; line-height: 1.3; color: var(--mute); }

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.cta-row-form { margin-top: 0.25rem; }

.cta-row-form .button {
  flex: 1;
  font-size: clamp(1.1rem, 4.8vw, 1.4rem);
  text-align: center;
  padding: 0.55em 1em;
}

.cta-row-form .button[disabled] { opacity: 0.6; cursor: wait; }

.status {
  display: none;
  padding: 0.75rem 1rem;
  border: 2px solid var(--ink);
  background: var(--panel);
  font-size: 0.9375rem;
}

.status.is-visible { display: block; }

.status.is-warning { background: var(--yellow); }

.status.is-error { border-color: var(--red); color: var(--red-dark); background: var(--paper); }

.status code { font-family: ui-monospace, Menlo, monospace; font-size: 0.85em; }

/* Venmo confirmation */

.confirm { display: grid; gap: 1.25rem; }

h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  line-height: 1.05;
}

.order-id { font-family: ui-monospace, Menlo, monospace; font-size: 1.05em; background: var(--yellow); padding: 0 0.2em; }

.venmo-card {
  border: 2px solid var(--ink);
  padding: 0.75rem 1rem;
  display: grid;
  gap: 0.35rem;
  font-size: 1.125rem;
}

.venmo-line { display: flex; gap: 0.75rem; align-items: baseline; }

.venmo-label { width: 4.5rem; flex: none; color: var(--mute); font-size: 0.875rem; }

/* Motion */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* Comic Sans has no heavy display cut, so the big type goes bold instead. */
h1, h2, .price, .button, .sticker-text, .clock, .clock b, .sticky-buy { font-weight: 700; }

/* ---------- Desktop window sizes ---------- */

/* Never let a button label wrap onto two lines (it made BUY NOW!! a tall block around 830–900px wide). */
.button { white-space: nowrap; }

/* Narrow desktop windows and tablets (832–1023px): the pitch column is too narrow for the
   price row and BUY NOW!! with arrows, so stack the photos above the pitch like on phones. */
@media (min-width: 52rem) and (max-width: 63.99rem) {
  .hero-body { grid-template-columns: minmax(0, 1fr); }
  .media { width: 100%; max-width: 38rem; justify-self: center; }
  .pitch { justify-self: center; max-width: 38rem; width: 100%; }
  .price-row, .pitch > .cta-row { justify-content: center; }
}

/* Short laptop windows (1366x768, 1280x720, browser bars eating height): shrink the photos by
   window height and tighten spacing so the landing page still fits one screen. */
@media (min-width: 52rem) and (max-height: 50rem) {
  .media { width: 100%; max-width: calc((100svh - 20rem) * 1.12); justify-self: start; }
  .hero { gap: 0.6rem; padding-top: 0.6rem; }
  .hero-body { gap: 2rem; }
  .pitch { gap: 0.6rem; }
  .price { font-size: 4.75rem; }
  h1 { font-size: 2.9rem; }
}

/* Very short windows (small laptops with the browser bar showing): smaller headline and price. */
@media (min-width: 52rem) and (max-height: 45rem) {
  h1 { font-size: 2.4rem; }
  .price { font-size: 4rem; }
  .blurb { font-size: 0.9375rem; line-height: 1.4; }
  .hero-foot .facts { gap: 0.15rem; }
  .hero-foot { gap: 0.5rem 2.5rem; }
}

/* Big monitors: scale the whole layout up a little so it doesn't sit tiny in the middle. */
@media (min-width: 112.5rem) and (min-height: 62.5rem) {
  html { font-size: 112.5%; }
}
@media (min-width: 150rem) and (min-height: 81.25rem) {
  html { font-size: 131.25%; }
}

/* Stacked layouts (phones and narrow windows): centre the headline and blurb to match the centred price and BUY NOW. */
@media (max-width: 63.99rem) {
  .pitch h1, .pitch .blurb { text-align: center; }
  .pitch .blurb { margin-inline: auto; }
}
