:root {
  --color-bg: #fffbf0;
  --color-surface: #ffffff;
  --color-primary: #ff3333;
  --color-primary-text: #ffffff;
  --color-secondary: #ffd700;
  --color-secondary-text: #000000;
  --color-text: #0a0a0a;
  --color-text-muted: #4a4a4a;
  --color-border: #000000;
  
  --border-weight: 4px;
  --shadow-offset: 8px;
  --shadow-offset-mobile: 0px;
  
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-24: 24px;
  --space-40: 40px;
  --space-64: 64px;

  --font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  min-width: 0;
}

html {
  font-family: var(--font-family);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  font-size: 16px;
}

body {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, .brand-name {
  font-weight: 900;
  text-transform: uppercase;
  margin-top: 0;
  margin-bottom: var(--space-16);
  line-height: 1.1;
  overflow-wrap: anywhere;
  color: var(--color-text);
}

h1 { font-size: clamp(2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }

p, ul, ol, dl {
  margin-top: 0;
  margin-bottom: var(--space-24);
  overflow-wrap: break-word;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: bold;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 4px dashed var(--color-primary);
  outline-offset: 4px;
}

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-24);
}

/* Header */
.site-header {
  border-bottom: var(--border-weight) solid var(--color-border);
  background-color: var(--color-surface);
  height: 64px;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 100;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 1.2rem;
  color: var(--color-text);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.site-brand:hover {
  text-decoration: none;
}

.site-brand svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-24);
}

.site-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--space-24);
}

.site-nav-list a {
  color: var(--color-text);
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.site-nav-list a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.btn-cta {
  background-color: var(--color-primary);
  color: var(--color-primary-text);
  border: var(--border-weight) solid var(--color-border);
  padding: var(--space-8) var(--space-16);
  font-weight: 900;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 4px 4px 0px var(--color-border);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-cta:hover, .btn-cta:focus {
  text-decoration: none;
  color: var(--color-primary-text);
}

.btn-cta:active {
  transform: translate(4px, 4px);
  box-shadow: 0px 0px 0px var(--color-border);
}

.btn-secondary {
  background-color: var(--color-secondary);
  color: var(--color-secondary-text);
  border: var(--border-weight) solid var(--color-border);
  padding: var(--space-8) var(--space-16);
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 4px 4px 0px var(--color-border);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-secondary:active {
  transform: translate(4px, 4px);
  box-shadow: 0px 0px 0px var(--color-border);
}

.menu-toggle {
  display: none;
  background: var(--color-secondary);
  border: var(--border-weight) solid var(--color-border);
  padding: var(--space-8);
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 4px 4px 0px var(--color-border);
}

/* Main Content */
.main-content {
  flex: 1;
  padding: var(--space-64) 0;
}

.hero {
  margin-bottom: var(--space-64);
  border: var(--border-weight) solid var(--color-border);
  background-color: var(--color-secondary);
  box-shadow: var(--shadow-offset) var(--shadow-offset) 0px var(--color-border);
  padding: var(--space-40);
  display: flex;
  flex-direction: column;
  gap: var(--space-24);
}

.hero p {
  font-size: 1.25rem;
  max-width: 800px;
  font-weight: bold;
}

/* Horizontal Split Card Styles */
.card-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-40);
}

.card {
  display: flex;
  flex-direction: row;
  border: var(--border-weight) solid var(--color-border);
  background-color: var(--color-surface);
  box-shadow: var(--shadow-offset) var(--shadow-offset) 0px var(--color-border);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.card:hover {
  transform: translate(-4px, -4px);
  box-shadow: calc(var(--shadow-offset) + 4px) calc(var(--shadow-offset) + 4px) 0px var(--color-border);
  text-decoration: none;
}

.card-media {
  flex: 0 0 40%;
  border-right: var(--border-weight) solid var(--color-border);
  background-color: var(--color-border);
  position: relative;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-content {
  flex: 1;
  padding: var(--space-24);
  display: flex;
  flex-direction: column;
}

.card-tags {
  display: flex;
  gap: var(--space-8);
  margin-bottom: var(--space-16);
  flex-wrap: wrap;
}

.tag {
  background-color: var(--color-border);
  color: var(--color-surface);
  font-size: 0.75rem;
  font-weight: 900;
  padding: var(--space-4) var(--space-8);
  text-transform: uppercase;
}

.card-title {
  margin-bottom: var(--space-12);
  color: var(--color-primary);
}

.card-excerpt {
  margin-bottom: var(--space-24);
  color: var(--color-text-muted);
  flex-grow: 1;
}

.card-cta {
  align-self: flex-start;
  font-weight: 900;
  text-transform: uppercase;
  border-bottom: 3px solid var(--color-primary);
  padding-bottom: 2px;
  color: var(--color-text);
}

/* Page Content Formatting */
.page-header {
  margin-bottom: var(--space-64);
  border-bottom: var(--border-weight) solid var(--color-border);
  padding-bottom: var(--space-24);
}

.content-block {
  background: var(--color-surface);
  border: var(--border-weight) solid var(--color-border);
  box-shadow: var(--shadow-offset) var(--shadow-offset) 0px var(--color-border);
  padding: var(--space-40);
  margin-bottom: var(--space-64);
}

.content-block img {
  max-width: 100%;
  height: auto;
  border: var(--border-weight) solid var(--color-border);
  margin-bottom: var(--space-24);
  display: block;
}

.content-block h2, .content-block h3 {
  margin-top: var(--space-40);
}

/* Statistics Table / Data */
.stat-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-24);
  border: var(--border-weight) solid var(--color-border);
}

.stat-table th, .stat-table td {
  border: var(--border-weight) solid var(--color-border);
  padding: var(--space-12);
  text-align: left;
}

.stat-table th {
  background-color: var(--color-secondary);
  font-weight: 900;
  text-transform: uppercase;
}

/* Form Styles */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-24);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.form-label {
  font-weight: 900;
  text-transform: uppercase;
}

.form-control {
  border: var(--border-weight) solid var(--color-border);
  padding: var(--space-12);
  font-family: inherit;
  font-size: 1rem;
  background-color: var(--color-bg);
}

.form-control:focus {
  outline: none;
  background-color: var(--color-surface);
  box-shadow: inset 0 0 0 2px var(--color-primary);
}

.form-control.is-invalid {
  border-color: var(--color-primary);
  background-color: #ffe6e6;
}

.error-message {
  color: var(--color-primary);
  font-weight: bold;
  font-size: 0.875rem;
  display: none;
}

.error-message.is-visible {
  display: block;
}

.form-success {
  display: none;
  background-color: var(--color-secondary);
  border: var(--border-weight) solid var(--color-border);
  padding: var(--space-24);
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: var(--space-24);
  box-shadow: 4px 4px 0px var(--color-border);
}

.form-success.is-visible {
  display: block;
}

.map-block {
  border: var(--border-weight) solid var(--color-border);
  height: 300px;
  background: repeating-linear-gradient(
    45deg,
    #e5e5e5,
    #e5e5e5 10px,
    #d3d3d3 10px,
    #d3d3d3 20px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-offset) var(--shadow-offset) 0px var(--color-border);
  margin-top: var(--space-40);
  margin-bottom: var(--space-24);
}

.map-label {
  background-color: var(--color-surface);
  border: var(--border-weight) solid var(--color-border);
  padding: var(--space-16);
  font-weight: 900;
  text-transform: uppercase;
}

/* Footer */
.site-footer {
  border-top: var(--border-weight) solid var(--color-border);
  background-color: var(--color-surface);
  padding: var(--space-64) 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-40);
}

.footer-col h3 {
  font-size: 1.2rem;
  border-bottom: var(--border-weight) solid var(--color-border);
  padding-bottom: var(--space-8);
  margin-bottom: var(--space-16);
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.footer-col a {
  color: var(--color-text);
  font-weight: bold;
}

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

.footer-bottom {
  margin-top: var(--space-40);
  padding-top: var(--space-24);
  border-top: var(--border-weight) solid var(--color-border);
  text-align: center;
  font-weight: bold;
  font-size: 0.9rem;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--color-surface);
  border-top: var(--border-weight) solid var(--color-border);
  padding: var(--space-24);
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
  box-shadow: 0px -4px 0px rgba(0,0,0,1);
}

.cookie-banner.is-visible {
  transform: translateY(0);
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

.cookie-text p {
  margin: 0;
  font-weight: bold;
}

.cookie-actions {
  display: flex;
  gap: var(--space-16);
  flex-wrap: wrap;
}

/* Utilities */
.table-wrapper {
  overflow-x: auto;
  margin-bottom: var(--space-24);
  border: var(--border-weight) solid var(--color-border);
}

.table-wrapper .stat-table {
  margin-bottom: 0;
  border: none;
}

.visually-hidden {
  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;
}

/* Responsive */
@media (max-width: 768px) {
  :root {
    --shadow-offset: 0px;
  }
  
  .site-header {
    height: 52px;
  }
  
  .site-nav {
    position: absolute;
    top: 52px;
    left: 0;
    width: 100%;
    background-color: var(--color-surface);
    border-bottom: var(--border-weight) solid var(--color-border);
    flex-direction: column;
    padding: var(--space-24);
    display: none;
    box-shadow: 0px 4px 0px var(--color-border);
  }
  
  .site-nav.is-visible {
    display: flex;
  }
  
  .site-nav-list {
    flex-direction: column;
    width: 100%;
    text-align: center;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .header-cta {
    display: none;
  }
  
  .site-nav .header-cta {
    display: inline-flex;
    margin-top: var(--space-16);
  }

  .card {
    flex-direction: column;
  }

  .card-media {
    border-right: none;
    border-bottom: var(--border-weight) solid var(--color-border);
    height: 200px;
  }

  .hero, .content-block {
    padding: var(--space-24);
    box-shadow: none;
  }
}

@media (max-width: 400px) {
  .site-header {
    height: 48px;
  }
  
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  
  .cookie-actions {
    flex-direction: column;
  }
  
  .btn-cta, .btn-secondary {
    width: 100%;
    text-align: center;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}