/* Avo website.
   Colours come from the app: host/Avo/Assets.xcassets (AvoFlesh, AvoSkin,
   AvoDeep, AvoPit) and docs/brand.md (Cream). Everything else is derived
   from them: the page is AvoDeep pushed toward black, the light is AvoFlesh,
   and the haze is AvoPit warmed up.

   Typefaces are a switch: site.config.mjs picks a set from css/fonts/, which
   the build appends after this file and which overrides the --font-* and
   --display-* variables below (the defaults are the system fonts). */

:root {
  --flesh: #d8e8a7;
  --skin: #2f4a1f;
  --deep: #223519;
  --pit: #7b4a2a;
  --cream: #fbf8f1;

  --bg-0: #050904;
  --bg-1: #0a1108;
  --bg-2: #0e170b;
  --bg-3: #13200f;
  --ink: #f3f1e8;
  --ink-2: #c5cdb9;
  --ink-3: #9aa58e;
  --line: rgba(216, 232, 167, 0.13);
  --fill-1: rgba(216, 232, 167, 0.05);
  --fill-2: rgba(216, 232, 167, 0.09);
  --fill-3: rgba(216, 232, 167, 0.15);
  --accent-ink: #15210e;
  --ember: #eaa970;
  --ember-ink: #2a160a;
  --ok: #bcdc8f;
  --bad: #f39a7c;

  --font-fallback: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono-fallback: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  --font-display: var(--font-fallback);
  --font-sans: var(--font-fallback);
  --font-mono: var(--font-mono-fallback);
  --display-weight: 700;
  --display-stretch: 100%;
  --display-stretch-narrow: 100%;
  --display-tracking: -0.02em;
  --display-leading: 1.04;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 68px;
  --section-y: clamp(72px, 9vw, 124px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  background: var(--bg-0);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  background:
    radial-gradient(120% 60% at 50% 0%, #0d170a 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-1) 70%, var(--bg-0) 100%);
  color: var(--ink);
  font: 400 17px/1.62 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

a {
  color: var(--flesh);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: #eef6cf;
}

:focus-visible {
  outline: 2px solid var(--flesh);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: rgba(216, 232, 167, 0.32);
  color: #fff;
}

h1,
h2,
h3,
h4,
p,
figure,
dl,
dd {
  margin: 0;
}

p + p {
  margin-top: 1em;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--flesh);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 12px;
  color: var(--accent-ink);
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
}

/* ---------------------------------------------------------------- Type */

.display {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-stretch: var(--display-stretch);
  letter-spacing: var(--display-tracking);
  line-height: var(--display-leading);
  text-wrap: balance;
  overflow-wrap: break-word;
}

h1.display {
  font-size: clamp(2.3rem, 1.35rem + 3.3vw, 4rem);
  line-height: calc(var(--display-leading) - 0.02);
}

h2.display {
  font-size: clamp(1.85rem, 1.3rem + 2.1vw, 2.9rem);
}

h2.display-s,
h3.display-s,
.display-s {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.15rem);
  line-height: 1.14;
}

.lede {
  font-size: clamp(1.07rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 40em;
  text-wrap: pretty;
}

.kicker {
  margin-bottom: 18px;
  font: 500 0.8rem/1.3 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--flesh);
}

.muted {
  color: var(--ink-3);
}

.note {
  color: var(--ink-3);
  font-size: 0.94rem;
}

.list-title {
  margin-bottom: 18px;
  font: 500 0.78rem/1.3 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* Inline, not inline-block, so a shortcut such as ⌘ G never wraps apart. */
kbd {
  display: inline;
  min-width: 1.75em;
  margin: 0 0.1em;
  padding: 0.2em 0.42em;
  white-space: nowrap;
  border-radius: 6px;
  background: var(--fill-2);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.45);
  color: var(--ink);
  font: 600 0.8em/1 var(--font-sans);
  text-align: center;
  vertical-align: 0.08em;
}

code {
  padding: 0.12em 0.38em;
  border-radius: 5px;
  background: var(--fill-1);
  color: #e3ecc4;
  font: 0.88em var(--font-mono);
  overflow-wrap: anywhere;
}

q {
  quotes: '\201C' '\201D';
}

.tag {
  display: inline-block;
  flex: none;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(234, 169, 112, 0.14);
  color: var(--ember);
  font: 500 0.72rem/1.45 var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tag-muted {
  background: var(--fill-2);
  color: var(--ink-2);
}

/* ------------------------------------------------------------- Buttons */

.btn {
  --b-bg: var(--fill-2);
  --b-fg: var(--ink);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--b-bg);
  color: var(--b-fg);
  font: 600 1rem/1.2 var(--font-sans);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.25s var(--ease), box-shadow 0.25s;
}

.btn:hover {
  color: var(--b-fg);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

/* A light under the pointer. motion.js sets --lx and --ly (where the pointer
   is) and --lit (how bright), and pulls the button toward the pointer with
   the translate property. */
.btn::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
  width: 150px;
  height: 150px;
  margin: -75px 0 0 -75px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(216, 232, 167, 0.26), transparent);
  opacity: var(--lit, 0);
  transform: translate(var(--lx, 50%), var(--ly, 50%));
  pointer-events: none;
}

.btn-primary::after {
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.75), transparent);
}

.btn .icon {
  width: 18px;
  height: 18px;
}

.btn-primary {
  --b-bg: var(--flesh);
  --b-fg: var(--accent-ink);
  box-shadow: 0 14px 34px -14px rgba(216, 232, 167, 0.6);
}

.btn-primary:hover {
  --b-bg: #e7f1c3;
}

.btn-quiet:hover {
  --b-bg: var(--fill-3);
}

.btn-small {
  min-height: 38px;
  padding: 0 15px;
  gap: 8px;
  font-size: 0.9rem;
}

.btn-small .icon {
  width: 16px;
  height: 16px;
}

/* -------------------------------------------------------------- Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background-color 0.3s, box-shadow 0.3s;
}

.site-header.is-scrolled,
.site-header.is-open {
  background: rgba(7, 12, 6, 0.86);
  -webkit-backdrop-filter: saturate(1.3) blur(14px);
  backdrop-filter: saturate(1.3) blur(14px);
  box-shadow: 0 1px 0 var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.brand img {
  width: 30px;
  height: 30px;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: var(--display-weight);
  font-stretch: var(--display-stretch);
  line-height: 1;
  letter-spacing: var(--display-tracking);
}

.site-nav {
  flex: 1;
}

.site-nav ul {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 0.93rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  background: var(--fill-2);
  color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-switch {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.lang-switch:hover {
  background: var(--fill-2);
  color: var(--ink);
}

.lang-short {
  display: none;
}

.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--fill-2);
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  position: absolute;
  left: 50%;
  width: 18px;
  height: 1.6px;
  margin-left: -9px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

.nav-toggle-bars {
  top: 50%;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: '';
  left: 0;
  margin-left: 0;
}

.nav-toggle-bars::before {
  transform: translateY(-6px);
}

.nav-toggle-bars::after {
  transform: translateY(6px);
}

.nav-toggle[aria-expanded='true'] .nav-toggle-bars {
  background: transparent;
}

.nav-toggle[aria-expanded='true'] .nav-toggle-bars::before {
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded='true'] .nav-toggle-bars::after {
  transform: rotate(-45deg);
}

/* ---------------------------------------------------------------- Hero */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: min(980px, 100vh);
  margin-top: calc(-1 * var(--header-h));
  padding: calc(var(--header-h) + clamp(32px, 6vw, 88px)) 0 clamp(64px, 8vw, 120px);
  /* The glow behind the screenshot reaches past the sides on phones. */
  overflow-x: clip;
}

.hero-sky {
  position: absolute;
  /* Larger than the hero, so drifting with the pointer never shows an edge. */
  inset: -28px;
  z-index: -2;
  background:
    radial-gradient(42% 46% at 74% 44%, rgba(234, 169, 112, 0.2), transparent 72%),
    radial-gradient(70% 60% at 12% 0%, rgba(47, 74, 31, 0.5), transparent 70%),
    radial-gradient(60% 40% at 70% 100%, rgba(34, 53, 25, 0.6), transparent 70%),
    linear-gradient(180deg, #0b1309, #0a1108);
}

.haze-canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.8s ease;
}

.haze-canvas.is-ready {
  opacity: 1;
}

/* A warm light that follows the pointer over the hero (motion.js). */
.hero-fx {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.hero-light {
  position: absolute;
  left: 0;
  top: 0;
  width: 760px;
  height: 760px;
  margin: -380px 0 0 -380px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(240, 196, 140, 0.17), rgba(216, 232, 167, 0.06) 48%, transparent);
  opacity: 0;
}

.has-pointer-motion .hero-light {
  will-change: transform, opacity;
}

/* The hero arrives: the words one after another, then the screenshot. */
.hero-copy > * {
  animation: rise-in 0.9s var(--ease-out) both;
}

.hero-copy > :nth-child(2) {
  animation-delay: 70ms;
}

.hero-copy > :nth-child(3) {
  animation-delay: 140ms;
}

.hero-copy > :nth-child(4) {
  animation-delay: 210ms;
}

.hero-copy > :nth-child(5) {
  animation-delay: 280ms;
}

.hero-visual {
  animation: shot-in 1.3s var(--ease-out) 0.18s both;
}

@keyframes rise-in {
  from {
    opacity: 0;
    translate: 0 18px;
  }
}

@keyframes shot-in {
  from {
    opacity: 0;
    translate: 0 36px;
    scale: 0.965;
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}

.hero-copy h1 {
  margin: 22px 0 26px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 15px 7px 13px;
  border-radius: 999px;
  background: var(--fill-1);
  color: var(--ink-2);
  font-size: 0.88rem;
  font-weight: 500;
}

.status-pill::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 0 4px rgba(234, 169, 112, 0.18);
}

.status-pill.is-released::before {
  background: var(--flesh);
  box-shadow: 0 0 0 4px rgba(216, 232, 167, 0.18);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.cta-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.cta-meta {
  padding-left: 4px;
  color: var(--ink-3);
  font-size: 0.86rem;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-3);
  font-size: 0.92rem;
}

.hero-points li {
  display: flex;
  align-items: center;
  gap: 9px;
}

.hero-points li::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--flesh);
  opacity: 0.75;
}

/* ------------------------------------------------- Screenshots of Avo */

/* Real window captures from assets/img/screens/: 1x macOS captures with the
   shadow removed and the corners flattened onto the page colour. Each frame
   is a container, so the rounded corner follows the window's own corner
   (about 19px on the capture) at any size. */

.shot {
  position: relative;
  container-type: inline-size;
}

.shot img {
  width: 100%;
  height: auto;
  border-radius: var(--shot-radius, 2cqw);
  background: var(--bg-2);
  box-shadow:
    0 0 0 1px rgba(216, 232, 167, 0.08),
    0 3.2cqw 7cqw -1.6cqw rgba(0, 0, 0, 0.75),
    0 0.6cqw 1.6cqw rgba(0, 0, 0, 0.35);
}

.shot-library {
  --shot-radius: 1.8cqw;
}

.shot-settings {
  --shot-radius: 2.05cqw;
}

.shot-game {
  --shot-radius: 1.5cqw;
}

.hero-visual {
  position: relative;
}

.hero-shot {
  max-width: 640px;
  margin-left: auto;
}

.hero-shot::before {
  content: '';
  position: absolute;
  inset: -16% -14% -20%;
  z-index: -1;
  background: radial-gradient(50% 50% at 50% 52%, rgba(216, 232, 167, 0.1), transparent 72%);
  pointer-events: none;
}

/* A soft light that follows the pointer across a card or a screenshot
   (motion.js moves it with --gx and --gy, and fades it with opacity). On a
   card it sits behind the words, on a screenshot over the picture. */
.glare {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
}

.glare::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 560px;
  height: 560px;
  margin: -280px 0 0 -280px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(216, 232, 167, 0.11), rgba(216, 232, 167, 0.035) 55%, transparent);
  transform: translate(var(--gx, 50%), var(--gy, 50%));
}

.shot > .glare {
  z-index: 1;
  border-radius: var(--shot-radius, 2cqw);
}

.shot > .glare::before {
  background: radial-gradient(closest-side, rgba(255, 250, 232, 0.13), rgba(255, 250, 232, 0.04) 55%, transparent);
}

/* Click to zoom (lightbox.js adds the button). */
.shot.is-zoomable img {
  cursor: zoom-in;
}

.zoom-btn {
  position: absolute;
  right: clamp(8px, 1.6cqw, 16px);
  bottom: clamp(8px, 1.6cqw, 16px);
  z-index: 3;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(8, 13, 7, 0.78);
  box-shadow: inset 0 0 0 1px rgba(216, 232, 167, 0.2), 0 8px 20px -8px rgba(0, 0, 0, 0.7);
  color: var(--ink);
  cursor: zoom-in;
  opacity: 0;
  transform: scale(0.86);
  transition: opacity 0.25s ease, transform 0.4s var(--ease-out);
}

.zoom-btn .icon {
  width: 18px;
  height: 18px;
}

.shot:hover .zoom-btn,
.zoom-btn:focus-visible {
  opacity: 1;
  transform: none;
}

.zoom-btn:hover {
  transform: scale(1.08);
}

.zoom-btn:focus-visible {
  border-radius: 50%;
}

@media (hover: none) {
  .zoom-btn {
    opacity: 1;
    transform: none;
  }
}

.shot-label {
  display: block;
  margin-bottom: 4px;
  color: var(--flesh);
  font: 500 0.74rem/1.3 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shot-note {
  color: var(--ink-3);
  font-size: 0.85rem;
}

/* Small macOS pieces drawn in CSS, used by the tiles in "On your Mac". */

.lights {
  display: flex;
  flex: none;
  gap: 0.85cqw;
}

.lights i {
  width: 1.55cqw;
  height: 1.55cqw;
  border-radius: 50%;
  background: #ff5f57;
}

.lights i:nth-child(2) {
  background: #febc2e;
}

.lights i:nth-child(3) {
  background: #28c840;
}

.notif {
  position: absolute;
  right: -1%;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  gap: 2cqw;
  width: 45%;
  padding: 2cqw 2.3cqw;
  border-radius: 2.6cqw;
  background: rgba(38, 46, 32, 0.9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 2.4cqw 5cqw -1cqw rgba(0, 0, 0, 0.6);
}

.notif-icon {
  width: 6.6cqw;
  height: 6.6cqw;
  flex: none;
}

.notif-text p {
  margin: 0;
  font-size: 1.85cqw;
  line-height: 1.35;
}

.notif-app {
  color: var(--ink-3);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 1.5cqw !important;
}

.notif-title {
  color: var(--ink);
  font-weight: 600;
}

.notif-body {
  color: var(--ink-2);
}

.dock-app svg {
  width: 7.6cqw;
  height: 7.6cqw;
}

.dock-app {
  position: relative;
  display: block;
}

.dock-app.is-running::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -1.05cqw;
  width: 0.75cqw;
  height: 0.75cqw;
  border-radius: 50%;
  background: var(--ink-2);
  transform: translateX(-50%);
}

.dock-sep {
  width: 0.2cqw;
  height: 6cqw;
  border-radius: 1cqw;
  background: rgba(255, 255, 255, 0.16);
}

/* ------------------------------------------------------------ Sections */

.section {
  position: relative;
  isolation: isolate;
  padding: var(--section-y) 0;
  /* The soft glows reach past the sides; clip them so phones never get a
     page wider than the screen. Up and down they still blend into the next
     section. */
  overflow-x: clip;
}

.section-head {
  max-width: 780px;
  margin-bottom: clamp(44px, 5vw, 72px);
}

.section-head h2,
.section-head h1 {
  margin-bottom: 22px;
}

.section-head-center {
  margin-inline: auto;
  text-align: center;
}

.section-head-center .lede {
  margin-inline: auto;
}

.glow {
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.glow-gaming {
  inset: -10% -20% 30% -30%;
  background: radial-gradient(45% 45% at 30% 35%, rgba(47, 74, 31, 0.5), transparent 70%);
}

.glow-dev {
  inset: 0 -30% 0 30%;
  background: radial-gradient(40% 40% at 60% 50%, rgba(34, 53, 25, 0.65), transparent 70%);
}

.glow-mac {
  inset: 10% -10%;
  background:
    radial-gradient(35% 30% at 50% 20%, rgba(216, 232, 167, 0.07), transparent 70%),
    radial-gradient(50% 45% at 50% 60%, rgba(47, 74, 31, 0.35), transparent 70%);
}

.glow-support {
  inset: 0 -20%;
  background: radial-gradient(40% 50% at 80% 40%, rgba(216, 232, 167, 0.06), transparent 70%);
}

.status-note {
  max-width: 860px;
  margin-top: 40px;
  color: var(--ink-3);
  font-size: 0.95rem;
}

.more-link {
  margin-top: 48px;
}

.more-link a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  text-decoration: none;
}

.more-link a:hover {
  text-decoration: underline;
}

/* -------------------------------------------------------------- Gaming */

/* Without JavaScript: the two screenshots side by side, each with its
   caption, and the hotspots open on hover and focus. */

.showcase {
  display: grid;
  gap: clamp(24px, 3vw, 36px);
}

.showcase-deck {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 2.6vw, 36px);
}

.showcase-item figcaption {
  max-width: 46em;
  margin-top: 16px;
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.55;
}

.showcase-side {
  display: grid;
  align-content: start;
  gap: 12px;
}

.showcase-hint {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink-2);
  font-size: 0.93rem;
  line-height: 1.5;
}

.showcase-hint .icon {
  width: 18px;
  height: 18px;
  margin-top: 0.12em;
  color: var(--ember);
}

.showcase-side .shot-note {
  padding-left: 28px;
}

/* With JavaScript (showcase.js): the screenshots stacked like cards, the one
   behind peeking out at the top right, with tabs beside them. */

.showcase.is-enhanced {
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  grid-template-areas:
    'stage tabs'
    'stage side';
  align-items: center;
  column-gap: clamp(32px, 4.5vw, 64px);
  row-gap: 26px;
}

.is-enhanced .showcase-stage {
  grid-area: stage;
}

.is-enhanced .showcase-side {
  grid-area: side;
  align-self: start;
  padding-left: 20px;
}

.is-enhanced .showcase-deck {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  /* Room for the card behind. */
  padding: 30px 28px 0 0;
}

.is-enhanced .showcase-item {
  grid-area: 1 / 1;
  transform-origin: 100% 0;
  transition: transform 0.85s var(--ease-out), opacity 0.6s var(--ease-out);
}

.is-enhanced .showcase-item figcaption {
  display: none;
}

.showcase-item.is-front {
  z-index: 2;
}

.showcase-item.is-back {
  z-index: 1;
  opacity: 0.4;
  transform: translate3d(28px, -30px, 0) scale(0.94);
  cursor: pointer;
}

.showcase-item.is-back:hover {
  opacity: 0.62;
  transform: translate3d(30px, -36px, 0) scale(0.94);
}

.showcase-item.is-back .shot img {
  cursor: pointer;
}

/* The card behind sits a little deeper: it drifts against the tilt
   (motion.js sets --px and --py on the deck). */
.showcase-item.is-back .shot {
  transform: translate3d(calc(var(--px, 0) * -10px), calc(var(--py, 0) * -8px), 0);
  transition: transform 0.5s var(--ease-out);
}

.showcase-item.is-back .hotspots,
.showcase-item.is-back .zoom-btn {
  visibility: hidden;
}

/* A light sweeps across the card that comes to the front. */
.shot-sweep {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  border-radius: var(--shot-radius, 2cqw);
  pointer-events: none;
}

.shot-sweep::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 60%;
  background: linear-gradient(100deg, transparent, rgba(255, 252, 235, 0.15) 50%, transparent);
  opacity: 0;
}

.is-arriving .shot-sweep::before {
  animation: sweep 1.1s var(--ease-out) 0.12s both;
}

@keyframes sweep {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(270%);
  }
}

.showcase-tabs {
  position: relative;
  grid-area: tabs;
  align-self: end;
  display: grid;
  gap: 8px;
}

.showcase-tab {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 16px;
  row-gap: 6px;
  width: 100%;
  padding: 18px 22px 20px 18px;
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.3s, box-shadow 0.3s;
}

.showcase-tab:hover {
  background: var(--fill-1);
}

.showcase-tab[aria-selected='true'] {
  background: linear-gradient(180deg, rgba(31, 47, 24, 0.85), rgba(19, 31, 15, 0.7));
  box-shadow: inset 0 0 0 1px var(--line);
}

.showcase-tab-num {
  grid-row: 1 / span 2;
  color: var(--ink-3);
  font: 500 0.78rem/1.45 var(--font-mono);
  letter-spacing: 0.06em;
}

.showcase-tab-title {
  color: var(--ink-2);
  font: 500 0.78rem/1.45 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.showcase-tab-text {
  grid-column: 2;
  color: var(--ink-3);
  font-size: 0.95rem;
  line-height: 1.55;
}

.showcase-tab[aria-selected='true'] .showcase-tab-num,
.showcase-tab[aria-selected='true'] .showcase-tab-title {
  color: var(--flesh);
}

.showcase-tab[aria-selected='true'] .showcase-tab-text {
  color: var(--ink-2);
}

/* Hotspots over the key labels: a ring that breathes, and a tip that says
   what the key does. Positions are fractions of the screenshot. */

.hotspots {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.hotspot {
  --hs-size: clamp(26px, 4.4cqw, 40px);
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 0;
  height: 0;
}

.hotspot:hover,
.hotspot:focus-within,
.hotspot.is-open {
  z-index: 2;
}

/* Each marker sits at a corner of its key label, so the label stays readable
   (the editor's × and resize handles are left clear too). */
.hs-play-move { --x: 16.5%; --y: 73.1%; }
.hs-play-look { --x: 60.4%; --y: 45.3%; --d: 0.6s; }
.hs-play-fire { --x: 9.6%; --y: 50.4%; --d: 1.2s; }
.hs-play-jump { --x: 93.2%; --y: 68.7%; --d: 1.8s; }
.hs-play-fps { --x: 5.6%; --y: 5.2%; --d: 2.4s; }
.hs-keys-add { --x: 38.6%; --y: 10.4%; }
.hs-keys-templates { --x: 47.75%; --y: 10.4%; --d: 0.5s; }
.hs-keys-key { --x: 20.2%; --y: 39.2%; --d: 1s; }
.hs-keys-look { --x: 51.4%; --y: 40.6%; --d: 1.5s; }
.hs-keys-pad { --x: 16.5%; --y: 73.1%; --d: 2s; }
.hs-keys-mouse { --x: 94.4%; --y: 63%; --d: 2.5s; }

.hotspot-dot {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--hs-size);
  height: var(--hs-size);
  margin: calc(var(--hs-size) / -2) 0 0 calc(var(--hs-size) / -2);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: help;
  pointer-events: auto;
}

.hotspot-dot::before,
.hotspot-dot::after {
  --mark: clamp(7px, 1.35cqw, 13px);
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--mark);
  height: var(--mark);
  margin: calc(var(--mark) / -2) 0 0 calc(var(--mark) / -2);
  border-radius: 50%;
}

/* Ember, the palette's warm accent: it stands apart from Avo's own key
   labels, which are drawn in the light green. */
.hotspot-dot::after {
  background: var(--ember);
  box-shadow: 0 0 0 2.5px rgba(8, 13, 7, 0.62), 0 0 14px 2px rgba(234, 169, 112, 0.6);
  transition: transform 0.35s var(--ease-out);
}

.hotspot-dot::before {
  border: 1.5px solid var(--ember);
  opacity: 0;
  animation: hotspot-pulse 3.2s var(--ease-out) var(--d, 0s) infinite;
}

@keyframes hotspot-pulse {
  0% {
    opacity: 0.9;
    transform: scale(1);
  }
  65%,
  100% {
    opacity: 0;
    transform: scale(2.8);
  }
}

.hotspot:hover .hotspot-dot::after,
.hotspot.is-open .hotspot-dot::after,
.hotspot-dot:focus-visible::after {
  transform: scale(1.35);
}

.hotspot-dot:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
  border-radius: 50%;
}

.hotspot-tip {
  position: absolute;
  left: 0;
  bottom: calc(var(--hs-size) / 2 + 10px);
  z-index: 1;
  width: max-content;
  max-width: min(250px, 64vw);
  padding: 10px 13px 11px;
  border-radius: 12px;
  background: rgba(12, 19, 10, 0.95);
  box-shadow: inset 0 0 0 1px rgba(216, 232, 167, 0.16), 0 18px 40px -14px rgba(0, 0, 0, 0.85);
  color: var(--ink-2);
  font: 400 0.84rem/1.45 var(--font-sans);
  text-align: left;
  translate: -50% 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px) scale(0.96);
  transform-origin: 50% 100%;
  transition: opacity 0.2s ease, transform 0.35s var(--ease-out), visibility 0s linear 0.35s;
  pointer-events: none;
}

/* Bridges the gap to the dot, so the pointer can move onto the tip. */
.hotspot-tip::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 14px;
}

.hotspot-tip strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ember);
  font: 500 0.72rem/1.35 var(--font-mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.tip-start .hotspot-tip {
  translate: calc(var(--hs-size) / -2) 0;
  transform-origin: 0 100%;
}

.tip-end .hotspot-tip {
  left: auto;
  right: 0;
  translate: calc(var(--hs-size) / 2) 0;
  transform-origin: 100% 100%;
}

.tip-below .hotspot-tip {
  bottom: auto;
  top: calc(var(--hs-size) / 2 + 10px);
  transform: translateY(-6px) scale(0.96);
  transform-origin: 50% 0;
}

.tip-below .hotspot-tip::before {
  top: auto;
  bottom: 100%;
}

.tip-start.tip-below .hotspot-tip {
  transform-origin: 0 0;
}

.hotspot:hover .hotspot-tip,
.hotspot-dot:focus-visible + .hotspot-tip,
.hotspot.is-open .hotspot-tip {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
  pointer-events: auto;
}

/* Escape hides it until the pointer or focus moves on. */
.hotspot.is-dismissed .hotspot-tip {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* What you can do, as cards below the screenshots. */

.feature-cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin: clamp(48px, 5vw, 72px) 0 0;
  padding: 0;
  list-style: none;
}

.feature-card {
  position: relative;
  isolation: isolate;
  grid-column: span 2;
  padding: clamp(22px, 2.2vw, 28px);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(31, 47, 24, 0.6), rgba(19, 31, 15, 0.42));
  box-shadow: inset 0 0 0 1px rgba(216, 232, 167, 0.07);
}

.feature-card:nth-child(n + 4) {
  grid-column: span 3;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 20px;
  border-radius: 13px;
  background: rgba(216, 232, 167, 0.1);
  box-shadow: inset 0 0 0 1px rgba(216, 232, 167, 0.12);
  color: var(--flesh);
}

.feature-icon .icon {
  width: 21px;
  height: 21px;
}

.feature-card h3 {
  margin-bottom: 6px;
  color: var(--ink);
  font: 600 1.08rem/1.35 var(--font-sans);
  letter-spacing: -0.005em;
}

.feature-card p {
  color: var(--ink-2);
  font-size: 0.97rem;
}

/* ----------------------------------------------------------- Developer */

/* ----------------------------------------------------------------- Mac */

.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.tile {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  grid-column: span 2;
  min-height: 320px;
  padding: clamp(22px, 2.4vw, 32px);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(31, 47, 24, 0.72), rgba(19, 31, 15, 0.6));
}

.tile-dock,
.tile-translate {
  grid-column: span 4;
}

.tile-follow,
.tile-capture {
  grid-column: span 3;
}

.tile h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font: 600 1.12rem/1.35 var(--font-sans);
}

.tile p {
  color: var(--ink-2);
  font-size: 0.97rem;
}

.tile-art {
  display: grid;
  flex: 1;
  place-items: center;
  min-height: 130px;
  margin-bottom: 26px;
}

.mini-dock {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 22px;
  background: rgba(8, 13, 7, 0.55);
}

.mini-dock img,
.mini-dock .dock-app svg {
  width: 46px;
  height: 46px;
}

.mini-dock .dock-app.is-running::after {
  bottom: -8px;
  width: 5px;
  height: 5px;
}

.mini-dock .dock-sep {
  width: 1.5px;
  height: 36px;
}

.notif-static {
  position: relative;
  inset: auto;
  width: min(100%, 320px);
  padding: 14px 16px;
  border-radius: 18px;
  gap: 12px;
}

.notif-static .notif-icon {
  width: 40px;
  height: 40px;
}

.notif-static .notif-text p {
  font-size: 0.9rem;
}

.notif-static .notif-app {
  font-size: 0.72rem !important;
}

.clip-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(8, 13, 7, 0.55);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}

.pill-accent {
  background: var(--flesh);
  color: var(--accent-ink);
}

.flow-arrow {
  width: 22px;
  height: 22px;
  color: var(--flesh);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 420px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(8, 13, 7, 0.55);
  color: var(--ink-2);
  font-size: 0.88rem;
  white-space: nowrap;
}

.chips li:first-child {
  background: var(--fill-3);
  color: var(--ink);
}

.translate-demo {
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(100%, 420px);
  padding: 30px 20px 24px;
  border-radius: 18px;
  background: linear-gradient(160deg, #1a2a14, #0f180c);
}

.translate-line {
  position: relative;
  color: rgba(197, 205, 185, 0.45);
  font: 600 1.25rem/1.25 var(--font-sans);
  text-align: center;
}

.translate-plate {
  position: absolute;
  left: 50%;
  top: 50%;
  min-width: calc(100% + 28px);
  padding: 8px 14px;
  border-radius: 10px;
  background: #f3f1e8;
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.6);
  color: #18230f;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.translate-line-muted {
  color: var(--ink-3);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.rec-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(100%, 360px);
  height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, #212c1b, #1a2316);
  color: var(--ink-2);
  font-size: 0.9rem;
}

.rec-bar .lights {
  gap: 7px;
  margin-right: auto;
}

.rec-bar .lights i {
  width: 12px;
  height: 12px;
}

.rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: 0 0 0 4px rgba(255, 95, 87, 0.2);
  animation: rec 1.6s ease-in-out infinite;
}

.rec-bar .icon {
  width: 18px;
  height: 18px;
  color: var(--ink-3);
}

@keyframes rec {
  50% {
    opacity: 0.35;
  }
}

/* The Dock's icons grow from the bottom when magnified (motion.js). */
.mini-dock > * {
  transform-origin: 50% 100%;
}

/* As a tile arrives, its little scene plays once. */
.tile.reveal-in .notif-static {
  animation: notif-in 0.9s var(--ease-out) both;
  animation-delay: calc(var(--reveal-delay, 0ms) + 260ms);
}

.tile.reveal-in .mini-dock > *,
.tile.reveal-in .chips li {
  animation: pop-in 0.7s var(--ease-out) both;
  animation-delay: calc(var(--reveal-delay, 0ms) + 200ms + var(--n, 0) * 55ms);
}

.mini-dock > :nth-child(2),
.chips li:nth-child(2) {
  --n: 1;
}

.mini-dock > :nth-child(3),
.chips li:nth-child(3) {
  --n: 2;
}

.mini-dock > :nth-child(4),
.chips li:nth-child(4) {
  --n: 3;
}

.mini-dock > :nth-child(5),
.chips li:nth-child(5) {
  --n: 4;
}

.mini-dock > :nth-child(6) {
  --n: 5;
}

.mini-dock > :nth-child(7) {
  --n: 6;
}

.mini-dock > :nth-child(8) {
  --n: 7;
}

.tile.reveal-in .pill-accent {
  animation: paste-in 0.8s var(--ease-out) both;
  animation-delay: calc(var(--reveal-delay, 0ms) + 480ms);
}

.tile.reveal-in .translate-plate {
  animation: plate-in 0.9s var(--ease-out) both;
  animation-delay: calc(var(--reveal-delay, 0ms) + 520ms);
}

.tile.reveal-in .rec-bar {
  animation: pop-in 0.8s var(--ease-out) both;
  animation-delay: calc(var(--reveal-delay, 0ms) + 220ms);
}

.tile-clip:hover .flow-arrow {
  animation: nudge 1.4s ease-in-out infinite;
}

@keyframes notif-in {
  from {
    opacity: 0;
    translate: 48px 0;
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    translate: 0 10px;
    scale: 0.7;
  }
}

@keyframes paste-in {
  from {
    opacity: 0;
    translate: -18px 0;
  }
}

@keyframes plate-in {
  from {
    opacity: 0;
    scale: 0.9;
  }
}

@keyframes nudge {
  50% {
    transform: translateX(4px);
  }
}

/* ------------------------------------------------------- Settings tour */

.glow-tour {
  inset: 0 -20%;
  background: radial-gradient(40% 40% at 68% 55%, rgba(47, 74, 31, 0.42), transparent 70%);
}

/* Without JavaScript every screen is shown with its caption, in a grid.
   site.js turns the grid into tabs beside one large screen. */

.tour-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(36px, 4vw, 56px) clamp(20px, 2.4vw, 32px);
}

.tour-item[hidden] {
  display: none;
}

.tour-item figcaption {
  margin-top: 18px;
}

.tour-item h3 {
  margin-bottom: 6px;
  color: var(--ink);
  font: 600 1.08rem/1.35 var(--font-sans);
}

.tour-item p {
  color: var(--ink-2);
  font-size: 0.97rem;
}

.tour-gallery.is-tabbed {
  grid-template-columns: minmax(250px, 340px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 4vw, 64px);
}

.tour-tabs {
  display: grid;
  gap: 6px;
}

/* Every screen waits in the same place; the chosen one fades in as the
   others fade out, moving the way the list moves (site.js sets --off: -1 for
   screens above the chosen one, 1 below). */
.is-tabbed .tour-item {
  grid-column: 2;
  grid-row: 1;
  transition: opacity 0.55s var(--ease-out), transform 0.8s var(--ease-out), visibility 0s;
}

.is-tabbed .tour-item.is-off {
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, calc(var(--off, 1) * 22px), 0) scale(0.985);
  transition: opacity 0.3s ease, transform 0.5s ease, visibility 0s linear 0.5s;
  pointer-events: none;
}

.is-tabbed .tour-item figcaption {
  display: none;
}

.tour-tab {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 14px 18px 15px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}

.tour-tab:hover {
  background: var(--fill-1);
  color: var(--ink);
}

.tour-tab[aria-selected='true'] {
  background: linear-gradient(180deg, rgba(31, 47, 24, 0.85), rgba(19, 31, 15, 0.7));
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink);
}

.tour-tab-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 600 1.04rem/1.3 var(--font-sans);
}

.tour-tab-title::before {
  content: '';
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-3);
  opacity: 0.55;
}

.tour-tab[aria-selected='true'] .tour-tab-title::before {
  background: var(--flesh);
  opacity: 1;
  box-shadow: 0 0 0 4px rgba(216, 232, 167, 0.16);
}

/* Only the chosen tab shows its description, so the list stays about as
   tall as the screenshot. */
.tour-tab-text {
  display: none;
  padding-left: 17px;
  color: var(--ink-2);
  font-size: 0.92rem;
  line-height: 1.5;
}

.tour-tab[aria-selected='true'] .tour-tab-text {
  display: block;
  animation: text-in 0.5s var(--ease-out) 0.08s both;
}

@keyframes text-in {
  from {
    opacity: 0;
    translate: 0 -4px;
  }
}

/* -------------------------------------------------------- How it works */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding-top: 24px;
  counter-increment: step;
}

.steps li::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(216, 232, 167, 0.5), transparent 85%);
  transform-origin: 0 50%;
}

.steps li.reveal-pending::after {
  transform: scaleX(0);
}

.steps li.reveal-in::after {
  transition: transform 1.3s var(--ease-out) calc(var(--reveal-delay, 0ms) + 200ms);
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 14px;
  color: var(--flesh);
  font: 500 0.95rem/1 var(--font-mono);
  letter-spacing: 0.06em;
}

.steps h3 {
  margin-bottom: 8px;
  font: 600 1.08rem/1.35 var(--font-sans);
}

.steps p {
  color: var(--ink-2);
  font-size: 0.97rem;
}

/* -------------------------------------------------------- Requirements */

.req-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 48px;
}

.req-list dt {
  margin-bottom: 8px;
  color: var(--ink);
  font: 600 1.12rem/1.35 var(--font-sans);
}

.req-list dd {
  color: var(--ink-2);
}

/* ------------------------------------------------------------- Support */

.support-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(36px, 6vw, 96px);
}

.support .section-head {
  margin-bottom: 44px;
}

.channels-block {
  padding-top: 8px;
}

.channels {
  display: grid;
  gap: 10px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}

.channel {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 16px;
  padding: 20px 24px;
  border-radius: 18px;
  background: var(--fill-1);
  color: var(--ink);
  text-decoration: none;
  transition: background-color 0.2s;
}

a.channel:hover {
  background: var(--fill-2);
  color: var(--ink);
}

.channel-name {
  font-size: 1.1rem;
  font-weight: 600;
}

.channel-meta {
  grid-column: 1;
  color: var(--ink-3);
  font-size: 0.9rem;
}

.channel .icon {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 22px;
  height: 22px;
  color: var(--flesh);
}

.channel-details {
  grid-column: 1 / -1;
  margin-top: 8px;
  color: var(--ink-2);
  font: 0.9rem/1.6 var(--font-mono);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.thanks {
  margin-top: 18px;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 600;
}

/* ---------------------------------------------------------------- Haze */

/* The hero's haze fades into the page at the bottom with a mask, so it blends
   with whatever colour the page has there. */

.hero-sky,
.hero .haze-canvas,
.not-found .haze-canvas {
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 70%, transparent 100%);
}

/* ----------------------------------------------------------------- FAQ */

.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.4fr);
  align-items: start;
  gap: clamp(28px, 6vw, 96px);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list details:first-child {
  border-top: 1px solid var(--line);
}

.faq-list summary {
  position: relative;
  padding: 22px 44px 22px 0;
  color: var(--ink);
  font: 600 1.08rem/1.4 var(--font-sans);
  list-style: none;
  cursor: pointer;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: '';
  position: absolute;
  right: 8px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--flesh);
  border-bottom: 2px solid var(--flesh);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.25s var(--ease);
}

.faq-list details[open] summary::after {
  transform: translateY(-25%) rotate(225deg);
}

.faq-list summary:hover {
  color: #fff;
}

.faq-list details p {
  max-width: 46em;
  padding-bottom: 24px;
  color: var(--ink-2);
}

.faq-list details[open] > p {
  animation: faq-in 0.45s var(--ease-out);
}

@keyframes faq-in {
  from {
    opacity: 0;
    translate: 0 -6px;
  }
}

/* -------------------------------------------------------------- Footer */

.site-footer {
  padding: clamp(64px, 8vw, 96px) 0 44px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.35));
  color: var(--ink-3);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
  gap: 48px;
  padding-bottom: 52px;
}

.footer-brand img {
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
}

.footer-brand p {
  max-width: 24em;
}

.footer-brand .footer-credit {
  margin-top: 10px;
  font-size: 0.9rem;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.footer-title {
  margin-bottom: 16px;
  color: var(--ink-2);
  font: 500 0.76rem/1.3 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-nav ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-nav a,
.footer-legal a {
  color: var(--ink-3);
  text-decoration: none;
}

.footer-nav a:hover,
.footer-legal a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.footer-legal {
  display: grid;
  gap: 6px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
}

.footer-legal p + p {
  margin-top: 0;
}

/* ----------------------------------------------------------------- 404 */

.not-found {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: 80vh;
  margin-top: calc(-1 * var(--header-h));
  padding: calc(var(--header-h) + 64px) 0 64px;
}

.not-found-inner h1 {
  margin-bottom: 20px;
}

.not-found-inner > p + p {
  margin-top: 26px;
}

/* ----------------------------------------------------- Scroll reveal */

/* site.js marks what is below the fold, then lets it in as it arrives, one
   after another (--reveal-delay). The reveal uses the translate and scale
   properties, so it never fights the tilt (transform) of the same card. */

.reveal-pending {
  opacity: 0;
  translate: 0 26px;
}

.reveal-pending.showcase,
.reveal-pending.tour-gallery {
  translate: 0 44px;
  scale: 0.97;
}

.reveal-pending.tile,
.reveal-pending.feature-card {
  translate: 0 32px;
  scale: 0.98;
}

.reveal-in {
  transition: opacity 0.9s var(--ease-out), translate 1.1s var(--ease-out), scale 1.1s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

/* Looping animations rest while their section is off screen. */
.is-offscreen .rec-dot,
.is-offscreen .hotspot-dot::before {
  animation-play-state: paused;
}

/* ---------------------------------------------------------- Lightbox */

html.has-lightbox {
  overflow: hidden;
  padding-right: var(--scrollbar-gap, 0px);
}

.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: clamp(64px, 9vh, 88px) clamp(16px, 4vw, 48px) clamp(20px, 4vh, 40px);
  border: 0;
  background: transparent;
  color: var(--ink);
  overflow: hidden;
}

.lightbox[open] {
  display: grid;
  place-items: center;
}

.lightbox::backdrop {
  background: transparent;
}

.lightbox-scrim {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 3, 0.9);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  backdrop-filter: blur(12px) saturate(1.2);
}

.lightbox-figure {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 18px;
  max-width: 100%;
  min-height: 0;
}

.lightbox-img {
  width: auto;
  height: auto;
  max-width: min(100%, 1309px);
  max-height: calc(100vh - 200px);
  max-height: calc(100dvh - 200px);
  border-radius: 12px;
  background: var(--bg-2);
  box-shadow: 0 0 0 1px rgba(216, 232, 167, 0.1), 0 40px 90px -30px rgba(0, 0, 0, 0.9);
  transform-origin: 0 0;
  cursor: zoom-out;
}

.lightbox-caption {
  max-width: 52em;
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.55;
  text-align: center;
  text-wrap: pretty;
}

.lightbox-caption strong {
  display: block;
  margin-bottom: 4px;
  color: var(--flesh);
  font: 500 0.74rem/1.4 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lightbox-close {
  position: absolute;
  top: clamp(12px, 2.4vh, 22px);
  right: clamp(12px, 2.4vw, 22px);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--fill-2);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.3s var(--ease-out);
}

.lightbox-close:hover {
  transform: rotate(90deg);
}

.lightbox-close:focus-visible {
  border-radius: 50%;
}

.lightbox-close .icon {
  width: 20px;
  height: 20px;
}

/* ------------------------------------------------------- Plain lists */

.plain-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plain-list li {
  position: relative;
  padding-left: 24px;
  color: var(--ink-2);
}

.plain-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 11px;
  height: 2px;
  border-radius: 2px;
  background: var(--flesh);
}

.also {
  max-width: 860px;
  margin-top: 40px;
  color: var(--ink-2);
}

.dev-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(32px, 6vw, 96px);
}

.dev-grid .section-head {
  margin-bottom: 0;
}

.dev-grid .cta-row {
  margin-top: 28px;
}

/* -------------------------------------------------------- Responsive */

@media (max-width: 1180px) {
  .site-nav a {
    padding: 8px 9px;
    font-size: 0.9rem;
  }
}

@media (max-width: 1080px) {
  .hero {
    min-height: 0;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-shot {
    max-width: 720px;
    margin: 12px auto 0;
  }

  .dev-grid,
  .support-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .faq-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .faq-grid .section-head {
    margin-bottom: 8px;
  }
}

@media (max-width: 980px) {
  .nav-toggle {
    display: inline-block;
  }

  .nav-toggle[hidden] {
    display: none;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: var(--header-h);
    padding: 8px var(--gutter) 22px;
    background: rgba(7, 12, 6, 0.97);
    box-shadow: 0 1px 0 var(--line), 0 30px 60px -20px rgba(0, 0, 0, 0.8);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 2px;
  }

  .site-nav a {
    padding: 13px 14px;
    border-radius: 12px;
    font-size: 1.05rem;
  }

  .header-inner {
    justify-content: space-between;
  }

  .header-actions {
    margin-left: auto;
  }
}

@media (max-width: 900px) {
  .tour-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tour-gallery.is-tabbed {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .tour-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .tour-tab {
    width: auto;
    padding: 8px 15px;
    border-radius: 999px;
    background: var(--fill-1);
  }

  .tour-tab-title {
    font-size: 0.93rem;
  }

  .tour-tab-title::before,
  .tour-tab[aria-selected='true'] .tour-tab-text {
    display: none;
  }

  .tour-tab[aria-selected='true'] {
    background: var(--flesh);
    box-shadow: none;
    color: var(--accent-ink);
  }

  .is-tabbed .tour-item {
    grid-column: 1;
    grid-row: 2;
  }

  /* Games: the tabs become a switch above the screenshots, with a pill that
     slides to the chosen one, and the caption shows under the screenshot. */
  .showcase.is-enhanced {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-template-areas:
      'tabs'
      'stage'
      'side';
    row-gap: 18px;
  }

  .is-enhanced .showcase-side {
    padding-left: 0;
  }

  .is-enhanced .showcase-deck {
    padding: 18px 16px 0 0;
  }

  .showcase-item.is-back {
    transform: translate3d(16px, -18px, 0) scale(0.95);
  }

  .showcase-item.is-back:hover {
    transform: translate3d(16px, -20px, 0) scale(0.95);
  }

  .is-enhanced .showcase-item figcaption {
    display: block;
  }

  .is-enhanced .showcase-item.is-back figcaption {
    visibility: hidden;
  }

  .is-enhanced .showcase-item .shot-label {
    display: none;
  }

  .showcase-tabs {
    align-self: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    padding: 5px;
    border-radius: 999px;
    background: var(--fill-1);
    box-shadow: inset 0 0 0 1px var(--line);
  }

  .showcase-tabs::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 5px;
    bottom: 5px;
    width: calc(50% - 5px);
    border-radius: 999px;
    background: var(--flesh);
    transform: translateX(calc(var(--tab-index, 0) * 100%));
    transition: transform 0.5s var(--ease-out);
  }

  .showcase-tabs .showcase-tab,
  .showcase-tabs .showcase-tab:hover,
  .showcase-tabs .showcase-tab[aria-selected='true'] {
    position: relative;
    display: block;
    padding: 10px 12px;
    border-radius: 999px;
    background: transparent;
    box-shadow: none;
    text-align: center;
  }

  .showcase-tab-num,
  .showcase-tab-text {
    display: none;
  }

  .showcase-tab-title {
    transition: color 0.3s;
  }

  .showcase-tab[aria-selected='true'] .showcase-tab-title {
    color: var(--accent-ink);
  }

  .feature-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-card,
  .feature-card:nth-child(n + 4) {
    grid-column: span 1;
  }

  .feature-card:last-child {
    grid-column: 1 / -1;
  }

  .is-tabbed .tour-item figcaption {
    display: block;
  }

  /* The tab already names the screen. */
  .is-tabbed .tour-item h3 {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tile,
  .tile-follow,
  .tile-capture {
    grid-column: span 1;
  }

  .tile-dock,
  .tile-translate {
    grid-column: span 2;
  }

  .footer-top {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  .req-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .header-github span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .header-github {
    width: 40px;
    padding: 0;
  }

  .lang-long {
    display: none;
  }

  .lang-short {
    display: inline;
  }

}

@media (max-width: 600px) {
  .tour-gallery {
    grid-template-columns: minmax(0, 1fr);
  }

  .display,
  .brand-name {
    font-stretch: var(--display-stretch-narrow);
  }

  .steps,
  .bento,
  .feature-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature-card:last-child {
    grid-column: auto;
  }

  .feature-cards {
    gap: 12px;
  }

  .feature-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 16px;
    padding: 20px 20px 22px;
    border-radius: 18px;
  }

  .feature-icon {
    grid-row: 1 / span 2;
    width: 38px;
    height: 38px;
    margin-bottom: 0;
    border-radius: 11px;
  }

  .feature-icon .icon {
    width: 19px;
    height: 19px;
  }

  .showcase-deck {
    grid-template-columns: minmax(0, 1fr);
  }

  .is-enhanced .showcase-deck {
    padding: 14px 12px 0 0;
  }

  .showcase-item.is-back,
  .showcase-item.is-back:hover {
    transform: translate3d(12px, -14px, 0) scale(0.96);
  }

  .hotspot-tip {
    max-width: min(230px, 62vw);
    font-size: 0.8rem;
  }

  .zoom-btn {
    width: 34px;
    height: 34px;
  }

  .zoom-btn .icon {
    width: 16px;
    height: 16px;
  }

  .tile,
  .tile-dock,
  .tile-translate,
  .tile-follow,
  .tile-capture {
    grid-column: auto;
    min-height: 0;
  }

  .tile-art {
    min-height: 110px;
  }

  .mini-dock {
    gap: 8px;
    padding: 10px 12px;
  }

  .mini-dock img,
  .mini-dock .dock-app svg {
    width: 34px;
    height: 34px;
  }

  .mini-dock .dock-app:nth-child(n + 7) {
    display: none;
  }

  .cta-row .btn,
  .cta-row .cta-stack {
    width: 100%;
  }

  .cta-stack .btn {
    width: 100%;
  }

  .footer-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .status-note {
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 380px) {

  .brand-name {
    font-size: 1.3rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal-pending {
    opacity: 1;
    translate: none;
    scale: none;
  }

  .hotspot-dot::before {
    display: none;
  }
}

@media (forced-colors: active) {
  .btn,
.channel,
.tile {
    border: 1px solid CanvasText;
  }

  .tour-tab[aria-selected='true'],
  .showcase-tab[aria-selected='true'] {
    outline: 2px solid Highlight;
  }

  .feature-card,
  .zoom-btn,
  .hotspot-tip {
    border: 1px solid CanvasText;
  }

  .hotspot-dot::after {
    border-color: ButtonText;
    background: Canvas;
  }
}

@media print {
  :root {
    --ink: #000;
    --ink-2: #222;
    --ink-3: #444;
    --line: #bbb;
    --fill-1: transparent;
    --fill-2: transparent;
    color-scheme: light;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .site-header,
  .site-footer,
  .haze-canvas,
  .hero-sky,
  .hero-fx,
  .glow,
  .glare,
  .hotspots,
  .zoom-btn,
  .lightbox,
  .skip-link {
    display: none !important;
  }

  .section {
    padding: 16pt 0;
    background: none !important;
  }

  a {
    color: #000;
  }

  .kicker {
    color: #000 !important;
  }
}

/* ------------------------------------------- Typeface set A */

/* Typeface set A: Hubot Sans (headings), Mona Sans (text), Mona Sans Mono
   (labels and code). GitHub's open-source superfamily, SIL OFL 1.1; licenses
   in assets/fonts/<family>/OFL.txt. Hubot Sans and Mona Sans are Google
   Fonts' Latin files, unmodified; Mona Sans Mono is GitHub's release file. */

@font-face {
  font-family: 'Hubot Sans';
  src: url('../fonts/hubot-sans/hubot-sans.woff2') format('woff2');
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Mona Sans';
  src: url('../fonts/mona-sans/mona-sans.woff2') format('woff2');
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Mona Sans Mono';
  src: url('../fonts/mona-sans-mono/mona-sans-mono.woff2') format('woff2');
  font-weight: 200 900;
  font-display: swap;
}

:root {
  --font-display: 'Hubot Sans', var(--font-fallback);
  --font-sans: 'Mona Sans', var(--font-fallback);
  --font-mono: 'Mona Sans Mono', var(--font-mono-fallback);
  --display-weight: 650;
  --display-stretch: 108%;
  --display-stretch-narrow: 102%;
  --display-tracking: -0.01em;
  --display-leading: 1.04;
}
