@charset "UTF-8";

/* 
  Aesthetic: Editorial — serif/sans pairing, rules and separators, multi-column
  Card: Border accent — no border except a left accent bar
*/

:root {
  /* Editorial Color Palette */
  --bg-color: #fcfcfb;
  --text-color: #1a1a1a;
  --text-light: #4a4a4a;
  --accent-color: #a83232; /* Strong crimson/burgundy for editorial contrast */
  --border-color: #d1cfc7;
  --surface-color: #ffffff;
  
  /* Typography */
  --font-serif: "Georgia", "Times New Roman", serif;
  --font-sans: "Helvetica Neue", "Helvetica", "Arial", sans-serif;
  
  /* Spacing Scale */
  --sp-4: 4px;
  --sp-8: 8px;
  --sp-12: 12px;
  --sp-16: 16px;
  --sp-24: 24px;
  --sp-40: 40px;
  --sp-64: 64px;
  
  /* Header Heights */
  --header-desktop: 64px;
  --header-mobile: 52px;
}

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

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

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

/* Typography Overrides */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  margin: 0 0 var(--sp-16) 0;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-color);
  overflow-wrap: anywhere;
}

h1 { font-size: 2.5rem; margin-bottom: var(--sp-24); }
h2 { font-size: 2rem; margin-bottom: var(--sp-24); border-bottom: 2px solid var(--text-color); padding-bottom: var(--sp-8); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin: 0 0 var(--sp-16) 0;
}

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

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

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

/* Specific text wrapping rule */
.brand, nav a, th, td {
  overflow-wrap: anywhere;
}

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

main {
  flex: 1;
  padding-bottom: var(--sp-64);
}

section {
  margin-top: var(--sp-64);
  margin-bottom: var(--sp-64);
}

/* Grid & Flex shrink rules */
.grid, .flex {
  min-width: 0; 
}
.grid > *, .flex > * {
  min-width: 0;
}

/* Header */
.site-header {
  height: var(--header-desktop);
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  position: relative; /* Not sticky */
}

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

.header-left {
  display: flex;
  align-items: center;
  gap: var(--sp-12);
}

.brand {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.brand:hover {
  color: var(--text-color);
}

.logo-mark {
  width: 24px;
  height: 24px;
  fill: var(--accent-color);
}

/* Navigation */
.nav-center {
  display: flex;
  gap: var(--sp-24);
}

.nav-link {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-light);
}

.nav-link:hover {
  color: var(--accent-color);
}

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
}

.btn {
  display: inline-block;
  background-color: var(--text-color);
  color: var(--surface-color);
  padding: var(--sp-8) var(--sp-16);
  text-decoration: none;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.2s;
}

.btn:hover {
  background-color: var(--accent-color);
  color: var(--surface-color);
}

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

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

/* Hamburger */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  padding: var(--sp-8);
  cursor: pointer;
  color: var(--text-color);
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Hero Section (Editorial Style) */
.hero {
  border-bottom: 4px solid var(--text-color);
  padding-bottom: var(--sp-40);
  margin-bottom: var(--sp-64);
}

.hero-meta {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-color);
  margin-bottom: var(--sp-16);
  display: block;
}

.hero h1 {
  font-size: 4rem;
  margin-bottom: var(--sp-40);
  line-height: 1.1;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-40);
}

.hero-lead {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-light);
}

/* Card Style: Border Accent (Left Bar) */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-40);
  margin-top: var(--sp-40);
}

.card {
  display: flex;
  flex-direction: column;
  background-color: var(--surface-color);
  border-left: 4px solid var(--accent-color);
  padding: var(--sp-24);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  text-decoration: none;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.08);
  text-decoration: none;
}

.card-img-wrapper {
  margin-bottom: var(--sp-16);
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background-color: var(--border-color);
}

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

.card-meta {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: var(--sp-8);
  letter-spacing: 1px;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: var(--sp-8);
  border-bottom: none;
  padding-bottom: 0;
}

.card-desc {
  font-family: var(--font-sans);
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 0;
  flex-grow: 1;
}

/* Editorial Multi-column */
.multi-col {
  column-count: 2;
  column-gap: var(--sp-40);
  column-rule: 1px solid var(--border-color);
}

.multi-col p {
  break-inside: avoid;
}

/* Image with Caption */
.figure-editorial {
  margin: var(--sp-40) 0;
}
.figure-editorial img {
  width: 100%;
  height: auto;
  border: 1px solid var(--border-color);
}
.figure-editorial figcaption {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: var(--sp-8);
  border-left: 2px solid var(--accent-color);
  padding-left: var(--sp-8);
}

/* Sub-page Specifics */
.article-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--sp-40) auto;
}
.article-header h1 {
  font-size: 3rem;
  margin-bottom: var(--sp-16);
}
.article-meta {
  font-family: var(--font-sans);
  color: var(--text-light);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.article-content {
  max-width: 800px;
  margin: 0 auto;
}
.article-content h2 {
  margin-top: var(--sp-40);
}
.article-content ul, .article-content ol {
  margin-bottom: var(--sp-24);
  padding-left: var(--sp-24);
}
.article-content li {
  margin-bottom: var(--sp-8);
}

/* Data Table */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--sp-24);
  text-align: left;
}
table th, table td {
  padding: var(--sp-12);
  border-bottom: 1px solid var(--border-color);
}
table th {
  font-family: var(--font-serif);
  font-weight: 700;
  background-color: var(--surface-color);
}
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-bottom: var(--sp-24);
}

/* Stats Block (12px between stat and label per rules) */
.stat-block {
  display: flex;
  align-items: baseline;
  gap: var(--sp-12);
  margin-bottom: var(--sp-16);
  padding: var(--sp-16);
  background-color: var(--surface-color);
  border-left: 4px solid var(--text-color);
}
.stat-value {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-color);
}
.stat-label {
  font-size: 0.95rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Contact Page */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-64);
}
.form-group {
  margin-bottom: var(--sp-24);
}
.form-label {
  display: block;
  font-family: var(--font-serif);
  font-weight: 700;
  margin-bottom: var(--sp-8);
}
.form-control {
  width: 100%;
  padding: var(--sp-12);
  font-family: var(--font-sans);
  border: 1px solid var(--border-color);
  background-color: var(--surface-color);
  color: var(--text-color);
}
.form-control:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 1px var(--accent-color);
}
textarea.form-control {
  min-height: 150px;
  resize: vertical;
}
.error-msg {
  display: none;
  color: var(--accent-color);
  font-size: 0.85rem;
  margin-top: var(--sp-4);
}
.form-control.is-invalid {
  border-color: var(--accent-color);
}
.form-control.is-invalid + .error-msg {
  display: block;
}
.form-success {
  display: none;
  background-color: #e6f4ea;
  color: #137333;
  padding: var(--sp-16);
  margin-bottom: var(--sp-24);
  border-left: 4px solid #137333;
}
.form-success.is-visible {
  display: block;
}

/* Styled Static Map Block */
.static-map {
  width: 100%;
  height: 300px;
  background: 
    linear-gradient(rgba(252, 252, 251, 0.9), rgba(252, 252, 251, 0.9)),
    repeating-linear-gradient(45deg, var(--border-color) 0, var(--border-color) 1px, transparent 1px, transparent 20px),
    repeating-linear-gradient(-45deg, var(--border-color) 0, var(--border-color) 1px, transparent 1px, transparent 20px);
  background-color: #eae8e1;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-24);
  position: relative;
}
.map-marker {
  width: 16px;
  height: 16px;
  background-color: var(--accent-color);
  border-radius: 50%;
  border: 2px solid var(--surface-color);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Footer */
.site-footer {
  background-color: var(--text-color);
  color: var(--surface-color);
  padding: var(--sp-64) 0 var(--sp-40) 0;
  font-family: var(--font-sans);
  margin-top: auto;
}
.site-footer a {
  color: var(--border-color);
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--surface-color);
  text-decoration: underline;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-40);
  margin-bottom: var(--sp-40);
  border-bottom: 1px solid #333;
  padding-bottom: var(--sp-40);
}
.footer-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--surface-color);
  margin-bottom: var(--sp-16);
  border-bottom: none;
  padding-bottom: 0;
}
.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-list li {
  margin-bottom: var(--sp-8);
  font-size: 0.9rem;
}
.footer-bottom {
  font-size: 0.85rem;
  color: #888;
  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(--surface-color);
  border-top: 2px solid var(--text-color);
  padding: var(--sp-24);
  box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
}
.cookie-banner.is-visible {
  transform: translateY(0);
}
.cookie-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-24);
}
.cookie-text {
  flex: 1 1 300px;
  font-size: 0.9rem;
  margin: 0;
}
.cookie-actions {
  display: flex;
  gap: var(--sp-8);
  flex-wrap: wrap;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  h1 { font-size: 3rem; }
  .hero h1 { font-size: 3.5rem; }
}

@media (max-width: 768px) {
  .site-header {
    height: var(--header-mobile);
  }
  .nav-center {
    display: none;
    position: absolute;
    top: var(--header-mobile);
    left: 0;
    width: 100%;
    background-color: var(--bg-color);
    flex-direction: column;
    padding: var(--sp-24);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    z-index: 100;
  }
  .nav-center.is-menu-open {
    display: flex;
  }
  .nav-toggle {
    display: block;
  }
  .header-right {
    display: none; /* Hide CTA on mobile to keep header clean */
  }
  .hero-content {
    grid-template-columns: 1fr;
    gap: var(--sp-24);
  }
  .hero h1 {
    font-size: 2.5rem;
  }
  .multi-col {
    column-count: 1;
  }
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

/* Mobile Small Breakpoint (<400px) */
@media (max-width: 399px) {
  h1 { font-size: 2rem; }
  .hero h1 { font-size: 2rem; }
  .guides-grid {
    grid-template-columns: 1fr;
  }
  .cookie-actions {
    flex-direction: column;
    width: 100%;
  }
  .cookie-actions .btn {
    width: 100%;
  }
  .card-img-wrapper {
    aspect-ratio: 16/9; /* Tighter ratio on extremely small screens */
  }
}

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