/* ==========================================================================
   GenZdukan — Base Styles
   CSS reset, typography, and global utility classes.
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 100%; /* 16px base */
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

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

/* ── Typography ───────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--color-primary-dark);
  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 {
  margin-bottom: var(--space-md);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-accent);
}

strong, b {
  font-weight: var(--weight-semibold);
}

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

/* ── Images ───────────────────────────────────────────────────────────────── */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

img {
  object-fit: cover;
}

/* ── Form Elements ────────────────────────────────────────────────────────── */
button, input, select, textarea {
  font: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ── Table ────────────────────────────────────────────────────────────────── */
table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

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

/* ── Scrollbar ────────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--color-text-muted);
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-secondary);
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

/* ── Container ────────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

.container--narrow {
  max-width: var(--container-narrow);
}

/* ── Section Spacing ──────────────────────────────────────────────────────── */
.section {
  padding-block: var(--space-4xl);
}

.section--alt {
  background-color: var(--color-bg-alt);
}

/* ── Section Title ────────────────────────────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-title {
  font-size: var(--text-4xl);
  font-weight: var(--weight-extrabold);
  color: var(--color-primary-dark);
  margin-bottom: var(--space-sm);
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: var(--color-accent);
  border-radius: var(--radius-pill);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin-inline: auto;
  margin-top: var(--space-lg);
}

/* ── Accessibility ────────────────────────────────────────────────────────── */
.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;
}

/* ── Text Utilities ───────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-accent { color: var(--color-accent); }
.text-gold   { color: var(--color-gold); }
.text-muted  { color: var(--color-text-muted); }

/* ── Flex Utilities ───────────────────────────────────────────────────────── */
.flex { display: flex; }
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}
.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.flex-column {
  display: flex;
  flex-direction: column;
}
.flex-wrap { flex-wrap: wrap; }
.gap-xs  { gap: var(--space-xs); }
.gap-sm  { gap: var(--space-sm); }
.gap-md  { gap: var(--space-md); }
.gap-lg  { gap: var(--space-lg); }
.gap-xl  { gap: var(--space-xl); }
.gap-2xl { gap: var(--space-2xl); }
