/* potato.video. The palette and type are the web UI's (mvd-assets' docs/VISUAL_DESIGN.md);
   the hero is the Apple TV launch screen: the wordmark over the potato. */

@font-face {
  font-family: "Bricolage";
  src: url("/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 80% 100%;
  font-display: swap;
}

:root {
  --ink: #2b2d2f;
  --ink-2: #35383b;
  --line: #46494d;
  --paper: #f4f4f6;
  --dim: #a7a9ad;
  --gold: #d4af37;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 400 1.125rem/1.55 "Bricolage", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-stretch: 80%;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 62rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

a { color: var(--gold); text-underline-offset: 0.2em; }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { margin: 0; line-height: 1.1; text-wrap: balance; }
h1 { font-size: clamp(2rem, 5.2vw, 3.4rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 700; letter-spacing: -0.015em; }
h3 { font-size: 1.25rem; font-weight: 650; }
p { margin: 0; }

/* The top bar */

.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.1rem;
}
.brand img { display: block; }
nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; }
nav a { color: var(--paper); text-decoration: none; font-weight: 500; }
nav a:hover { color: var(--gold); }

/* The hero */

.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(9rem, 24vw, 17rem);
}
.hero .wrap { position: relative; z-index: 1; display: grid; justify-items: center; gap: 1.4rem; }
.wordmark { width: clamp(9rem, 22vw, 14rem); height: auto; margin-bottom: 0.6rem; }
.hero h1 { max-width: 17em; }
.lede { max-width: 34em; color: var(--dim); font-size: 1.3rem; line-height: 1.45; }
.potato {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(68rem, 130vw);
  max-width: none;
  height: auto;
  transform: translate(-50%, 62%);
  filter: brightness(1.75);
  opacity: 0.55;
  pointer-events: none;
}

.actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.8rem 1.6rem; }
.button {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 6px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.button:hover { background: #e2c04e; }
.quiet { color: var(--paper); font-weight: 500; }

/* Where to get the apps: one entry for each store */
.gets { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; margin-top: 0.4rem; }
.get {
  display: grid;
/*
  min-width: 13.5rem;
  padding: 0.7rem 1.3rem 0.8rem;
  border-radius: 10px;
  background: var(--gold);
  border: 1px solid var(--gold);
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  line-height: 1.2;
 */
}
/*
a.get:hover { background: #e2c04e; }
.get small { font-size: 0.8rem; font-weight: 500; }
.get b { font-size: 1.45rem; font-weight: 750; letter-spacing: -0.01em; }
.get.soon { background: none; border-color: var(--line); color: var(--paper); }
.get.soon small { color: var(--dim); }
a.get.soon:hover { background: none; border-color: var(--gold); }
 */
.server { display: grid; gap: 1rem; margin-top: 1.5rem; padding-top: 2.5rem; border-top: 1px solid var(--line); }
.server .gets { justify-content: flex-start; }
/* A grid's children are as wide as their longest line unless told otherwise:
   the command scrolls in its own box. */
.server, .server > * { min-width: 0; }
.command {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.5rem 0.5rem 0.5rem 1.1rem;
  background: #1f2123;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.command pre {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0.4rem 0;
  overflow-x: auto;
  color: var(--paper);
  font: 0.95rem/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-stretch: 100%;
}
.command code { font: inherit; }
.command button {
  flex: none;
  min-width: 4.6rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--ink-2);
  color: var(--paper);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}
.command button:hover { border-color: var(--gold); color: var(--gold); }
.command button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }

/* The sections */

.band { border-top: 1px solid var(--line); padding: clamp(3rem, 7vw, 5rem) 0; }
.band .wrap { display: grid; gap: 2.2rem; }
.band p { color: var(--dim); max-width: 36em; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(22rem, 100%), 1fr)); gap: 2.2rem 3rem; }
.features > div { display: grid; gap: 0.6rem; align-content: start; }
.features h3 { color: var(--gold); }
.features .lead { grid-column: 1 / -1; }
.features .lead h3 { font-size: 1.6rem; }
.features .lead p { max-width: 44em; font-size: 1.2rem; }
.features .lead { gap: 0.9rem; }

.intro { display: grid; gap: 1rem; }
/* The screenshots: a strip of thumbnails that scrolls sideways, as wide as
   the window, lined up with the text above it. They're all one height, so
   a phone's tall pictures can sit beside the browser's wide ones. */
.thumbs {
  --edge: max(1.5rem, (100% - 62rem) / 2 + 1.5rem);
  list-style: none;
  margin: 0;
  padding: 0.5rem var(--edge) 1.6rem;
  display: flex;
  gap: 1.2rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--edge);
  scrollbar-width: none;
}
.thumbs::-webkit-scrollbar { display: none; }
/* Its space from the text, whether it comes before the .wrap or after. */
.wrap + .thumbs { margin-top: 1.7rem; }
.thumbs ~ .wrap { margin-top: 1.7rem; }
.thumbs li { flex: none; scroll-snap-align: start; }
.thumbs a { display: block; border-radius: 10px; }
.thumbs img {
  display: block;
  height: clamp(11rem, 26vw, 17rem);
  width: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.35);
  transition: border-color 0.15s, transform 0.15s;
}
.thumbs a:hover img { border-color: var(--gold); transform: translateY(-3px); }

/* Under the strip, centered: the tabs, which pick a device's pictures, and
   under them a few words of small print, never wider than the tabs. */
.band .caption {
  display: grid;
  justify-content: center;
  justify-items: center;
  gap: 0.5rem;
  margin-top: 0.2rem;
}
.caption ~ .wrap { margin-top: 2.6rem; }
.devices {
  display: flex;
  flex: none;
  max-width: 100%;
  padding: 0.2rem;
  gap: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--ink-2);
  overflow-x: auto;
  scrollbar-width: none;
}
.devices[hidden] { display: none; }
.devices button {
  flex: none;
  padding: 0.2rem 0.95rem;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--dim);
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.4;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.devices button:hover { color: var(--paper); }
.devices button[aria-selected="true"] { background: var(--gold); color: var(--ink); }
.devices button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
/* width: 0 with min-width: 100% makes it wrap to the tabs' width, not
   widen the column; with the tabs hidden it takes the room it needs. */
.band .disclaimer {
  width: 0;
  min-width: 100%;
  margin: 0;
  color: var(--dim);
  opacity: 0.8;
  font-size: 0.75rem;
  line-height: 1.4;
  text-align: center;
}
.devices[hidden] + .disclaimer { width: auto; }

/* The lightbox a thumbnail opens */
.lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--paper);
}
.lightbox::backdrop { background: rgba(20, 21, 22, 0.94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.lightbox[open] { display: grid; place-items: center; animation: fade 0.18s ease-out; }
@keyframes fade { from { opacity: 0; } }
.lightbox figure {
  margin: 0;
  width: 100%;
  height: 100%;
  padding: 3.5rem clamp(1rem, 6vw, 5rem) 1.5rem;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  justify-items: center;
  align-items: center;
  gap: 1rem;
}
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.lightbox figcaption { color: var(--dim); font-size: 1rem; text-align: center; max-width: 40em; }
.lightbox button {
  position: absolute;
  width: 2.8rem;
  height: 2.8rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox button:hover { border-color: var(--gold); color: var(--gold); }
.lightbox button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.lightbox .close { top: 0.7rem; right: 0.7rem; }
.lightbox .prev, .lightbox .next { top: 50%; transform: translateY(-50%); }
.lightbox .prev { left: 0.7rem; }
.lightbox .next { right: 0.7rem; }
.lightbox.single .prev, .lightbox.single .next { display: none; }
@media (hover: none) { .lightbox .prev, .lightbox .next { display: none; } }

.privacy { background: var(--ink-2); }
.band .split { grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 2.4rem 4rem; align-items: start; }
.split > div { display: grid; gap: 1.2rem; justify-items: start; }
.nots { list-style: none; margin: 0; padding: 0; display: grid; }
.nots li { padding: 0.9rem 0; border-top: 1px solid var(--line); color: var(--dim); }
.nots li:last-child { border-bottom: 1px solid var(--line); }
.nots strong { color: var(--paper); font-weight: 650; margin-right: 0.3em; }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 2rem 3rem;
}
.steps li { counter-increment: step; display: grid; gap: 0.5rem; align-content: start; }
.steps li::before {
  content: counter(step);
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
  color: var(--gold);
}

.potato-band .split > div { gap: 1rem; }
.specs { margin: 0; display: grid; }
.specs > div { display: grid; gap: 0.1rem; padding: 0.8rem 0; border-top: 1px solid var(--line); }
.specs > div:last-child { border-bottom: 1px solid var(--line); }
.specs dt { color: var(--dim); font-size: 0.9rem; }
.specs dd { margin: 0; font-weight: 650; font-size: 1.2rem; }
.specs img, .split > img { width: 100%; height: auto; border-radius: 6px; }

/* The router photo sits behind both columns, centered on the gap between them,
   and shows through them as if through frosted glass. When the columns stack,
   it's left out, so it doesn't push the screenshots down. */
.potato-band .router { display: none; }
@media (min-width: 41rem) {
  .potato-band .split { position: relative; isolation: isolate; }
  .potato-band .split > div,
  .potato-band .specs {
    background: color-mix(in srgb, var(--ink) 80%, transparent);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    /* Room around the text inside the glass; the negative margin keeps the
       text lined up with the rest of the page. */
    padding: 1.25rem 1.5rem;
    margin: -1.25rem -1.5rem;
    border-radius: 10px;
  }
  .potato-band .router {
    display: block;
    position: absolute;
    z-index: -1;
    /* 1rem below the bottom of the taller panel, which hangs 1.25rem below
       the grid (its negative margin). */
    bottom: -2.25rem;
    left: 50%;
    width: 64%;
    transform: translateX(-50%);
    border-radius: 0;
    pointer-events: none;
  }
}

/* The footer */

footer { border-top: 1px solid var(--line); padding: 2.2rem 0 3rem; }
footer .wrap { display: grid; gap: 0.9rem; }
footer nav a { color: var(--gold); font-weight: 650; }
.fine { color: var(--dim); font-size: 0.9rem; max-width: 46em; }
.fine a { color: var(--dim); }

/* A document: the privacy policy */

.doc { padding: clamp(2rem, 5vw, 3.5rem) 0 4rem; }
.doc .wrap { max-width: 44rem; }
.doc h1 { margin-bottom: 1.2rem; }
.doc h2 { font-size: 1.5rem; margin: 2.4rem 0 0.8rem; color: var(--gold); }
.doc p, .doc ul { margin: 0 0 1rem; }
.doc ul { padding-left: 1.2rem; }
.doc li { margin-bottom: 0.5rem; }
.doc code { font: 0.9em ui-monospace, "SF Mono", Menlo, monospace; font-stretch: 100%; color: var(--paper); background: var(--ink-2); padding: 0.1em 0.35em; border-radius: 4px; }

/* A phone's top bar has room for two links: the ones to other pages. */
@media (max-width: 30rem) {
  .top nav a[href*="#"] { display: none; }
  .top nav { gap: 0.4rem 1.1rem; }
}
