/* Slop Vancouver front page (js/landing.js). Civic Drip styling, provisional (Claude Design handoff, Bridge work 1110):
   cream paper, ink, one orange. Shown only while <html data-landing> is set (index.html decides before first paint). */

html:not([data-landing]) #landing { display: none; }
html[data-landing] #loading-overlay { display: none; }
html[data-landing], html[data-landing] body { background: #f1ede5; overflow: auto; height: auto; }
/* The page itself scrolls, not the body (8 Nov 2026): style.css gives html and body `overscroll-behavior: none` for the game,
   so a body that is its own scroll box (overflow: auto) swallowed the wheel, Page Down and touch scrolls without passing
   them to the page, and the front page could not scroll at all. A visible body hands scrolling to the page */
html[data-landing] body { overflow: visible; }
/* Slopcouver Looks (5 Nov 2026, the iPad bug docs/bugs/2026-11-05-ipad-page-zoom-stuck.md): no double-tap page zoom
   anywhere on the front page (a double tap on Start exploring zoomed the page, and the game then opened zoomed in);
   a deliberate pinch still zooms for reading, and the game resets it (hud-ui.js) */
html[data-landing] { touch-action: manipulation; }

.landing {
  --paper: #f1ede5;
  --ink: #1f2a30;
  --ink-2: #4a565c;
  --line: #c9c2b4;
  --orange: #ff5a1f;
  --orange-ink: #1f2a30;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --display: 'Arial Black', 'Helvetica Neue', Arial, system-ui, sans-serif;
  position: relative;
  z-index: 10000;
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, 'Inter', 'Helvetica Neue', Arial, sans-serif;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.landing *, .landing *::before, .landing *::after { box-sizing: border-box; }
.landing[hidden] { display: none !important; }

.landing-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1120px; width: 100%; margin: 0 auto; }
/* the top bar stays at the top of the page as it scrolls (the user, 8 Nov: "a sticky header"): full width over the
   landing's own padding, a solid paper background and a thin rule; the game never shows it (Start hides #landing) */
.landing .landing-bar {
  position: sticky; top: 0; z-index: 20; display: block; max-width: none;
  width: auto; margin: calc(-1 * max(16px, env(safe-area-inset-top))) calc(-1 * max(16px, env(safe-area-inset-right))) 0 calc(-1 * max(16px, env(safe-area-inset-left)));
  padding: max(10px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.landing-bar-in { display: flex; align-items: center; gap: 12px; max-width: 1120px; margin: 0 auto; min-height: 36px; }
.landing-bar-in .landing-wordmark { flex: none; }
.landing-nav { display: flex; align-items: center; gap: 4px 18px; margin-left: auto; flex-wrap: nowrap; white-space: nowrap; }
.landing-nav a { color: var(--ink); font: 600 14px/1 -apple-system, BlinkMacSystemFont, 'Inter', Arial, sans-serif; text-decoration: none; padding: 10px 0; }
.landing-nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
.landing-bar-in .landing-badge { flex: none; }
.landing-bar-start {
  flex: none; font: 800 13px/1 var(--display); text-transform: uppercase; letter-spacing: 0.04em; color: var(--orange-ink);
  background: var(--orange); border: 2px solid var(--ink); border-radius: 4px; padding: 8px 12px; cursor: pointer; box-shadow: 2px 2px 0 var(--ink);
}
.landing-bar-start[hidden] { display: none; }
/* what the bar can cover: anything scrolled to sits below it */
.landing [id] { scroll-margin-top: 72px; }
.landing-wordmark { display: inline-flex; align-items: center; gap: 8px; font: 900 15px/1 var(--display); text-transform: uppercase; letter-spacing: 0.02em; }
.landing-wordmark b { background: var(--orange); color: var(--ink); padding: 3px 6px 2px; font-weight: 900; }
.landing-badge { font: 600 12px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); border: 1px solid var(--line); padding: 6px 8px; }

.landing-main {
  flex: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 0 32px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 48px;
  align-items: center;
}
.landing-kicker { margin: 0 0 14px; font: 600 12px/1.4 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); }
.landing-title {
  margin: 0 0 20px;
  font: 900 clamp(34px, 5.4vw, 72px)/0.98 var(--display);
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
/* whole phrases wrap, never a word or the comma on its own */
.landing-title .nb { white-space: nowrap; }
.landing-title:focus { outline: none; }
.landing-lede { margin: 0 0 28px; max-width: 34em; font-size: 18px; color: var(--ink-2); }

.landing-cta {
  min-height: 56px;
  padding: 0 28px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--orange);
  color: var(--orange-ink);
  font: 900 18px/1 var(--display);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  touch-action: manipulation;
}
.landing-cta:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.landing-cta:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.landing-note { margin: 14px 0 0; font-size: 14px; color: var(--ink-2); }

.landing-graphics { margin: 28px 0 0; padding: 0; border: 0; min-width: 0; }
.landing-graphics legend { padding: 0; margin-bottom: 8px; font: 600 12px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); }
.landing-seg { display: inline-flex; border: 2px solid var(--ink); border-radius: 4px; overflow: hidden; }
.landing-seg button {
  min-width: 72px;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-left: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: 700 15px/1 -apple-system, BlinkMacSystemFont, 'Inter', Arial, sans-serif;
  cursor: pointer;
  touch-action: manipulation;
}
.landing-seg button:first-child { border-left: 0; }
.landing-seg button[aria-checked="true"] { background: var(--ink); color: var(--paper); }
.landing-graphics-note { margin: 8px 0 0; min-height: 1.5em; font-size: 14px; color: var(--ink-2); max-width: 30em; }

.landing :focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.landing .landing-cta:focus-visible { outline-offset: 5px; }
.landing-seg button:focus-visible { outline: 3px solid var(--orange); outline-offset: -5px; }
.landing .landing-hero-pause:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* ---- The cinematic cover (Slopcouver Looks, 7 Nov 2026) ------------------------------------------------------------
   The game's own footage: the poster <img> is the first paint (sized by its width/height, so nothing moves when it
   arrives); landing.js lays the muted loop over it after load. On a wide screen the copy sits on a paper card over the
   cover's water; narrower, the card follows the cover and overlaps its foot. */
.landing-main { display: block; position: relative; padding: 24px 0 36px; }
.landing-hero { margin: 0; container-type: inline-size; }
/* The cover's width and height in whole pixels (the 4 px are its border). With a fractional height (aspect-ratio alone gives
   253.25 px at 375 wide) Chrome counted the poster as 339x253 and the loop's first frame, in the same box, as
   339x253.25, so the loop became a "larger" paint at ~3.8 s on a throttled phone; whole pixels make them the same size,
   and the poster stays the largest paint. aspect-ratio stays as the fallback where round() is not supported. */
@supports (height: round(down, 10.5px, 1px)) {
  .landing-hero-frame { width: round(down, 100cqw, 1px); height: calc(round(down, calc((round(down, 100cqw, 1px) - 4px) * 9 / 16), 1px) + 4px); }
}
.landing-hero-frame {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; border: 2px solid var(--ink); border-radius: 4px;
  box-shadow: 6px 6px 0 var(--ink);
  background: linear-gradient(180deg, #4f86ad 0%, #8fb3c9 44%, #2f6f7a 45%, #1d4f5a 100%);
}
.landing-hero-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
video.landing-hero-media { opacity: 0; transition: opacity 0.6s ease; }
video.landing-hero-media.is-playing { opacity: 1; }
.landing-hero-tag {
  position: absolute; left: 12px; top: 12px; padding: 5px 8px; background: var(--paper); color: var(--ink);
  border: 2px solid var(--ink); font: 700 11px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em;
}
/* in .landing-main after the copy (tab order: after Start), placed on the cover's top-right corner: the frame is the
   first thing in .landing-main, full width, below its top padding and 2 px border */
.landing-hero-pause {
  position: absolute; z-index: 2; right: 14px; top: calc(24px + 14px); min-width: 44px; min-height: 44px; padding: 0 12px;
  border: 2px solid var(--ink); border-radius: 4px; background: var(--paper); color: var(--ink);
  font: 700 12px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; cursor: pointer; touch-action: manipulation;
}
.landing-hero figcaption { margin-top: 12px; font: 500 12px/1.4 var(--mono); color: var(--ink-2); }

.landing-copy {
  position: relative; z-index: 1; margin: -48px 16px 0; padding: 22px 22px 18px;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 4px; box-shadow: 6px 6px 0 var(--ink);
}
.landing-copy .landing-title { font-size: clamp(32px, 6.4vw, 56px); margin-bottom: 14px; }
.landing-copy .landing-lede { font-size: 17px; margin-bottom: 20px; }
.landing-copy .landing-graphics { margin-top: 20px; }

/* narrower than the card-over-cover layout: the card overlaps the cover's foot, so the caption would peek out under it */
@media (max-width: 1023px) { .landing-hero figcaption { display: none; } }
@media (min-width: 1024px) {
  /* the card over the cover's lower left, on the water; the caption moves under the frame's right */
  .landing-copy { position: absolute; left: 32px; bottom: 76px; width: 470px; margin: 0; }
  .landing-hero-frame { aspect-ratio: auto; height: clamp(560px, 70vw, 700px); }
  .landing-hero figcaption { text-align: right; }
}

/* The stills: three pictures from the game, lazy (below the fold on a phone) */
.landing-stills { width: 100%; max-width: 1120px; margin: 0 auto; padding: 8px 0 28px; }
.landing-stills h2, .landing-starts h2 { margin: 0 0 14px; font: 800 20px/1.2 -apple-system, BlinkMacSystemFont, 'Inter', Arial, sans-serif; }
.landing-still-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.landing-still { margin: 0; border: 2px solid var(--ink); border-radius: 4px; overflow: hidden; background: #fbf9f5; }
.landing-still img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: #9fb0b6; border-bottom: 2px solid var(--ink); }
.landing-still figcaption { padding: 10px 12px; font: 700 13px/1.3 var(--mono); text-transform: uppercase; letter-spacing: 0.04em; }

.landing-foot { width: 100%; max-width: 1120px; margin: 0 auto; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.landing-foot p { margin: 0; }
.landing-foot a { color: var(--ink); text-underline-offset: 2px; padding: 12px 0; }  /* a larger tap area for an inline link */


.landing-starts { width: 100%; max-width: 1120px; margin: 0 auto; padding: 8px 0 32px; }
.landing-more { width: 100%; max-width: 1120px; margin: 0 auto; padding: 8px 0 32px; }
.landing-more h2, .landing-now h2 { margin: 0 0 14px; font: 800 20px/1.2 -apple-system, BlinkMacSystemFont, 'Inter', Arial, sans-serif; }
.landing-now { width: 100%; max-width: 1120px; margin: 0 auto; padding: 8px 0 32px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.landing-now-col { border: 2px solid var(--ink); border-radius: 4px; background: #fbf9f5; padding: 18px 18px 8px; }
.landing-now-note { margin: -8px 0 10px; font: 600 12px/1.4 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }
.landing-list { margin: 0; padding: 0 0 0 1.1em; font-size: 15px; color: var(--ink-2); }
.landing-list li { margin: 0 0 10px; }
.landing-foot .landing-links { margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 0 18px; font-weight: 600; }
.landing-foot .landing-links a { padding: 4px 0; }
.landing-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.landing-card {
  display: flex; flex-direction: column; gap: 6px; height: 100%; min-height: 48px; padding: 18px 18px 16px;
  border: 2px solid var(--ink); border-radius: 4px; background: #fbf9f5; color: var(--ink); text-decoration: none;
  transition: transform 0.08s ease, box-shadow 0.08s ease; touch-action: manipulation;
}
.landing-card:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.landing-card-name { font: 900 22px/1.05 var(--display); text-transform: uppercase; }
.landing-card-text { font-size: 15px; color: var(--ink-2); }
.landing-card-go { margin-top: auto; padding-top: 6px; font: 600 13px/1.3 var(--mono); }

@media (max-width: 760px) {
  .landing-cards { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  /* the bar on a phone: one row, the most used links */
  .landing-bar-in .landing-badge, .landing-nav-new { display: none; }
  .landing-nav { gap: 14px; }
  .landing-now { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .landing-main { padding: 16px 0 24px; }
  .landing-hero-frame { box-shadow: 4px 4px 0 var(--ink); }
  .landing-hero-tag { left: 8px; top: 8px; }
  .landing-hero-pause { right: 10px; top: calc(16px + 10px); }
  /* taller on a phone, held on the skyline (the cover's right half) */
  .landing-hero-frame { aspect-ratio: 4 / 3; }
  @supports (height: round(down, 10.5px, 1px)) {
    .landing-hero-frame { height: calc(round(down, calc((round(down, 100cqw, 1px) - 4px) * 3 / 4), 1px) + 4px); }
  }
  .landing-hero-media { object-position: 72% 50%; }
  .landing-copy { margin: -28px 8px 0; padding: 18px 16px 16px; box-shadow: 4px 4px 0 var(--ink); }
  .landing-copy .landing-lede { font-size: 16px; }
  /* the stills scroll sideways on a phone, one and a bit at a time */
  .landing-still-list { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 80%; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 4px 8px 0; }
  .landing-still-list > li { scroll-snap-align: start; }
  .landing-cta { width: 100%; }
  .landing-seg { display: flex; width: 100%; }
  .landing-seg button { flex: 1; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { .landing-cta, .landing-card { transition: none; } video.landing-hero-media { display: none; } }
@media (max-width: 420px) {
  .landing-nav-play { display: none; }
  .landing-bar-in { gap: 8px; }
  .landing-bar-in .landing-wordmark { font-size: 12px; gap: 5px; flex: 0 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; }
  .landing-bar-in .landing-wordmark img { width: 20px; height: 20px; }
  .landing-nav { gap: 12px; }
  .landing-nav a { font-size: 13px; }
  .landing-bar-start { padding: 7px 9px; font-size: 12px; }
}
