/* The night a Mac is kept awake through, and the amber of the switch that is on. */
:root {
  --night: #0e1024;
  --raised: #171a36;
  --line: rgba(255, 255, 255, 0.1);
  --text: #f5f2ea;
  --muted: #a8abc6;
  --amber: #f5a83c;
  --knob: #ffd27a;
  --rounded: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--knob);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--text);
}

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

h1,
h2,
h3 {
  font-family: var(--rounded);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

img {
  max-width: 100%;
  height: auto;
}

.wrap {
  width: min(100% - 2.5rem, 68rem);
  margin-inline: auto;
}

/* ------------------------------------------------------------------ header */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  font: 600 1.1rem/1 var(--rounded);
  text-decoration: none;
}

.brand svg {
  width: 2.3rem;
  height: auto;
}

.top nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
}

.top nav a {
  color: var(--muted);
  text-decoration: none;
}

.top nav a:hover {
  color: var(--text);
}

/* -------------------------------------------------------------------- hero */

/* The switch behind the notifications is turned, and its corners reach past a narrow screen. */
main {
  overflow-x: clip;
}

.hero {
  display: grid;
  gap: 3rem;
  align-items: center;
  padding-block: 3rem 5rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  font-weight: 700;
}

.hero h1 em {
  color: var(--amber);
  font-style: normal;
}

.lede {
  margin-top: 1.5rem;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.2rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  background: var(--amber);
  color: #1a1408;
  font: 600 1.05rem/1 var(--rounded);
  text-decoration: none;
}

.button:hover {
  background: var(--knob);
  color: #1a1408;
}

.button.quiet {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.button.quiet:hover {
  background: rgba(255, 255, 255, 0.18);
  color: var(--text);
}

.small {
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* The switch from the icon, large, with what arrives on a phone in front of it. */
.scene {
  position: relative;
  display: grid;
  gap: 0.9rem;
  padding: 2.5rem 0;
  isolation: isolate;
}

.scene > svg {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(120%, 34rem);
  transform: translate(-50%, -50%) rotate(-14deg);
  opacity: 0.5;
  z-index: -1;
}

.note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  width: min(100%, 24rem);
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  background: rgba(30, 33, 66, 0.82);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 1.2rem 2.5rem rgba(0, 0, 0, 0.35);
  font-size: 0.95rem;
  line-height: 1.35;
}

.scene .note {
  justify-self: center;
}

.scene .note:nth-of-type(2) {
  transform: translateX(1.25rem);
}

.note img {
  width: 2.4rem;
  border-radius: 0.6rem;
}

.note h3 {
  font: 600 1rem/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0;
}

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

.note ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.65rem 0 0.1rem;
  padding: 0;
  list-style: none;
}

.note li {
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 600;
  font-size: 0.9rem;
}

.note li:first-child {
  background: var(--amber);
  color: #1a1408;
}

/* ---------------------------------------------------------------- sections */

section {
  padding-block: 4.5rem;
  border-top: 1px solid var(--line);
}

.kicker {
  color: var(--amber);
  font: 600 0.85rem/1 var(--rounded);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

section h2 {
  margin-top: 0.9rem;
  max-width: 22ch;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
}

.intro {
  margin-top: 1.1rem;
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.1rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}

.cards .note {
  width: auto;
  box-shadow: none;
  background: var(--raised);
}

.points {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 2rem 2.5rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}

.points h3 {
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.points p {
  margin-top: 0.5rem;
  color: var(--muted);
}

.points code,
.steps code {
  padding: 0.1em 0.35em;
  border-radius: 0.35em;
  background: rgba(255, 255, 255, 0.1);
  font: 0.9em ui-monospace, SFMono-Regular, Menlo, monospace;
}

.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 16rem));
  justify-content: center;
  gap: 1.5rem 2.5rem;
  align-items: start;
  margin-top: 3rem;
}

figure {
  margin: 0;
}

.shots img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 1.6rem;
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.4);
}

figcaption {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.split {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.split img {
  display: block;
  width: min(100%, 26rem);
  margin-inline: auto;
  border-radius: 0.9rem;
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.45);
}

.get {
  text-align: center;
}

.get h2,
.get .intro {
  margin-inline: auto;
}

.get .actions {
  justify-content: center;
}

/* ------------------------------------------------------------------ footer */

footer {
  padding-block: 2.5rem 3.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
}

footer nav {
  display: flex;
  gap: 1.5rem;
}

footer a {
  color: var(--muted);
}

/* ------------------------------------------------- privacy and support pages */

.page {
  width: min(100% - 2.5rem, 42rem);
  margin-inline: auto;
  padding-block: 3rem 5rem;
}

.page h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
}

.page .updated {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.page h2 {
  margin-top: 3rem;
  font-size: 1.5rem;
}

.page h3 {
  margin-top: 2rem;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.page p,
.page ul,
.page ol {
  margin-top: 0.9rem;
  color: #d5d6e6;
}

.page ul,
.page ol {
  padding-left: 1.25rem;
}

.page li + li {
  margin-top: 0.45rem;
}

.page strong {
  color: var(--text);
}

@media (min-width: 56rem) {
  .hero {
    grid-template-columns: 1.1fr 0.9fr;
    padding-block: 5rem 7rem;
  }

  .split {
    grid-template-columns: 1fr 1fr;
  }
}

/* On a phone the three screens sit side by side and are swiped through. */
@media (max-width: 40rem) {
  .shots {
    display: flex;
    gap: 1rem;
    margin-inline: -1.25rem;
    padding: 0 1.25rem 3rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }

  .shots figure {
    flex: 0 0 62%;
    scroll-snap-align: center;
  }
}

@media (max-width: 30rem) {
  .top nav {
    gap: 1rem;
  }

  .top nav .wide {
    display: none;
  }
}

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