/* ── Reset & Base ────────────────────────────────────────────────────────── */

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  color-scheme: dark light;
}

body {
  font-family: var(--prodigi-font-family);
  font-size: var(--prodigi-text-base);
  font-weight: var(--prodigi-body-weight);
  line-height: var(--prodigi-body-line-height);
  color: var(--prodigi-text-primary);
  background-color: var(--prodigi-bg);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Noise texture overlay (decorative) ─────────────────────────────────── */
.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--prodigi-z-noise);
  pointer-events: none;
  opacity: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  background-repeat: repeat;
}

/* ── Typography base ─────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--prodigi-heading-weight);
  line-height: var(--prodigi-heading-line-height);
  letter-spacing: var(--prodigi-heading-tracking);
  color: var(--prodigi-text-primary);
}

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

p {
  font-size: var(--prodigi-text-base);
  line-height: var(--prodigi-body-line-height);
  color: var(--prodigi-text-primary);
}

strong { font-weight: 700; }
em     { font-style: normal; font-weight: 500; }

/* ── Media ───────────────────────────────────────────────────────────────── */
img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ── Links ───────────────────────────────────────────────────────────────── */
a {
  color: inherit;
  text-decoration: none;
  transition: var(--prodigi-transition-colors);
}

a:hover {
  color: var(--prodigi-magenta);
}

/* ── Focus visible (WCAG 2.1 AA) ─────────────────────────────────────────── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--prodigi-magenta);
  outline-offset: 3px;
  border-radius: var(--prodigi-radius-sm);
}

/* ── Lists ───────────────────────────────────────────────────────────────── */
ul,
ol {
  list-style: none;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

/* ── Form elements ───────────────────────────────────────────────────────── */
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* ── SVG ─────────────────────────────────────────────────────────────────── */
svg {
  display: inline-block;
  vertical-align: middle;
  fill: currentColor;
}

/* ── Selection ───────────────────────────────────────────────────────────── */
::selection {
  background: #FF008C;
  color: var(--prodigi-white);
}

/* ── Scrollbar (webkit) ──────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--prodigi-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--prodigi-border);
  border-radius: var(--prodigi-radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--prodigi-magenta);
}
