:root {
  /* Swiss Minimalist Palette */
  --color-bg: #fdfdfd;
  --color-text: #111111;
  --color-accent: #cc0000; /* Red representing Singapore */
  --color-gray-light: #eeeeee;
  --color-gray-dark: #555555;
  --color-white: #ffffff;
  
  /* Spacing Scale */
  --sp-4: 4px;
  --sp-8: 8px;
  --sp-12: 12px;
  --sp-16: 16px;
  --sp-24: 24px;
  --sp-40: 40px;
  --sp-64: 64px;
  
  /* Typography */
  --font-sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-size-base: 16px;
  --line-height-base: 1.5;
}

/* Reset & Basics */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .brand-name, nav {
  margin: 0 0 var(--sp-24) 0;
  font-weight: 700;
  overflow-wrap: anywhere;
  line-height: 1.1;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
p { margin: 0 0 var(--sp-24) 0; }
a { color: var(--color-text); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--color-accent); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
table { width: 100%; border-collapse: collapse; margin-bottom: var(--sp-24); }
th, td { border: 1px solid var(--color-text); padding: var(--sp-12); text-align: left; }
th { background-color: var(--color-text); color: var(--color-bg); }

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

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

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

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

.grid {
  display: grid;
  gap: var(--sp-40);
  min-width: 0;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

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

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

.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-12);
  font-weight: 700;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

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

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

.cta-btn {
  background-color: var(--color-text);
  color: var(--color-bg);
  padding: var(--sp-8) var(--sp-16);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  display: inline-block;
}

.cta-btn:hover {
  background-color: var(--color-accent);
  color: var(--color-white);
  text-decoration: none;
}

/* Mobile Menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-8);
}

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

@media (max-width: 768px) {
  .site-header { height: 52px; }
  .menu-toggle { display: block; }
  
  .nav-links {
    display: none;
    position: absolute;
    top: 52px;
    left: 0;
    width: 100%;
    background-color: var(--color-bg);
    flex-direction: column;
    padding: var(--sp-24);
    border-bottom: 2px solid var(--color-text);
    gap: var(--sp-16);
  }
  
  .nav-links.is-visible {
    display: flex;
  }
}

/* Hero Section (Asymmetrical Swiss) */
.hero {
  border-bottom: 2px solid var(--color-text);
  background-color: var(--color-gray-light);
}

.hero-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  min-height: 60vh;
}

@media (max-width: 768px) {
  .hero-content { grid-template-columns: 1fr; }
}

.hero-text {
  padding: var(--sp-64) var(--sp-40) var(--sp-64) 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-visual {
  border-left: 2px solid var(--color-text);
  background: linear-gradient(45deg, var(--color-text) 0%, var(--color-gray-dark) 100%);
  display: flex;
  align-items: flex-end;
  padding: var(--sp-24);
}

@media (max-width: 768px) {
  .hero-text { padding: var(--sp-40) 0; }
  .hero-visual { border-left: none; border-top: 2px solid var(--color-text); min-height: 200px; }
}

.hero-visual svg {
  width: 100%;
  height: auto;
  opacity: 0.8;
}

/* Cards - Data Grid Style */
.card {
  display: flex;
  flex-direction: column;
  border: 2px solid var(--color-text);
  background-color: var(--color-bg);
  transition: transform 0.2s ease;
  min-width: 0; /* Flex child min-width fix */
  height: 100%;
}

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

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

/* The Data Grid Header */
.card-data-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 2px solid var(--color-text);
  background-color: var(--color-gray-light);
  min-width: 0;
}

.data-point {
  padding: var(--sp-16);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.data-point:first-child {
  border-right: 2px solid var(--color-text);
}

.data-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--color-gray-dark);
  margin-bottom: var(--sp-12); /* Rule: 12px between stat and label */
}

.data-value {
  font-size: 1.25rem;
  font-weight: 700;
  word-break: break-word;
}

.card-body {
  padding: var(--sp-24); /* Rule: Min 24px between distinct elements inside card */
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

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

.card-excerpt {
  color: var(--color-gray-dark);
  margin-bottom: var(--sp-24);
  flex-grow: 1;
}

.card-link {
  font-weight: 700;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-8);
}

/* Supporting Section */
.supporting-section {
  background-color: var(--color-text);
  color: var(--color-bg);
}

.supporting-section a {
  color: var(--color-accent);
}

.supporting-section h2 {
  color: var(--color-bg);
}

/* Content Pages */
.page-header {
  padding: var(--sp-64) 0;
  border-bottom: 2px solid var(--color-text);
  background-color: var(--color-gray-light);
}

.content-wrapper {
  max-width: 800px; /* Readability measure */
  margin: 0 auto;
}

.content-area h2 {
  margin-top: var(--sp-64);
}

.content-area img {
  border: 2px solid var(--color-text);
  margin-bottom: var(--sp-24);
}

.article-meta {
  display: flex;
  gap: var(--sp-24);
  font-size: 0.875rem;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: var(--sp-24);
  color: var(--color-gray-dark);
}

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

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

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

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

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

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

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

/* Contact Map Block */
.static-map {
  width: 100%;
  height: 300px;
  background-color: var(--color-gray-light);
  border: 2px solid var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  margin-bottom: var(--sp-24);
}

.static-map::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(var(--color-gray-dark) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.2;
}

.map-marker {
  width: 24px;
  height: 24px;
  background-color: var(--color-accent);
  border: 2px solid var(--color-text);
  border-radius: 50%;
  position: relative;
  z-index: 2;
}

/* Footer */
.site-footer {
  border-top: 2px solid var(--color-text);
  padding: var(--sp-64) 0;
  background-color: var(--color-text);
  color: var(--color-bg);
}

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

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

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-40);
  min-width: 0;
}

.footer-col h4 {
  color: var(--color-gray-light);
  font-size: 0.875rem;
  text-transform: uppercase;
  margin-bottom: var(--sp-16);
}

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

.footer-links li {
  margin-bottom: var(--sp-8);
}

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

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--color-text);
  color: var(--color-bg);
  padding: var(--sp-24);
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
  border-top: 4px solid var(--color-accent);
}

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

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

@media (min-width: 768px) {
  .cookie-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-8);
}

.cookie-btn {
  padding: var(--sp-8) var(--sp-16);
  font-family: var(--font-sans);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  cursor: pointer;
  border: 1px solid var(--color-bg);
}

.btn-primary { background-color: var(--color-accent); color: var(--color-white); border-color: var(--color-accent); }
.btn-secondary { background-color: transparent; color: var(--color-bg); }

/* Responsive adjustments for very small screens */
@media (max-width: 400px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .card-data-header { grid-template-columns: 1fr; }
  .data-point:first-child { border-right: none; border-bottom: 2px solid var(--color-text); }
}

.table-wrapper {
  overflow-x: auto;
  margin-bottom: var(--sp-24);
}