/* Event Calendar Countdown. Light is the app's Daylight theme, dark is its Field Lights theme. */

:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --bg-soft: #f2f3f6;
  --card: #ffffff;
  --text: #0b0b0c;
  --muted: #4b5159;
  --accent: #0a4dff;
  --accent-text: #0a3fd6;
  --accent-soft: #eaf0ff;
  --on-accent: #ffffff;
  --track: #e4e8ee;
  --line: #dfe3ea;
  --star: #e2a400;
  --favorite: #fff6dc;
  --favorite-text: #4a3700;
  --bezel: #101216;
  --shadow: 0 24px 60px -24px rgb(12 24 60 / 0.35);
  --header: rgb(255 255 255 / 0.82);

  --sans: system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --wide: 1160px;
  --prose: 44rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0e13;
    --bg-soft: #10161d;
    --card: #141a21;
    --text: #f3f6f9;
    --muted: #a9b8c7;
    --accent: #37e08a;
    --accent-text: #37e08a;
    --accent-soft: #12281f;
    --on-accent: #06130c;
    --track: #1b232c;
    --line: #27313c;
    --star: #ffc53d;
    --favorite: #2b2410;
    --favorite-text: #ffe6a6;
    --bezel: #252c35;
    --shadow: 0 24px 60px -24px rgb(0 0 0 / 0.8);
    --header: rgb(10 14 19 / 0.82);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

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

a {
  color: var(--accent-text);
  text-underline-offset: 0.16em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

h1,
h2,
h3 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.022em;
  line-height: 1.1;
  text-wrap: balance;
}

p {
  margin: 0;
}

.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: -80px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}

.skip:focus {
  top: 12px;
}

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

/* Header */

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

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.015em;
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.site-nav ul {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
}

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

.site-nav a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent-text);
}

@media (max-width: 640px) {
  .brand span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .site-nav a {
    padding-inline: 12px;
  }
}

/* Device frames */

.phone {
  margin: 0;
  padding: 7px;
  border-radius: 40px;
  background: var(--bezel);
  box-shadow: var(--shadow);
}

.phone img {
  width: 100%;
  border-radius: 33px;
}

.tablet {
  margin: 0;
  padding: 10px;
  border-radius: 28px;
  background: var(--bezel);
  box-shadow: var(--shadow);
}

.tablet img {
  width: 100%;
  border-radius: 19px;
}

/* Hero */

.hero {
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  padding-block: clamp(40px, 7vw, 96px);
}

.eyebrow {
  color: var(--accent-text);
  font-size: 1rem;
  font-weight: 700;
}

.hero h1 {
  margin-top: 12px;
  font-size: clamp(2.9rem, 8vw, 5.5rem);
  letter-spacing: -0.035em;
  line-height: 1;
}

.lead {
  margin-top: 22px;
  max-width: 34rem;
  color: var(--muted);
  font-size: clamp(1.15rem, 2.2vw, 1.35rem);
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 26px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  filter: brightness(1.08);
}

.button.quiet {
  background: var(--accent-soft);
  color: var(--accent-text);
}

/* Apple's own Download on the App Store badge, unaltered: black on light, white on dark. Apple asks
   for clear space of a quarter of its height around it. */
.store-badge {
  display: inline-flex;
  margin-inline-end: 13px;
  border-radius: 9px;
}

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

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.97rem;
  font-weight: 600;
}

.stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
  padding-block: 12px;
}

.stage .ring {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 112%;
  max-width: none;
  transform: translate(-50%, -50%) rotate(-90deg);
}

.ring circle {
  fill: none;
  stroke-width: 34;
}

.ring .ring-track {
  stroke: var(--track);
}

.ring .ring-time {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-dasharray: 100 100;
  stroke-dashoffset: -28;
  animation: unwind 2.2s cubic-bezier(0.22, 0.7, 0.2, 1) 0.3s both;
}

@keyframes unwind {
  from {
    stroke-dashoffset: 0;
  }

  to {
    stroke-dashoffset: -28;
  }
}

.stage .phone {
  position: relative;
  width: min(58%, 300px);
}

@media (max-width: 860px) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1fr);
  }

  .stage {
    max-width: 440px;
    margin-top: 28px;
  }

  .stage .ring {
    width: 106%;
  }
}

/* The three questions */

.questions {
  background: var(--accent);
  color: var(--on-accent);
}

.questions ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 4vw, 48px);
  margin: 0;
  padding: clamp(36px, 6vw, 64px) 0;
  list-style: none;
}

.questions strong {
  display: block;
  font-size: clamp(1.6rem, 3.2vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.12;
}

.questions span {
  display: block;
  margin-top: 8px;
  opacity: 0.92;
}

@media (max-width: 760px) {
  .questions ul {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Features */

.feature {
  padding-block: clamp(56px, 9vw, 112px);
}

.feature.soft {
  background: var(--bg-soft);
}

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

.feature-grid.flip > :first-child {
  order: 2;
}

.feature h2,
.band h2 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  letter-spacing: -0.03em;
  line-height: 1.04;
}

.feature .copy p {
  margin-top: 16px;
  max-width: 32rem;
  color: var(--muted);
  font-size: 1.15rem;
}

.feature .phone {
  width: min(100%, 320px);
  margin-inline: auto;
}

.ways {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.ways li {
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
}

.ways strong {
  display: block;
  font-size: 1.1rem;
}

.ways span {
  color: var(--muted);
}

.pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 3vw, 28px);
  align-items: start;
}

.pair .phone:last-child {
  margin-top: 44px;
}

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

  .feature-grid.flip > :first-child {
    order: 0;
  }
}

/* The Lock Screen card */

.lock {
  max-width: 420px;
  margin-inline: auto;
  padding: 22px;
  border-radius: 28px;
  background: #11161c;
  color: #f3f6f9;
  box-shadow: var(--shadow);
}

.lock-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2px 16px;
}

.lock-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.lock-name svg {
  flex: none;
  width: 22px;
  height: 22px;
  fill: #ffc53d;
}

.lock-time {
  font-size: 2.25rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: #37e08a;
}

.lock-detail {
  margin-top: 4px;
  color: #a9b8c7;
  font-size: 1rem;
}

/* Themes */

.themes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 4vw, 44px);
  margin: clamp(32px, 5vw, 56px) 0 0;
  padding: 0;
  list-style: none;
}

.themes .phone {
  width: min(100%, 300px);
  margin-inline: auto;
}

.themes h3 {
  margin-top: 22px;
  font-size: 1.4rem;
  text-align: center;
}

.themes p {
  margin-top: 4px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 720px) {
  .themes {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .themes .phone {
    width: min(76%, 280px);
  }
}

/* iPad */

.center-copy {
  max-width: 40rem;
  margin-inline: auto;
  text-align: center;
}

.center-copy p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.15rem;
}

.feature .tablet {
  max-width: 980px;
  margin: clamp(32px, 5vw, 56px) auto 0;
}

/* A television: a thin bezel and nearly square corners. */
.tv {
  max-width: 1040px;
  margin: clamp(32px, 5vw, 56px) auto 0;
  padding: 8px;
  border-radius: 10px;
  background: var(--bezel);
  box-shadow: var(--shadow);
}

.tv img {
  display: block;
  width: 100%;
  border-radius: 4px;
}

/* Closing band */

.band {
  padding-block: clamp(56px, 9vw, 104px);
  background: var(--text);
  color: var(--bg);
}

.band .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 6vw, 72px);
}

.band p {
  margin-top: 14px;
  max-width: 34rem;
  font-size: 1.15rem;
  opacity: 0.86;
}

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

.band-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  padding: 12px 20px;
  border: 1px solid color-mix(in srgb, var(--bg) 28%, transparent);
  border-radius: 18px;
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

.band-links a:hover {
  background: color-mix(in srgb, var(--bg) 10%, transparent);
}

.band-links a::after {
  content: "\2192";
}

@media (max-width: 760px) {
  .band .wrap {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Document pages */

.doc-head {
  padding-block: clamp(36px, 6vw, 72px) clamp(24px, 4vw, 40px);
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}

.doc-head h1 {
  max-width: 44rem;
  font-size: clamp(2.3rem, 6vw, 3.8rem);
  letter-spacing: -0.03em;
  line-height: 1.04;
}

.doc-head p {
  margin-top: 14px;
  max-width: var(--prose);
  color: var(--muted);
  font-size: 1.15rem;
}

.doc-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--prose)) minmax(0, 15rem);
  justify-content: space-between;
  gap: clamp(24px, 5vw, 64px);
  padding-block: clamp(28px, 5vw, 56px) clamp(56px, 8vw, 96px);
}

.toc {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  font-size: 0.97rem;
}

.toc h2 {
  color: var(--muted);
  font-size: 0.97rem;
  font-weight: 700;
  letter-spacing: 0;
}

.toc ol {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.toc a {
  display: block;
  padding: 7px 12px;
  border-left: 2px solid var(--line);
  color: var(--muted);
  line-height: 1.3;
  text-decoration: none;
}

.toc a:hover {
  border-left-color: var(--accent);
  color: var(--text);
}

.prose {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.prose > :first-child {
  margin-top: 0;
}

.prose h2 {
  margin-top: 2.6rem;
  padding-top: 0.2rem;
  font-size: 1.85rem;
}

.prose h3 {
  margin-top: 1.9rem;
  font-size: 1.3rem;
  letter-spacing: -0.015em;
}

.prose p,
.prose ul,
.prose ol,
.prose dl {
  margin: 0.9rem 0 0;
}

.prose ul,
.prose ol {
  padding-left: 1.35rem;
}

.prose li + li {
  margin-top: 0.4rem;
}

.prose li::marker {
  color: var(--muted);
}

.prose table {
  width: 100%;
  margin-top: 1.1rem;
  border-collapse: collapse;
  font-size: 0.99rem;
  line-height: 1.45;
}

.prose th,
.prose td {
  padding: 10px 14px 10px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 700;
}

.prose td:first-child {
  font-weight: 600;
}

.note {
  margin-top: 1.1rem;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--favorite);
  color: var(--favorite-text);
}

.note a {
  color: inherit;
}

.steps {
  counter-reset: step;
  padding-left: 0;
  list-style: none;
}

.prose .steps li {
  position: relative;
  counter-increment: step;
  min-height: 34px;
  margin-top: 0.8rem;
  padding-left: 46px;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -1px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.95rem;
  font-weight: 800;
}

.prose figure.shot {
  float: right;
  width: min(42%, 220px);
  margin: 0.6rem 0 1rem 28px;
  padding: 5px;
  border-radius: 28px;
}

.prose figure.shot img {
  border-radius: 23px;
}

.prose h2 {
  clear: both;
}

@media (max-width: 960px) {
  .doc-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .toc {
    grid-column: 1;
    grid-row: auto;
    position: static;
    max-height: none;
    padding: 16px 18px;
    border-radius: 18px;
    background: var(--bg-soft);
  }

  .toc ol {
    columns: 2;
    column-gap: 16px;
  }

  .toc a {
    padding: 8px 0;
    border-left: 0;
    break-inside: avoid;
  }

  .prose {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 640px) {
  .prose table.stack,
  .prose table.stack tbody,
  .prose table.stack tr,
  .prose table.stack td {
    display: block;
    width: 100%;
  }

  .prose table.stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .prose table.stack tr {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 16px;
    background: var(--bg-soft);
  }

  .prose table.stack td {
    padding: 4px 0;
    border: 0;
  }

  .prose table.stack td[data-label]::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 0.87rem;
    font-weight: 700;
  }

  .prose figure.shot {
    float: none;
    width: min(70%, 240px);
    margin: 1.2rem auto 0.4rem;
  }
}

/* Footer */

.site-footer {
  padding-block: 36px 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.97rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  display: inline-block;
  padding-block: 8px;
  color: var(--muted);
}

/* 404 */

.lost {
  padding-block: clamp(72px, 14vw, 160px);
  text-align: center;
}

.lost h1 {
  font-size: clamp(2.4rem, 7vw, 4rem);
}

.lost p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 1.15rem;
}

.lost .button {
  margin-top: 26px;
}

@media (prefers-reduced-motion: reduce) {
  .ring .ring-time {
    animation: none;
  }
}

@media print {
  .site-header,
  .site-footer,
  .toc {
    display: none;
  }

  .doc-layout {
    display: block;
  }
}

/* The band inverts the page's colors, so it takes the other badge: white in light mode, black in
   dark mode. The badge is never faded with the band's text. */
.band .band-badge {
  margin-top: 22px;
  opacity: 1;
}
