/* EasyKVM — shared web theme.
 * Same tokens the app uses (see UiKit.cs / Theme.swift) so the marketing
 * site, checkout, and account dashboard feel like one product.
 */

:root {
  /* Surface */
  --bg:        #F6F5F1;
  --bg-soft:   #FAF9F4;
  --card:      #FFFFFF;
  --card-edge: #E5E2DA;
  --line:      #ECE9E1;

  /* Type */
  --text:      #1A1A1A;
  --text-dim:  #6E6A60;
  --text-mute: #A39E92;

  /* Accent */
  --accent:    #2D5BFF;
  --accent-hover: #234CE0;
  --accent-soft: #E8EEFF;

  /* Tones */
  --success:    #1F8A5B;
  --success-bg: #E3F3EA;
  --warn:       #C97A2A;
  --warn-bg:    #FBEDD9;
  --danger:     #B33A2E;
  --danger-bg:  #FBE5E1;

  /* Type system */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  --font-mono: "SF Mono", "Cascadia Mono", "JetBrains Mono", ui-monospace, monospace;

  /* Spacing rhythm */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

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

/* ───── Layout helpers ───── */

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ───── Top nav ───── */

.topnav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 245, 241, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.topnav-inner {
  display: flex; align-items: center; gap: 28px;
  height: 60px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; letter-spacing: -0.01em;
}
.brand-glyph {
  width: 24px; height: 24px;
  background: var(--text); color: var(--bg);
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px;
  font-family: var(--font-mono);
}

.topnav-links {
  display: flex; gap: 22px;
  font-size: 14px; color: var(--text-dim);
}
.topnav-links a { transition: color .12s; }

.topnav-right {
  margin-left: auto;
  display: flex; align-items: center; gap: 10px;
}

/* ───── Buttons ───── */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid var(--card-edge);
  background: var(--card);
  color: var(--text);
  font-family: inherit; font-size: 14px; font-weight: 500;
  cursor: pointer;
  transition: background .12s, border-color .12s, transform .04s;
  white-space: nowrap;
}
.btn:hover { background: #FAF9F4; }
.btn:active { transform: translateY(0.5px); }

.btn-primary {
  background: var(--accent); color: #fff; border-color: transparent;
  font-weight: 600;
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; }

.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }

.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: rgba(0,0,0,0.04); }

/* ───── Section header rhythm ───── */

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px; font-weight: 700;
  color: var(--text-dim);
}

h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 0;
}

h1 { font-size: clamp(36px, 5vw, 56px); line-height: 1.05; }
h2 { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.15; }
h3 { font-size: 20px; line-height: 1.25; }

p { margin: 0; }

.lead {
  font-size: 18px; color: var(--text-dim);
  text-wrap: pretty;
  max-width: 60ch;
}

/* ───── Card primitive ───── */

.card {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: var(--r-md);
  padding: 22px;
}

/* ───── Footer ───── */

.footer {
  margin-top: 100px;
  border-top: 1px solid var(--line);
  padding: 36px 0 48px;
  color: var(--text-dim);
  font-size: 13px;
}
.footer-inner {
  display: flex; gap: 28px; align-items: flex-start;
  flex-wrap: wrap;
}
.footer-col { min-width: 140px; }
.footer-col-title {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text); margin-bottom: 10px;
}
.footer-col a { display: block; padding: 3px 0; }
.footer-spacer { flex: 1; }
.footer-bottom {
  margin-top: 28px; padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  font-size: 12px;
}

/* ───── Status pill (reused across pages) ───── */

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 9px;
  border-radius: 999px;
  font-size: 11px; font-weight: 600;
  white-space: nowrap;
}
.pill-success { color: var(--success); background: var(--success-bg); }
.pill-warn    { color: var(--warn);    background: var(--warn-bg); }
.pill-accent  { color: var(--accent);  background: var(--accent-soft); }
.pill-neutral { color: var(--text-dim); background: #EDEBE5; }
.pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}

/* ───── Hotkey chip ───── */

.kbd {
  display: inline-flex; align-items: center;
  height: 26px; padding: 0 10px;
  background: #FFFFFF;
  border: 1px solid var(--card-edge);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.04em;
}

/* ───── Mini app window preview ───── */

.app-window {
  background: var(--bg);
  border: 1px solid var(--card-edge);
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 30px 60px -25px rgba(20, 16, 8, 0.18),
    0 8px 20px -12px rgba(20, 16, 8, 0.12);
}
.app-titlebar {
  height: 34px;
  background: #EDEBE5;
  border-bottom: 1px solid var(--card-edge);
  display: flex; align-items: center;
  padding: 0 14px;
  color: var(--text-dim); font-size: 12px; font-weight: 500;
  position: relative;
}
.app-titlebar .tl-dots { display: flex; gap: 6px; }
.app-titlebar .tl-dot { width: 11px; height: 11px; border-radius: 50%; background: #D6D3CA; }
.app-titlebar .tl-title {
  position: absolute; left: 0; right: 0; text-align: center;
  pointer-events: none;
}
.app-body {
  padding: 16px 18px 18px;
  display: flex; flex-direction: column; gap: 12px;
}
.app-section-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-dim);
  margin-left: 4px;
}
.app-card {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 10px;
  padding: 14px 16px;
}
.app-toggle {
  width: 36px; height: 20px;
  background: var(--accent); border-radius: 999px;
  position: relative; flex: 0 0 auto;
}
.app-toggle::after {
  content: ''; position: absolute;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; top: 2px; left: 18px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.app-toggle.off { background: #D6D3CA; }
.app-toggle.off::after { left: 2px; }
.app-toggle.sm {
  width: 28px; height: 16px;
}
.app-toggle.sm::after {
  width: 12px; height: 12px;
  left: 14px;
}
.app-toggle.sm.off::after { left: 2px; }

/* ───── Utilities ───── */

.row { display: flex; align-items: center; gap: 12px; }
.col { display: flex; flex-direction: column; gap: 10px; }
.spacer { flex: 1; }
.mono { font-family: var(--font-mono); }
.dim { color: var(--text-dim); }
.mute { color: var(--text-mute); }

/* ───── Responsive ───── */

@media (max-width: 760px) {
  .topnav-links { display: none; }
  h1 { font-size: 38px; }
  .container, .container-narrow { padding: 0 18px; }
}
