/* ─────────────────────────────────────────────
   Cozy Drone — palette lifted from the game art
   ───────────────────────────────────────────── */
:root {
  --sand:      #c6ac84;
  --sand-dark: #b2966b;
  --sand-deep: #9c8259;
  --ink:       #000000;
  --ink-soft:  #4a3c28;
  --grass:     #3f7d33;
  --line:      rgba(0, 0, 0, .18);

  --pixel: "Press Start 2P", ui-monospace, monospace;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --wrap: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--ink); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Type ─────────────────────────────────── */
.h {
  font-family: var(--pixel);
  font-size: clamp(15px, 2.6vw, 24px);
  line-height: 1.5;
  margin: 0 0 32px;
  letter-spacing: .5px;
}
.h-sub {
  font-family: var(--pixel);
  font-size: clamp(12px, 1.8vw, 15px);
  margin: 56px 0 24px;
}
.prose { max-width: 62ch; margin: 0 0 20px; }
.prose strong { font-weight: 700; }
.closing { margin-top: 40px; }

/* ── Hero ─────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 12vw, 130px) 0 clamp(64px, 10vw, 110px);
  border-bottom: 3px solid var(--ink);
}

.hero-inner { position: relative; z-index: 1; text-align: center; }

.wordmark {
  width: min(100%, 820px);
  margin: 0 auto;
  image-rendering: pixelated;
}

.tagline {
  max-width: 42ch;
  margin: 32px auto 0;
  font-size: clamp(17px, 2.4vw, 21px);
  line-height: 1.55;
  color: var(--ink-soft);
}

/* Plain text — no box or background, so it can't read as a button */
.badge {
  display: table;          /* own line, but only as wide as its text */
  margin: 40px auto 28px;
  font-family: var(--pixel);
  font-size: clamp(11px, 1.7vw, 15px);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink);
}

.platforms {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 0;
  font-size: 19px;
  color: var(--ink-soft);
}
/* Keeps the OS icon glued to its label when the row wraps */
.platform-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
/* Inline so it needs no network request and inherits the text colour */
.os-icon {
  width: 1.05em;
  height: 1.05em;
  fill: currentColor;
  shape-rendering: crispEdges;   /* keeps the panes hard-edged like the rest of the art */
  flex: none;
}

/* Drifting planes, straight out of the capsule art */
.sky { position: absolute; inset: 0; pointer-events: none; }
.plane {
  position: absolute;
  width: 12px; height: 26px;
  /* nose points right, matching the drift direction */
  background: no-repeat center/contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 13' shape-rendering='crispEdges'%3E%3Cg fill='%23ffffff'%3E%3Crect x='0' y='6' width='6' height='1'/%3E%3Crect x='3' y='0' width='1' height='13'/%3E%3Crect x='1' y='4' width='1' height='5'/%3E%3C/g%3E%3C/svg%3E");
  opacity: .5;
  animation: drift linear infinite;
}
/* kept clear of the centre band so nothing crosses the wordmark */
.plane-1 { top: 10%;  animation-duration: 34s; animation-delay: -4s;  transform: scale(1.1); }
.plane-2 { top: 76%;  animation-duration: 46s; animation-delay: -22s; opacity: .35; }
.plane-3 { top: 88%;  animation-duration: 58s; animation-delay: -40s; opacity: .28; transform: scale(.8); }

@keyframes drift {
  from { left: -6%; }
  to   { left: 106%; }
}
@media (prefers-reduced-motion: reduce) {
  .plane { animation: none; display: none; }
}

/* ── Buttons ──────────────────────────────── */
.btn {
  display: inline-block;
  padding: 18px 30px;
  background: var(--ink);
  color: var(--sand);
  border: 3px solid var(--ink);
  font-family: var(--pixel);
  font-size: clamp(10px, 1.5vw, 13px);
  letter-spacing: 1px;
  text-decoration: none;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, .25);
  transition: transform .08s, box-shadow .08s, background .12s;
}
.btn:hover  { background: var(--grass); color: #fff; }
.btn:active { transform: translate(4px, 4px); box-shadow: 2px 2px 0 rgba(0, 0, 0, .25); }
.btn:focus-visible { outline: 3px solid var(--grass); outline-offset: 4px; }

/* ── Sections ─────────────────────────────── */
.section { padding: clamp(64px, 9vw, 104px) 0; }
.section-alt { background: var(--sand-dark); border-block: 3px solid var(--ink); }
.section-cta { text-align: center; background: var(--sand-deep); border-top: 3px solid var(--ink); }
.section-cta .prose { margin: 0 auto 36px; }

/* ── Trailer ──────────────────────────────── */
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 3px solid var(--ink);
  background: #000;
  overflow: hidden;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, .22);
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Click-to-load facade — keeps YouTube off the page until asked */
.video-facade {
  position: absolute; inset: 0;
  width: 100%; padding: 0;
  border: 0; background: #000;
  cursor: pointer;
}
.video-facade img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.video-facade:hover img { opacity: 1; }

.play {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 88px; height: 62px;
  display: grid; place-items: center;
  background: var(--ink);
  border: 3px solid #fff;
  color: #fff;
  font-size: 24px;
  line-height: 1;
}
.video-facade:hover .play { background: var(--grass); }

.video-soon {
  position: absolute; inset: 0;
  display: grid; place-items: center;
}
.video-soon img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .35;
}
.video-soon p {
  position: relative;
  margin: 0;
  padding: 14px 20px;
  background: var(--ink);
  color: var(--sand);
  font-family: var(--pixel);
  font-size: clamp(10px, 1.6vw, 14px);
  letter-spacing: 1px;
}
.video-soon a { color: var(--sand); }

/* ── Specs list ───────────────────────────── */
.specs { margin: 0; max-width: 720px; }
.specs > div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 14px 0;
  border-bottom: 2px solid var(--line);
}
.specs dt {
  flex: 0 0 200px;
  font-family: var(--pixel);
  font-size: 10px;
  line-height: 1.8;
  text-transform: uppercase;
}
.specs dd { flex: 1 1 260px; margin: 0; color: var(--ink-soft); }

/* ── Screenshots carousel ─────────────────── */
.rail {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;          /* the dots are the affordance */
}
.rail::-webkit-scrollbar { display: none; }
.rail:focus-visible { outline: 3px solid var(--grass); outline-offset: 6px; }

@media (prefers-reduced-motion: reduce) {
  .rail { scroll-behavior: auto; }
}

.slide {
  flex: 0 0 100%;
  margin: 0;
  scroll-snap-align: center;
}
.slide img {
  width: 100%;
  height: auto;                   /* files are all 16:9, so no crop */
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, .22);
  cursor: zoom-in;
}
/* No image-rendering: pixelated here on purpose. The sources are 2400px wide
   and display at ~1030, so they always downscale — and nearest-neighbour
   downscaling drops pixels rather than averaging them, which shreds the 1px
   villagers and HUD text. Smooth downsampling of a 2x source is what keeps
   these crisp. Only use `pixelated` where an image is scaled UP. */

/* Controls are JS-driven — without JS the rail is still swipe/scrollable */
.rail-bar { display: none; }
.gallery.is-ready .rail-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 26px;
}

.rail-nav {
  width: 46px; height: 40px;
  display: grid; place-items: center;
  background: var(--ink);
  color: var(--sand);
  border: 3px solid var(--ink);
  font-size: 13px;
  cursor: pointer;
}
.rail-nav:hover:not(:disabled) { background: var(--grass); color: #fff; }
.rail-nav:disabled { opacity: .3; cursor: default; }
.rail-nav:focus-visible { outline: 3px solid var(--grass); outline-offset: 3px; }

.rail-dots { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.dot {
  width: 13px; height: 13px;
  padding: 0;
  background: transparent;
  border: 2px solid var(--ink);
  cursor: pointer;
}
.dot[aria-selected="true"] { background: var(--ink); }
.dot:focus-visible { outline: 3px solid var(--grass); outline-offset: 3px; }

.rail-count {
  font-family: var(--pixel);
  font-size: 10px;
  min-width: 68px;
  text-align: right;
}

@media (max-width: 560px) {
  .rail-count { display: none; }
  .gallery.is-ready .rail-bar { gap: 12px; }
}

/* The press header carries three items; side by side they wrap mid-phrase and
   strand the separators, so stack them once the row gets tight. */
@media (max-width: 560px) {
  .platforms-meta {
    flex-direction: column;
    gap: 6px;
  }
  .platforms-meta .sep { display: none; }
}

/* ── Lightbox ─────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  padding: 32px;
  background: rgba(0, 0, 0, .88);
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  border: 3px solid var(--sand);
}
.lightbox-close {
  position: absolute; top: 18px; right: 22px;
  width: 44px; height: 44px;
  background: none; border: 0;
  color: #fff; font-size: 22px;
  cursor: pointer;
}
.lightbox-close:focus-visible { outline: 3px solid var(--grass); }

/* ── Footer ───────────────────────────────── */
.footer {
  padding: 40px 0;
  border-top: 3px solid var(--ink);
  background: var(--sand);
  font-size: 14px;
  color: var(--ink-soft);
}
.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  justify-content: space-between;
}
.footer p { margin: 0; }

@media (max-width: 560px) {
  .specs dt { flex-basis: 100%; }
  .btn { width: 100%; }
}

/* ── Press kit page ───────────────────────── */
.press-hero { padding: clamp(48px, 7vw, 80px) 0; }

/* Logo links home on /press only (index leaves the wordmark inert) */
.wordmark-link {
  display: block;
  width: min(100%, 820px);
  margin: 0 auto;
  cursor: pointer;
}
.wordmark-link .wordmark { width: 100%; }
.wordmark-link:focus-visible { outline: 3px solid var(--grass); outline-offset: 8px; }

/* Plain text subheader — deliberately not boxed like .badge */
.press-kicker {
  margin: 36px 0 0;
  font-family: var(--pixel);
  font-size: clamp(13px, 2vw, 18px);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Stacked, equal-width action buttons */
.press-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  width: min(100%, 400px);
  margin: 40px auto 0;
}
.press-actions .btn { text-align: center; }
.btn-alt { background: transparent; color: var(--ink); }
.btn-alt:hover { background: var(--grass); color: #fff; }

/* Section title + copy/download control on one line */
.press-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 24px;
}
.press-heading .h, .press-heading .h-sub { margin-bottom: 24px; }

.copy-btn {
  padding: 10px 16px;
  background: var(--ink);
  color: var(--sand);
  border: 2px solid var(--ink);
  font-family: var(--pixel);
  font-size: 9px;
  letter-spacing: 1px;
  cursor: pointer;
}
.copy-btn:hover:not(:disabled) { background: var(--grass); color: #fff; }
.copy-btn:disabled { background: var(--grass); color: #fff; }
.copy-btn:focus-visible { outline: 3px solid var(--grass); outline-offset: 3px; }

.dl-link {
  font-size: 14px;
  font-family: var(--body);
  font-weight: 600;
  color: var(--ink);
  text-underline-offset: 3px;
}

.press-note { color: var(--ink-soft); margin-bottom: 36px; }

.desc-block { margin-bottom: 40px; max-width: 760px; }
.desc-block blockquote {
  margin: 0;
  padding: 18px 22px;
  border: 2px solid var(--line);
  border-left: 5px solid var(--ink);
  background: rgba(255, 255, 255, .12);
}

/* Downloadable asset grids (GIFs, screenshots, key art) */
.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px 20px;
}
.asset { margin: 0; }
.asset img {
  width: 100%;
  height: auto;
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, .2);
  background: var(--sand-dark);
}
.asset figcaption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-top: 10px;
  font-size: 14px;
  color: var(--ink-soft);
}
.asset-logo { grid-column: 1 / -1; }
.asset-logo img { padding: 26px 18px; box-sizing: border-box; }
