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

:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #f1efea;
  --border: #e3e0d8;
  --text: #17181c;
  --muted: #5c5f67;
  --link: #2f43cc;
  --ring: rgba(20, 22, 30, 0.08);
  --shadow: 0 1px 2px rgba(20, 22, 30, 0.04), 0 6px 20px rgba(20, 22, 30, 0.05);
  --shadow-lift: 0 2px 4px rgba(20, 22, 30, 0.05), 0 16px 36px rgba(20, 22, 30, 0.1);
  --glow: 0.22;
  --accent: #ff8a4c;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0e12;
    --surface: #16181e;
    --surface-2: #1f222a;
    --border: #2a2d36;
    --text: #eceef2;
    --muted: #a2a5ae;
    --link: #93a4ff;
    --ring: rgba(255, 255, 255, 0.1);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-lift: 0 16px 36px rgba(0, 0, 0, 0.45);
    --glow: 0.16;
  }
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

a {
  color: var(--link);
  text-underline-offset: 3px;
}

a:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
  border-radius: 6px;
}

img {
  max-width: 100%;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: 20px;
}

.wrap-narrow {
  max-width: 780px;
}

.section-label {
  margin: 0 0 16px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Top bar: brand only, no navigation */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border);
}

.topbar .wrap {
  display: flex;
  align-items: center;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.logo-mark {
  flex: none;
  display: block;
  border-radius: 28%;
  box-shadow: 0 0 0 1px var(--ring);
}

.wordmark {
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.wordmark b {
  font-weight: 800;
}

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

/* Home */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: 72px 48px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -180px 0 auto;
  height: 620px;
  background:
    radial-gradient(34% 48% at 22% 55%, rgba(255, 138, 76, var(--glow)), transparent 70%),
    radial-gradient(34% 48% at 70% 45%, rgba(60, 200, 188, var(--glow)), transparent 70%);
  pointer-events: none;
}

.hero .wrap {
  position: relative;
}

.hero-mark .logo-mark {
  box-shadow: 0 0 0 1px var(--ring), 0 18px 40px -12px rgba(255, 138, 76, 0.45);
}

.hero h1 {
  margin: 28px 0 14px;
  font-size: clamp(2.6rem, 7vw, 4.25rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.hero h1 b {
  font-weight: 800;
}

.intro p {
  max-width: 36rem;
  margin: 0;
  font-size: 1.15rem;
  color: var(--muted);
}

/* Facts, not buttons: plain text separated by dots */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

.pill + .pill::before {
  content: "\00b7";
  margin-inline: 10px;
}

.apps {
  padding-bottom: 72px;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.app-card {
  position: relative;
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.app-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 60%, var(--border));
  box-shadow: var(--shadow-lift);
}

.app-icon {
  flex: none;
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 23%;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--ring), 0 8px 20px -8px color-mix(in srgb, var(--accent) 70%, transparent);
}

.app-card-body {
  min-width: 0;
}

.app-card h3 {
  margin: 2px 0 4px;
  font-size: 1.125rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.app-card h3 a {
  color: var(--text);
  text-decoration: none;
}

.stretched::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.app-card p {
  margin: 0 0 14px;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.chip:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, var(--surface-2));
}

.note {
  margin: 28px 0 0;
  padding: 14px 18px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  font-size: 0.925rem;
  color: var(--muted);
}

/* App page and document header */

.app-hero,
.doc-hero {
  position: relative;
  overflow: hidden;
  padding-block: 40px 36px;
}

.app-hero::before,
.doc-hero::before {
  content: "";
  position: absolute;
  inset: -260px 0 auto;
  height: 600px;
  background: radial-gradient(40% 50% at 30% 50%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 70%);
  pointer-events: none;
}

.app-hero .wrap,
.doc-hero .wrap {
  position: relative;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  font-size: 0.9rem;
  color: var(--muted);
}

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

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

.crumb-app {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.crumbs .crumb-app {
  color: var(--text);
}

.crumb-app img {
  display: block;
  border-radius: 23%;
  box-shadow: 0 0 0 1px var(--ring);
}

.app-head {
  display: flex;
  align-items: center;
  gap: 24px;
}

.app-head .app-icon {
  width: 112px;
  height: 112px;
}

.app-head h1 {
  margin: 0 0 6px;
  font-size: clamp(2rem, 5vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.app-head p {
  margin: 0;
  font-size: 1.1rem;
  color: var(--muted);
}

.app-docs {
  padding-bottom: 72px;
}

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

.doc-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.doc-link:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 60%, var(--border));
  box-shadow: var(--shadow-lift);
}

.doc-link-legacy {
  border-style: dashed;
  box-shadow: none;
}

.doc-ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--accent) 18%, var(--surface-2));
}

.doc-text {
  flex: 1;
  min-width: 0;
}

.doc-text strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.35;
}

.doc-text span {
  display: block;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--muted);
}

.doc-arrow {
  font-size: 1.2rem;
  color: var(--muted);
  transition: transform 0.2s ease, color 0.2s ease;
}

.doc-link:hover .doc-arrow {
  transform: translateX(3px);
  color: var(--text);
}

.contact {
  margin: 28px 0 0;
  color: var(--muted);
}

/* Document page */

.doc-hero {
  padding-bottom: 28px;
}

.doc-hero .crumbs {
  margin-bottom: 20px;
}

.doc-hero h1 {
  margin: 0;
  font-size: clamp(1.9rem, 5vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.tab {
  display: inline-block;
  padding: 7px 15px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.tab:hover {
  border-color: var(--accent);
}

.tab[aria-current="page"] {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.notice {
  margin: 22px 0 0;
  padding: 14px 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  font-size: 0.95rem;
}

.prose {
  margin-bottom: 72px;
  padding: clamp(22px, 5vw, 48px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  line-height: 1.7;
  overflow-wrap: break-word;
}

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

.prose > :last-child {
  margin-bottom: 0;
}

.prose h2 {
  margin: 2em 0 0.6em;
  padding-top: 1.4em;
  border-top: 1px solid var(--border);
  font-size: 1.3rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.prose h3 {
  margin: 1.7em 0 0.35em;
  font-size: 1.05rem;
  line-height: 1.4;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 1em;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li {
  margin: 0.3em 0;
}

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

.prose a {
  overflow-wrap: anywhere;
}

.prose code {
  padding: 0.1em 0.35em;
  border-radius: 6px;
  background: var(--surface-2);
  font-size: 0.9em;
}

/* Footer */

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

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

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

@media (max-width: 560px) {
  .hero {
    padding-block: 48px 36px;
  }

  .app-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .app-head .app-icon {
    width: 88px;
    height: 88px;
  }

  .app-card {
    padding: 16px;
  }

  .app-card .app-icon {
    width: 60px;
    height: 60px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }

  .app-card:hover,
  .doc-link:hover,
  .doc-link:hover .doc-arrow {
    transform: none;
  }
}
