:root {
  --bg: #090909;
  --surface: #131313;
  --surface-strong: #1b1b1b;
  --line: rgba(212, 175, 55, 0.18);
  --text: #f8f5ef;
  --muted: #b8b0a4;
  --gold: #d4af37;
  --gold-soft: #f1d592;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

/* Responsive contract: base 320-479px, tablet 480-767px, desktop 768-1024px+. */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background:
    radial-gradient(circle at top right, rgba(212, 175, 55, 0.12), transparent 0 26%),
    linear-gradient(180deg, #0a0a0a 0%, #050505 100%);
  color: var(--text);
}

.welcome-page {
  overflow: hidden;
}

.welcome-shell {
  position: relative;
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.welcome-card {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 32px 22px;
  border: 1px solid var(--line);
  border-radius: 28px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  box-shadow: var(--shadow);
  animation: splashFade 1s ease-out both;
}

.welcome-brand {
  margin: 0;
  font-size: 3rem;
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.welcome-tagline {
  margin: 12px 0 10px;
  color: var(--gold);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.welcome-copy {
  margin: 0 auto;
  max-width: 28ch;
  color: var(--muted);
  line-height: 1.65;
}

.welcome-actions {
  justify-content: center;
}

.welcome-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}

.welcome-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(20px);
  opacity: 0.5;
}

.welcome-orb-top {
  top: 8%;
  right: -40px;
  width: 180px;
  height: 180px;
  background: rgba(212, 175, 55, 0.18);
}

.welcome-orb-bottom {
  bottom: 8%;
  left: -50px;
  width: 160px;
  height: 160px;
  background: rgba(212, 175, 55, 0.12);
}

@keyframes splashFade {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px 16px 96px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.brand-title {
  margin: 0;
  font-size: 1.85rem;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.mini-link {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--gold-soft);
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}

.content-stack {
  display: grid;
  gap: 18px;
}

.hero-card,
.list-card,
.feature-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 20px;
}

.badge {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-soft);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-card h2 {
  margin: 0 0 10px;
  font-size: 1.65rem;
  line-height: 1.15;
}

.hero-card p,
.section-head p,
.feature-card span {
  color: var(--muted);
}

.hero-card p {
  margin: 0;
  line-height: 1.6;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  font-size: 0.94rem;
  font-weight: 800;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-soft) 100%);
  color: #111;
}

.btn-secondary {
  border: 1px solid var(--line);
  color: var(--gold-soft);
  background: rgba(255, 255, 255, 0.02);
}

.auth-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 16px;
}

.auth-card {
  width: min(100%, 480px);
  padding: clamp(24px, 6vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 8vw, 2.6rem);
}

.auth-card form {
  display: grid;
  gap: 10px;
  margin: 24px 0 12px;
}

.auth-card input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-strong);
  color: var(--text);
  font: inherit;
}

.auth-card .btn {
  width: 100%;
  min-height: 48px;
  border: 0;
  cursor: pointer;
}

.form-message {
  min-height: 1.4em;
  color: #f1a6a6;
}

button,
a,
input,
textarea,
select {
  touch-action: manipulation;
}

@media (min-width: 480px) {
  .welcome-shell,
  .site-shell { padding-left: 24px; padding-right: 24px; }
}

@media (min-width: 768px) {
  .welcome-shell,
  .site-shell { max-width: 720px; }
  .welcome-card { padding: 48px 40px; }
}

@media (min-width: 1024px) {
  .welcome-shell,
  .site-shell { max-width: 960px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.section-head {
  margin-bottom: 12px;
}

.section-head h2 {
  margin: 0 0 4px;
  font-size: 1.1rem;
}

.section-head p {
  margin: 0;
  font-size: 0.92rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.feature-card {
  display: block;
  padding: 16px;
}

.feature-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.98rem;
}

.feature-card span {
  display: block;
  font-size: 0.83rem;
  line-height: 1.5;
}

.list-card {
  padding: 18px;
}

.page-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.page-list li a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.page-list span {
  font-size: 0.93rem;
  font-weight: 700;
}

.page-list code {
  font-family: Consolas, 'Courier New', monospace;
  font-size: 0.75rem;
  color: var(--gold-soft);
  word-break: break-all;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 10px 12px 20px;
  border-top: 1px solid var(--line);
  background: rgba(5, 5, 5, 0.96);
  backdrop-filter: blur(12px);
}

.bottom-nav a {
  text-align: center;
  font-size: 0.71rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.bottom-nav a.active {
  color: var(--gold);
}

@media (min-width: 700px) {
  body {
    padding: 18px;
  }

  .site-shell {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(0, 0, 0, 0.45);
    overflow: hidden;
  }

  .bottom-nav {
    bottom: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
  }
}
