/* Soft Modern Aesthetic — rounded corners, pastels, micro-shadows, gentle blur */
:root {
  /* Colors */
  --color-bg: #FDF8F5; /* Soft blush */
  --color-surface: #FFFFFF;
  --color-text: #2C2C2C;
  --color-text-muted: #595959;
  --color-accent: #E3E8E1; /* Sage */
  --color-accent-dark: #C6CFC3;
  --color-border: #F0EAE5;
  --color-focus: #9FB59A;
  
  /* Spacing */
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-24: 24px;
  --space-40: 40px;
  --space-64: 64px;
  
  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(44, 44, 44, 0.04);
  --shadow-md: 0 4px 16px rgba(44, 44, 44, 0.06);
  --shadow-lg: 0 12px 32px rgba(44, 44, 44, 0.08);
}

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

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

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

h1, h2, h3, h4, .brand-name {
  margin-top: 0;
  margin-bottom: var(--space-16);
  font-weight: 600;
  color: var(--color-text);
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.2;
}

h1 { font-size: 2.5rem; letter-spacing: -0.02em; }
h2 { font-size: 2rem; letter-spacing: -0.01em; }
h3 { font-size: 1.5rem; }
p { margin-top: 0; margin-bottom: var(--space-24); }

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

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

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
}

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

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

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

/* Header */
.site-header {
  height: 64px;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-text);
}

.logo-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

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

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

.nav-desktop a:hover {
  text-decoration: underline;
}

.btn-cta {
  background-color: var(--color-text);
  color: var(--color-surface);
  padding: var(--space-8) var(--space-16);
  border-radius: var(--radius-lg);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  display: inline-block;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-cta:hover {
  background-color: #000000;
  text-decoration: none;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-8);
  fill: var(--color-text);
}

/* Mobile Nav Overlay */
.nav-mobile {
  display: none;
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-24);
  box-shadow: var(--shadow-md);
  z-index: 50;
}

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

.nav-mobile ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

.nav-mobile a {
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  display: block;
}

@media (max-width: 767px) {
  .site-header { height: 56px; }
  .nav-desktop { display: none; }
  .hamburger { display: block; }
  .nav-mobile { top: 56px; }
}

/* Hero Section */
.hero {
  text-align: center;
  padding: calc(var(--space-64) * 1.5) var(--space-24);
  background: radial-gradient(circle at 50% 0%, var(--color-surface) 0%, var(--color-bg) 100%);
}

.hero h1 {
  max-width: 800px;
  margin: 0 auto var(--space-24);
}

.hero p {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto var(--space-40);
}

/* Framed Canvas Cards (Grid) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-40);
  min-width: 0; /* allows shrinking */
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  margin-top: var(--space-16);
  margin-left: var(--space-16);
  min-width: 0;
  height: 100%;
}

.card::before {
  content: "";
  position: absolute;
  top: 16px;
  left: -16px;
  right: 16px;
  bottom: -16px;
  background-color: var(--color-accent);
  border-radius: var(--radius-md);
  z-index: 0;
  transition: transform 0.3s ease;
}

.card-inner {
  background-color: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-24);
  box-shadow: var(--shadow-sm);
  z-index: 1;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-width: 0;
}

.card:hover .card-inner {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.card:hover::before {
  transform: translate(4px, 4px);
}

.card-img-wrapper {
  margin: calc(var(--space-24) * -1) calc(var(--space-24) * -1) var(--space-24);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  overflow: hidden;
}

.card-img-wrapper img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 0;
  transition: transform 0.5s ease;
}

.card:hover .card-img-wrapper img {
  transform: scale(1.05);
}

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

.card-desc {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: var(--space-24);
  flex-grow: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-16);
}

@media (max-width: 767px) {
  .card {
    margin: 0; /* Remove offset on small screens */
  }
  .card::before {
    display: none; /* No negative insets past container on mobile */
  }
  .card:hover .card-inner {
    transform: translateY(-4px);
  }
}

/* Generic Content Layouts (Sub-pages & Legal) */
.content-wrapper {
  max-width: 800px;
  margin: 0 auto;
  background-color: var(--color-surface);
  padding: var(--space-40) var(--space-64);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.content-header {
  text-align: center;
  margin-bottom: var(--space-40);
}

.content-header img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-top: var(--space-24);
}

.content-body h2 {
  margin-top: var(--space-40);
  font-size: 1.75rem;
}

.content-body h3 {
  margin-top: var(--space-24);
  font-size: 1.25rem;
}

.content-body ul, .content-body ol {
  margin-bottom: var(--space-24);
  padding-left: var(--space-24);
}

.content-body li {
  margin-bottom: var(--space-8);
}

/* Stats / Data Grids in content */
.stat-block {
  display: flex;
  align-items: baseline;
  gap: var(--space-12);
  background: var(--color-bg);
  padding: var(--space-16);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-24);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text);
}

.stat-label {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* Tables for Legal */
.table-wrapper {
  width: 100%;
  overflow-x: auto; /* Permitted per rules */
  margin-bottom: var(--space-24);
}

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

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

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

@media (max-width: 767px) {
  .content-wrapper {
    padding: var(--space-24) var(--space-16);
    border-radius: var(--radius-sm);
  }
}

/* Contact Form & Map */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-40);
}

@media (max-width: 767px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

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

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

.form-control {
  width: 100%;
  padding: var(--space-12) var(--space-16);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  background-color: var(--color-bg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-focus);
  box-shadow: 0 0 0 3px rgba(159, 181, 154, 0.3);
}

.form-control.is-invalid {
  border-color: #d32f2f;
}

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

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

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

.static-map {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-bg) 100%);
  border-radius: var(--radius-md);
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  text-align: center;
  padding: var(--space-24);
}

.static-map svg {
  width: 48px;
  height: 48px;
  fill: var(--color-text);
  margin-bottom: var(--space-16);
}

.form-message-success {
  display: none;
  background-color: var(--color-accent);
  color: var(--color-text);
  padding: var(--space-16);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-24);
}
.form-message-success.is-visible {
  display: block;
}

/* Footer */
.site-footer {
  margin-top: auto;
  background-color: #1A1A1A;
  color: #FDF8F5; /* using the blush variable color hex for contrast */
  padding: var(--space-64) 0 var(--space-40);
}

.site-footer a {
  color: #C6CFC3; /* accent dark */
  text-decoration: none;
}
.site-footer a:hover {
  text-decoration: underline;
  color: #FFFFFF;
}

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

.footer-col h4 {
  color: #FFFFFF;
  margin-bottom: var(--space-24);
}

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

.footer-col li {
  margin-bottom: var(--space-12);
}

.footer-bottom {
  border-top: 1px solid #333333;
  padding-top: var(--space-24);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-16);
  font-size: 0.85rem;
  color: #999999;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--color-surface);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.1);
  padding: var(--space-24);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.cookie-content p {
  margin: 0;
  font-size: 0.95rem;
}

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

.btn-cookie {
  padding: var(--space-8) var(--space-16);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cookie:hover {
  background: var(--color-border);
}

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

.btn-cookie[data-cookie-choice="accept"]:hover {
  background: #000000;
}

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

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}