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

:root {
  --space-4: 4px;
  --space-8: 8px;
  --space-16: 16px;
  --space-24: 24px;
  --space-40: 40px;
  --space-64: 64px;
  
  --color-bg: #ffffff;
  --color-surface: #f4f4f4;
  --color-text: #111111;
  --color-text-light: #555555;
  --color-accent: #0033cc;
  --color-accent-hover: #002299;
  --color-error: #d90429;
  
  --font-sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  
  --header-height: 64px;
}

@media (max-width: 767px) {
  :root {
    --header-height: 52px;
  }
}

html {
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: var(--color-bg);
  font-size: 16px;
  line-height: 1.5;
  scroll-behavior: smooth;
}

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

/* TYPOGRAPHY - Swiss Minimalist */
h1, h2, h3, h4, h5, h6, .brand-name, nav, .wrap-anywhere {
  overflow-wrap: anywhere;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  margin-bottom: var(--space-40);
}

h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: var(--space-24);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: var(--space-16);
}

p {
  margin-bottom: var(--space-24);
  max-width: 70ch;
  font-size: 1.125rem;
  color: var(--color-text-light);
}

a {
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: color 0.2s;
}

a:hover {
  color: var(--color-accent);
}

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

/* ACCESSIBILITY */
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

@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;
  }
}

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

.section {
  padding: var(--space-64) 0;
}

/* Swiss Asymmetry Setup */
.grid-asymmetric {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-40);
  min-width: 0;
}

@media (min-width: 768px) {
  .grid-asymmetric {
    grid-template-columns: 7fr 5fr;
    align-items: center;
  }
  .grid-asymmetric.reverse {
    grid-template-columns: 5fr 7fr;
  }
}

.grid-cols-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-40);
  min-width: 0;
}
@media (min-width: 768px) {
  .grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* HEADER */
.site-header {
  height: var(--header-height);
  border-bottom: 1px solid var(--color-surface);
  display: flex;
  align-items: center;
  background: var(--color-bg);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  min-width: 0;
}
.brand-mark {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.desktop-nav {
  display: none;
}
@media (min-width: 768px) {
  .desktop-nav {
    display: flex;
    gap: var(--space-24);
    align-items: center;
  }
  .desktop-nav a {
    text-decoration: none;
    font-weight: 500;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-16);
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-16);
  background-color: var(--color-text);
  color: var(--color-bg);
  text-decoration: none;
  font-weight: 700;
  border: none;
  cursor: pointer;
  min-width: 0;
  transition: background-color 0.2s;
}
.btn:hover {
  background-color: var(--color-accent);
  color: var(--color-bg);
}
.btn-primary {
  background-color: var(--color-accent);
}
.btn-primary:hover {
  background-color: var(--color-accent-hover);
}
.btn-outline {
  background-color: transparent;
  color: var(--color-text);
  border: 2px solid var(--color-text);
}
.btn-outline:hover {
  background-color: var(--color-text);
  color: var(--color-bg);
}

/* MOBILE MENU OVERLAY */
.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-4);
  display: block;
}
@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }
}
.menu-toggle svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.mobile-menu {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  height: calc(100vh - var(--header-height));
  background-color: var(--color-bg);
  padding: var(--space-40) var(--space-24);
  display: flex;
  flex-direction: column;
  gap: var(--space-24);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 50;
  overflow-y: auto;
}
.mobile-menu.is-visible {
  transform: translateX(0);
}
.mobile-menu a {
  font-size: 2rem;
  text-decoration: none;
  font-weight: 700;
}

/* CARDS - Border Accent Style */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-24);
  min-width: 0;
}
@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
}

.card-accent {
  background-color: var(--color-surface);
  border-left: 6px solid var(--color-accent);
  padding: var(--space-24);
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.card-accent:hover {
  background-color: #eaeaea;
  color: inherit;
}
.card-accent h3 {
  margin: 0;
  font-size: 1.5rem;
}
.card-accent p {
  margin: 0;
  font-size: 1rem;
}
.card-meta {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  margin-bottom: var(--space-8);
}

/* STATS */
.stat-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stat-value {
  font-size: clamp(3rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1;
  color: var(--color-accent);
}
.stat-label {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* ARTICLE / CONTENT PAGES */
.article-header {
  padding: var(--space-64) 0 var(--space-40);
  border-bottom: 2px solid var(--color-text);
  margin-bottom: var(--space-40);
}
.article-content h2 {
  margin-top: var(--space-64);
}
.article-content h3 {
  margin-top: var(--space-40);
}
.article-content ul, .article-content ol {
  margin-bottom: var(--space-24);
  padding-left: var(--space-24);
  max-width: 70ch;
  font-size: 1.125rem;
  color: var(--color-text-light);
}
.article-content li {
  margin-bottom: var(--space-8);
}

/* DATA TABLES */
.table-wrapper {
  overflow-x: auto;
  margin-bottom: var(--space-24);
  max-width: 100%;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}
th, td {
  text-align: left;
  padding: var(--space-16);
  border-bottom: 1px solid var(--color-surface);
}
th {
  font-weight: 700;
  background-color: var(--color-surface);
  color: var(--color-text);
}

/* FORMS */
.form-group {
  margin-bottom: var(--space-24);
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}
label {
  font-weight: 700;
  font-size: 1rem;
}
input, textarea {
  width: 100%;
  padding: var(--space-16);
  font-family: inherit;
  font-size: 1rem;
  border: 2px solid var(--color-surface);
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color 0.2s;
  min-width: 0;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  background: var(--color-bg);
}
.form-error {
  color: var(--color-error);
  font-size: 0.875rem;
  font-weight: 700;
  display: none;
}
input.is-invalid, textarea.is-invalid {
  border-color: var(--color-error);
}
input.is-invalid ~ .form-error, textarea.is-invalid ~ .form-error {
  display: block;
}

/* MAP BLOCK */
.map-block {
  width: 100%;
  height: 400px;
  background: linear-gradient(135deg, var(--color-surface) 0%, #e0e0e0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-left: 6px solid var(--color-accent);
}
.map-marker-icon {
  width: 48px;
  height: 48px;
  fill: var(--color-accent);
}

/* FOOTER */
.site-footer {
  margin-top: auto;
  background-color: var(--color-text);
  color: var(--color-bg);
  padding: var(--space-64) 0;
}
.site-footer a {
  color: var(--color-bg);
  text-decoration: none;
}
.site-footer a:hover {
  text-decoration: underline;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-40);
  min-width: 0;
}
@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}
.footer-col h4 {
  font-size: 1.25rem;
  margin-bottom: var(--space-16);
  color: var(--color-surface);
}
.footer-col ul {
  list-style: none;
  padding: 0;
}
.footer-col li {
  margin-bottom: var(--space-8);
}
.footer-bottom {
  margin-top: var(--space-64);
  padding-top: var(--space-24);
  border-top: 1px solid rgba(255,255,255,0.2);
  font-size: 0.875rem;
  color: #aaaaaa;
}

/* COOKIE BANNER */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--color-bg);
  border-top: 4px solid var(--color-accent);
  padding: var(--space-24);
  z-index: 100;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.1);
  display: none; /* hidden by default, script toggles */
}
.cookie-banner.is-visible {
  display: block;
}
.cookie-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  max-width: 1200px;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .cookie-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}
.cookie-text {
  font-size: 0.875rem;
  max-width: 60ch;
  margin: 0;
}
.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
}