/* Cosmos & Concrete — cosmic theme (from site preview). Dark only. */
:root, [data-theme="dark"] {
  --bg: #05080c;
  --bg2: #0d141b;
  --surface: #0d141b;
  --surface-2: #121e28;
  --card: #0d141b;
  --ink: #f6f8f8;
  --muted: #aab7bf;
  --line: #263946;
  --accent: #f2bc3d;
  --accent-ink: #171105;
  --teal: #59d5c5;
  --blue: #4ca6d8;
  --gold: #f2bc3d;
  --ok: #4ade80;
  --warn: #fbbf24;
  --err: #ff7f73;
  --btn-ink: #171105;
  --glow: rgba(76,166,216,.16);
  --gold-glow: rgba(242,188,61,.15);
  --shadow: 0 28px 80px rgba(0,0,0,.42);
  --nav: rgba(5,8,12,.86);
  --input: #0a1016;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
  overflow-x: hidden;
}
/* nebula washes */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(circle at 82% 8%, var(--glow), transparent 25%),
    radial-gradient(circle at 12% 74%, var(--gold-glow), transparent 24%);
}
/* starfield canvas */
#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: .66; }
main, .topbar, .footer { position: relative; z-index: 1; }

a { color: var(--teal); }
.muted { color: var(--muted); }
.pre { white-space: pre-wrap; }
.mono { font-family: "DM Mono", ui-monospace, monospace; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; gap: 1rem;
  padding: 0 1.2rem; height: 76px;
  border-bottom: 1px solid var(--line);
  background: var(--nav);
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.brand-logo { width: 42px; height: 42px; object-fit: contain; }
.brand-name { line-height: 1.05; }
.amp { color: var(--accent); }
.topnav { display: flex; gap: 1.4rem; margin-left: auto; align-items: center; }
.topnav a { text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.topnav a:hover { color: var(--ink); }
.controls { display: flex; gap: 8px; align-items: center; }
/* theme pill toggle */
.ctl {
  height: 40px; border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--muted); text-decoration: none;
  font-family: "DM Mono", monospace; font-size: 11px; font-weight: 500;
  padding: 0 12px; min-width: 48px;
}
.ctl:hover { color: var(--ink); border-color: var(--muted); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px; text-decoration: none; border-radius: 6px;
  font-size: 13px; font-weight: 800; letter-spacing: .035em;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.btn-primary, .btn-gold { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 30px var(--gold-glow); border: none; }
.btn-primary:hover, .btn-gold:hover { filter: brightness(1.08); transform: translateY(-2px); }
.btn-ghost { border-color: var(--line); background: var(--surface); color: var(--ink); }
.btn-ghost:hover { border-color: var(--teal); transform: translateY(-2px); }
.btn-sm { min-height: 0; padding: 0.45rem 0.9rem; font-size: 12px; }
.btn-lg { padding: 0.85rem 1.7rem; font-size: 14px; }

/* ---------- layout ---------- */
main { flex: 1; }
.section { max-width: 1080px; margin: 0 auto; padding: 3.5rem 1.2rem; position: relative; }
.eyebrow {
  display: flex; align-items: center; gap: 11px;
  text-transform: uppercase; letter-spacing: .13em; font-size: 11px;
  color: var(--teal); font-family: "DM Mono", monospace; font-weight: 500;
}
.eyebrow::before { content: ""; width: 34px; height: 1px; background: currentColor; box-shadow: 12px 0 14px currentColor; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); line-height: 1.02; letter-spacing: -.04em; margin: 0.6rem 0 1rem; font-weight: 800; }
h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); line-height: 1.08; letter-spacing: -.035em; margin: 0.6rem 0 1rem; font-weight: 800; }
.section-sub { max-width: 640px; color: var(--muted); line-height: 1.75; }

/* ---------- hero ---------- */
.hero { padding: 5rem 1.2rem 4rem; position: relative; isolation: isolate; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; width: min(72vw, 940px); aspect-ratio: 1;
  border: 1px solid var(--glow); border-radius: 50%;
  right: -34vw; top: -38vw; z-index: -1;
  box-shadow: 0 0 0 72px rgba(76,166,216,.03), 0 0 0 180px rgba(242,188,61,.02);
}
.hero::after {
  content: ""; position: absolute; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); right: 13%; top: 17%; z-index: -1;
  box-shadow: 0 0 18px var(--accent), -120px 92px 0 -2px var(--teal), 65px 180px 0 -3px var(--ink);
}
.hero-inner { max-width: 1080px; margin: 0 auto; display: flex; gap: 3rem; align-items: center; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-text { flex: 1 1 420px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: "DM Mono", monospace; font-size: 11px; letter-spacing: .13em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 1.2rem;
}
.hero-title { margin: 0 0 1rem; }
.hero-title .accent { color: var(--accent); text-shadow: 0 0 34px var(--gold-glow); }
.hero-tagline {
  display: flex; align-items: center; gap: 13px; margin: 1.4rem 0 0;
  color: var(--accent); font-family: "DM Mono", monospace;
  font-size: clamp(16px, 2vw, 22px); font-weight: 500; letter-spacing: .05em;
}
.hero-tagline::before { content: "✦"; font-size: .72em; text-shadow: 0 0 16px var(--accent); }
.hero-sub { font-size: 1.05rem; color: var(--muted); max-width: 560px; line-height: 1.72; }
.hero-cta { display: flex; gap: 12px; margin-top: 2rem; flex-wrap: wrap; }
.hero-logo-wrap { position: relative; flex: 1 1 320px; max-width: 440px; margin: 0 auto; }
.hero-logo-wrap img {
  width: 100%; display: block;
  filter: drop-shadow(0 18px 50px rgba(0,0,0,.45));
}
/* tour-guide tips (from the preview) */
.guide-row {
  display: grid; grid-template-columns: 120px minmax(0,1fr);
  gap: 22px; align-items: center;
  margin: 0.5rem 0 2.2rem; max-width: 790px;
}
.guide-row.slim { margin: 1.2rem 0 1.8rem; }
.guide-row.slim .guide-portrait { width: 96px; }
.guide-portrait {
  width: 120px; aspect-ratio: 1; position: relative;
  border-radius: 50% 50% 20% 50%; overflow: hidden;
  border: 2px solid var(--accent);
  box-shadow: 0 16px 38px rgba(0,0,0,.25), 0 0 30px var(--gold-glow);
  transform: rotate(-2deg);
  background:
    radial-gradient(circle at 18% 24%, rgba(255,255,255,.55) 0 1px, transparent 1.6px),
    radial-gradient(circle at 76% 34%, rgba(227,179,65,.6) 0 1px, transparent 1.6px),
    radial-gradient(circle at 47% 78%, rgba(255,255,255,.4) 0 1px, transparent 1.6px),
    radial-gradient(ellipse at 50% 35%, #1a2745 0%, #0b1322 55%, #05080c 100%);
  background-size: 110px 100px, 140px 130px, 95px 90px, cover;
}
.guide-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.guide-note {
  position: relative; background: var(--surface);
  border: 1px solid var(--teal);
  padding: 20px 23px; border-radius: 8px 18px 18px 18px;
  box-shadow: 0 16px 44px rgba(0,0,0,.18);
}
.guide-note::before {
  content: ""; position: absolute; left: -11px; top: 34px;
  width: 20px; height: 20px; background: var(--surface);
  border-left: 1px solid var(--teal); border-bottom: 1px solid var(--teal);
  transform: rotate(45deg);
}
.guide-note b {
  display: block; color: var(--accent);
  font-family: "DM Mono", monospace; font-size: 10px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: 8px;
}
.guide-note p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
/* cosmic backdrop behind Cosmo (avatars are transparent PNG-style webp now) */
.card-cosmo, .cta-cosmo, .gate-cosmo, .login-cosmo, .done-cosmo, .empty-state img {
  background:
    radial-gradient(circle at 18% 24%, rgba(255,255,255,.55) 0 1px, transparent 1.6px),
    radial-gradient(circle at 76% 34%, rgba(227,179,65,.6) 0 1px, transparent 1.6px),
    radial-gradient(circle at 47% 78%, rgba(255,255,255,.4) 0 1px, transparent 1.6px),
    radial-gradient(circle at 64% 12%, rgba(89,213,197,.5) 0 1px, transparent 1.6px),
    radial-gradient(ellipse at 50% 35%, #1a2745 0%, #0b1322 55%, #05080c 100%);
  background-size: 110px 100px, 140px 130px, 95px 90px, 125px 115px, cover;
}

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 2rem; }
.card {
  background: linear-gradient(150deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line); border-radius: 12px; padding: 2rem;
  position: relative; overflow: hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,.10);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--teal), var(--blue), transparent 80%); }
.card:nth-child(2)::before { background: linear-gradient(90deg, var(--accent), var(--blue), transparent 80%); }
/* little orbit ring on each card, like the preview */
.card::after {
  content: ""; position: absolute; width: 220px; height: 220px;
  border: 1px solid rgba(89,213,197,.28); border-radius: 50%;
  right: -116px; bottom: -124px; pointer-events: none;
  box-shadow: 0 0 0 28px rgba(89,213,197,.03), 0 0 0 60px rgba(76,166,216,.02);
}
.card:nth-child(2)::after { border-color: rgba(242,188,61,.32); }
.card:nth-child(3)::after { border-color: rgba(76,166,216,.30); }
.card:hover { transform: translateY(-4px); border-color: var(--teal); box-shadow: 0 24px 64px var(--glow); }
.card h3 { margin: 1rem 0 0.8rem; font-size: 1.3rem; letter-spacing: -.02em; }
.card p { color: var(--muted); line-height: 1.7; font-size: 14px; margin: 0; position: relative; z-index: 1; }
.card-cosmo { width: 96px; border-radius: 14px; margin-bottom: 0.6rem; position: relative; z-index: 1; }

/* ---------- watchtower ---------- */
.watchtower {
  background: linear-gradient(180deg, transparent, var(--glow) 50%, transparent);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  max-width: none;
}
.watchtower > * { max-width: 1080px; margin-left: auto; margin-right: auto; }
.wt-body { max-width: 760px; line-height: 1.7; color: var(--muted); }
.wt-list { max-width: 760px; line-height: 2; padding-left: 1.2rem; color: var(--muted); }
.wt-list li::marker { color: var(--teal); }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-top: 2rem; position: relative; }
.steps::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, var(--teal), var(--blue), var(--accent)); opacity: .65; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.8rem; }
.step-n {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--teal); color: var(--teal);
  font-family: "DM Mono", monospace; font-weight: 500;
  display: inline-grid; place-items: center; margin-bottom: 1rem;
  box-shadow: 0 0 0 7px var(--glow);
}
.step:nth-child(2) .step-n { color: var(--accent); border-color: var(--accent); }
.step h3 { margin: 0 0 0.7rem; font-size: 1.15rem; }
.step p { color: var(--muted); line-height: 1.7; font-size: 13px; margin: 0; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; padding: 4.5rem 1.2rem; position: relative; overflow: hidden; }
.cta-inner {
  max-width: 1080px; margin: 0 auto;
  background: linear-gradient(115deg, var(--accent), #f6d575 62%, #81d8cb 145%);
  color: #171105; border-radius: 12px; padding: 52px;
  position: relative; overflow: hidden;
  box-shadow: 0 24px 70px var(--gold-glow);
  text-align: left;
}
.cta-inner::before { content: ""; position: absolute; width: 290px; height: 290px; border: 1px solid rgba(23,17,5,.18); border-radius: 50%; right: -90px; top: -190px; }
.cta-inner::after { content: "✦"; position: absolute; right: 32%; top: 24px; font-size: 22px; color: rgba(23,17,5,.35); }
.cta-inner h2 { color: #171105; position: relative; z-index: 1; }
.cta-inner p { color: rgba(23,17,5,.78); position: relative; z-index: 1; }
.cta-inner .btn { background: #171105; color: var(--gold); position: relative; z-index: 2; }
.cta-cosmo { width: 120px; border-radius: 50% 50% 12% 50%; border: 2px solid rgba(23,17,5,.3); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 2rem 1.2rem 3rem; margin-top: 2rem; }
.footer-inner { max-width: 1080px; margin: 0 auto; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.footer-tag { font-size: 1.2rem; font-weight: 800; margin-bottom: 0.6rem; color: var(--accent); font-family: "DM Mono", monospace; letter-spacing: .08em; }
.footer-note { color: var(--muted); font-size: 0.9rem; margin: 0.25rem 0; }
.footer-rights { color: var(--muted); font-size: 0.8rem; margin-top: 1rem; }
.footer-link { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.footer-link:hover { color: var(--accent); }

/* legal pages */
.narrow.legal { max-width: 720px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
.narrow.legal h1 { margin-bottom: 0.25rem; }
.narrow.legal h2 { margin-top: 2rem; font-size: 1.15rem; color: var(--accent); }

/* ---------- forms ---------- */
.form-wrap { max-width: 640px; margin: 2.5rem auto; padding: 0 1.2rem; position: relative; z-index: 1; }
.form-wrap.narrow { max-width: 440px; }
.form-wrap.center { text-align: center; }
label { display: block; margin: 1rem 0; font-weight: 600; }
input, select, textarea {
  display: block; width: 100%; margin-top: 0.35rem; padding: 0.7rem 0.9rem;
  border-radius: 8px; border: 1px solid var(--line);
  background: var(--input); color: var(--ink); font-size: 1rem; font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
input.bad, textarea.bad { border-color: var(--err); }
.form-row { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: end; }
.form-row input, .form-row select { width: auto; flex: 1 1 140px; }
.qstep { display: none; border: none; padding: 0; margin: 0; }
.qstep.on { display: block; }
.qnav { display: flex; gap: 0.8rem; margin-top: 1.5rem; }
.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 1.2rem 0 0.4rem; }
.progress-bar { height: 100%; width: 33%; background: linear-gradient(90deg, var(--teal), var(--accent)); transition: width 0.3s; }
.step-label { color: var(--muted); font-size: 0.9rem; margin-bottom: 1rem; font-family: "DM Mono", monospace; }

/* ---------- gate ---------- */
.gate-wrap { max-width: 440px; margin: 4rem auto; padding: 0 1.2rem; text-align: center; position: relative; z-index: 1; }
.gate-cosmo { width: 130px; border-radius: 50% 50% 18% 50%; border: 2px solid var(--accent); box-shadow: 0 0 32px var(--gold-glow); }
.gate-form { display: flex; gap: 0.6rem; margin-top: 1.2rem; }
.gate-form input { flex: 1; }

/* ---------- alerts ---------- */
.alert { padding: 0.8rem 1rem; border-radius: 8px; margin: 1rem 0; }
.alert-error { background: rgba(255,127,115,.12); border: 1px solid var(--err); }
.alert-warn { background: rgba(251,191,36,.12); border: 1px solid var(--warn); }
.alert-ok { background: rgba(74,222,128,.12); border: 1px solid var(--ok); }
.flashes { max-width: 1080px; margin: 1rem auto 0; padding: 0 1.2rem; position: relative; z-index: 1; }
.flash { background: rgba(74,222,128,.12); border: 1px solid var(--ok); padding: 0.7rem 1rem; border-radius: 8px; }

/* ---------- admin ---------- */
.admin-wrap { max-width: 1080px; margin: 2rem auto; padding: 0 1.2rem; position: relative; z-index: 1; }
.admin-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.8rem; }
.admin-links { display: flex; gap: 1rem; align-items: center; }
.badge { background: var(--err); color: #fff; font-size: 0.75rem; padding: 0.2rem 0.6rem; border-radius: 99px; font-weight: 700; }
.filters { display: flex; gap: 0.5rem; margin: 1.2rem 0; flex-wrap: wrap; }
.chip { padding: 0.35rem 0.8rem; border: 1px solid var(--line); border-radius: 99px; text-decoration: none; color: var(--muted); font-size: 0.85rem; background: var(--surface); }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.inbox-list { display: flex; flex-direction: column; gap: 0.6rem; }
.inbox-row {
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 1rem 1.2rem; text-decoration: none; color: var(--ink);
  transition: border-color .2s ease, transform .2s ease;
}
.inbox-row:hover { border-color: var(--teal); transform: translateY(-1px); }
.inbox-row.st-new { border-left: 3px solid var(--teal); }
.row-meta { display: flex; gap: 0.8rem; align-items: center; white-space: nowrap; }
.pill { background: var(--surface-2); border: 1px solid var(--line); padding: 0.2rem 0.7rem; border-radius: 99px; font-size: 0.8rem; font-family: "DM Mono", monospace; }
.pill.big { font-size: 0.95rem; padding: 0.35rem 1rem; }
.detail-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.dcard { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 1.2rem; }
.dcard h3 { margin-top: 0; font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; font-family: "DM Mono", monospace; }
.detail-form { margin: 1.5rem 0; }
.detail-form textarea { min-height: 80px; }
.activity { list-style: none; padding: 0; }
.activity li { padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
.utable { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.utable th, .utable td { text-align: left; padding: 0.6rem; border-bottom: 1px solid var(--line); }
.back { text-decoration: none; }

/* ---------- portal ---------- */
.empty-state { text-align: center; color: var(--muted); padding: 1rem 0; }
.empty-state img { width: 90px; border-radius: 50% 50% 18% 50%; opacity: 0.9; border: 2px solid var(--line); }
.ok { color: var(--ok); font-weight: 600; }
.login-cosmo { width: 90px; border-radius: 50% 50% 18% 50%; border: 2px solid var(--accent); }
.done-cosmo { width: 130px; border-radius: 50% 50% 18% 50%; border: 2px solid var(--accent); box-shadow: 0 0 32px var(--gold-glow); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { padding: 3.5rem 1.2rem 3rem; }
  .hero::before { right: -55vw; top: -32vw; }
}
@media (max-width: 640px) {
  .topnav a:not(.btn) { display: none; }
  .brand { font-size: 11px; }
  .inbox-row { flex-direction: column; align-items: flex-start; }
  .cta-inner { padding: 2rem 1.5rem; }
  .guide-row { grid-template-columns: 86px 1fr; gap: 15px; }
  .guide-portrait { width: 86px; }
  .guide-row.slim .guide-portrait { width: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
