:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --ink: #111315;
  --muted: #646b75;
  --line: #d8dee7;
  --line-strong: #b9c2cf;
  --accent: #0f766e;
  --accent-strong: #0b4f4b;
  --accent-warm: #d94f30;
  --accent-blue: #2563eb;
  --accent-pink: #b83280;
  --accent-green: #2f855a;
  --shadow: 0 18px 50px rgba(17, 19, 21, 0.12);
  --max: 1180px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101112;
  --surface: #17191c;
  --surface-raised: #1e2024;
  --ink: #f3f6f7;
  --muted: #a8b0bb;
  --line: #2c3036;
  --line-strong: #454b55;
  --accent: #2dd4bf;
  --accent-strong: #67e8f9;
  --accent-warm: #fb7a4e;
  --accent-blue: #7aa2ff;
  --accent-pink: #f472b6;
  --accent-green: #70c489;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

body::selection {
  background: var(--accent);
  color: #ffffff;
}

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

img,
svg {
  display: block;
}

button,
input,
textarea,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  min-height: 70px;
  padding: 12px max(22px, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 760;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--accent-warm);
  font-size: 0.82rem;
}

.brand-text {
  white-space: nowrap;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 650;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: var(--surface);
  color: var(--ink);
  outline: none;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.theme-toggle svg,
.button svg,
.text-link svg,
.elsewhere-links svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--line-strong);
  outline: none;
}

.hero {
  padding: 48px 22px 44px;
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 20px;
  font-size: 4.65rem;
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: 2.35rem;
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.08rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.hero-lede,
.section-heading p {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.hero-lede {
  max-width: 58ch;
  margin-bottom: 26px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 760;
}

.button-primary {
  background: var(--ink);
  color: var(--bg);
}

.button-secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.section {
  padding: 72px 22px;
  border-bottom: 1px solid var(--line);
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading h2 {
  max-width: 660px;
}

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

.app-card {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 16px;
  min-height: 336px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.app-card[hidden] {
  display: none;
}

.app-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.app-icon,
.app-lettermark {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 8px;
}

.app-icon {
  object-fit: cover;
  box-shadow: 0 10px 20px rgba(17, 19, 21, 0.14);
}

.app-lettermark {
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 850;
}

.app-card h3 {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}

.status {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 820;
  text-transform: uppercase;
}

.status-live {
  color: var(--accent-green);
}

.status-open {
  color: var(--accent-blue);
}

.status-progress {
  color: var(--accent-pink);
}

.app-card > p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.58;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 31px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  color: var(--accent-strong);
  font-weight: 780;
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--accent-warm);
  outline: none;
}

.section-elsewhere {
  background: var(--surface);
}

.elsewhere-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.6fr) minmax(360px, 1fr);
  gap: 32px;
  align-items: center;
}

.elsewhere-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.elsewhere-links a {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 54px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-weight: 760;
}

.elsewhere-links a:hover,
.elsewhere-links a:focus-visible {
  border-color: var(--line-strong);
  color: var(--accent-warm);
  outline: none;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: var(--max);
  min-height: 82px;
  margin: 0 auto;
  padding: 0 22px;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  font-weight: 760;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: auto auto;
  }

  .site-nav {
    order: 3;
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .theme-toggle {
    justify-self: end;
  }

  .hero {
    min-height: auto;
  }

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

  .hero-copy {
    max-width: none;
  }

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

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

@media (max-width: 640px) {
  .site-header {
    gap: 10px;
    min-height: 64px;
    padding-inline: 16px;
  }

  .brand-text {
    display: none;
  }

  .site-nav a {
    padding: 0 10px;
  }

  .hero,
  .section {
    padding-inline: 16px;
  }

  .hero {
    min-height: auto;
    padding-top: 34px;
    padding-bottom: 30px;
  }

  .section {
    padding-top: 58px;
    padding-bottom: 58px;
  }

  .section-apps {
    padding-top: 32px;
  }

  h1 {
    font-size: 3.05rem;
  }

  h2 {
    font-size: 2rem;
  }

  .app-grid,
  .elsewhere-links {
    grid-template-columns: 1fr;
  }

  .app-card {
    min-height: 310px;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height: 110px;
    padding-inline: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
