:root {
  color-scheme: dark;
  --bg: #0b0b0c;
  --card: #141416;
  --card-raised: #1b1b1e;
  --line: #26262a;
  --line-strong: #34343a;
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #6e6e73;
  --blue: #0a84ff;
  --green: #30d158;
  --radius: 16px;
  --radius-inner: 10px;
  --container: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
p,
ul,
dl,
dd,
pre {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

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

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 8px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* SF Symbols, rendered from macOS and tinted with CSS */

.sym {
  flex: none;
  display: inline-block;
  width: 1em;
  height: 1em;
  background-color: var(--tint, currentColor);
  -webkit-mask: var(--sym) center / contain no-repeat;
  mask: var(--sym) center / contain no-repeat;
}

.label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 500;
}

.label .sym {
  font-size: 14px;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.btn-light {
  background: var(--text);
  color: #0b0b0c;
}

.btn-light:hover {
  background: #ffffff;
}

.btn-dark {
  background: var(--card-raised);
  border: 1px solid var(--line-strong);
  color: var(--text);
}

.btn-dark:hover {
  border-color: #4a4a50;
}

.gh {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
}

.brand img {
  border-radius: 6px;
}

/* Hero */

.hero {
  padding-top: 72px;
}

.hero-icon {
  margin-bottom: 24px;
  border-radius: 14px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.34));
}

.hero h1 {
  font-size: clamp(40px, 5.6vw, 60px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.hero-sub {
  max-width: 560px;
  margin-top: 16px;
  color: var(--text-2);
  font-size: 17px;
  line-height: 1.5;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.stage {
  position: relative;
  isolation: isolate;
  margin-top: 48px;
  padding: 56px 56px 0;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #15161b;
  overflow: hidden;
}

.stage::before {
  content: "";
  position: absolute;
  inset: -35%;
  z-index: -1;
  background:
    radial-gradient(34% 40% at 30% 34%, rgba(110, 140, 190, 0.9), transparent 70%),
    radial-gradient(32% 36% at 72% 30%, rgba(150, 128, 186, 0.8), transparent 70%),
    radial-gradient(36% 38% at 64% 72%, rgba(112, 158, 150, 0.7), transparent 70%),
    radial-gradient(30% 34% at 30% 74%, rgba(186, 142, 150, 0.6), transparent 70%);
  filter: blur(48px);
  animation:
    stage-drift 48s ease-in-out infinite alternate,
    stage-hue 72s ease-in-out infinite alternate;
}

@keyframes stage-drift {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }

  50% {
    transform: translate(5%, -4%) rotate(18deg) scale(1.06);
  }

  100% {
    transform: translate(-5%, 3%) rotate(-12deg) scale(1);
  }
}

@keyframes stage-hue {
  from {
    filter: blur(48px) hue-rotate(0deg);
  }

  to {
    filter: blur(48px) hue-rotate(50deg);
  }
}

.stage img {
  position: relative;
  width: 100%;
  border-radius: 12px 12px 0 0;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14),
    0 30px 80px rgba(0, 0, 0, 0.6);
}

/* Sections */

.section {
  padding-top: 96px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

h2 {
  margin-top: 6px;
  font-size: clamp(28px, 3.4vw, 36px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.section-note {
  max-width: 380px;
  color: var(--text-3);
  font-size: 13px;
  text-align: right;
}

/* Grid and cards */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.span-2 {
  grid-column: span 2;
}

.visual {
  position: relative;
  height: 236px;
  overflow: hidden;
}

.visual .ui {
  border-radius: var(--radius-inner);
  box-shadow: 0 0 0 1px var(--line-strong), 0 16px 40px rgba(0, 0, 0, 0.5);
}

.visual-pad {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
}

.visual-top {
  padding: 24px 24px 0;
}

.visual-top > .ui {
  width: 100%;
  border-radius: var(--radius-inner) var(--radius-inner) 0 0;
}

.visual-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
}

.visual-stack > .ui:first-child {
  width: 100%;
  height: 140px;
  object-fit: cover;
  object-position: top;
}

.visual-corner {
  padding: 24px 0 0 24px;
}

.visual-corner .ui {
  width: 100%;
  border-radius: var(--radius-inner) 0 0 0;
}

.card-text {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--line);
}

.card-text h3 {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.33;
}

/* Shortcut palette */

.palette {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-inner);
  background: #101012;
  font-size: 13px;
}

.palette-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--text-3);
}

.palette-search span:not(.sym) {
  flex: 1;
}

.palette-list {
  padding: 4px;
}

.palette-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 6px;
  color: var(--text-2);
}

.palette-list li > span:not(.sym) {
  flex: 1;
}

.palette .sym {
  font-size: 13px;
}

.palette-list li.is-active {
  background: rgba(10, 132, 255, 0.18);
  color: var(--text);
}

kbd {
  padding: 1px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--card-raised);
  color: var(--text-2);
  font-family: var(--font);
  font-size: 11px;
}

/* Accounts */

.accounts {
  display: grid;
  gap: 6px;
}

.accounts li {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 54px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-inner);
  background: #101012;
}

.avatar {
  flex: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--c);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
}

.avatar-add {
  background: transparent;
  border: 1px dashed var(--line-strong);
  color: var(--text-3);
}

.avatar-add .sym {
  font-size: 11px;
}

.who {
  flex: 1;
  min-width: 0;
  display: grid;
  font-size: 13px;
}

.who b {
  font-weight: 500;
}

.who small {
  color: var(--text-3);
  font-size: 12px;
}

.accounts-add .who b {
  color: var(--text-2);
  font-weight: 400;
}

.pill-state {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(10, 132, 255, 0.16);
  color: #64b0ff;
  font-size: 11px;
}

.pill-ready {
  background: rgba(48, 209, 88, 0.14);
  color: #5fdc80;
}

/* Sync */

.sync {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-inner);
  background: #101012;
  font-size: 13px;
}

.sync-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sync-row span:nth-child(2) {
  flex: 1;
}

.sync-row time {
  color: var(--text-3);
  font-size: 12px;
}

.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.sync-dot-busy {
  background: var(--blue);
}

.bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--card-raised);
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0a84ff, #5e5ce6);
}

.sync-months {
  display: flex;
  justify-content: space-between;
  color: var(--text-2);
  font-size: 12px;
}

.sync-months .dim {
  color: var(--text-3);
}

/* Keychain */

.keychain {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-inner);
  background: #101012;
}

.keychain-icon {
  flex: none;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(180deg, #2c2c30, #1b1b1e);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-size: 24px;
}

.keychain dl {
  display: grid;
  gap: 4px;
  font-size: 12px;
}

.keychain dl div {
  display: flex;
  gap: 10px;
}

.keychain dt {
  width: 40px;
  color: var(--text-3);
}

/* Footer */

.footer {
  padding-top: 64px;
  padding-bottom: 32px;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.footer-links {
  display: flex;
  gap: 20px;
  color: var(--text-2);
  font-size: 13px;
}

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

.footer-note {
  margin-top: 16px;
  color: var(--text-3);
  font-size: 12px;
}

/* Responsive */

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

@media (max-width: 640px) {
  .hero {
    padding-top: 48px;
  }

  .stage {
    padding: 24px 24px 0;
  }

  .section {
    padding-top: 72px;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-note {
    text-align: left;
  }

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

  .span-2 {
    grid-column: auto;
  }
}

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

  .stage::before {
    animation: none;
  }

  * {
    transition: none !important;
  }
}
