/* Apex styles.
 *
 * Plain CSS, served as-is. No build step, no preprocessor, no bundler -- the
 * target machine has no Node.js, and a build step would be a hard blocker.
 *
 * Layout uses flexbox and grid; no framework. Custom properties for the
 * palette so a theme change is one block of edits.
 */

:root {
  --bg: #0f1218;
  --bg-raised: #161b24;
  --bg-card: #1a212c;
  --border: #2a3342;
  --border-strong: #3a4658;
  --text: #e8ecf2;
  --text-muted: #8b97ab;
  --accent: #6c8cff;
  --accent-text: #0b0e14;
  --good: #3fb27f;
  --warn: #d9a441;
  --danger: #d95757;
  --radius: 10px;
  --wrap: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Anchor targets stop below the sticky header instead of underneath it. */
section[id] { scroll-margin-top: 5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; font-weight: 650; }
h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }

a { color: var(--accent); }
a:hover { text-decoration: none; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: #0b0e14;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 640px; }
.muted { color: var(--text-muted); }
.small { font-size: 0.875rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--accent-text);
  padding: 0.5rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0; }

/* --- Header ------------------------------------------------------------- */

.site-header {
  /* Sticky so the anchor nav is reachable from anywhere in the long page. */
  position: sticky; top: 0; z-index: 20;
  background: rgba(15, 18, 24, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 4rem; flex-wrap: wrap;
}

.wordmark { font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }

.site-nav { display: flex; gap: 1.25rem; margin-right: auto; flex-wrap: wrap; }
.site-nav a { color: var(--text-muted); text-decoration: none; font-size: 0.9375rem; }
.site-nav a:hover { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.inline-form { display: inline-flex; align-items: center; gap: 0.5rem; margin: 0; }

/* --- Buttons ------------------------------------------------------------ */

.button {
  display: inline-block;
  padding: 0.55rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--bg-raised);
  color: var(--text);
  font: inherit; font-size: 0.9375rem; font-weight: 550;
  text-decoration: none; cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.button:hover { background: #1e2532; border-color: #4a576d; }

.button-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.button-primary:hover { background: #829bff; border-color: #829bff; }

.button-quiet { background: transparent; border-color: transparent; color: var(--text-muted); }
.button-quiet:hover { background: var(--bg-raised); color: var(--text); }

.button-danger { border-color: var(--danger); color: var(--danger); background: transparent; }
.button-danger:hover { background: rgba(217, 87, 87, 0.12); }

.button-large { padding: 0.75rem 1.5rem; font-size: 1rem; }
.button-block { display: block; text-align: center; }

.button-row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }

/* --- Text bits ---------------------------------------------------------- */

.eyebrow {
  text-transform: uppercase; letter-spacing: 0.09em;
  font-size: 0.75rem; font-weight: 650;
  color: var(--accent); margin: 0 0 0.75rem;
}

.lede { font-size: 1.125rem; color: var(--text-muted); max-width: 60ch; }

.tick-list { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.tick-list li { position: relative; padding-left: 1.5rem; margin-bottom: 0.4rem; color: var(--text-muted); }
.tick-list li::before { content: "\2713"; position: absolute; left: 0; color: var(--good); font-weight: 700; }

.prose p, .prose li { max-width: 68ch; }
.prose h2 { margin-top: 2rem; }

/* --- Notices ------------------------------------------------------------ */

.notice {
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  background: var(--bg-raised);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  margin: 1.25rem 0;
}
.notice p:last-child { margin-bottom: 0; }
.notice-warn { border-left-color: var(--warn); }
.notice-good { border-left-color: var(--good); }

.key-value { word-break: break-all; background: #0b0e14; padding: 0.6rem 0.75rem; border-radius: 6px; border: 1px solid var(--border); }

/* --- Hero --------------------------------------------------------------- */

.hero { padding: 5rem 0 4rem; border-bottom: 1px solid var(--border); }
.hero-inner { max-width: 760px; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 1.75rem 0 0; }

/* --- Feature sections --------------------------------------------------- */

.feature { padding: 4rem 0; border-bottom: 1px solid var(--border); }
.feature-alt { background: var(--bg-raised); }

.feature-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 780px) {
  .feature-inner { grid-template-columns: 1fr; gap: 1.75rem; }
  /* Keep the copy first when the columns stack. */
  .feature-alt .feature-media { order: 2; }
}

.feature-media .media {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius); border: 1px solid var(--border);
}

/* --- Pricing ------------------------------------------------------------ */

.pricing { padding: 4rem 0; border-bottom: 1px solid var(--border); }

.plan-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem; margin: 2rem 0 1rem;
}

.plan {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-card); padding: 1.75rem;
}
.plan-featured { border-color: var(--accent); }
.plan-badge {
  display: inline-block; font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--accent); margin: 0 0 0.5rem; font-weight: 650;
}
.plan-price { font-size: 1.75rem; font-weight: 650; margin: 0 0 1rem; }
.pricing-note { margin-top: 1rem; }

/* --- Closing ------------------------------------------------------------ */

.closing { padding: 5rem 0; }
.closing-inner { max-width: 640px; }

/* --- Panels and cards --------------------------------------------------- */

.panel-page { padding: 3rem 0 5rem; }

.card-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem; margin: 2rem 0;
}

.card {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-card); padding: 1.5rem;
  display: flex; flex-direction: column;
}
.card h2 { font-size: 1.25rem; margin-bottom: 0.25rem; }
.card .button { margin-top: auto; align-self: flex-start; }
/* A locked card is dimmed but still readable: the user needs to know what they
 * are missing in order to want it. */
.card-locked { opacity: 0.72; }

.locked-reason { color: var(--warn); font-size: 0.9375rem; margin: 1rem 0 0; }

.feature-states { list-style: none; margin: 1rem 0 1.25rem; padding: 0; font-size: 0.9375rem; }
.feature-states li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.4rem 0; border-bottom: 1px solid var(--border);
}
.feature-states li:last-child { border-bottom: 0; }
.feature-states .state { color: var(--text-muted); font-size: 0.875rem; white-space: nowrap; }
.feature-states li.on .state { color: var(--good); }
.feature-states li.off .state { color: var(--text-muted); }

/* --- Account page ------------------------------------------------------- */

.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2.5rem; margin-bottom: 2rem; }

.facts { margin: 0 0 1rem; }
.facts dt { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-top: 1rem; }
.facts dd { margin: 0.2rem 0 0; }

.pill {
  display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--bg-raised);
  font-size: 0.875rem;
}

.small-heading { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin: 1.5rem 0 0.25rem; }

.table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: 0.9375rem; }
.table th, .table td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); }
.table th { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); font-weight: 600; }

.danger-heading { color: var(--danger); margin-top: 3rem; }

.dev-login { border-top: 1px solid var(--border); margin-top: 2rem; padding-top: 1.5rem; }
.dev-login h2 { font-size: 1rem; color: var(--text-muted); }

input[type="text"] {
  padding: 0.5rem 0.7rem; border-radius: 8px;
  border: 1px solid var(--border-strong); background: var(--bg);
  color: var(--text); font: inherit; font-size: 0.9375rem;
}

label { color: var(--text-muted); font-size: 0.875rem; }

/* --- Footer ------------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--border); padding: 2.5rem 0; margin-top: 2rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; flex-wrap: wrap; }
.footer-brand .muted { margin: 0.25rem 0 0; font-size: 0.875rem; }
.site-footer nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-footer nav a { color: var(--text-muted); text-decoration: none; font-size: 0.9375rem; }
.site-footer nav a:hover { color: var(--text); text-decoration: underline; }

/* --- Accessibility ------------------------------------------------------ */

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
