:root {
  /* Colour System */
  --portal-deep: #10242B;
  --bright-surface: #F7F8F4;
  --insight-blue: #327FA6;
  --fresh-teal: #3B9B8C;
  --portal-gold: #D5AE62;
  --soft-cloud: #E3E9E7;
  --deep-text: #18242A;
  --muted-text: #64716D;
  --alert-accent: #C67B45;

  /* Typography */
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;
  --spacing-xxl: 8rem;

  /* Layout */
  --container-width: 1200px;
  --header-height: 80px;
  
  /* Radii & Borders */
  --radius-sm: 4px;
  --radius-md: 8px;
  --border-subtle: 1px solid var(--soft-cloud);
  --border-strong: 1px solid var(--portal-deep);
}

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

body {
  font-family: var(--font-body);
  color: var(--deep-text);
  background-color: var(--bright-surface);
  line-height: 1.6;
  font-size: 1rem;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--portal-deep);
  margin-bottom: var(--spacing-sm);
  overflow-wrap: break-word;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: var(--spacing-md);
  color: var(--muted-text);
}

a {
  color: var(--insight-blue);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--portal-deep);
}

a:focus, button:focus, input:focus, textarea:focus {
  outline: 2px solid var(--fresh-teal);
  outline-offset: 2px;
}

/* Technical Labels */
.tech-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--insight-blue);
  display: inline-block;
  margin-bottom: var(--spacing-xs);
}

/* Layout Utilities */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section {
  padding: var(--spacing-xl) 0;
}

.section-alt {
  background-color: var(--soft-cloud);
}

.section-dark {
  background-color: var(--portal-deep);
  color: var(--bright-surface);
}

.section-dark h2, .section-dark h3, .section-dark p {
  color: var(--bright-surface);
}

.section-dark p {
  opacity: 0.8;
}

.grid {
  display: grid;
  gap: var(--spacing-md);
}

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

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  text-align: center;
}

.btn-primary {
  background-color: var(--insight-blue);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--portal-deep);
  color: #fff;
}

.btn-secondary {
  background-color: transparent;
  border-color: var(--portal-deep);
  color: var(--portal-deep);
}

.btn-secondary:hover {
  background-color: var(--portal-deep);
  color: #fff;
}

.btn-dark {
  background-color: var(--bright-surface);
  color: var(--portal-deep);
}
.btn-dark:hover {
  background-color: var(--portal-gold);
  color: var(--portal-deep);
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  background-color: rgba(247, 248, 244, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: var(--border-subtle);
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition: background-color 0.3s ease;
}

.site-header.scrolled {
  background-color: var(--bright-surface);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.logo-container {
  display: flex;
  flex-direction: column;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--portal-deep);
  letter-spacing: -0.02em;
}

.studio-name {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--insight-blue);
  font-weight: 600;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.main-nav a {
  color: var(--deep-text);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--fresh-teal);
  transition: width 0.3s ease;
}

.main-nav a:hover::after {
  width: 100%;
}

.nav-cta {
  margin-left: 2rem;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.menu-icon {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--portal-deep);
  position: relative;
  transition: background-color 0.2s ease;
}

.menu-icon::before, .menu-icon::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: var(--portal-deep);
  transition: transform 0.3s ease;
}

.menu-icon::before { top: -6px; }
.menu-icon::after { bottom: -6px; }

/* Mobile Menu Active State */
.menu-open .menu-icon { background-color: transparent; }
.menu-open .menu-icon::before { transform: rotate(45deg); top: 0; }
.menu-open .menu-icon::after { transform: rotate(-45deg); bottom: 0; }

/* Hero Section (Portal Style) */
.hero-portal {
  padding: var(--spacing-xxl) 0 var(--spacing-xl);
  background-image: linear-gradient(to bottom, var(--bright-surface) 0%, var(--soft-cloud) 100%);
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 800px;
  position: relative;
  z-index: 2;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--muted-text);
  margin-bottom: var(--spacing-md);
  max-width: 600px;
}

.hero-graphic {
  position: absolute;
  right: -5%;
  top: 10%;
  width: 60%;
  height: auto;
  opacity: 0.1;
  z-index: 1;
  pointer-events: none;
}

/* Layout System: Layered Blocks */
.layered-block {
  background: #fff;
  padding: var(--spacing-md);
  border: 1px solid var(--soft-cloud);
  border-left: 4px solid var(--insight-blue);
  box-shadow: 0 10px 30px rgba(16, 36, 43, 0.05);
  position: relative;
  transition: transform 0.3s ease;
}

.layered-block:hover {
  transform: translateY(-5px);
}

.layered-block h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

/* Pathway Map */
.pathway-map {
  position: relative;
  padding-left: 2rem;
}

.pathway-map::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--soft-cloud);
}

.pathway-stage {
  position: relative;
  margin-bottom: var(--spacing-lg);
}

.pathway-stage::before {
  content: '';
  position: absolute;
  left: -2.35rem;
  top: 0.25rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background-color: var(--fresh-teal);
  border: 3px solid var(--bright-surface);
  box-shadow: 0 0 0 2px var(--soft-cloud);
}

.stage-number {
  color: var(--insight-blue);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.25rem;
  display: block;
}

/* Entry Paths */
.entry-paths-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1px;
  background-color: var(--soft-cloud);
  border: 1px solid var(--soft-cloud);
}

.entry-path {
  background-color: var(--bright-surface);
  padding: var(--spacing-md);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.entry-path h3 {
  font-size: 1.1rem;
  color: var(--portal-deep);
  margin-bottom: var(--spacing-sm);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.entry-path p {
  color: var(--muted-text);
  font-size: 0.9rem;
  margin-bottom: 0;
  flex-grow: 1;
}

.entry-path:hover {
  background-color: #fff;
}

/* Editorial Panels */
.editorial-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: center;
}

.editorial-content {
  padding-right: var(--spacing-md);
}

.editorial-visual {
  background-color: #fff;
  border: 1px solid var(--soft-cloud);
  padding: var(--spacing-md);
  position: relative;
}

.editorial-visual::after {
  content: '';
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: -1rem;
  bottom: -1rem;
  border: 1px solid var(--portal-gold);
  z-index: -1;
}

/* Service Detail Layout */
.service-header {
  padding: var(--spacing-xl) 0 var(--spacing-md);
  border-bottom: var(--border-subtle);
  margin-bottom: var(--spacing-lg);
}

.service-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--spacing-xl);
}

.service-sidebar {
  background-color: var(--soft-cloud);
  padding: var(--spacing-md);
}

.check-list {
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.check-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--insight-blue);
  font-weight: bold;
}

/* Knowledge Centre */
.article-card {
  border-bottom: var(--border-subtle);
  padding-bottom: var(--spacing-md);
}

.article-meta {
  font-size: 0.8rem;
  color: var(--muted-text);
  margin-bottom: 0.5rem;
}

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

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--portal-deep);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--soft-cloud);
  background-color: #fff;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  color: var(--deep-text);
}

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

.form-message {
  display: none;
  padding: 1rem;
  margin-top: 1rem;
  background-color: var(--soft-cloud);
  border-left: 4px solid var(--fresh-teal);
  font-size: 0.9rem;
}

/* Footer */
.site-footer {
  background-color: var(--portal-deep);
  color: var(--bright-surface);
  padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.footer-col h4 {
  color: var(--bright-surface);
  margin-bottom: var(--spacing-sm);
}

.footer-col p {
  color: rgba(247, 248, 244, 0.7);
  font-size: 0.9rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: rgba(247, 248, 244, 0.7);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--portal-gold);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--spacing-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(247, 248, 244, 0.5);
}

.legal-links {
  display: flex;
  gap: 1rem;
}

.legal-links a {
  color: rgba(247, 248, 244, 0.5);
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--bright-surface);
  border-top: 2px solid var(--portal-deep);
  padding: var(--spacing-md);
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.4s ease;
  box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
}

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

.cookie-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-md);
}

.cookie-text {
  flex: 1;
  font-size: 0.9rem;
  margin-bottom: 0;
}

.cookie-actions {
  display: flex;
  gap: 0.5rem;
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
  .editorial-panel {
    gap: var(--spacing-md);
  }
}

@media (max-width: 768px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }
  
  .menu-toggle { display: block; }
  
  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background-color: var(--bright-surface);
    flex-direction: column;
    padding: var(--spacing-lg) var(--spacing-md);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
  }
  
  .main-nav.active {
    transform: translateX(0);
  }
  
  .main-nav ul {
    flex-direction: column;
    gap: var(--spacing-md);
  }
  
  .nav-cta {
    margin-left: 0;
    margin-top: var(--spacing-md);
    width: 100%;
  }

  .editorial-panel, .service-grid, .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-graphic {
    width: 100%;
    opacity: 0.05;
  }
  
  .cookie-content {
    flex-direction: column;
    align-items: stretch;
  }
  
  .cookie-actions {
    flex-direction: column;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: var(--spacing-sm);
    text-align: center;
  }
}

@media (max-width: 480px) {
  .section { padding: var(--spacing-lg) 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .pathway-map { padding-left: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}