/* MindWave — Reset, typography, primitives, utilities */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, picture, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--color-accent); }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6 { margin: 0; line-height: var(--lh-tight); font-weight: 700; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; border-radius: var(--radius-xs); }

/* Layout primitives */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}
.section { padding: var(--space-9) 0; }
.section--tight { padding: var(--space-8) 0; }
.section-head { max-width: 720px; margin-bottom: var(--space-6); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: var(--fs-xs); letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--color-accent); font-weight: 600; margin-bottom: var(--space-3);
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--color-accent); display: inline-block; }
.section-head.center .eyebrow::before { display: none; }
.section-title { font-size: var(--fs-3xl); letter-spacing: -0.02em; margin-bottom: var(--space-3); }
.section-subtitle { color: var(--color-text-muted); font-size: var(--fs-md); line-height: var(--lh-relaxed); }

/* Grid */
.grid { display: grid; gap: var(--space-5); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: 12px 22px; border-radius: var(--radius-pill);
  font-weight: 600; font-size: var(--fs-sm); letter-spacing: 0.01em;
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  white-space: nowrap; user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--color-accent); color: #0a0a0a; }
.btn--primary:hover { background: var(--color-accent-hover); color: #0a0a0a; box-shadow: var(--shadow-glow); }
.btn--ghost { background: transparent; color: var(--color-text); border: 1px solid var(--color-border-strong); }
.btn--ghost:hover { border-color: var(--color-accent); color: var(--color-accent); }
.btn--dark { background: var(--color-surface-3); color: var(--color-text); }
.btn--dark:hover { background: var(--color-border-strong); }
.btn--lg { padding: 15px 30px; font-size: var(--fs-base); }
.btn--sm { padding: 8px 16px; font-size: var(--fs-xs); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* Pills, badges, chips */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: var(--radius-pill);
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.02em;
  background: var(--color-surface-3); color: var(--color-text-muted);
}
.pill--accent { background: var(--color-accent-soft); color: var(--color-accent); }
.pill--success { background: rgba(46, 204, 113, 0.15); color: var(--color-success); }
.badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  padding: 4px 10px; border-radius: var(--radius-sm);
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.04em;
  background: var(--color-accent); color: #0a0a0a; text-transform: uppercase;
}
.rating { display: inline-flex; align-items: center; gap: 4px; color: var(--color-warning); font-size: var(--fs-sm); }
.rating .count { color: var(--color-text-dim); margin-left: 4px; }

/* Forms */
.field { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-4); }
.label { font-size: var(--fs-sm); color: var(--color-text-muted); font-weight: 500; }
.input, .textarea, .select {
  width: 100%; padding: 12px 14px; background: var(--color-surface-2);
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  color: var(--color-text); font-size: var(--fs-base); transition: border var(--transition-fast), background var(--transition-fast);
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--color-accent); background: var(--color-surface-3); outline: none; }
.input::placeholder, .textarea::placeholder { color: var(--color-text-dim); }
.textarea { resize: vertical; min-height: 120px; }
.field-error { color: var(--color-danger); font-size: var(--fs-xs); min-height: 14px; }
.row { display: flex; gap: var(--space-4); }
.row > * { flex: 1; }

/* Utilities */
.text-muted { color: var(--color-text-muted); }
.text-dim { color: var(--color-text-dim); }
.text-accent { color: var(--color-accent); }
.text-center { text-align: center; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.hidden { display: none !important; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.divider { height: 1px; background: var(--color-border); border: 0; margin: var(--space-6) 0; }
.tag-mono { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--color-text-dim); letter-spacing: 0.04em; }

/* Skeleton shimmer for image placeholders */
.shimmer { background: linear-gradient(110deg, var(--color-surface) 8%, var(--color-surface-3) 18%, var(--color-surface) 33%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
