/* LogoLight site. No external requests: system fonts only, and every image is local. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --card: #f5f5f7;
  --text: #1d1d1f;
  --text-2: #424245;
  --muted: #6e6e73;
  --hairline: rgb(0 0 0 / 0.1);
  --accent: #0066cc;
  --btn-bg: #0068d6;
  --btn-bg-hover: #0058b5;
  --btn-text: #ffffff;
  --code-bg: #e8e8ed;
  --header-bg: rgb(255 255 255 / 0.78);
  --shadow-lg: 0 30px 60px -20px rgb(0 0 0 / 0.28), 0 12px 24px -12px rgb(0 0 0 / 0.18);
  --icon-ring: none;

  /* The scene around the real menu: a corner of the screen, with the menu bar. */
  --wallpaper:
    radial-gradient(110% 80% at 100% 0%, #b9cbf2 0%, rgb(185 203 242 / 0) 60%),
    radial-gradient(90% 70% at 0% 100%, #f0cfe0 0%, rgb(240 207 224 / 0) 62%),
    linear-gradient(160deg, #dfe6f5 0%, #efe9f2 55%, #f6eef0 100%);
  --menubar-bg: rgb(255 255 255 / 0.32);
  --menubar-text: rgb(0 0 0 / 0.85);
  --status-highlight: rgb(0 0 0 / 0.1);
  --menu-bg: rgb(242 242 245 / 0.8);
  --menu-edge: rgb(0 0 0 / 0.14);
  --menu-text: #1d1d1f;
  --menu-sep: rgb(0 0 0 / 0.1);
  --icon-filter: none;

  /* Corner radii. Two things keep their own: the icon tiles (a quarter of their size, as on iOS) and the menu
     (macOS's 12 points, in the scene's --pt). */
  --radius-lg: 26px;
  --radius-md: 16px;
  --radius-sm: 8px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  /* The live view's fade curve, measured on the real logo (docs/corebrightnessd.md). */
  --fade: cubic-bezier(0.17, 0, 0.17, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* A little lighter than black, so the stage (pure black, like the lid's surroundings at night) stands apart. */
    --bg: #0c0c0e;
    --bg-alt: #161618;
    --card: #1c1c1f;
    --text: #f5f5f7;
    --text-2: #d2d2d7;
    --muted: #a1a1a6;
    --hairline: rgb(255 255 255 / 0.12);
    --accent: #2997ff;
    --btn-bg: #0071e3;
    --btn-bg-hover: #147ce5;
    --btn-text: #ffffff;
    --code-bg: #2a2a2e;
    --header-bg: rgb(22 22 23 / 0.78);
    --shadow-lg: 0 30px 60px -20px rgb(0 0 0 / 0.7), 0 12px 24px -12px rgb(0 0 0 / 0.5);
    /* The app icon is dark, so it gets a fine edge on dark backgrounds. */
    --icon-ring: 0 0 0 1px rgb(255 255 255 / 0.16);

    --wallpaper:
      radial-gradient(110% 80% at 100% 0%, #2d3a6e 0%, rgb(45 58 110 / 0) 60%),
      radial-gradient(90% 70% at 0% 100%, #3a1f45 0%, rgb(58 31 69 / 0) 62%),
      linear-gradient(160deg, #121830 0%, #0d0f1d 60%, #120c18 100%);
    --menubar-bg: rgb(0 0 0 / 0.22);
    --menubar-text: rgb(255 255 255 / 0.92);
    --status-highlight: rgb(255 255 255 / 0.2);
    --menu-bg: rgb(38 38 41 / 0.82);
    --menu-edge: rgb(255 255 255 / 0.16);
    --menu-text: #f5f5f7;
    --menu-sep: rgb(255 255 255 / 0.12);
    --icon-filter: invert(1);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* The sticky header's height, so a section jumped to starts just below it. */
  scroll-padding-top: 53px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.47 var(--font);
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

p a,
li a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
}

p,
figure {
  margin: 0;
}

figcaption {
  text-wrap: balance;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  letter-spacing: 0;
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 6px;
  overflow-wrap: anywhere;
}

kbd {
  font-family: var(--font);
  font-size: 0.85em;
  font-weight: 600;
  padding: 0.05em 0.45em;
  border: 1px solid var(--hairline);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--bg);
  white-space: nowrap;
}

strong {
  font-weight: 600;
  color: var(--text);
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: max(16px, min(5vw, 40px));
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 16px;
  top: -200px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
}

.skip:focus {
  top: 12px;
  box-shadow: var(--shadow-lg);
}

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

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text);
  font-weight: 600;
  font-size: 1.06rem;
  letter-spacing: -0.02em;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 28px;
  height: 28px;
  margin-block: -2px;
  border-radius: 23%;
  box-shadow: var(--icon-ring);
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.6vw, 30px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: var(--text-2);
  font-size: 0.82rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.site-nav .nav-cta {
  display: inline-block;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-weight: 500;
}

.site-nav .nav-cta:hover {
  background: var(--btn-bg-hover);
  color: var(--btn-text);
}

@media (max-width: 560px) {
  .site-nav .nav-wide {
    display: none;
  }
}

/* The hero, the download section and the footer link to it too. */
@media (max-width: 820px) {
  .site-nav .nav-coffee {
    display: none;
  }
}

@media (max-width: 380px) {
  .site-nav .nav-mid {
    display: none;
  }
}

/* Buttons */

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-weight: 500;
  font-size: 1.06rem;
  line-height: 1.2;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.btn:hover {
  text-decoration: none;
}

.btn svg {
  width: 19px;
  height: 19px;
  flex: none;
}

.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-text);
}

.btn-primary:hover {
  background: var(--btn-bg-hover);
}

.btn-secondary {
  color: var(--accent);
  border-color: currentColor;
}

.btn-secondary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 1.06rem;
}

.btn-link svg {
  width: 15px;
  height: 15px;
  margin-top: 1px;
}

/* Shared headings */

.eyebrow {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: clamp(0.94rem, 0.88rem + 0.3vw, 1.06rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.section-head {
  max-width: 44rem;
  margin: 0 auto clamp(40px, 6vw, 64px);
  text-align: center;
}

.section-head h2 {
  font-size: clamp(2.1rem, 1.3rem + 2.8vw, 3.5rem);
  line-height: 1.07;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.section-head p:not(.eyebrow) {
  margin-top: 18px;
  color: var(--muted);
  font-size: clamp(1.06rem, 0.98rem + 0.4vw, 1.3rem);
  line-height: 1.45;
  text-wrap: pretty;
}

.section {
  padding-block: clamp(72px, 9vw, 120px);
}

.section-alt {
  background: var(--bg-alt);
}

/* Hero */

.hero {
  padding-block: clamp(12px, 1.5vw, 20px) clamp(56px, 7vw, 96px);
}

.hero-grid {
  display: grid;
  gap: clamp(40px, 6vw, 64px);
  align-items: center;
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  }
}

.hero-copy {
  max-width: 34rem;
}

/* One column: the copy centred above the scene. */
@media (max-width: 959px) {
  .hero-copy {
    max-width: 36rem;
    margin-inline: auto;
    text-align: center;
  }

  .hero .actions,
  .facts li {
    justify-content: center;
  }

  .facts {
    justify-items: center;
  }
}

.hero h1 {
  font-size: clamp(2.7rem, 1.7rem + 3.6vw, 4.6rem);
  line-height: 1.03;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.lead {
  margin-top: 22px;
  color: var(--text-2);
  font-size: clamp(1.15rem, 1.02rem + 0.55vw, 1.42rem);
  line-height: 1.42;
  letter-spacing: -0.016em;
  text-wrap: pretty;
}

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

.facts {
  display: grid;
  gap: 8px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.9rem;
}

.facts li {
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
}

@media (max-width: 420px) {
  .facts {
    font-size: 0.8rem;
  }

  .facts li {
    gap: 7px;
  }
}

.facts svg {
  width: 18px;
  height: 18px;
  flex: none;
}

/* The scene: a corner of the screen, at a zoom set in macOS points. Everything in it is sized in --pt, so the
   menu bar and the menu's frame keep the proportions of the real ones around the real panel. */

.scene {
  --pt: 1.25px;
  justify-self: center;
  width: 100%;
  max-width: 600px;
}

@media (min-width: 600px) {
  .scene {
    --pt: 1.45px;
  }
}

/* One column: a narrower corner, so the menu fills it. */
@media (max-width: 959px) {
  .scene {
    max-width: 440px;
  }
}

@media (min-width: 1200px) {
  .scene {
    --pt: 1.62px;
  }
}

.screen-frame {
  position: relative;
}

.screen {
  position: relative;
  height: calc(var(--pt) * 457);
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--wallpaper);
  box-shadow: inset 0 0 0 1px var(--hairline), var(--shadow-lg);
}

.menubar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: calc(var(--pt) * 13);
  height: calc(var(--pt) * 26);
  padding-inline: calc(var(--pt) * 12) calc(var(--pt) * 14);
  background: var(--menubar-bg);
  color: var(--menubar-text);
  font-size: calc(var(--pt) * 13);
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.status {
  position: relative;
  display: grid;
  place-items: center;
  width: calc(var(--pt) * 28);
  height: calc(var(--pt) * 22);
  border-radius: calc(var(--pt) * 6);
}

.status-open {
  background: var(--status-highlight);
}

.status-icon {
  width: auto;
  height: calc(var(--pt) * 15);
  filter: var(--icon-filter);
}

.glyph {
  flex: none;
  height: calc(var(--pt) * 12);
  fill: currentColor;
}

.glyph-battery {
  width: calc(var(--pt) * 27);
}

.glyph-wifi {
  width: calc(var(--pt) * 17);
}

.glyph-controls {
  width: calc(var(--pt) * 16);
}

.clock {
  font-variant-numeric: tabular-nums;
}

/* The menu's frame, around the real panel. */

.menu {
  display: block;
  width: calc(var(--pt) * 170);
  padding-block: calc(var(--pt) * 5);
  border-radius: calc(var(--pt) * 12);
  background: var(--menu-bg);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 0 0 0.5px var(--menu-edge), 0 calc(var(--pt) * 10) calc(var(--pt) * 30) rgb(0 0 0 / 0.28);
  color: var(--menu-text);
  text-align: left;
}

.status .menu {
  position: absolute;
  top: calc(100% + var(--pt) * 7);
  left: 0;
}

.menu-panel {
  position: relative;
  display: block;
}

.menu-panel img {
  width: 100%;
  height: auto;
}

/* The lid inside the panel: 116 × 82 points at (27, 50), in a panel 170 × 315 points. The renderer prints
   these (LOGOLIGHT_RENDER_GLOWS); update them with the panel pictures. */
.menu-panel .glow {
  inset: 15.873% auto auto 15.8824%;
  width: 68.2353%;
  height: 26.0317%;
}

.menu-sep {
  display: block;
  height: calc(var(--pt) * 11);
  padding: calc(var(--pt) * 5) calc(var(--pt) * 10) 0;
}

.menu-sep::before {
  content: "";
  display: block;
  height: 1px;
  background: var(--menu-sep);
}

.menu-item {
  position: relative;
  display: flex;
  align-items: center;
  height: calc(var(--pt) * 22);
  padding-left: calc(var(--pt) * 24);
  font-size: calc(var(--pt) * 13);
  font-weight: 400;
}

.menu-check {
  position: absolute;
  left: calc(var(--pt) * 9);
  width: calc(var(--pt) * 11);
  height: calc(var(--pt) * 11);
}

.scene figcaption {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}

/* A pause button for the scene's animation (WCAG 2.2.2), without scripts: a checkbox in a round label. */

.pause {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgb(29 29 31 / 0.62);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.16), 0 2px 8px rgb(0 0 0 / 0.2);
  color: #ffffff;
  cursor: pointer;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: background-color 0.15s;
}

.pause:hover {
  background: rgb(29 29 31 / 0.8);
}

.pause input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.pause svg {
  grid-area: 1 / 1;
  width: 15px;
  height: 15px;
}

.pause .play-icon,
.pause:has(input:checked) .pause-icon {
  display: none;
}

.pause:has(input:checked) .play-icon {
  display: block;
}

.pause:has(input:focus-visible) {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* The live view: the lid unlit, with the logo's light over it (LOGOLIGHT_RENDER_LIGHT). As in the app, the light's
   group is at the glow's opacity and its halo is too, inside it, so the halo shows at the glow squared. */

.lid {
  position: relative;
  display: block;
}

.lid > img {
  width: 100%;
  height: auto;
}

.glow {
  position: absolute;
  inset: 0;
  display: block;
  opacity: var(--peak, 1);
}

.glow img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.glow .halo {
  opacity: var(--peak, 1);
}

.menu-panel .glow {
  --peak: 0.9;
}

/* Effects, with timings from LogoEffect.cycle and the measured curve (--fade). The halo runs the same animation
   as its group, so the two multiply as in the app. */
@media (prefers-reduced-motion: no-preference) {
  .anim-breathe,
  .anim-breathe .halo {
    animation: breathe 6.3s infinite;
  }

  /* Lit for a moment before it starts breathing. */
  .menu-panel .glow,
  .menu-panel .glow .halo {
    animation-delay: 1.2s;
  }

  .play .glow,
  .play .glow .halo {
    animation: var(--fx, none) var(--fx-time, 1s) infinite;
  }

  /* Paused: the logo holds at its level. */
  .scene:has(.pause input:checked) .glow,
  .scene:has(.pause input:checked) .glow .halo {
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pause {
    display: none;
  }
}

/* Fall 2 s, rest 0.5 s, rise 3.5 s, hold 0.3 s. */
@keyframes breathe {
  0% {
    opacity: var(--peak, 1);
    animation-timing-function: var(--fade);
  }
  31.746% {
    opacity: 0;
  }
  39.683% {
    opacity: 0;
    animation-timing-function: var(--fade);
  }
  95.238%,
  100% {
    opacity: var(--peak, 1);
  }
}

/* Fall 0.7 s, rest 0.1 s, rise 1.2 s, hold 0.15 s. */
@keyframes pulse {
  0% {
    opacity: var(--peak, 1);
    animation-timing-function: var(--fade);
  }
  32.558% {
    opacity: 0;
  }
  37.209% {
    opacity: 0;
    animation-timing-function: var(--fade);
  }
  93.023%,
  100% {
    opacity: var(--peak, 1);
  }
}

/* Two beats from dark (rise 0.12 s, hold 0.05 s, fall 0.18 s, rest 0.08 s), then a fall of 0.5 s and a rest. */
@keyframes heartbeat {
  0% {
    opacity: 0;
    animation-timing-function: var(--fade);
  }
  7.742% {
    opacity: var(--peak, 1);
  }
  10.968% {
    opacity: var(--peak, 1);
    animation-timing-function: var(--fade);
  }
  22.581% {
    opacity: 0;
  }
  27.742% {
    opacity: 0;
    animation-timing-function: var(--fade);
  }
  35.484% {
    opacity: var(--peak, 1);
  }
  38.71% {
    opacity: var(--peak, 1);
    animation-timing-function: var(--fade);
  }
  70.968%,
  100% {
    opacity: 0;
  }
}

/* The stage: always black, so the glow shows as it does on the lid. */

.stage {
  --text: #f5f5f7;
  --text-2: #d2d2d7;
  --muted: #a1a1a6;
  --accent: #2997ff;
  isolation: isolate;
  /* The light around the big lid reaches past the sides on narrow screens. */
  overflow-x: clip;
  background: #000000;
  color: var(--text);
  padding-block: clamp(72px, 9vw, 120px);
}

@media (prefers-color-scheme: dark) {
  .stage {
    border-block: 1px solid rgb(255 255 255 / 0.08);
  }
}

.stage-part + .stage-part {
  margin-top: clamp(96px, 12vw, 160px);
}

.stage .eyebrow {
  color: #b4c8ff;
}

/* The big live view, with its effect and brightness picked by two rows of radio buttons (:has, no scripts). */

.play {
  --peak: 1;
  --fx: breathe;
  --fx-time: 6.3s;
}

.play:has(#fx-none:checked) {
  --fx: none;
}

.play:has(#fx-pulse:checked) {
  --fx: pulse;
  --fx-time: 2.15s;
}

.play:has(#fx-heartbeat:checked) {
  --fx: heartbeat;
  --fx-time: 1.55s;
}

.play:has(#lv-25:checked) {
  --peak: 0.25;
}

.play:has(#lv-50:checked) {
  --peak: 0.5;
}

.play:has(#lv-75:checked) {
  --peak: 0.75;
}

.big-lid {
  position: relative;
  width: min(100%, 760px);
  margin-inline: auto;
}

/* A faint light around the lid, so its dark edge reads on black. */
.big-lid::before {
  content: "";
  position: absolute;
  inset: -18% -14% -6%;
  z-index: -1;
  background: radial-gradient(closest-side, rgb(150 165 210 / 0.16), rgb(150 165 210 / 0));
  pointer-events: none;
}

.big-lid figcaption,
.finishes figcaption {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px clamp(24px, 4vw, 48px);
  margin-top: clamp(28px, 4vw, 40px);
}

.segmented {
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  text-align: center;
}

.segmented legend {
  margin: 0 auto 10px;
  padding: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.segments {
  display: inline-flex;
  max-width: 100%;
  padding: 3px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.1);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.06);
}

.segments label {
  position: relative;
  flex: 1 1 auto;
  cursor: pointer;
}

.segments input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.segments span {
  display: block;
  min-width: 3.4em;
  padding: 7px clamp(9px, 2.4vw, 18px);
  border-radius: 999px;
  color: var(--text-2);
  font-size: clamp(0.86rem, 0.8rem + 0.25vw, 0.98rem);
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}

.segments label:hover span {
  color: #ffffff;
}

.segments input:checked + span {
  background: #f5f5f7;
  color: #000000;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.35);
}

.segments input:focus-visible + span {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.fx-notes {
  max-width: 34rem;
  min-height: 3em;
  margin: 22px auto 0;
  color: var(--muted);
  text-align: center;
  text-wrap: balance;
}

.fx-notes strong {
  margin-right: 0.3em;
  color: var(--text);
}

.fx-note,
.motion-note {
  display: none;
}

.play:has(#fx-none:checked) .fx-note-none,
.play:has(#fx-breathe:checked) .fx-note-breathe,
.play:has(#fx-pulse:checked) .fx-note-pulse,
.play:has(#fx-heartbeat:checked) .fx-note-heartbeat {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .motion-note {
    display: block;
    margin-top: 8px;
    font-size: 0.86rem;
  }
}

/* Finishes */

.finishes {
  display: grid;
  gap: 36px clamp(20px, 3vw, 40px);
  max-width: 1040px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .finishes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.finishes figcaption {
  font-size: 0.95rem;
  font-weight: 500;
}

/* The menu, on and off */

.menu-pair {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 5vw, 72px);
}

.menu-shot {
  --pt: min(1.8px, calc((100vw - 56px) / 340));
  display: grid;
  justify-items: center;
}

.menu-alone {
  padding-block: calc(var(--pt) * 6);
  box-shadow: 0 0 0 0.5px var(--menu-edge), var(--shadow-lg);
}

.menu-alone img {
  width: 100%;
  height: auto;
}

.menu-shot figcaption {
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
}

.trio {
  display: grid;
  gap: 36px clamp(24px, 4vw, 48px);
  max-width: 1000px;
  margin: clamp(64px, 9vw, 112px) auto 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 760px) {
  .trio {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 759px) {
  .trio .feature {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    column-gap: 16px;
  }

  .trio .feature > :not(.tile) {
    grid-column: 2;
  }

  .trio .feature h3 {
    margin-top: 10px;
  }

  .trio .tile {
    grid-row: 1 / span 2;
  }
}

.feature h3 {
  margin: 16px 0 8px;
  font-size: 1.24rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.feature p {
  color: var(--muted);
}

.feature p + p {
  margin-top: 10px;
}

.tile {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  color: #ffffff;
}

.tile svg {
  width: 24px;
  height: 24px;
}

.tile-orange { background: #f08300; }
.tile-blue { background: #1f6fe5; }
.tile-teal { background: #0898aa; }
.tile-indigo { background: #5b50dc; }
.tile-pink { background: #e5335c; }
.tile-green { background: #26a04f; }

/* Cards */

.cards {
  display: grid;
  gap: 20px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

@media (min-width: 720px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* With its screenshot, the Control Center card (the first) spans the row, with the picture beside the text.
     The other three follow: two, then one across. */
  .card-cc:has(.cc-shot) {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 40px;
    align-items: center;
  }

  .cards:has(.cc-shot) > .card:last-child {
    grid-column: 1 / -1;
  }
}

/* Wide enough for the three in a row. */
@media (min-width: 960px) {
  .cards:has(.cc-shot) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cards:has(.cc-shot) > .card:last-child {
    grid-column: auto;
  }
}

.card {
  padding: clamp(26px, 3.4vw, 36px);
  border-radius: var(--radius-lg);
  background: var(--card);
}

.card-cc .cc-copy {
  max-width: 40rem;
}

.cc-shot img {
  width: 100%;
  height: auto;
}

@media (max-width: 719px) {
  .cc-shot {
    margin-top: 24px;
  }
}

.fine {
  color: var(--muted);
  font-size: 0.9rem;
}

.feature .fine {
  margin-top: 12px;
  font-size: 0.9rem;
}

/* Download and support */

.offer {
  display: grid;
  justify-items: center;
  max-width: 980px;
  text-align: center;
}

.offer-icon {
  width: 112px;
  height: 112px;
  margin-bottom: 28px;
  border-radius: 23%;
  box-shadow: var(--icon-ring);
  filter: drop-shadow(0 12px 20px rgb(0 0 0 / 0.28));
}

.offer h2 {
  font-size: clamp(2.3rem, 1.5rem + 3vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.032em;
}

.offer-text {
  max-width: 32rem;
  margin-top: 18px;
  color: var(--muted);
  font-size: clamp(1.06rem, 0.98rem + 0.4vw, 1.24rem);
  line-height: 1.45;
}

.offer .actions {
  justify-content: center;
  margin-top: 34px;
}

.steps {
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: 900px;
  margin: 56px 0 40px;
  padding: 0;
  counter-reset: step;
  list-style: none;
  text-align: left;
  color: var(--text-2);
  font-size: 0.98rem;
}

@media (min-width: 720px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

.steps li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--bg);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-size: 0.82rem;
  font-weight: 700;
}

.offer .fine + .fine {
  margin-top: 6px;
}

/* FAQ */

.faq-wrap {
  max-width: 860px;
}

.faq {
  border-top: 1px solid var(--hairline);
}

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

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 4px;
  cursor: pointer;
  list-style: none;
}

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

.faq summary h3 {
  font-size: clamp(1.1rem, 1rem + 0.45vw, 1.32rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.faq summary svg {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--muted);
  transform: rotate(90deg);
  transition: transform 0.2s;
}

.faq details[open] summary svg {
  transform: rotate(-90deg);
}

.faq summary:hover h3 {
  color: var(--accent);
}

.answer {
  padding: 0 4px 28px;
  max-width: 44rem;
}

.answer p,
.answer li {
  color: var(--muted);
}

.answer p + p,
.answer ol + p {
  margin-top: 12px;
}

.answer ol {
  margin: 0 0 12px;
  padding-left: 1.3em;
}

.answer li + li {
  margin-top: 4px;
}

/* Footer */

.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--hairline);
}

.site-footer .wrap {
  display: grid;
  gap: 8px;
  padding-block: 36px 48px;
  color: var(--muted);
  font-size: 0.82rem;
}

.site-footer .brand {
  margin-bottom: 8px;
  font-size: 1rem;
}

.site-footer .brand img {
  width: 24px;
  height: 24px;
}

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

  .btn,
  .pause,
  .segments span,
  .faq summary svg {
    transition: none;
  }
}

/* 404 */

.not-found {
  display: grid;
  place-items: center;
  min-height: 70vh;
  text-align: center;
  padding-block: 64px;
}

.not-found img {
  width: 88px;
  height: 88px;
  margin: 0 auto 24px;
  border-radius: 23%;
  box-shadow: var(--icon-ring);
  filter: drop-shadow(0 10px 18px rgb(0 0 0 / 0.28));
}

.not-found h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.not-found p {
  color: var(--muted);
  margin-bottom: 28px;
}
