/* Waypoint v2 — design system base styles
   Colors + type + primitives. Component-specific CSS lives in the page itself (for now).
   See DESIGN_SYSTEM.md for the full spec. */

:root {
  --bg: #0D1B2A;
  --surface: #0f2035;
  --surface2: #111f30;
  --surface3: #162538;
  --border: rgba(200, 169, 81, 0.15);
  --gold: #C8A951;
  --gold-dim: #a08840;
  --gold-glow: rgba(200, 169, 81, 0.08);
  --text: #F0EDE6;
  --text-dim: #9a968f;
  --text-muted: rgba(240, 237, 230, 0.35);
  --green: #4a9e6b;
  --blue: #4a7e9e;
  --purple: #7a4a9e;
  --red: #c0392b;
  --radius: 4px;
  --radius-sm: 3px;
  --radius-lg: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
*, *::before, *::after { -webkit-tap-highlight-color: transparent; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: calc(80px + env(safe-area-inset-bottom));
}

/* Subtle film-grain overlay for brand texture */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.5;
}

/* Typography */
h1, h2, h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  line-height: 1.15;
}
h1 em, h2 em, h3 em { font-style: italic; color: var(--gold); }

.eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.wordmark {
  font-family: 'Cormorant Garamond', serif;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Primary container */
.container {
  width: 100%;
  max-width: 640px;
  padding: 0 24px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: none;
  border-radius: 6px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  color: var(--bg);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: var(--bg);
  box-shadow: 0 2px 8px rgba(200, 169, 81, 0.25);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(200, 169, 81, 0.35); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-secondary {
  background: transparent;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
}
.btn-secondary:hover { background: var(--gold-glow); }

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
}
.btn-ghost:hover { color: var(--gold); }

/* Inputs */
.input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s;
}
.input:focus { border-color: var(--gold-dim); }
.input::placeholder { color: var(--text-muted); }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

/* Utility */
.flex-col { display: flex; flex-direction: column; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.text-dim { color: var(--text-dim); }
.text-muted { color: var(--text-muted); }
.text-gold { color: var(--gold); }
.text-center { text-align: center; }

/* Phosphor icon sizing + color utilities */
.ph-duotone, [class^="ph-"], [class*=" ph-"] {
  line-height: 1;
}
.icon-gold { color: var(--gold); }
.icon-dim { color: var(--text-dim); }
.icon-muted { color: var(--text-muted); }

/* Loading spinner */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 24px; height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Banners */
.banner {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.banner-success {
  background: rgba(74, 158, 107, 0.08);
  border: 1px solid rgba(74, 158, 107, 0.3);
  color: #8ed0a5;
}
.banner-error {
  background: rgba(192, 57, 43, 0.08);
  border: 1px solid rgba(192, 57, 43, 0.3);
  color: #e8918a;
}
.banner-info {
  background: rgba(74, 126, 158, 0.08);
  border: 1px solid rgba(74, 126, 158, 0.3);
  color: #9ec3d8;
}
