/* ===================================================================
   BASE STYLES — PromithicAI v1.1
   =================================================================== */

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

/* ── Root ── */
html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: var(--leading-normal);
  min-height: 100vh;
  transition: background-color var(--transition-base), color var(--transition-base);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-full);
  transition: background var(--transition-fast);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-cyan); }
* { scrollbar-width: thin; scrollbar-color: var(--border) var(--bg-secondary); }

/* ── Selection ── */
::selection {
  background: var(--glow-cyan);
  color: var(--accent-cyan);
}

/* ── Focus ── */
:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p { line-height: var(--leading-relaxed); }
a { text-decoration: none; color: inherit; transition: color var(--transition-fast); }
a:hover { color: var(--accent-cyan); }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; font-family: var(--font-sans); color: inherit; }
input, textarea, select { font-family: var(--font-sans); color: inherit; }
ul, ol { list-style: none; }
code, pre { font-family: var(--font-mono); }

/* ── Layout Containers ── */
.container {
  width: 100%;
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
}

.container-sm {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
}

.container-xs {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
}

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

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

.text-cyan    { color: var(--accent-cyan) !important; }
.text-violet  { color: var(--accent-violet) !important; }
.text-green   { color: var(--accent-green) !important; }
.text-orange  { color: var(--accent-orange) !important; }
.text-red     { color: var(--accent-red) !important; }
.text-muted   { color: var(--text-secondary) !important; }
.text-primary { color: var(--text-primary) !important; }

.font-mono { font-family: var(--font-mono); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

.border { border: 1px solid var(--border); }
.border-glow { border-color: var(--border-glow); box-shadow: var(--shadow-glow-cyan); }

.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.mt-auto { margin-top: auto; }
.mb-auto { margin-bottom: auto; }
.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }

.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.p-8 { padding: 32px; }

.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.pointer-events-none { pointer-events: none; }
.user-select-none { user-select: none; }

/* ── Page wrapper (for nav offset) ── */
.page-wrapper {
  padding-top: var(--nav-height);
  min-height: 100vh;
}

/* ── Divider ── */
.divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

.divider-vertical {
  width: 1px;
  height: 100%;
  background: var(--border);
}

/* ── Backdrop blur glass effect ── */
.glass {
  background: rgba(26, 34, 53, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
}

[data-theme="light"] .glass {
  background: rgba(255, 255, 255, 0.8);
}

/* ── Section spacing ── */
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.section-lg { padding: 120px 0; }

/* ── Grid ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-2xl); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .section-lg { padding: 80px 0; }
}
