/* ═══════════════════════════════════════════════════════
   NOVA Support Pool — Base / Reset
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;700&display=swap');

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

html {
  height: 100%;
  height: -webkit-fill-available;
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  height: 100%;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--bg-base);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: var(--leading-tight);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
}

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

p  { color: var(--text-secondary); line-height: var(--leading-relaxed); }

a  {
  color: var(--accent-secondary);
  text-decoration: none;
  transition: opacity var(--dur-fast) var(--ease-out);
}
a:hover { opacity: 0.75; }

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  outline: none;
  border: none;
  background: none;
  color: inherit;
}

/* Prevent iOS Safari from auto-zooming the page when an input is focused.
   Safari zooms when font-size < 16px. !important is necessary here because
   component CSS (class selectors, higher specificity) would otherwise win. */
input, textarea, select {
  font-size: 16px !important;
}

button { cursor: pointer; }

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

ul, ol { list-style: none; }

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

/* ── Selection ── */
::selection {
  background: var(--accent-primary-soft);
  color: var(--text-primary);
}

/* ── Scrollbars ── */
::-webkit-scrollbar        { width: 4px; height: 4px; }
::-webkit-scrollbar-track  { background: transparent; }
::-webkit-scrollbar-thumb  { background: var(--border-default); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ── RTL support ── */
[dir="rtl"] { direction: rtl; }
[dir="rtl"] .chat-back-btn svg { transform: scaleX(-1); }

/* ── Utility classes ── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden   { display: none !important; }
.invisible { visibility: hidden; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.w-full { width: 100%; }
.min-w-0 { min-width: 0; }
.flex-1 { flex: 1; }

/* ── Animations ── */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-out {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-8px); }
}
@keyframes slide-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scale-in {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: var(--shadow-glow-primary); }
  50%       { box-shadow: 0 0 40px rgba(124,58,237,0.6); }
}
@keyframes shimmer {
  from { background-position: -200% 0; }
  to   { background-position:  200% 0; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes bounce-in {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.15); }
  80%  { transform: scale(0.95); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-6px); }
}
@keyframes gradient-shift {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}
@keyframes bell-shake {
  0%,100%{ transform: rotate(0); }
  15%    { transform: rotate(12deg); }
  30%    { transform: rotate(-10deg); }
  45%    { transform: rotate(8deg); }
  60%    { transform: rotate(-6deg); }
  75%    { transform: rotate(4deg); }
}
@keyframes count-up {
  from { transform: translateY(6px); opacity: 0; }
  to   { transform: translateY(0);   opacity: 1; }
}
@keyframes neon-pulse {
  0%, 100% { text-shadow: 0 0 8px currentColor; }
  50%       { text-shadow: 0 0 20px currentColor, 0 0 40px currentColor; }
}
@keyframes ripple {
  to { transform: scale(4); opacity: 0; }
}

.animate-fade-in  { animation: fade-in  var(--dur-base) var(--ease-out) both; }
.animate-slide-up { animation: slide-up var(--dur-slow) var(--ease-out) both; }
.animate-scale-in { animation: scale-in var(--dur-base) var(--ease-spring) both; }
