/* BASE & CSS VARIABLES (Swiss Minimalist) */
:root {
  --color-bg: #FFFFFF;
  --color-text: #111111;
  --color-text-light: #555555;
  --color-accent: #E5E5E5;
  --color-focus: #0055FF;
  --color-error: #FF3333;
  
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-24: 24px;
  --space-40: 40px;
  --space-64: 64px;

  --font-sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  
  --border-weight: 2px;
}

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

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

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

main {
  flex-grow: 1;
}

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

h1 {
  font-size: clamp(2.5rem, 5vw + 1rem, 5rem);
  margin-bottom: var(--space-24);
}

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

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

p, ul, ol, table {
  margin-bottom: var(--space-24);
  max-width: 75ch;
}

li {
  margin-left: var(--space-24);
  margin-bottom: var(--space-8);
}

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

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

/* ACCESSIBILITY */
:focus-visible {
  outline: 3px solid var(--color-focus);
  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);
  min-width: 0;
}

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

.col-12 { grid-column: span 12; min-width: 0; }
.col-8 { grid-column: span 8; min-width: 0; }
.col-6 { grid-column: span 6; min-width: 0; }
.col-4 { grid-column: span 4; min-width: 0; }

@media (max-width: 768px) {
  .col-8, .col-6, .col-4 { grid-column: span 12; }
}

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

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

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

.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;
  overflow-wrap: anywhere;
}

.brand svg {
  width: 24px;
  height: 24px;
  fill: var(--color-text);
}

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

.nav-desktop a {
  text-decoration: none;
  font-weight: 500;
}

.header-cta {
  background: var(--color-text);
  color: var(--color-bg);
  padding: var(--space-8) var(--space-16);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.875rem;
}

.header-cta:hover {
  background: var(--color-text-light);
  color: var(--color-bg);
}

/* MOBILE NAV */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-8);
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
  fill: var(--color-text);
}

.nav-mobile-overlay {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-bg);
  border-bottom: var(--border-weight) solid var(--color-text);
  padding: var(--space-24);
  z-index: 99;
}

.nav-mobile-overlay.is-visible {
  display: block;
}

.nav-mobile-overlay a {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  margin-bottom: var(--space-16);
}

@media (max-width: 767px) {
  .nav-desktop, .header-cta { display: none; }
  .menu-toggle { display: block; }
}

/* HERO SECTION (Swiss Asymmetry) */
.hero {
  border-bottom: var(--border-weight) solid var(--color-text);
  padding-bottom: 0;
}

.hero .grid {
  align-items: end;
}

.hero-content {
  padding-bottom: var(--space-64);
}

.hero-visual {
  border-left: var(--border-weight) solid var(--color-text);
  height: 100%;
  min-height: 400px;
  background: url('images/hero-visual.png') center/cover;
}

@media (max-width: 768px) {
  .hero-visual {
    border-left: none;
    border-top: var(--border-weight) solid var(--color-text);
    min-height: 250px;
  }
}

/* CARD STYLE: Data Grid */
.card {
  border: var(--border-weight) solid var(--color-text);
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  background: var(--color-bg);
  transition: transform 0.2s ease;
}

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

.card-data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: var(--border-weight) solid var(--color-text);
  font-family: monospace;
  font-size: 0.875rem;
}

.card-data-item {
  padding: var(--space-12) var(--space-16);
  display: flex;
  flex-direction: column;
}

.card-data-item:first-child {
  border-right: var(--border-weight) solid var(--color-text);
}

.data-label {
  color: var(--color-text-light);
  text-transform: uppercase;
  margin-bottom: var(--space-4);
  font-size: 0.7rem;
}

.data-value {
  font-weight: 700;
  color: var(--color-text);
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: var(--border-weight) solid var(--color-text);
}

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

.card-title {
  font-size: 1.5rem;
  margin-bottom: var(--space-8);
}

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

.card-cta {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
}

/* CONTENT PAGES (Sub-pages & Legal) */
.page-header {
  border-bottom: var(--border-weight) solid var(--color-text);
  padding: var(--space-64) 0;
  background: var(--color-accent);
}

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

.content-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.article-image {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: cover;
  margin-bottom: var(--space-40);
  border: var(--border-weight) solid var(--color-text);
}

.content-wrapper h2 {
  margin-top: var(--space-64);
  padding-top: var(--space-24);
  border-top: 1px solid var(--color-accent);
}

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

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0;
}

th, td {
  padding: var(--space-16);
  border: 1px solid var(--color-text);
  text-align: left;
}

th {
  background: var(--color-text);
  color: var(--color-bg);
  font-weight: 700;
}

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

label {
  display: block;
  font-weight: 700;
  margin-bottom: var(--space-8);
}

input, textarea {
  width: 100%;
  padding: var(--space-16);
  border: var(--border-weight) solid var(--color-text);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: inherit;
  font-size: 1rem;
}

input.is-invalid, textarea.is-invalid {
  border-color: var(--color-error);
}

.error-message {
  display: none;
  color: var(--color-error);
  font-size: 0.875rem;
  margin-top: var(--space-4);
}

.is-invalid + .error-message {
  display: block;
}

button[type="submit"] {
  background: var(--color-text);
  color: var(--color-bg);
  border: none;
  padding: var(--space-16) var(--space-40);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

button[type="submit"]:hover {
  background: var(--color-text-light);
}

/* MAP BLOCK */
.map-block {
  width: 100%;
  height: 300px;
  background: var(--color-accent);
  border: var(--border-weight) solid var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-24);
}

.map-block svg {
  width: 48px;
  height: 48px;
  fill: var(--color-text-light);
}

/* FOOTER */
.site-footer {
  border-top: var(--border-weight) solid var(--color-text);
  padding: var(--space-64) 0 var(--space-24);
  background: var(--color-bg);
}

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

.footer-col h3 {
  font-size: 1.125rem;
  margin-bottom: var(--space-16);
}

.footer-col ul {
  list-style: none;
  margin: 0;
}

.footer-col li {
  margin-left: 0;
}

.footer-bottom {
  border-top: 1px solid var(--color-accent);
  padding-top: var(--space-24);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-16);
  font-size: 0.875rem;
  color: var(--color-text-light);
}

/* COOKIE BANNER */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--color-text);
  color: var(--color-bg);
  padding: var(--space-24);
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
}

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

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-24);
}

.cookie-text {
  flex: 1;
  min-width: 280px;
}

.cookie-text p {
  margin: 0;
  max-width: none;
}

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

.cookie-btn {
  padding: var(--space-8) var(--space-16);
  border: 1px solid var(--color-bg);
  background: transparent;
  color: var(--color-bg);
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
}

.cookie-btn[data-cookie-choice="accept"] {
  background: var(--color-bg);
  color: var(--color-text);
}

.cookie-btn:hover {
  opacity: 0.8;
}

/* UTILITIES */
[hidden] {
  display: none !important;
}