/* ===== BASE STYLES ===== */

/* Typography System */
:root {
  /* Font Weights */
  --font-thin: 100;
  --font-extra-light: 200;
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extra-bold: 800;
  --font-black: 900;
}

/* Base typography */
h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6 {
  font-family: var(--font-display);
  font-weight: 400;
  margin: 0 0 1rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1, .h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2, .h2 { font-size: clamp(2rem, 5vw, 4rem); }
h3, .h3 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h4, .h4 { font-size: clamp(1.25rem, 2.5vw, 2rem); }
h5, .h5 { font-size: 1rem; }
h6, .h6 { font-size: 0.875rem; }

p {
  margin: 0 0 1rem;
  line-height: 1.7;
}

/* Display Headings */
.u-display-1 {
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0;
}

.u-display-2 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 6rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
}

/* Text utilities */
.u-text-sm { font-size: 0.875rem; }
.u-text-base { font-size: 1rem; }
.u-text-lg { font-size: 1.125rem; }
.u-text-xl { font-size: 1.25rem; }
.u-text-2xl { font-size: 1.5rem; }

.u-font-light { font-weight: 300; }
.u-font-normal { font-weight: 400; }
.u-font-medium { font-weight: 500; }
.u-font-bold { font-weight: 700; }

.u-uppercase { text-transform: uppercase; }
.u-lowercase { text-transform: lowercase; }
.u-capitalize { text-transform: capitalize; }

/* Layout helpers */
.u-flex { display: flex; }
.u-flex-center { display: flex; align-items: center; justify-content: center; }
.u-flex-between { display: flex; align-items: center; justify-content: space-between; }
.u-flex-col { display: flex; flex-direction: column; }

.u-grid {
  display: grid;
  gap: var(--space-md);
}

.u-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.u-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

/* Spacing utilities */
.u-mt-xs { margin-top: var(--space-xs); }
.u-mt-sm { margin-top: var(--space-sm); }
.u-mt-md { margin-top: var(--space-md); }
.u-mt-lg { margin-top: var(--space-lg); }
.u-mt-xl { margin-top: var(--space-xl); }

.u-mb-xs { margin-bottom: var(--space-xs); }
.u-mb-sm { margin-bottom: var(--space-sm); }
.u-mb-md { margin-bottom: var(--space-md); }
.u-mb-lg { margin-bottom: var(--space-lg); }
.u-mb-xl { margin-bottom: var(--space-xl); }

.u-py-xs { padding-top: var(--space-xs); padding-bottom: var(--space-xs); }
.u-py-sm { padding-top: var(--space-sm); padding-bottom: var(--space-sm); }
.u-py-md { padding-top: var(--space-md); padding-bottom: var(--space-md); }
.u-py-lg { padding-top: var(--space-lg); padding-bottom: var(--space-lg); }

/* Visual utilities */
.u-divider {
  width: 100%;
  height: 1px;
  background: var(--color-muted-white);
  opacity: 0.15;
}

.u-divider--vertical {
  width: 1px;
  height: 2rem;
  background: var(--color-muted-white);
  opacity: 0.2;
}

.u-overlay-gradient {
  position: relative;
}

.u-overlay-gradient::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 0%, rgba(5, 5, 5, 0.95) 80%);
  pointer-events: none;
}

/* Aspect ratio helpers */
.u-aspect-16-9 {
  aspect-ratio: 16 / 9;
  position: relative;
}

.u-aspect-4-3 {
  aspect-ratio: 4 / 3;
  position: relative;
}

.u-aspect-square {
  aspect-ratio: 1;
  position: relative;
}

/* Image frame helpers */
.u-img-frame {
  position: relative;
  overflow: hidden;
}

.u-img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}

.u-img-frame:hover img {
  transform: scale(1.03);
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--color-crimson);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-deep-red);
}

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

/* Hidden but accessible */
.u-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
