/* ============================================
   LEX & ASSOCIADOS - BASE STYLES
   Typography, global styles, and utilities
   ============================================ */

/* ============================================
   GLOBAL CONTAINER AND LAYOUT
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
}

section {
  padding: clamp(4rem, 8vw, 8rem) 0;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

/* Headings */
h1 {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-spacing-tight);
  line-height: var(--line-height-tight);
}

h2 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-spacing-tight);
  line-height: var(--line-height-tight);
}

h3 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--letter-spacing-tight);
  line-height: var(--line-height-tight);
}

h4 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-tight);
}

h5 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-tight);
}

h6 {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wider);
}

/* Body text */
p {
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

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

/* Links */
a {
  color: var(--color-gold);
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-gold-light);
}

/* Strong and emphasis */
strong, b {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
}

em, i {
  font-style: italic;
}

/* Small text */
small {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */

/* Container variants */
.container--narrow {
  max-width: var(--container-lg);
}

.container--wide {
  max-width: var(--container-2xl);
}

/* Section padding */
.section {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
}

.section--sm {
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
}

.section--lg {
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
}

/* ============================================
   FLEX UTILITIES
   ============================================ */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

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

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-sm {
  gap: var(--space-sm);
}

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

.gap-lg {
  gap: var(--space-lg);
}

/* ============================================
   GRID UTILITIES
   ============================================ */
.grid {
  display: grid;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ============================================
   TEXT UTILITIES
   ============================================ */
.text-center {
  text-align: center;
}

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

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

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

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

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

.font-heading {
  font-family: var(--font-heading);
}

.font-body {
  font-family: var(--font-body);
}

.uppercase {
  text-transform: uppercase;
}

.tracking-wide {
  letter-spacing: var(--letter-spacing-wide);
}

.tracking-wider {
  letter-spacing: var(--letter-spacing-wider);
}

.tracking-widest {
  letter-spacing: var(--letter-spacing-widest);
}

/* ============================================
   SPACING UTILITIES
   ============================================ */
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

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

/* ============================================
   VISIBILITY UTILITIES
   ============================================ */
.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================
   BACKGROUND UTILITIES
   ============================================ */
.bg-navy {
  background-color: var(--color-navy);
}

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

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

/* ============================================
   DECORATIVE ELEMENTS
   ============================================ */
.gold-line {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-gold), var(--color-gold-light));
}

.gold-line--center {
  margin-left: auto;
  margin-right: auto;
}

.gold-line--lg {
  width: 100px;
  height: 3px;
}

.section-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-family: var(--font-body);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wider);
  color: var(--color-gold);
  border: 1px solid var(--color-gold);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
}

/* ============================================
   PAGE LOADING STATE
   ============================================ */
body:not(.loaded) [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
}
