/* ─── Design Tokens ─────────────────────────────────────────── */
:root {
  /* Colors */
  --color-bg:         #0D0D0D;
  --color-surface:    #1A1A1A;
  --color-surface-2:  #222222;
  --color-border:     rgba(255,255,255,0.06);
  --color-border-2:   #333333;
  --color-gold:       #C9972A;
  --color-text:       #E2DDD4;
  --color-text-muted: #B7B0A3;
  --color-text-dim:   #8E877B;

  /* Refinement tokens */
  --text-primary:    #E2DDD4;
  --text-secondary:  #B7B0A3;
  --text-muted:      #8E877B;
  --brand-gold:      #C8A96B;
  --border-soft:     rgba(255,255,255,0.06);
  --surface-overlay: rgba(255,255,255,0.03);

  /* Typography */
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans:  -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Radius */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-full: 9999px;

  /* Transitions */
  --transition: 200ms ease;
}

/* ─── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: 0.2px;
  -webkit-font-smoothing: antialiased;
}

/* ─── Typography ─────────────────────────────────────────────── */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
}

h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }

p  { color: var(--color-text-muted); font-size: 16px; }

/* ─── Layout ─────────────────────────────────────────────────── */
.screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}

.screen--top {
  justify-content: flex-start;
  padding-top: var(--space-12);
}

.container {
  width: 100%;
  max-width: 420px;
}

/* ─── Card ───────────────────────────────────────────────────── */
.card {
  background: var(--color-surface);
  border: 0.5px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

/* ─── Form elements ──────────────────────────────────────────── */
.input {
  width: 100%;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-2);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  padding: var(--space-4) var(--space-5);
  outline: none;
  transition: border-color var(--transition);
}

.input::placeholder { color: #8F8A82; }

.input:focus { border-color: var(--color-gold); }

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: opacity var(--transition), transform var(--transition);
  text-decoration: none;
}

.btn:active { transform: scale(0.98); }

.btn--primary {
  background: linear-gradient(180deg, #C9972A, #B8861F);
  color: #111111;
  font-weight: 600;
}

.btn--primary:hover { opacity: 0.88; }

.btn--outline {
  background: transparent;
  border: 1px solid var(--color-gold);
  color: var(--color-gold);
}

.btn--outline:hover { background: rgba(201, 151, 42, 0.08); }

.btn--ghost {
  background: transparent;
  color: var(--color-text-muted);
}

.btn--ghost:hover { color: var(--color-text); }

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* ─── Logo / brand ───────────────────────────────────────────── */
.brand {
  font-family: var(--font-serif);
  font-size: 32px;
  color: var(--color-gold);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.brand--sm {
  font-size: 20px;
  letter-spacing: 1.5px;
}

/* ─── Divider ────────────────────────────────────────────────── */
.divider {
  height: 0.5px;
  background: var(--color-border);
  margin: var(--space-6) 0;
}

/* ─── Stack (vertical spacing helper) ───────────────────────── */
.stack { display: flex; flex-direction: column; }
.stack--2  { gap: var(--space-2); }
.stack--3  { gap: var(--space-3); }
.stack--4  { gap: var(--space-4); }
.stack--6  { gap: 28px; }
.stack--8  { gap: 40px; }

/* ─── Text utilities ─────────────────────────────────────────── */
.text-center  { text-align: center; }
.text-muted   { color: var(--color-text-muted); font-size: 15px; }
.text-gold    { color: var(--color-gold); }
.text-sm      { font-size: 14px; }

/* ─── Link ───────────────────────────────────────────────────── */
a {
  color: var(--color-gold);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* ─── Alert / feedback ───────────────────────────────────────── */
.alert {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  font-size: 15px;
  display: none;
}
.alert.visible { display: block; }

.alert--error {
  background: rgba(220, 60, 60, 0.12);
  border: 0.5px solid rgba(220, 60, 60, 0.4);
  color: #f87171;
}

.alert--success {
  background: rgba(201, 151, 42, 0.10);
  border: 0.5px solid rgba(201, 151, 42, 0.35);
  color: var(--color-gold);
}

/* ─── Loading spinner ────────────────────────────────────────── */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}
.spinner.visible { display: inline-block; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Progress dots (onboarding) ────────────────────────────── */
.dots {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-border);
  transition: background var(--transition), width var(--transition);
}

.dot.active {
  background: var(--color-gold);
  width: 18px;
}

/* ─── Icon placeholder ───────────────────────────────────────── */
.icon-circle {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: rgba(201, 151, 42, 0.12);
  border: 0.5px solid rgba(201, 151, 42, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto;
}
