/**
 * Wallpapers page (/wallpapers/)
 *
 * A standalone, phone-first page - not part of the retro-TV homepage chrome.
 * Branded like tickets/index.html and the promoter dashboard (css/promo.css):
 * brand yellow on near-black, same system-ui font stack.
 *
 * Viewport/container units throughout (vw/vh/vmin/ch), not px/rem, per
 * CLAUDE.md. Every class used in wallpapers/index.html is defined here -
 * tools/validators/check-css-classes.cjs scans this file.
 */

:root {
  --wallpapers-yellow: #F7F751;
  --wallpapers-ink: #0a0a0a;
  --wallpapers-ink-soft: #1c1c1c;
  --wallpapers-border: #333;
  --wallpapers-muted: #b8b8b8;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body.wallpapers-page {
  min-height: 100vh;
  width: 100%;
  background: var(--wallpapers-ink);
  color: var(--wallpapers-yellow);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, "Work Sans", Helvetica, Arial, sans-serif;
}

.wallpapers-container {
  max-width: 120ch;
  margin: 0 auto;
  padding: clamp(4vmin, 5vw, 6vmin) clamp(4vmin, 5vw, 6vmin) clamp(8vmin, 8vw, 10vmin);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(3vmin, 3vh, 5vmin);
  text-align: center;
}

.wallpapers-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1vh;
  width: 100%;
}

.wallpapers-home-link {
  align-self: flex-start;
  color: var(--wallpapers-muted);
  text-decoration: none;
  font-size: clamp(2.4vmin, 1.4vw, 3.2vmin);
}

.wallpapers-home-link:hover {
  color: var(--wallpapers-yellow);
}

.wallpapers-subtitle {
  width: 100%;
  color: var(--wallpapers-muted);
  font-size: clamp(2.8vmin, 1.8vw, 3.8vmin);
  margin: 0;
}

.wallpapers-tickets-link {
  display: inline-block;
  margin-top: 1vh;
  background: var(--wallpapers-yellow);
  color: var(--wallpapers-ink);
  text-decoration: none;
  font-weight: 700;
  border-radius: 0.8vmin;
  padding: 1.2vh 3vmin;
  font-size: clamp(2.6vmin, 1.6vw, 3.4vmin);
}

.wallpapers-tickets-link:hover {
  filter: brightness(1.08);
}

.wallpapers-intro {
  display: flex;
  flex-direction: column;
  gap: 1.4vh;
  width: 100%;
  max-width: 60ch;
}

.wallpapers-intro p {
  margin: 0;
  font-size: clamp(2.6vmin, 1.8vw, 3.6vmin);
  line-height: 1.4;
}

/* "Best for your phone" banner - only shown once js/wallpapers.js has
   worked out a suggestion from the user agent and screen size. Hidden
   via the `hidden` attribute until then, never via a CSS display rule
   here, so there's one source of truth for its visibility. */
.wallpapers-suggestion {
  background: var(--wallpapers-ink-soft);
  border: calc(1 / 400 * 100vw) solid var(--wallpapers-yellow);
  border-radius: 1.2vmin;
  padding: 1.4vh 3vmin;
  font-size: clamp(2.6vmin, 1.5vw, 3.2vmin);
  font-weight: 600;
  max-width: 60ch;
}

/* The altar photo (images/wallpapers/wallpapers-phones.jpg, 1200x1431) and
   its four invisible download hit areas, one per phone. The container is
   sized purely from the image's own aspect ratio so the hit areas' percent
   positions below always line up with the phones regardless of viewport
   width. */
.wallpapers-photo {
  position: relative;
  width: 100%;
  max-width: 70vmin;
  aspect-ratio: 1200 / 1431;
}

.wallpapers-photo-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 1.6vmin;
}

/* Transparent hit areas over each phone in the photo - "left/top/width/
   height" are % of the photo box, matched to the phones by eye. Where two
   overlap (iphone-max and android-standard, top-left vs bottom-left) DOM
   order in js/wallpapers.js decides which phone is "in front" and wins the
   click - no z-index needed. */
.wallpaper-hitarea {
  position: absolute;
  display: block;
  border-radius: 1vmin;
  outline-offset: calc(2 / 400 * 100vw);
}

.wallpaper-hitarea:focus-visible {
  outline: calc(3 / 400 * 100vw) solid var(--wallpapers-yellow);
}

.wallpaper-hitarea--iphone-max {
  left: 22.5%;
  top: 15.5%;
  width: 25%;
  height: 40%;
}

.wallpaper-hitarea--android-flagship {
  left: 54%;
  top: 16%;
  width: 24.3%;
  height: 42%;
}

.wallpaper-hitarea--android-standard {
  left: 15.8%;
  top: 51.4%;
  width: 21.3%;
  height: 35.2%;
}

.wallpaper-hitarea--iphone {
  left: 64.6%;
  top: 52%;
  width: 20.6%;
  height: 34.7%;
}

/* The two-column link list below the photo: left = iPhone sizes, right =
   Android sizes (js/wallpapers.js LINK_COLUMNS), each a direct download
   link to the matching full file. */
.wallpapers-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2vmin, 3vw, 5vmin);
  width: 100%;
  max-width: 60ch;
}

.wallpapers-links-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4vh;
}

.wallpaper-link {
  display: inline-block;
  background: var(--wallpapers-ink-soft);
  border: calc(1 / 400 * 100vw) solid var(--wallpapers-border);
  color: var(--wallpapers-yellow);
  text-decoration: none;
  font-weight: 700;
  border-radius: 0.8vmin;
  padding: 1.2vh 3vmin;
  font-size: clamp(2.4vmin, 1.6vw, 3.2vmin);
  width: 100%;
}

.wallpaper-link:hover {
  border-color: var(--wallpapers-yellow);
}

/* Highlighted by js/wallpapers.js on the one link it thinks best matches
   this visitor's phone. The others stay fully visible and downloadable -
   this is a highlight, never a filter. */
.wallpaper-link--best {
  background: var(--wallpapers-yellow);
  border-color: var(--wallpapers-yellow);
  color: var(--wallpapers-ink);
}
