/* ==========================================================================
   BASE & RESET STYLES - VIBRANT & EXPRESSIVE STUDIO ATMOSPHERE
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-ink);
  background-color: var(--color-surface-bg);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  max-width: 100%;
  width: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  position: relative;
  max-width: 100%;
  width: 100%;
  overflow-x: hidden;
  background-color: var(--color-surface-bg);
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(245, 158, 11, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 20%, rgba(59, 130, 246, 0.09) 0%, transparent 45%),
    radial-gradient(circle at 50% 65%, rgba(16, 185, 129, 0.07) 0%, transparent 50%),
    linear-gradient(to right, rgba(15, 23, 42, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 40px 40px, 40px 40px;
}

/* Custom Text Selection */
::selection {
  background: #FDE68A;
  color: #0F172A;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.15;
  color: var(--color-ink);
  letter-spacing: -0.025em;
  word-break: break-word;
}

h1 {
  font-size: clamp(2.2rem, 5vw + 0.5rem, 4.2rem);
}

h2 {
  font-size: clamp(1.8rem, 3.5vw + 0.5rem, 3rem);
}

h3 {
  font-size: clamp(1.3rem, 2vw + 0.5rem, 2rem);
}

h4 {
  font-size: 1.22rem;
}

p {
  color: var(--color-ink-muted);
  font-size: 1.05rem;
  line-height: 1.65;
  word-break: break-word;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button, input, select, textarea {
  font: inherit;
  max-width: 100%;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
  box-sizing: border-box;
}

.section {
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-3xl);
  position: relative;
  overflow: hidden;
}

/* Rendering performance: defer off-screen section layout and paint */
.section:not(.hero) {
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}

@media (max-width: 640px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
  .section {
    padding-top: 44px;
    padding-bottom: 44px;
  }
}

/* Accessibility Focus States */
:focus-visible {
  outline: 2px solid var(--color-blue);
  outline-offset: 3px;
}

/* Skip link for screen readers */
.skip-link {
  position: absolute;
  top: -999px;
  left: 20px;
  background: var(--color-amber-light);
  color: var(--color-ink);
  padding: 10px 16px;
  border: var(--border-thick);
  box-shadow: var(--shadow-brutal);
  font-weight: 700;
  z-index: 9999;
}

.skip-link:focus {
  top: 20px;
}
