/* 
  Aesthetic: Swiss Minimalist
  Card Style: Horizontal Split
*/

:root {
  /* Colors */
  --c-bg: #ffffff;
  --c-text: #111111;
  --c-accent: #e3000f; /* Bold Swiss Red */
  --c-grey-light: #f5f5f5;
  --c-grey-mid: #cccccc;
  
  /* Spacing */
  --s-4: 4px;
  --s-8: 8px;
  --s-12: 12px;
  --s-16: 16px;
  --s-24: 24px;
  --s-40: 40px;
  --s-64: 64px;
  --s-128: 128px;
  
  /* Typography */
  --font-sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  
  /* Layout */
  --header-height-desktop: 64px;
  --header-height-mobile: 52px;
  --max-width: 1440px;
}

/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

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

/* Typography */
h1, h2, h3, h4, .brand-name, .nav-link {
  overflow-wrap: anywhere;
}

h1 {
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: var(--s-40);
}

h2 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin-bottom: var(--s-24);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: var(--s-16);
}

p {
  margin-bottom: var(--s-16);
  font-size: 1.125rem;
  max-width: 65ch;
}

a {
  color: var(--c-text);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* Focus States */
a:focus-visible, 
button:focus-visible, 
input:focus-visible, 
textarea:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 2px;
}

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

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--s-24);
  min-width: 0;
}

/* Header */
.site-header {
  height: var(--header-height-desktop);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--c-text);
  padding: 0 var(--s-24);
  background: var(--c-bg);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--s-8);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand svg {
  width: 24px;
  height: 24px;
}

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

.nav-link {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.875rem;
}

.btn, .cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--c-text);
  color: var(--c-bg);
  padding: var(--s-12) var(--s-24);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn:hover, .cta:hover {
  background: var(--c-accent);
  color: var(--c-bg);
}

.btn-outline {
  background: transparent;
  color: var(--c-text);
  border: 2px solid var(--c-text);
}

.btn-outline:hover {
  background: var(--c-text);
  color: var(--c-bg);
}

/* Mobile Nav */
.nav-mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: var(--s-8);
  z-index: 100;
}

.nav-mobile-toggle svg {
  width: 24px;
  height: 24px;
  fill: var(--c-text);
}

.nav-overlay {
  display: none;
}

/* Main Content Spacing */
main {
  flex: 1;
  padding-top: var(--s-64);
  padding-bottom: var(--s-128);
}

section {
  margin-bottom: var(--s-128);
}

/* Asymmetric Hero Grid */
.hero {
  padding: var(--s-64) 0;
  border-bottom: 2px solid var(--c-text);
  margin-bottom: var(--s-64);
}

.hero-content {
  grid-column: 1 / 11;
}

/* Card Style: Horizontal Split */
.card-h-split {
  display: flex;
  flex-direction: row;
  border: 2px solid var(--c-text);
  margin-bottom: var(--s-40);
  background: var(--c-bg);
  transition: transform 0.2s ease;
  min-width: 0;
}

.card-h-split:hover {
  transform: translateY(-4px);
}

.card-media {
  flex: 0 0 50%;
  border-right: 2px solid var(--c-text);
  min-width: 0;
}

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

.card-content {
  flex: 1;
  padding: var(--s-40);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

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

.tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--c-grey-light);
  padding: var(--s-4) var(--s-8);
  color: var(--c-text);
}

.card-title {
  margin-bottom: var(--s-16);
}

.card-desc {
  margin-bottom: var(--s-24);
  font-size: 1rem;
}

.card-action {
  margin-top: auto;
  align-self: flex-start;
}

/* Data / Stats Block */
.stat-group {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--s-24);
}

.stat-value {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: var(--s-12);
  line-height: 1;
}

.stat-label {
  font-size: 0.875rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--c-text);
}

/* Standard Page Layout (Swiss Style) */
.page-header {
  grid-column: 2 / 12;
  margin-bottom: var(--s-40);
}

/* Page Featured Media */
.page-media {
  grid-column: 2 / 12;
  margin: 0 0 var(--s-40) 0;
  border: 2px solid var(--c-text);
  background: var(--c-bg);
  min-width: 0;
}

.page-media img {
  width: 100%;
  height: clamp(280px, 45vw, 520px);
  object-fit: cover;
  display: block;
}

.page-media figcaption {
  padding: var(--s-12) var(--s-16);
  font-size: 0.875rem;
  background: var(--c-grey-light);
  border-top: 2px solid var(--c-text);
  color: var(--c-text);
  font-weight: 600;
}

.page-content {
  grid-column: 3 / 10;
}

/* Lists and Tables */
ul, ol {
  margin-bottom: var(--s-24);
  padding-left: var(--s-24);
}

li {
  margin-bottom: var(--s-8);
  font-size: 1.125rem;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-bottom: var(--s-40);
  border-top: 2px solid var(--c-text);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

th, td {
  padding: var(--s-16);
  text-align: left;
  border-bottom: 1px solid var(--c-grey-mid);
  font-size: 0.875rem;
}

th {
  font-weight: 700;
  text-transform: uppercase;
}

/* Forms */
.form-group {
  margin-bottom: var(--s-24);
}

.form-label {
  display: block;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.875rem;
  margin-bottom: var(--s-8);
}

.form-control {
  width: 100%;
  padding: var(--s-16);
  border: 2px solid var(--c-text);
  font-family: var(--font-sans);
  font-size: 1rem;
  background: var(--c-bg);
  color: var(--c-text);
}

.form-control:focus-visible {
  outline: none;
  border-color: var(--c-accent);
}

.form-control.is-invalid {
  border-color: var(--c-accent);
  background-color: #fff0f0;
}

textarea.form-control {
  resize: vertical;
  min-height: 150px;
}

.form-message {
  display: none;
  padding: var(--s-16);
  background: var(--c-text);
  color: var(--c-bg);
  margin-bottom: var(--s-24);
  font-weight: 700;
}

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

/* Map Block */
.map-block {
  width: 100%;
  height: 400px;
  background: var(--c-grey-light);
  border: 2px solid var(--c-text);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--s-40);
  position: relative;
}

.map-block svg {
  width: 64px;
  height: 64px;
  opacity: 0.2;
}

/* Footer */
.site-footer {
  background: var(--c-text);
  color: var(--c-bg);
  padding: var(--s-64) 0 var(--s-24);
  margin-top: auto;
}

.site-footer a {
  color: var(--c-bg);
}

.site-footer a:hover {
  color: var(--c-accent);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--s-24);
  margin-bottom: var(--s-64);
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding-bottom: var(--s-64);
}

.footer-col-main {
  grid-column: 1 / 5;
}

.footer-col-links {
  grid-column: 6 / 9;
}

.footer-col-legal {
  grid-column: 10 / 13;
}

.footer-brand {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--s-16);
  text-transform: uppercase;
}

.footer-heading {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: var(--s-16);
  color: var(--c-grey-mid);
}

.footer-list {
  list-style: none;
  padding: 0;
}

.footer-list li {
  margin-bottom: var(--s-8);
  font-size: 0.875rem;
}

.footer-bottom {
  font-size: 0.75rem;
  color: var(--c-grey-mid);
  text-align: center;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--c-bg);
  border-top: 2px solid var(--c-text);
  padding: var(--s-24);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: var(--s-16);
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

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

.cookie-content {
  max-width: 800px;
}

.cookie-title {
  font-weight: 700;
  margin-bottom: var(--s-8);
}

.cookie-text {
  font-size: 0.875rem;
  margin: 0;
}

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

/* Responsive */
@media (max-width: 1024px) {
  .page-header { grid-column: 1 / 13; }
  .page-media { grid-column: 1 / 13; }
  .page-content { grid-column: 1 / 13; }
}

@media (max-width: 768px) {
  .site-header {
    height: var(--header-height-mobile);
  }
  
  .nav-desktop {
    display: none;
  }
  
  .nav-mobile-toggle {
    display: block;
  }
  
  .nav-overlay {
    position: fixed;
    top: var(--header-height-mobile);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--c-bg);
    z-index: 90;
    padding: var(--s-40) var(--s-24);
    overflow-y: auto;
    display: none;
    flex-direction: column;
    gap: var(--s-24);
  }
  
  .nav-overlay.is-visible {
    display: flex;
  }
  
  .nav-overlay .nav-link {
    font-size: 2rem;
    border-bottom: 2px solid var(--c-text);
    padding-bottom: var(--s-12);
  }

  .grid {
    display: flex;
    flex-direction: column;
  }

  .card-h-split {
    flex-direction: column;
  }
  
  .card-media {
    border-right: none;
    border-bottom: 2px solid var(--c-text);
    height: 250px;
  }
  
  .card-content {
    padding: var(--s-24);
  }

  .page-media img {
    height: 240px;
  }
  
  .footer-grid {
    display: flex;
    flex-direction: column;
    gap: var(--s-40);
  }
  
  .cookie-banner {
    padding: var(--s-16);
  }
}

@media (max-width: 400px) {
  :root {
    --s-40: 24px;
    --s-64: 40px;
    --s-128: 64px;
  }
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.75rem; }
  .card-content { padding: var(--s-16); }
  .btn, .cta { width: 100%; }
}

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