/* ---------------------------------------------------------------------------
   Wander's stylesheet, which is Match Cut's: the same white page, the same
   near-black ink, the same system faces and the same true-black dark mode, so
   the two apps' sites read as one pair rather than two designs.

   What is not carried over is the television. Match Cut's hero sits on a
   moving field of static under scanlines, with white type on it, and its
   SMPTE color bars rule the page. Wander has no equivalent and inventing one
   would be inventing a second idea, so the hero is simply the page's own
   white -- which is also what the app's launch screen is now.

   The contact sheet this site used to be (cream stock, IBM Plex, the
   chinagraph red, frame numbers, roll ids, figcaptions) is gone with it. The
   screenshots, the copy and the icon are Wander's; everything around them is
   Match Cut's.
   ------------------------------------------------------------------------ */

:root {
  --page: #ffffff;
  --ink: #111111;
  --body: #3a3a3c;
  --muted: #6e6e73;
  --line: #e5e5ea;
  --surface: #f5f5f7;
  --button: #111111;
  --button-ink: #ffffff;
  --link-hover: #6e6e73;


  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #000000;
    --ink: #f5f5f7;
    --body: #c7c7cc;
    --muted: #8e8e93;
    --line: #2c2c2e;
    --surface: #1c1c1e;
    --button: #f5f5f7;
    --button-ink: #000000;
    --link-hover: #8e8e93;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--body);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }

a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--link-hover); }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 720px; }

/* ---------------------------------------------------------------- the bars */
/* A hairline of the test pattern across the top: the brand, said once. */

/* ---------------------------------------------------------------- the hero */
.hero {
  position: relative;
  /* The same height as every other page's, and centered the same way; see
     assets/style.css. The nav is taken out of the flow to make that true: as
     a flex item it was part of what got centered, so everything below it was
     pushed down by half the nav's height, and the padding being heavier at
     the bottom than the top moved it again. Out of flow, with equal padding
     top and bottom, `justify-content: center` means what it says. */
  min-height: 640px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 24px;
  text-align: center;
  /* Wander's hero is light -- dark text on its topo ground -- unlike the
     family's, which are all dark. Taking #fff from the shared stylesheet put
     white text on a white page. */
  background: var(--page);
  color: var(--body);
  overflow: hidden;
}

/* Lifts real content above the drifting ground below, which sits at 0. */
.hero > * { position: relative; z-index: 2; }

.hero-icon {
  width: 112px;
  height: auto;
  /* `img` is display:block, so text-align cannot center this one. */
  margin: 0 auto 28px;
  filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.18));
}
.hero.compact .hero-icon { width: 72px; margin: 0 auto 20px; }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 0 16px;
  color: var(--ink);
}
.hero.compact h1 { font-size: clamp(2rem, 5vw, 2.8rem); letter-spacing: -0.03em; }

.hero p.tagline {
  font-size: clamp(1.1rem, 2.4vw, 1.3rem);
  line-height: 1.45;
  color: var(--muted);
  max-width: 32ch;
  margin: 0 auto;
}

.hero-actions { margin-top: 32px; }

.release-meta {
  font-size: 0.875rem;
  color: var(--muted);
}
/* 18px, which is what Match Cut sets inline on this one line, so the two
   heroes end at the same height given the same content. */
.hero .release-meta { color: var(--muted); margin-top: 18px; }
.hero .release-meta a { color: var(--ink); }

/* ---------------------------------------------------------------- the nav */
.hero .topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 4px 0;
  z-index: 4;
}
.hero .topnav .wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.hero .topnav .wordmark:hover { color: var(--muted); }

.hero .topnav .nav-links { display: flex; gap: 28px; }
.hero .topnav .nav-links a {
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
}
.hero .topnav .nav-links a:hover,
.hero .topnav .nav-links a[aria-current="page"] { color: var(--ink); }

.hero .topnav .nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  color: var(--ink);
  padding: 4px;
  border-radius: 8px;
  cursor: pointer;
}
.hero .topnav .nav-toggle:hover { background: var(--surface); }
.hero .topnav .nav-toggle:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

@media (max-width: 720px) {
  .hero .topnav { flex-wrap: wrap; position: relative; }
  .hero .topnav .nav-toggle { display: block; }
  .hero .topnav .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    flex-direction: column;
    gap: 0;
    min-width: 200px;
    padding: 6px;
    background: var(--page);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    z-index: 5;
  }
  .hero .topnav .nav-toggle[aria-expanded="true"] + .nav-links { display: flex; }
  .hero .topnav .nav-links a {
    color: var(--ink);
    font-size: 1rem;
    padding: 10px 14px;
    border-radius: 9px;
    text-align: left;
  }
  .hero .topnav .nav-links a:hover { background: var(--surface); color: var(--ink); }
  .hero .topnav .nav-links a[aria-current="page"] { color: var(--ink); font-weight: 600; }
}

/* ---------------------------------------------------------------- buttons */
.btn-primary {
  display: inline-block;
  font-family: var(--font);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  color: var(--button-ink);
  background: var(--button);
  padding: 14px 26px;
  border-radius: 999px;
  transition: opacity 0.15s ease;
}
.btn-primary:hover { opacity: 0.85; color: var(--button-ink); }

/* ---------------------------------------------------------------- features */
.feature {
  padding: 88px 0;
  border-top: 1px solid var(--line);
}
main > .feature:first-child { border-top: 0; }

/* The heading, with its label as a small eyebrow above it. */
.sleeve-head {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 32px;
}
.sleeve-head .tag {
  display: block;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 12px;
}

.feature-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}
@media (min-width: 820px) {
  .feature-inner { grid-template-columns: 1.15fr 0.85fr; gap: 72px; }
  .feature.reverse .feature-copy { order: 2; }
  .feature.reverse .feature-image { order: 1; }
}
.feature-copy p { margin: 0; }
.feature-copy p + p { margin-top: 16px; }
.feature-copy em { font-style: normal; font-weight: 600; color: var(--ink); }
.feature-image img {
  display: block;
  width: 100%;
  max-width: 290px;
  margin: 0 auto;
  border-radius: 32px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.14);
}
@media (prefers-color-scheme: dark) {
  .feature-image img { border-color: rgba(255, 255, 255, 0.1); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); }
}
.feature-image.ipad img { max-width: 440px; border-radius: 20px; }

/* ---------------------------------------------------------------- cards */
/* The subpages' prose, and the home page's privacy note: a soft panel. */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 36px 36px;
  margin: 40px 0;
}
main > .card:first-child { margin-top: 56px; }
.card h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.45rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 36px 0 12px;
}
.card > h2:first-child { margin-top: 0; }
.card h3 {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  margin: 28px 0 8px;
}
.card h3:first-of-type { margin-top: 8px; }
.card p { margin: 0 0 14px; }
.card p:last-child { margin-bottom: 0; }
.card ol, .card ul { margin: 0 0 14px; padding-left: 22px; }
.card li { margin-bottom: 6px; }
.card code { font-size: 0.9em; background: var(--line); padding: 1px 6px; border-radius: 6px; }
@media (max-width: 600px) { .card { padding: 28px 22px; } }

/* ---------------------------------------------------------------- closing */
.closing-cta {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0;
}
.brand { color: inherit; }

/* ---------------------------------------------------------------- odds */
.release-header { margin-bottom: 6px; }
.release-header h2 { font-weight: 700; margin: 0; color: var(--ink); }
.release p { margin: 0 0 10px; }
.release p + ul { margin-top: -4px; }
.release ul { padding-left: 22px; }

/* The app's icon at the top of a sub-page is a way back to its front page.
   A link, so it needs none of a link's decoration -- and `align-self`, because
   the hero is a column flex container: a flex item is blockified, so
   `inline-block` alone left the link stretched the full width of the page with
   the icon adrift in the middle of it, and a click anywhere along that band
   navigated. */
.hero-icon-link {
  display: inline-block;
  align-self: center;
  line-height: 0;
  border: 0;
  text-decoration: none;
}

.app-store-badge { display: inline-block; }
.app-store-badge img { height: 52px; width: auto; }

/* Gone with the rest of the 90s; kept hidden for any page not yet edited. */
.ticker, .counter { display: none; }

/* ---------------------------------------------------------------- footer */
footer {
  text-align: center;
  padding: 40px 24px 64px;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
footer p { margin: 0 0 8px; }
footer a { color: var(--body); text-decoration: none; }
footer a:hover { color: var(--ink); }
footer a:not(:last-child)::after { content: "\00a0\00a0\00b7\00a0\00a0"; color: var(--muted); }
footer .release-meta { font-size: 0.8rem; }

/* The socials row, the same as the family stylesheet's: the mark alone in the
   footer's own color, named for a screen reader rather than in type. Wander
   keeps its own stylesheet, being an older design, so the rules are repeated
   here rather than shared. */
footer .socials { margin-top: 18px; line-height: 0; }
footer .socials a { display: inline-block; color: var(--muted); }
footer .socials a:hover { color: var(--ink); }
footer .socials a::after { content: none; }
footer .socials a + a { margin-left: 20px; }
footer .socials svg { display: block; }

.card h3 { font-family: var(--font-display); }

/* ----------------------------------------------------------- the closing */
/* Centered under the page, as Match Cut's is: the line, the badge beneath it
   and the small print beneath that, rather than a left-aligned heading with
   the badge sitting next to it. */
.closing-cta {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.9rem, 5vw, 3rem); line-height: 1.1;
  letter-spacing: -0.03em; color: var(--ink); margin: 0;
}
.brand { color: inherit; }

@media (min-width: 560px) {
  .figures > div { padding: 14px 0; }
}

/* ------------------------------------------------------ the hero's ground */
/* A topographic contour ground behind every hero. Deliberately not a map
   screenshot: Apple Maps imagery carries attribution requirements and
   licensed tile data, and a map's street labels would be a second set of
   type under the headline.

   A background rather than inline markup, so every page gets it without six
   copies of the image; two files rather than one themed one because a
   referenced image cannot read this sheet's custom properties.

   **On `::before` rather than on `.hero` itself, so it can move.** A
   background painted on an element cannot be transformed apart from that
   element's own content: translating `.hero` would carry the icon, the
   headline and the nav along with it. Its own layer is what makes the drift
   below possible, and it is why the dark-mode rule targets the
   pseudo-element too.

   `.hero > *` already lifts real content to z-index 2 and a pseudo-element
   is not matched by that selector, so this sits under the content at 0
   without any child needing to know it is there. */
.hero {
  /* How far the ground travels over one viewport of scrolling. Deliberately
     small: this is a quiet page, and a ground that visibly slides reads as a
     carousel rather than as depth.

     One value, used twice below - as the slack above the image and as the
     distance it moves. They have to be equal, and two literals that must
     match are two literals that will stop matching. */
  --hero-drift: 14vh;
}

.hero::before {
  content: "";
  position: absolute;
  /* Taller than the hero by exactly the drift, and bled upward only: the
     ground travels *down* as the page scrolls, so the slack it needs is
     above it. Any less and a strip of bare page appears along the top edge
     at the end of the drift. */
  top: calc(-1 * var(--hero-drift));
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  background-image: url("topo.png");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}

@media (prefers-color-scheme: dark) {
  /* The same contours on black. `topo-dark.png` is derived from
     `topo.png` by design/gen_topo_dark.swift rather than drawn again, so
     switching appearance changes the ground and not the terrain. */
  .hero::before { background-image: url("topo-dark.png"); }
}

/* The drift. Scroll-driven, so the compositor runs it off the main thread:
   no scroll listener, no `requestAnimationFrame`, no JavaScript at all.

   Not `background-attachment: fixed`, which is the one-line version of this
   idea and the wrong one. Mobile Safari ignores it outright, so the effect
   would simply be absent on the iPhone this page is mostly read on, and
   where it is honored it forces a full repaint of the fixed layer on every
   scroll frame.

   The `@supports` guard is doing real work rather than ceremony: without
   scroll-driven animations the rule drops out entirely and the ground is
   static, which is exactly the page as it shipped. Nothing degrades to
   broken, it degrades to before. */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero::before {
      will-change: transform;
      /* Longhands, and `duration: auto` spelled out. **The `animation`
         shorthand resets `animation-duration` to `0s`**, which leaves a
         scroll-driven animation with no active interval: its progress stays
         null and the ground never moves. Nothing errors and `@supports`
         still passes, so the shorthand version of this rule looks correct
         and does nothing. `auto` is what makes the animation fill the range
         below. */
      animation-name: hero-ground-drift;
      animation-duration: auto;
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: scroll(root block);
      /* Over the first viewport of scrolling, which is about when the tall
         hero has left the screen. The compact heroes on the subpages leave
         sooner and simply stop partway, which is the correct amount of
         drift for how far they were ever visible. */
      animation-range: 0 100vh;
    }
  }
}

@keyframes hero-ground-drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(0, var(--hero-drift), 0); }
}

/* ------------------------------------------------------------ the playback reel */
/* The one frame that moves. Two videos, one per theme, swapped here rather
   than by script: a single element whose source is rewritten on a theme
   change has to survive load(), which resets readyState and silently drops
   the play() that follows it. CSS has no such state to lose.

   Reduced motion hides both and shows the poster as a plain image, which is
   why that still is in the markup rather than left to the poster attribute:
   someone who asked for less movement should get a photograph, not a paused
   video.

   These rules lived in the sheet this one replaced; without them all three
   elements render at once, stacked. */
.feature-image .reel {
  display: block;
  width: 100%;
  max-width: 290px;
  margin: 0 auto;
  border-radius: 32px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.14);
}
.feature-image .reel-dark { display: none; }
.feature-image .still { display: none; }

@media (prefers-color-scheme: dark) {
  .feature-image .reel { border-color: rgba(255, 255, 255, 0.1); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); }
  .feature-image .reel-light { display: none; }
  .feature-image .reel-dark { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  .feature-image .reel { display: none; }
  .feature-image .still { display: block; }
}

/* --------------------------------------------------------- the App Store badge */
.app-store-badge { display: inline-block; }
.app-store-badge img { height: 52px; width: auto; display: block; }
.hero-actions .app-store-badge { margin: 0 auto; }

/* ------------------------------------------------- the privacy revisions */
/* The running record of substantive changes on the privacy page, oldest
   first. Here rather than in a `<style>` block on that page, which is where
   it used to live and where it had already broken once in silence: it was
   written against the old sheet's `--rule`, `--ink-soft` and `--f-edge`, so
   after the port it set a divider, a dimmed color and a face that none of
   the tokens it named still defined. A rule that cannot see the tokens it
   uses is a rule nobody notices stopping. */
ul.revisions { list-style: none; padding: 0; margin: 18px 0 0; }
ul.revisions li {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--body);
}
ul.revisions li:first-child { border-top: none; }
ul.revisions time {
  font-weight: 600;
  color: var(--ink);
  margin-right: 6px;
}

/* Out of the flow, so it is not one of the things being centered. It keeps
   the hero's own padding as its inset rather than sitting against the edge. */
/* The last thing in the hero carries a bottom margin meant for the gap to
   whatever used to follow it. Centring counts that margin as content, so the
   visible copy sat half of it high. */
.hero > *:last-child { margin-bottom: 0; }

.hero .topnav {
  position: absolute;
  top: 20px;
  left: 24px;
  right: 24px;
  width: auto;
  margin: 0;
  /* The nav was 1040px wide and centred, to line up with the content column
     below it. Out of the flow it keeps that width but loses the auto margins
     that centred it, so it sat against the left edge and the links stopped
     1064px in. It spans the page now: the name at one edge, the pages at the
     other, which is what being pinned to both edges should mean. */
  max-width: none;
}
