/* =============================================
   wazer.ai — main.css
   Shared tokens, nav, buttons, forms, components.
   ============================================= */

/* -------- 1. Tokens -------- */

:root {
  /* Cool neutral palette — sober, premium, no beige */
  --bg: #FAFBFC;
  --bg-soft: #F0F2F4;
  --surface: #FFFFFF;
  --border: #E4E7EA;
  --border-hi: #C9CFD4;

  --ink: #0F1419;
  --ink-soft: #2A323B;
  --ink-dim: #5C6772;
  --ink-mute: #98A1AC;

  /* Bubble surfaces — separate so chat UI can theme without touching base bg */
  --bubble-user: #EEF1F5;
  --bubble-user-text: #0F1419;
  --bubble-ai-text: #0F1419;

  /* Subtle cool accents — used very sparingly (logo dot only) */
  --accent-1: #B7D6E0;
  --accent-2: #A6BFD2;
  --gradient-brand: linear-gradient(135deg, var(--accent-1), var(--accent-2));

  --ff-display: 'Fraunces', 'Times New Roman', serif;
  --ff-hero: 'DM Serif Display', Georgia, serif;
  --ff-body: 'Inter Tight', -apple-system, sans-serif;
  --ff-mono: 'JetBrains Mono', ui-monospace, monospace;

  --nav-height: 64px;
  --content-max: 1200px;
  --content-narrow: 720px;
}

/* -------- 2. Reset & base -------- */

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ff-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  color: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* -------- 3. Layout -------- */

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 32px;
}

.container-narrow {
  max-width: var(--content-narrow);
  margin: 0 auto;
  padding: 0 32px;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-main {
  flex: 1 0 auto;
  padding: 120px 0 80px;
}

.page-main--tight {
  padding: 100px 0 60px;
}

/* -------- 4. Typography -------- */

h1, h2, h3 {
  font-family: var(--ff-hero);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 18px;
}

h1 { font-size: clamp(36px, 4.5vw, 52px); }
h2 { font-size: clamp(28px, 3vw, 36px); }
h3 { font-size: clamp(20px, 2.2vw, 26px); }

p { margin: 0 0 16px; }

.eyebrow {
  font-family: var(--ff-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink-mute);
}

.muted { color: var(--ink-dim); }
.faint { color: var(--ink-mute); }
.mono  { font-family: var(--ff-mono); }

.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* -------- 5. Logo -------- */

.logo {
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: 30px;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 144, "SOFT" 40;
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
}

.logo-dot {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* -------- 6. Nav (fixed) -------- */

nav.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(240, 242, 244, 0.82);
  border-bottom: 1px solid rgba(228, 231, 234, 0.85);
}

.nav-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
}

.nav-links {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 32px;
  align-items: center;
  list-style: none;
}

.nav-link {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 400;
  transition: color 0.2s;
  position: relative;
  padding: 4px 0;
}

.nav-link:hover { color: var(--ink); }

.nav-link--active {
  color: var(--ink);
  font-weight: 500;
}

.nav-link--active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.nav-cta {
  display: flex;
  gap: 10px;
  align-items: center;
}

.credit-badge {
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--ink-dim);
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: border-color 0.15s ease;
}

a.credit-badge {
  text-decoration: none;
}

a.credit-badge:hover {
  border-color: var(--border-hi);
  color: var(--ink);
}

/* -------- 6b. User menu -------- */

.user-menu {
  position: relative;
}

.user-menu-trigger {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease;
  border: none;
  padding: 0;
}
.user-menu-trigger:hover {
  transform: scale(1.05);
}

.user-avatar {
  font-family: var(--ff-body);
  font-size: 14px;
  font-weight: 500;
  color: #FFFFFF;
  line-height: 1;
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  min-width: 200px;
  padding: 6px;
  z-index: 200;
}

.user-menu-email {
  padding: 10px 12px 8px;
  font-size: 12px;
  color: var(--ink-dim);
  font-family: var(--ff-mono);
  word-break: break-all;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.user-menu-item {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  background: transparent;
  border: none;
  font-size: 14px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: background 0.15s ease;
}
.user-menu-item:hover {
  background: var(--bg-soft);
}

.user-menu-logout {
  color: var(--ink-dim);
  border-top: 1px solid var(--border);
  margin-top: 4px;
  padding-top: 12px;
  border-radius: 0 0 6px 6px;
}

/* -------- 6c. Mobile menu -------- */

.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  padding: 8px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--border);
  transition: border-color 0.15s ease;
}
.nav-mobile-toggle:hover {
  border-color: var(--border-hi);
}

.nav-mobile-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-mobile-toggle.open .nav-mobile-toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-mobile-toggle.open .nav-mobile-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-mobile-toggle.open .nav-mobile-toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-mobile-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 20px;
  right: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  padding: 8px;
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-mobile-menu a,
.nav-mobile-menu button {
  display: block;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 15px;
  color: var(--ink-soft);
  text-align: left;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}
.nav-mobile-menu a:hover,
.nav-mobile-menu button:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

.nav-mobile-menu a.nav-link--active {
  color: var(--ink);
  font-weight: 500;
  background: var(--bg-soft);
}
.nav-mobile-menu a.nav-link--active::after {
  display: none;
}

.nav-mobile-cta {
  margin-top: 6px;
  background: var(--ink) !important;
  color: #FFFFFF !important;
  text-align: center !important;
  font-weight: 500;
}
.nav-mobile-cta:hover {
  background: #000 !important;
}

.nav-mobile-logout {
  color: var(--ink-dim) !important;
  border-top: 1px solid var(--border) !important;
  border-radius: 0 0 8px 8px !important;
  margin-top: 6px;
}

/* -------- 6d. Skeleton -------- */

@keyframes nav-skeleton-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.8; }
}

.nav-skeleton {
  display: inline-block;
  background: var(--border);
  border-radius: 100px;
  animation: nav-skeleton-pulse 1.4s ease-in-out infinite;
}

.nav-skeleton--link {
  width: 60px;
  height: 14px;
  border-radius: 4px;
}

.nav-skeleton--btn {
  width: 120px;
  height: 34px;
}

.nav-skeleton--pill {
  width: 80px;
  height: 28px;
}

/* -------- 7. Buttons -------- */

.btn {
  font-family: var(--ff-body);
  font-size: 14px;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  letter-spacing: -0.005em;
  white-space: nowrap;
}

.btn-ghost {
  color: var(--ink-soft);
  background: transparent;
}
.btn-ghost:hover {
  color: var(--ink);
  background: rgba(22, 19, 16, 0.04);
}

.btn-primary {
  background: var(--ink);
  color: #FFFFFF;
  font-weight: 500;
}
.btn-primary:hover {
  background: #000;
  transform: translateY(-1px);
}

.btn-outline {
  background: var(--surface);
  border-color: var(--border-hi);
  color: var(--ink);
}
.btn-outline:hover {
  border-color: var(--ink);
}

.btn-lg {
  padding: 13px 24px;
  font-size: 15px;
  border-radius: 10px;
}

.btn-block {
  width: 100%;
}

/* -------- 8. Forms -------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.field-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
}

.field-input {
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  transition: border-color 0.15s ease;
}
.field-input:focus {
  outline: none;
  border-color: var(--ink);
}

.field-help {
  font-size: 13px;
  color: var(--ink-dim);
}

/* -------- 9. Cards -------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
}

.card-highlighted {
  border-color: var(--ink);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

/* -------- 10. Footer -------- */

footer.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  padding: 28px 0;
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 13px;
  color: var(--ink-dim);
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--ink); }

.footer-meta {
  font-size: 13px;
  color: var(--ink-mute);
}

/* -------- 11. Utilities -------- */

.center { text-align: center; }
.hidden { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.stack { display: flex; flex-direction: column; }
.stack-2 > * + * { margin-top: 8px; }
.stack-3 > * + * { margin-top: 12px; }
.stack-4 > * + * { margin-top: 16px; }
.stack-5 > * + * { margin-top: 24px; }
.stack-6 > * + * { margin-top: 32px; }

.row { display: flex; }
.row-between { justify-content: space-between; }
.row-gap-3 { gap: 12px; }
.row-gap-4 { gap: 16px; }
.row-gap-5 { gap: 24px; }

/* -------- 12. Mobile -------- */

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-mobile-toggle { display: flex; }

  .container, .container-narrow { padding: 0 20px; }
  .page-main { padding: 100px 0 60px; }

  .nav-inner { padding: 14px 20px; }
}

@media (min-width: 769px) {
  .nav-mobile-menu { display: none !important; }
}
