:root {
  /* Soft Modern Aesthetic Variables */
  --c-bg: #F9FAFB;
  --c-surface: #FFFFFF;
  --c-surface-glass: rgba(255, 255, 255, 0.85);
  --c-text-main: #1F2937;
  --c-text-muted: #4B5563;
  --c-primary: #8B5CF6; /* Soft purple */
  --c-primary-hover: #7C3AED;
  --c-primary-light: #EDE9FE;
  --c-secondary: #60A5FA; /* Soft blue */
  --c-border: #E5E7EB;
  --c-error: #EF4444;
  --c-error-bg: #FEF2F2;
  --c-success: #10B981;
  --c-success-bg: #ECFDF5;

  /* 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: 'Inter', system-ui, -apple-system, sans-serif;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  /* Micro-shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 12px 32px rgba(139, 92, 246, 0.12);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--c-bg);
  color: var(--c-text-main);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* Responsiveness - prevent overflow masking, allow wrap */
h1, h2, h3, h4, h5, h6, .brand-name, .nav-link, a {
  overflow-wrap: anywhere;
}

img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

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

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

/* Accessibility */
:focus-visible {
  outline: 3px solid var(--c-secondary);
  outline-offset: 2px;
  border-radius: 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 Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-16);
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.grid {
  display: grid;
}

/* Min-width 0 on flex/grid children to prevent blowouts */
.flex > *, .grid > * {
  min-width: 0;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.gap-8 { gap: var(--sp-8); }
.gap-16 { gap: var(--sp-16); }
.gap-24 { gap: var(--sp-24); }
.gap-40 { gap: var(--sp-40); }
.gap-64 { gap: var(--sp-64); }

.mt-24 { margin-top: var(--sp-24); }
.mt-40 { margin-top: var(--sp-40); }
.mt-64 { margin-top: var(--sp-64); }
.mb-16 { margin-bottom: var(--sp-16); }
.mb-24 { margin-bottom: var(--sp-24); }
.mb-40 { margin-bottom: var(--sp-40); }
.mb-64 { margin-bottom: var(--sp-64); }
.py-40 { padding-top: var(--sp-40); padding-bottom: var(--sp-40); }
.py-64 { padding-top: var(--sp-64); padding-bottom: var(--sp-64); }
.p-24 { padding: var(--sp-24); }

.text-center { text-align: center; }
.text-muted { color: var(--c-text-muted); }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.font-bold { font-weight: 700; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-12) var(--sp-24);
  background-color: var(--c-primary);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-full);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.btn:hover {
  background-color: var(--c-primary-hover);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--c-surface);
  color: var(--c-text-main);
  border: 1px solid var(--c-border);
}

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

/* Header */
.site-header {
  height: 64px;
  background: var(--c-surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.5);
  display: flex;
  align-items: center;
  position: relative; /* Not sticky as per rules */
  z-index: 40;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--c-text-main);
  text-decoration: none;
  z-index: 50;
}

.brand-icon {
  width: 24px;
  height: 24px;
  fill: var(--c-primary);
}

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

.nav-link {
  color: var(--c-text-muted);
  font-weight: 500;
}

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

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: var(--sp-8);
  z-index: 50;
  color: var(--c-text-main);
}

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

/* Hero Section */
.hero {
  padding: var(--sp-64) 0;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, var(--c-primary-light) 0%, transparent 70%);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.2;
  margin-bottom: var(--sp-24);
  color: var(--c-text-main);
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--c-text-muted);
  max-width: 600px;
  margin: 0 auto var(--sp-40);
}

/* Cards - Border Accent Style */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-40);
}

.card {
  background-color: var(--c-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--c-primary);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.card-img-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.card-title {
  font-size: 1.25rem;
  color: var(--c-text-main);
  margin-bottom: var(--sp-8);
}

.card-desc {
  color: var(--c-text-muted);
  flex-grow: 1;
}

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

/* Article / Pages */
.article-header {
  padding: var(--sp-64) 0 var(--sp-40);
  border-bottom: 1px solid var(--c-border);
  margin-bottom: var(--sp-40);
}

.article-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: var(--sp-16);
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.125rem;
  color: var(--c-text-main);
}

.article-content h2 {
  font-size: 1.75rem;
  margin: var(--sp-40) 0 var(--sp-24);
  color: var(--c-text-main);
}

.article-content h3 {
  font-size: 1.25rem;
  margin: var(--sp-24) 0 var(--sp-16);
}

.article-content p {
  margin-bottom: var(--sp-24);
}

.article-content ul, .article-content ol {
  margin: 0 0 var(--sp-24) var(--sp-24);
  padding-left: var(--sp-16);
}

.article-content li {
  margin-bottom: var(--sp-8);
}

/* Table styling for policies */
.table-wrap {
  width: 100%;
  overflow-x: auto; /* Allowed by rules */
  margin-bottom: var(--sp-24);
  border-radius: var(--radius-sm);
  border: 1px solid var(--c-border);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 600px; /* Forces scroll on small screens, wrap handles it */
}

th, td {
  padding: var(--sp-16);
  border-bottom: 1px solid var(--c-border);
}

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

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

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

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

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

.form-control:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-primary-light);
}

.form-control.is-invalid {
  border-color: var(--c-error);
  box-shadow: 0 0 0 3px var(--c-error-bg);
}

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

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

.success-msg {
  display: none;
  padding: var(--sp-16);
  background-color: var(--c-success-bg);
  color: var(--c-success);
  border-radius: var(--radius-sm);
  margin-bottom: var(--sp-24);
  border: 1px solid #A7F3D0;
}

.success-msg.is-visible {
  display: block;
}

.map-block {
  width: 100%;
  height: 400px;
  background-image: url('images/london-tech-district-location-map.png');
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-border);
}

.contact-info {
  margin-top: var(--sp-40);
  padding: var(--sp-24);
  background: var(--c-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

/* Footer */
.site-footer {
  background-color: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding: var(--sp-64) 0 var(--sp-24);
  margin-top: var(--sp-64);
}

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

.footer-col h4 {
  font-size: 1.125rem;
  margin-bottom: var(--sp-16);
  color: var(--c-text-main);
}

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

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

.footer-col a {
  color: var(--c-text-muted);
}

.footer-col a:hover {
  color: var(--c-primary);
}

.footer-bottom {
  border-top: 1px solid var(--c-border);
  padding-top: var(--sp-24);
  text-align: center;
  color: var(--c-text-muted);
  font-size: 0.875rem;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--c-surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--c-border);
  padding: var(--sp-24);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.05);
  z-index: 100;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.cookie-banner:not([hidden]) {
  transform: translateY(0);
}

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

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

.cookie-text {
  flex: 1;
}

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

/* Responsive Breakpoints */
@media (max-width: 767px) {
  .site-header {
    height: 52px;
  }
  
  .nav-menu {
    position: absolute;
    top: 52px;
    left: 0;
    width: 100%;
    background: var(--c-surface);
    flex-direction: column;
    padding: var(--sp-24);
    box-shadow: var(--shadow-md);
    gap: var(--sp-16);
    border-top: 1px solid var(--c-border);
    display: none;
  }
  
  .nav-menu.is-visible {
    display: flex;
  }
  
  .nav-toggle {
    display: block;
  }
  
  .header-cta {
    display: none; /* Simplify mobile header */
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 399px) {
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }

  .cookie-actions {
    flex-direction: column;
  }
}