/* Waypoint Local — design system base styles
   Cream + navy light mode. Colors + type + primitives.
   Component-specific CSS lives in the page itself (for now). */

:root {
  --bg: #F0EDE6;
  --surface: #FFFFFF;
  --surface2: #FAF7F0;
  --surface3: #F5EFE0;
  --border: rgba(13, 27, 42, 0.12);
  --gold: #C8A951;
  --gold-dim: #A88A3A;
  --gold-glow: rgba(200, 169, 81, 0.18);
  --text: #0D1B2A;
  --text-dim: #3D4A5C;
  --text-muted: rgba(13, 27, 42, 0.45);
  --green: #2F855A;
  --blue: #2C5282;
  --purple: #6B46A1;
  --red: #C53030;
  --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.25;
}

/* 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: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  color: var(--text);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: var(--text);
  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(47, 133, 90, 0.08);
  border: 1px solid rgba(47, 133, 90, 0.3);
  color: var(--green);
}
.banner-error {
  background: rgba(197, 48, 48, 0.08);
  border: 1px solid rgba(197, 48, 48, 0.3);
  color: var(--red);
}
.banner-info {
  background: rgba(44, 82, 130, 0.08);
  border: 1px solid rgba(44, 82, 130, 0.3);
  color: var(--blue);
}
