/* ==========================================================================
   Ghost Auth: marketing site theme
   Mirrors the app (src/app.css): strict monochrome, system monospace, dotted
   borders, green accent used only for focus. Light + dark follow the OS.
   ========================================================================== */

:root {
  color-scheme: light dark;

  /* dark (app @theme defaults) */
  --color-bg: #000000;
  --color-fg: #ffffff;
  --color-surface: #0a0a0a;
  --color-surface-2: #111111;
  --color-border: #3d3d3d;
  --color-dim: #777777;
  --color-muted: #999999;
  --color-accent: #4ade80;
  --color-error: #f87171;
  --color-text: #cfcfcf;      /* body copy */

  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", "Courier New", monospace;
  --wrap: 600px;
}

@media (prefers-color-scheme: light) {
  :root {
    --color-bg: #f5f5f0;
    --color-fg: #1a1a1a;
    --color-surface: #ededea;
    --color-surface-2: #e5e5e0;
    --color-border: #8a8a85;
    --color-dim: #5a5a5a;
    --color-muted: #555555;
    --color-accent: #16a34a;
    --color-error: #dc2626;
    --color-text: #33332f;
  }
}

/* ---- Reset --------------------------------------------------------------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}
::selection { background: var(--color-fg); color: var(--color-bg); }  /* app parity */

/* ---- Skip link ----------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: 50%;
  top: -60px;
  transform: translateX(-50%);
  z-index: 100;
  background: var(--color-bg);
  border: 1px dotted var(--color-border);
  color: var(--color-fg);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 0.55rem 1rem;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0.6rem; }

/* ---- Nav ----------------------------------------------------------------- */
nav.site {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--color-bg);
  border-bottom: 1px dotted var(--color-border);
}
nav.site .inner {
  max-width: var(--wrap);
  margin: 0 auto;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--color-fg);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  text-decoration: none;
  border: none;
}
.brand__name { white-space: nowrap; }
.brand svg { width: 20px; height: 20px; fill: var(--color-fg); }

nav.site .links { display: flex; align-items: center; gap: 1.25rem; }
nav.site .links a {
  color: var(--color-dim);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-decoration: none;
  border: none;
  padding: 0.3rem 0;
  transition: color 0.15s ease;
}
nav.site .links a:hover,
nav.site .links a.active { color: var(--color-fg); }

/* ---- Layout -------------------------------------------------------------- */
main { max-width: var(--wrap); margin: 0 auto; padding: 3rem 1.25rem 2rem; }
[id] { scroll-margin-top: 68px; }
section { margin-bottom: 2.5rem; }

/* ---- Headings & prose ---------------------------------------------------- */
main h1 {
  color: var(--color-fg);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 0.5rem;
}
main h2 {
  color: var(--color-fg);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
}
main h3 {
  color: var(--color-fg);
  font-size: 13px;
  font-weight: 500;
  margin: 1.4rem 0 0.4rem;
}
main p { margin-bottom: 0.7rem; }
main p:last-child { margin-bottom: 0; }
main strong { color: var(--color-fg); font-weight: 600; }

.lead, .summary, .intro {
  color: var(--color-fg);
  font-size: 15.5px;
  line-height: 1.65;
  margin-bottom: 2.25rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px dotted var(--color-border);
}
.page-sub, .subtitle, .updated {
  color: var(--color-dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 2.25rem;
}

main ol { padding-left: 1.25rem; margin: 0.5rem 0; }
main ol li { margin-bottom: 0.45rem; }
.step-label { color: var(--color-fg); }

/* ---- Links --------------------------------------------------------------- */
a {
  color: var(--color-fg);
  text-decoration: none;
  border-bottom: 1px dotted var(--color-dim);
  transition: border-color 0.15s ease;
}
a:hover { border-bottom-color: var(--color-fg); }

/* ---- Inline code --------------------------------------------------------- */
code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--color-fg);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 0.05em 0.35em;
}

/* ---- Dividers ------------------------------------------------------------ */
.divider, hr.divider, .fade-rule {
  border: none;
  border-top: 1px dotted var(--color-border);
  margin: 2.5rem 0;
  height: 0;
}
.fade-rule { margin: 0; }

/* ---- Buttons / CTAs ------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-decoration: none;
  border: 1px dotted var(--color-border);
  padding: 0.65rem 1rem;
  color: var(--color-fg);
  background: transparent;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { border-color: var(--color-fg); }
.btn .ico { width: 14px; height: 14px; flex: none; }
.btn--primary {
  border: 1px solid var(--color-fg);
  background: var(--color-fg);
  color: var(--color-bg);
}
.btn--primary:hover { background: transparent; color: var(--color-fg); }

/* ---- Footer -------------------------------------------------------------- */
footer.site {
  max-width: var(--wrap);
  margin: 3.5rem auto 0;
  padding: 1.75rem 1.25rem 3rem;
  border-top: 1px dotted var(--color-border);
  font-size: 12px;
  color: var(--color-dim);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
footer.site a { color: var(--color-dim); border-bottom: none; }
footer.site a:hover { color: var(--color-fg); }
footer.site .ghost-mark { width: 14px; height: 14px; fill: var(--color-dim); vertical-align: -2px; margin-right: 0.4rem; }

/* ==========================================================================
   Home
   ========================================================================== */
.hero { text-align: center; padding: 1rem 0 2.5rem; }
.hero__ghost { width: 78px; height: 78px; margin: 0 auto 1.5rem; }
.hero__ghost svg {
  width: 100%; height: 100%;
  fill: var(--color-fg);
  animation: ghost-float 5s ease-in-out infinite;
}
@keyframes ghost-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
.hero h1 {
  color: var(--color-fg);
  font-size: 15px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  padding-left: 0.28em;
  margin-bottom: 0.6rem;
}
.hero .tagline {
  color: var(--color-dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
.hero__sub {
  max-width: 44ch;
  margin: 1.25rem auto 0;
  color: var(--color-text);
  font-size: 14.5px;
  line-height: 1.65;
}
.hero__sub b { color: var(--color-fg); font-weight: 500; }

.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.6rem; margin-top: 1.6rem; }
.cta-note { margin-top: 0.9rem; font-size: 11px; color: var(--color-dim); }
.cta-note a { color: var(--color-muted); border-bottom: none; }
.cta-note a:hover { color: var(--color-fg); }

/* ---- Demo: a faithful monochrome mirror of the app's AccountCard --------- */
.demo {
  max-width: 380px;
  margin: 2rem auto 0;
  text-align: left;
  border: 1px dotted var(--color-border);
  background: var(--color-bg);
}
.demo__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px dotted var(--color-border);
}
.demo__head svg { width: 15px; height: 15px; fill: var(--color-fg); }
.demo__head .t {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-fg);
}
.demo__head .n { margin-left: auto; font-size: 10px; color: var(--color-dim); letter-spacing: 0.05em; }
.demo__list { list-style: none; }

.acct {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px dotted var(--color-border);
}
.acct:last-child { border-bottom: none; }
.acct__info { flex: 1; min-width: 0; }
.acct__issuer { display: block; color: var(--color-fg); font-size: 13px; }
.acct__label {
  display: block;
  color: var(--color-muted);
  font-size: 11px;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.acct__code {
  display: block;
  margin-top: 0.45rem;
  color: var(--color-fg);
  font-size: 26px;
  line-height: 1;
  font-weight: 300;
  letter-spacing: 0.15em;
  font-variant-numeric: tabular-nums;
}
.acct__code .sp { display: inline-block; width: 0.35em; }
.acct__code .d { display: inline-block; }

/* countdown ring: dashed faint track + fg arc + seconds in center (app parity) */
.acct__ring { position: relative; width: 40px; height: 40px; flex: none; display: grid; place-items: center; }
.acct__ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { stroke: var(--color-fg); opacity: 0.13; stroke-dasharray: 2 4; }
.ring-arc { stroke: var(--color-fg); opacity: 0.4; }
.acct.warn .ring-arc { opacity: 0.6; }
.acct.crit .ring-arc { stroke: var(--color-error); opacity: 1; }
.acct__secs {
  position: relative;
  font-size: 12px;
  color: var(--color-dim);
  font-variant-numeric: tabular-nums;
}
.acct.crit .acct__secs { color: var(--color-error); }

@keyframes code-in { from { opacity: 0; transform: translateY(-6px); } }

/* ---- Features ------------------------------------------------------------ */
.features { list-style: none; }
.features li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.65rem 0;
  border-bottom: 1px dotted var(--color-border);
}
.features li:last-child { border-bottom: none; }
.features .label { color: var(--color-fg); }
.features .detail { color: var(--color-muted); font-size: 13px; display: block; }

/* raster SVG icons adapt to theme, like the app's .icon-adapt */
img.ico { width: 16px; height: 16px; margin-top: 0.15rem; flex: none; filter: invert(1); opacity: 0.6; }
@media (prefers-color-scheme: light) { img.ico { filter: invert(0); } }

/* ---- Platforms ----------------------------------------------------------- */
.platforms { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-fg);
  border: 1px dotted var(--color-border);
  padding: 0.45rem 0.75rem;
  text-decoration: none;
  transition: border-color 0.15s ease;
}
.chip:hover { border-color: var(--color-fg); }
.chip img.ico { width: 13px; height: 13px; margin: 0; opacity: 0.7; }
.chip.disabled { opacity: 0.4; pointer-events: none; }
.subsection {
  color: var(--color-dim);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 1rem 0 0.5rem;
}

/* ---- Pills --------------------------------------------------------------- */
.pills { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.pill {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  border: 1px dotted var(--color-border);
  padding: 0.3rem 0.6rem;
}
.pill b { color: var(--color-fg); font-weight: 600; }

/* ==========================================================================
   A11y & motion
   ========================================================================== */
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }  /* app parity */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 480px) {
  main { padding-top: 2.5rem; }
  nav.site .links { gap: 1rem; }
  nav.site .links a { font-size: 9.5px; letter-spacing: 0.1em; }
  .brand__name { display: none; }
  .demo { max-width: 100%; }
  .cta .btn { flex: 1 1 100%; }
}
