/* Archi website — design system derived from the app (src/App.css). */

:root {
  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono-stack: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --accent: #2f6fed;
  --accent-hover: #2865de;
  --accent-deep: #245bc2;
  --accent-ink: #174aab;
  --accent-tint: #f5f8ff;
  --accent-tint-strong: #e8f0ff;

  --text: #20242c;
  --text-muted: #667085;
  --text-soft: #475467;

  --bg: #eef1f5;
  --surface: #fff;
  --surface-alt: #f8fafc;
  --border: #d8dde6;
  --border-soft: #e4e7ec;
  --border-strong: #cbd2dc;

  --shadow-panel: 0 12px 35px rgb(16 24 40 / 8%);
  --shadow-button: 0 1px 2px rgb(16 24 40 / 7%);

  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  --glow-a: rgb(47 111 237 / 10%);
  --glow-b: rgb(47 111 237 / 6%);
  --hero-grid-line: rgb(47 111 237 / 6%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #3f7df5;
    --accent-hover: #5088f7;
    --accent-deep: #6ea0f8;
    --accent-ink: #a8c6ff;
    --accent-tint: #1c2638;
    --accent-tint-strong: #243957;

    --text: #f3f4f6;
    --text-muted: #a3adb9;
    --text-soft: #c1c8d1;

    --bg: #17191d;
    --surface: #22252b;
    --surface-alt: #1c1f24;
    --border: #383d46;
    --border-soft: #2e333b;
    --border-strong: #454b55;

    --shadow-panel: 0 12px 35px rgb(0 0 0 / 35%);
    --shadow-button: 0 1px 2px rgb(0 0 0 / 25%);

    --glow-a: rgb(47 111 237 / 16%);
    --glow-b: rgb(47 111 237 / 9%);
    --hero-grid-line: rgb(99 143 240 / 7%);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--font-stack);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, dl { margin: 0; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.03em; font-weight: 700; }
img { max-width: 100%; display: block; }
a { color: var(--accent-deep); }
a:hover { color: var(--accent); }

.container { max-width: 1080px; margin: 0 auto; padding: 0 28px; }

.eyebrow {
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.eyebrow-accent { color: var(--accent); }

.section { padding: 88px 0; scroll-margin-top: 84px; }
.section-alt { background: var(--surface); border-block: 1px solid var(--border-soft); }
.section h2 { font-size: clamp(26px, 3.4vw, 34px); }
.section-lede { max-width: 640px; margin-top: 14px; color: var(--text-muted); font-size: 17px; }

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 9px 16px;
  font: inherit;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-button);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.button:hover { border-color: #8c99aa; background: var(--surface-alt); color: var(--text); }
.button:focus-visible, a:focus-visible { outline: 3px solid rgb(47 111 237 / 45%); outline-offset: 2px; border-radius: 6px; }

.button-primary {
  border-color: #2463d4;
  color: #fff;
  background: var(--accent);
}
.button-primary:hover { border-color: #1e55b6; background: var(--accent-hover); color: #fff; }
@media (prefers-color-scheme: dark) {
  .button-primary { border-color: #2b5fd4; }
  .button-primary:hover { background: var(--accent-hover); }
}

.button-lg { padding: 13px 22px; font-size: 17px; border-radius: 11px; }

.button-icon { flex: none; }

/* ---------- Header ---------- */

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.is-pinned { border-bottom-color: var(--border-soft); }

.site-header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}
.brand-icon { width: 28px; height: 28px; border-radius: 7px; }

.site-nav { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.site-nav a {
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.site-nav a:hover { color: var(--accent); }

.header-download { padding: 8px 14px; }
.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 9px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  color: var(--text);
  background: var(--surface);
}
.menu-toggle span { display: block; height: 2px; margin: 4px 0; border-radius: 2px; background: currentColor; }
.menu-toggle:focus-visible { outline: 3px solid rgb(47 111 237 / 45%); outline-offset: 2px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 84px 0 96px;
  background:
    radial-gradient(900px 520px at 12% -12%, var(--glow-a), transparent 62%),
    radial-gradient(760px 460px at 96% -4%, var(--glow-b), transparent 58%),
    repeating-linear-gradient(90deg, var(--hero-grid-line) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, var(--hero-grid-line) 0 1px, transparent 1px 72px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: 56px;
}

.hero h1 { font-size: clamp(34px, 4.6vw, 52px); }

.hero .lede {
  margin-top: 18px;
  max-width: 520px;
  color: var(--text-muted);
  font-size: 18px;
}

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

.hero-meta {
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 13px;
}
.hero-meta strong { color: var(--text-soft); }

/* ---------- App screenshot ---------- */

.hero-visual { min-width: 0; margin: 0; }
.hero-screenshot {
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 2px rgb(16 24 40 / 10%), 0 24px 70px rgb(16 24 40 / 22%);
}
.hero-visual figcaption { margin-top: 10px; color: var(--text-muted); font-size: 12px; text-align: center; }

/* ---------- Trust strip ---------- */

.trust-strip {
  border-bottom: 1px solid var(--border-soft);
  background: color-mix(in srgb, var(--surface) 55%, var(--bg));
}
.trust-strip-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding-block: 20px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-soft);
  font-size: 13.5px;
  font-weight: 600;
}
.trust-item svg { flex: none; color: var(--accent); }

/* ---------- Features ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 44px;
}
.feature-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-panel);
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.feature-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 42%, var(--border)); }
.feature-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  color: var(--accent);
  background: var(--accent-tint);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}
.feature-card h3 { font-size: 16.5px; letter-spacing: -0.02em; }
.feature-card p { color: var(--text-muted); font-size: 14px; line-height: 1.55; }

/* ---------- Formats ---------- */

.format-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; }
.format-group {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
}
.format-group h3 { display: flex; align-items: center; gap: 10px; font-size: 15.5px; letter-spacing: -0.01em; }
.format-group h3 svg { color: var(--accent); }
.format-group p { margin-top: 10px; color: var(--text-muted); font-size: 13.5px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.chip {
  padding: 4px 11px;
  border: 1px solid var(--border-strong);
  border-radius: 99px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 600;
  font-family: var(--mono-stack);
}
.chip-full { border-color: color-mix(in srgb, var(--accent) 45%, var(--border-strong)); color: var(--accent-deep); background: var(--accent-tint); }
@media (prefers-color-scheme: dark) { .chip-full { color: #8ab2f9; } }

.section-more { display: inline-flex; margin-top: 26px; font-weight: 600; }

/* ---------- Privacy panel ---------- */

.privacy-panel {
  --pp-text: #eef2fa;
  --pp-muted: #a9bad8;
  padding: 96px 0;
  color: var(--pp-text);
  background:
    radial-gradient(720px 420px at 88% -10%, rgb(63 125 245 / 22%), transparent 60%),
    linear-gradient(160deg, #16233f 0%, #101728 58%, #0d1420 100%);
}
.privacy-panel .eyebrow { color: #7fa4ef; }
.privacy-panel h2 { color: var(--pp-text); max-width: 620px; }
.privacy-panel .section-lede { color: var(--pp-muted); }
.privacy-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 44px; max-width: 860px; }
.privacy-point {
  display: flex;
  gap: 14px;
  padding: 20px 22px;
  border: 1px solid rgb(127 164 239 / 22%);
  border-radius: var(--radius-lg);
  background: rgb(255 255 255 / 4%);
}
.privacy-point svg { flex: none; margin-top: 3px; color: #7fa4ef; }
.privacy-point strong { display: block; font-size: 15px; }
.privacy-point p { margin-top: 4px; color: var(--pp-muted); font-size: 13.5px; line-height: 1.55; }
.privacy-more { margin-top: 30px; color: var(--pp-muted); font-size: 14px; }
.privacy-more a { color: #9dbcff; }

/* ---------- Download CTA ---------- */

.download-section { text-align: center; }
.download-section .section-lede { margin-inline: auto; }
.download-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.download-meta { margin-top: 14px; color: var(--text-muted); font-size: 13.5px; }

.install-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 860px;
  margin: 48px auto 0;
  text-align: left;
}
.install-step {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-panel);
}
.install-step .step-no {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  font-size: 14px;
  font-weight: 700;
}
.install-step p { margin-top: 12px; color: var(--text-soft); font-size: 14.5px; }
.install-step code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--accent-tint);
  font-family: var(--mono-stack);
  font-size: 0.9em;
}
.platform-note { margin-top: 34px; color: var(--text-muted); font-size: 13.5px; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--border-soft); background: var(--surface); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  padding-block: 44px;
}
.footer-brand p { margin-top: 10px; color: var(--text-muted); font-size: 13px; max-width: 320px; }
.footer-links { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-links h3 { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px; }
.footer-links ul { list-style: none; padding: 0; display: grid; gap: 9px; }
.footer-links a { color: var(--text-soft); font-size: 14px; text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.footer-legal {
  padding-block: 20px;
  border-top: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-size: 12.5px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  justify-content: space-between;
}

/* ---------- Docs pages ---------- */

.doc-header { padding: 64px 0 0; }
.doc-back { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 14px; text-decoration: none; }
.doc-back:hover { color: var(--accent); }
.doc-header h1 { margin-top: 22px; font-size: clamp(30px, 4vw, 40px); }
.doc-meta { margin-top: 12px; color: var(--text-muted); font-size: 14px; }

.doc-body { max-width: 760px; padding: 20px 28px 88px; }
.formats-page .doc-body { max-width: none; padding-inline: 0; }
.doc-body h2 {
  margin-top: 44px;
  padding-top: 30px;
  border-top: 1px solid var(--border-soft);
  font-size: 22px;
}
.doc-body > h2:first-of-type { border-top: 0; padding-top: 8px; }
.doc-body p, .doc-body li { color: var(--text-soft); font-size: 15.5px; }
.doc-body p { margin-top: 14px; }
.doc-body .doc-intro { color: var(--text); font-size: 18px; line-height: 1.55; }
.doc-body ul, .doc-body ol { margin-top: 12px; padding-left: 24px; display: grid; gap: 7px; }
.doc-body strong { color: var(--text); }
.doc-body code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--accent-tint);
  font-family: var(--mono-stack);
  font-size: 0.88em;
}

.security-flow {
  position: relative;
  counter-reset: security-step;
  list-style: none;
  padding: 0 !important;
  gap: 0 !important;
}
.security-flow li {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(130px, 175px) 1fr;
  gap: 14px;
  align-items: start;
  padding: 10px 0 18px;
}
.security-flow li::before {
  counter-increment: security-step;
  content: counter(security-step);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  font-size: 13px;
  font-weight: 700;
}
.security-flow li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 40px;
  bottom: 0;
  left: 14px;
  width: 2px;
  background: var(--border);
}
.security-flow strong { padding-top: 3px; }
.security-flow span { padding-top: 3px; color: var(--text-soft); }

.table-wrap {
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow-x: auto;
  background: var(--surface);
  box-shadow: var(--shadow-panel);
}
.table-hint { display: none; margin-top: 12px; color: var(--text-muted); font-size: 13px; }
.matrix { width: 100%; border-collapse: collapse; font-size: 13px; }
.matrix th, .matrix td { padding: 10px 14px; text-align: left; white-space: nowrap; }
.matrix thead th {
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.matrix tbody tr { border-bottom: 1px solid var(--border-soft); }
.matrix tbody tr:last-child { border-bottom: 0; }
.matrix tbody tr:hover { background: var(--accent-tint); }
.matrix th:first-child, .matrix td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
  box-shadow: 1px 0 var(--border-soft);
}
.matrix thead th:first-child { z-index: 2; background: var(--surface-alt); }
.matrix tbody tr:hover td:first-child { background: var(--accent-tint); }
.matrix td:first-child { font-weight: 700; }
.matrix .yes { color: var(--text); }
.matrix .no { color: var(--text-muted); opacity: 0.75; }
.matrix .partial { color: var(--text-muted); }

/* ---------- Responsive ---------- */

@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero { padding: 64px 0 72px; }
  .hero .lede { max-width: 560px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-strip-inner { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .container { padding: 0 20px; }
  .site-header-inner { gap: 14px; }
  .menu-toggle { display: block; margin-left: auto; }
  .site-nav {
    display: none;
    position: absolute;
    top: 56px;
    right: 20px;
    min-width: 190px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-panel);
  }
  .site-nav[data-open] { display: grid; gap: 2px; }
  .site-nav a { padding: 8px 10px; border-radius: 7px; }
  .header-download { display: none; }
  .section { padding: 64px 0; }
  .format-groups { grid-template-columns: 1fr; }
  .privacy-grid { grid-template-columns: 1fr; }
  .install-steps { grid-template-columns: 1fr; }
  .hero { padding-top: 52px; }
  .hero-grid { gap: 38px; }
  .doc-header { padding-top: 44px; }
  .doc-body { padding: 20px 0 64px; }
  .security-flow li { grid-template-columns: 30px 1fr; }
  .security-flow span { grid-column: 2; padding-top: 0; }
  .table-hint { display: block; }
  .footer-inner { flex-direction: column; }
}

/* ---------- Accessibility ---------- */

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

@media (prefers-contrast: more) {
  .button, .feature-card, .window, .format-group, .install-step { border-width: 2px; }
}
