/* ============================================
   AI Guide — Base / Reset / Typography
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-relaxed);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-primary-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

ul,
ol {
  list-style: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
}

button {
  cursor: pointer;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-text);
}

h1 {
  font-size: var(--font-size-5xl);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--font-size-4xl);
  letter-spacing: -0.01em;
}

h3 {
  font-size: var(--font-size-2xl);
}

h4 {
  font-size: var(--font-size-xl);
}

h5 {
  font-size: var(--font-size-lg);
}

h6 {
  font-size: var(--font-size-base);
}

p {
  margin-bottom: var(--space-md);
}

p:last-child {
  margin-bottom: 0;
}

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

/* --- Utility Classes --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

.section {
  padding-top: var(--section-pad);
  padding-bottom: var(--section-pad);
}

.section--dark {
  background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-primary-dark) 100%);
  color: var(--color-text-on-dark);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4,
.section--dark h5,
.section--dark h6 {
  color: var(--color-white);
}

.section--dark p {
  color: var(--color-text-on-dark-muted);
}

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

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--color-text-muted);
}

/* --- Scroll Animation Base --- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays for grid children */
.fade-up.delay-1 { transition-delay: 0.1s; }
.fade-up.delay-2 { transition-delay: 0.2s; }
.fade-up.delay-3 { transition-delay: 0.3s; }
.fade-up.delay-4 { transition-delay: 0.4s; }
.fade-up.delay-5 { transition-delay: 0.5s; }
.fade-up.delay-6 { transition-delay: 0.6s; }
.fade-up.delay-7 { transition-delay: 0.7s; }
.fade-up.delay-8 { transition-delay: 0.8s; }

/* --- Screen Reader Only --- */
.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;
}

/* --- Responsive Font Scaling --- */
@media (max-width: 1024px) {
  h1 { font-size: var(--font-size-4xl); }
  h2 { font-size: var(--font-size-3xl); }
}

@media (max-width: 768px) {
  h1 { font-size: var(--font-size-3xl); }
  h2 { font-size: var(--font-size-2xl); }
  h3 { font-size: var(--font-size-xl); }
  .section { padding-top: var(--space-3xl); padding-bottom: var(--space-3xl); }
  .container { padding-left: var(--space-md); padding-right: var(--space-md); }
}
