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

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

body {
  min-height: 100vh;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

button {
  background: none;
  border: none;
  cursor: pointer;
}

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

ul, ol {
  list-style: none !important;
}

/* ===== DESIGN TOKENS ===== */
:root {
  /* Colors */
  --felt-green: #0B3D2E;
  --felt-green-deep: #06261C;
  --charcoal: #121212;
  --charcoal-elevated: #1E1E1E;
  --ivory: #F5F0E6;
  --ivory-muted: #B8B2A6;
  --amber: #D98E2B;
  --amber-bright: #F0A93B;
  --crimson: #B33A3A;
  --border-subtle: #2E2E2E;

  /* Typography */
  --font-heading: "Oswald", sans-serif;
  --font-body: "Source Serif Pro", serif;

  --text-display: 4.5rem;
  --text-h1: 3.5rem;
  --text-h2: 2.5rem;
  --text-h3: 1.75rem;
  --text-h4: 1.25rem;
  --text-body-large: 1.25rem;
  --text-body: 1rem;
  --text-body-small: 0.875rem;
  --text-caption: 0.75rem;

  --leading-display: 1.05;
  --leading-h1: 1.1;
  --leading-h2: 1.15;
  --leading-h3: 1.2;
  --leading-h4: 1.3;
  --leading-body-large: 1.6;
  --leading-body: 1.65;
  --leading-body-small: 1.6;
  --leading-caption: 1.5;

  /* Spacing */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;

  /* Containers */
  --container-max: 1200px;
  --container-padding-mobile: 24px;
  --container-padding-desktop: 48px;

  /* Surfaces */
  --surface-page: var(--charcoal);
  --surface-elevated: var(--charcoal-elevated);
  --surface-brand: var(--felt-green);
  --surface-brand-deep: var(--felt-green-deep);

  /* Borders */
  --border-width: 1px;
  --border-style: solid;
  --border-color: var(--border-subtle);
  --border: var(--border-width) var(--border-style) var(--border-color);
  --border-amber: var(--border-width) var(--border-style) var(--amber);

  /* Shadows */
  --shadow-modal: 0 4px 12px rgba(0, 0, 0, 0.4);

  /* Radii */
  --radius-none: 0px;
  --radius-sm: 2px;
  --radius-md: 4px;

  /* Transitions */
  --transition-fast: 150ms ease-out;
  --transition-scroll: 200ms ease-out;

  /* Focus */
  --focus-ring: 2px solid var(--amber);
  --focus-offset: 2px;

  /* Navigation */
  --nav-height: 64px;
  --nav-bg-opacity: 0.95;

  /* Z-index layers */
  --z-nav: 100;
  --z-modal: 200;
  --z-overlay: 150;
}

/* ===== DOCUMENT TYPOGRAPHY ===== */
body {
  background-color: var(--surface-page);
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  text-transform: uppercase;
  color: var(--ivory);
  letter-spacing: 0.01em;
}

h1 {
  font-size: var(--text-h1);
  line-height: var(--leading-h1);
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-block-end: var(--space-md);
}

h2 {
  font-size: var(--text-h2);
  line-height: var(--leading-h2);
  font-weight: 600;
  margin-block-end: var(--space-md);
}

h3 {
  font-size: var(--text-h3);
  line-height: var(--leading-h3);
  font-weight: 500;
  margin-block-end: var(--space-sm);
}

h4 {
  font-size: var(--text-h4);
  line-height: var(--leading-h4);
  font-weight: 500;
  margin-block-end: var(--space-sm);
}

h5, h6 {
  font-size: var(--text-body);
  line-height: var(--leading-body);
  font-weight: 500;
  margin-block-end: var(--space-sm);
}

p {
  margin-block-end: var(--space-md);
  font-size: var(--text-body);
  line-height: var(--leading-body);
}

p:last-child {
  margin-block-end: 0;
}

blockquote {
  margin-block-end: var(--space-md);
  padding-inline-start: var(--space-md);
  border-inline-start: 2px solid var(--amber);
  font-size: var(--text-body-large);
  line-height: var(--leading-body-large);
  color: var(--ivory);
}

blockquote:last-child {
  margin-block-end: 0;
}

ul, ol {
  margin-block-end: var(--space-md);
  padding-inline-start: var(--space-md);
}

ul:last-child, ol:last-child {
  margin-block-end: 0;
}

li {
  margin-block-end: var(--space-2xs);
}

li:last-child {
  margin-block-end: 0;
}

a {
  color: var(--amber);
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--amber-bright);
  text-decoration: underline;
}

strong, b {
  font-weight: 700;
  color: var(--ivory);
}

em, i {
  font-style: italic;
}

small {
  font-size: var(--text-body-small);
  line-height: var(--leading-body-small);
}

hr {
  border: none;
  border-top: var(--border);
  margin-block: var(--space-lg);
}

code, pre {
  font-family: monospace;
  font-size: 0.9em;
  background-color: var(--charcoal-elevated);
  padding: var(--space-2xs) var(--space-xs);
  border-radius: var(--radius-sm);
}

pre {
  padding: var(--space-sm);
  overflow-x: auto;
}

/* ===== MEDIA DEFAULTS ===== */
img {
  border-radius: var(--radius-none);
}

figure {
  margin-block-end: var(--space-md);
}

figure:last-child {
  margin-block-end: 0;
}

figcaption {
  font-family: var(--font-heading);
  font-size: var(--text-caption);
  line-height: var(--leading-caption);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ivory-muted);
  margin-block-start: var(--space-2xs);
}

/* ===== FORM DEFAULTS ===== */
label {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--text-caption);
  line-height: var(--leading-caption);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ivory);
  margin-block-end: var(--space-2xs);
}

input,
textarea,
select {
  width: 100%;
  background-color: var(--charcoal-elevated);
  border: var(--border);
  border-radius: var(--radius-none);
  padding: 12px;
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  transition: border-color var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
  border-color: var(--amber);
}

input::placeholder,
textarea::placeholder {
  color: var(--ivory-muted);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23B8B2A6' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-inline-end: 36px;
}

fieldset {
  border: var(--border);
  padding: var(--space-md);
  margin-block-end: var(--space-md);
}

legend {
  font-family: var(--font-heading);
  font-size: var(--text-caption);
  line-height: var(--leading-caption);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ivory);
  padding-inline: var(--space-2xs);
}

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

.container-full {
  width: 100%;
  padding-inline: 0;
}

.container-full .container {
  padding-inline: var(--container-padding-mobile);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: var(--text-body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1;
  padding: 16px 32px;
  border-radius: var(--radius-none);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

.btn-primary {
  background-color: var(--amber);
  color: var(--charcoal);
  border-color: var(--amber);
}

.btn-primary:hover {
  background-color: var(--amber-bright);
  border-color: var(--amber-bright);
  color: var(--charcoal);
  text-decoration: none;
}

.btn-secondary {
  background-color: transparent;
  color: var(--amber);
  border-color: var(--amber);
}

.btn-secondary:hover {
  background-color: var(--amber);
  border-color: var(--amber);
  color: var(--charcoal);
  text-decoration: none;
}

/* ===== CARDS ===== */
.card {
  background-color: var(--surface-elevated);
  border: var(--border);
  border-radius: var(--radius-none);
  padding: 24px;
}

.card > :last-child {
  margin-block-end: 0;
}

/* ===== BADGES ===== */
.badge {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: var(--text-caption);
  line-height: var(--leading-caption);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background-color: var(--amber);
  color: var(--charcoal);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
}

/* ===== NAVIGATION TOGGLE ===== */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

.nav-toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--ivory);
  transition: all var(--transition-fast);
}

/* ===== FOCUS VISIBLE ===== */
:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

/* ===== ACCESSIBILITY ===== */
.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;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  z-index: 999;
  background-color: var(--amber);
  color: var(--charcoal);
  padding: var(--space-xs) var(--space-sm);
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border-radius: var(--radius-none);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-sm);
}

/* ===== RESPONSIVE TYPOGRAPHY ===== */
@media (max-width: 1024px) {
  :root {
    --text-display: 3.5rem;
    --text-h1: 2.75rem;
    --text-h2: 2rem;
    --text-h3: 1.5rem;
    --text-h4: 1.125rem;
  }
}

@media (max-width: 768px) {
  :root {
    --text-display: 2.5rem;
    --text-h1: 2.25rem;
    --text-h2: 1.75rem;
    --text-h3: 1.375rem;
    --text-h4: 1.125rem;
    --text-body-large: 1.125rem;
  }
}

@media (max-width: 480px) {
  :root {
    --text-display: 2rem;
    --text-h1: 1.875rem;
    --text-h2: 1.5rem;
    --text-h3: 1.25rem;
    --text-h4: 1.0625rem;
  }
}

/* ===== RESPONSIVE CONTAINERS ===== */
@media (min-width: 768px) {
  .container {
    padding-inline: var(--container-padding-desktop);
  }

  .container-full .container {
    padding-inline: var(--container-padding-desktop);
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
html, body {
  overflow-x: clip;
  max-width: 100%;
}

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