/* ============================================
   MANDATORY OPTIMISM — Corporate Design System
   Optimising Human Experience™
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,700;1,9..40,300&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  /* Brand colours */
  --mo-navy: #0a0f1c;
  --mo-dark: #111827;
  --mo-slate: #1e293b;
  --mo-mid: #475569;
  --mo-light: #94a3b8;
  --mo-pale: #e2e8f0;
  --mo-white: #f8fafc;
  --mo-pure-white: #ffffff;
  
  /* Accent — corporate teal */
  --mo-accent: #0ea5e9;
  --mo-accent-dim: rgba(14, 165, 233, 0.12);
  --mo-accent-glow: rgba(14, 165, 233, 0.25);
  
  /* Typography */
  --font-body: 'DM Sans', -apple-system, sans-serif;
  --font-display: 'Instrument Serif', Georgia, serif;
  
  /* Spacing */
  --section-pad: clamp(4rem, 10vw, 8rem);
  --content-max: 1140px;
  --content-narrow: 720px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--mo-dark);
  background: var(--mo-pure-white);
  overflow-x: hidden;
}

a { color: var(--mo-accent); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }

img { max-width: 100%; display: block; }

/* ---- Utility ---- */
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 2rem; }
.narrow { max-width: var(--content-narrow); }
.text-center { text-align: center; }
.text-light { color: var(--mo-light); }
.text-mid { color: var(--mo-mid); }
.text-accent { color: var(--mo-accent); }

/* ---- Typography ---- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  color: var(--mo-navy);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }

.label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mo-accent);
}

.subtitle {
  font-size: 1.15rem;
  color: var(--mo-mid);
  max-width: 540px;
  line-height: 1.8;
}

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  transition: all 0.3s;
}

.nav-logo {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--mo-navy);
  text-transform: lowercase;
}

.nav-logo span {
  color: var(--mo-accent);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--mo-mid);
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--mo-navy); opacity: 1; }

.nav-cta {
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  color: var(--mo-pure-white) !important;
  background: var(--mo-navy);
  padding: 0.55rem 1.4rem;
  border-radius: 6px;
  transition: background 0.2s !important;
}

.nav-cta:hover { background: var(--mo-slate); }

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--mo-navy);
  margin: 5px 0;
  transition: all 0.3s;
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--mo-pure-white);
    padding: 1.5rem 2rem;
    gap: 1.2rem;
    border-bottom: 1px solid var(--mo-pale);
  }
  .nav-links.active { display: flex; }
}

/* ---- Hero ---- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, var(--mo-accent-dim) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 80%, rgba(14, 165, 233, 0.04) 0%, transparent 60%);
  pointer-events: none;
}

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

.hero h1 {
  margin-bottom: 1.5rem;
}

.hero h1 em {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--mo-accent);
}

.hero .subtitle {
  margin: 0 auto 2.5rem;
}

/* ---- Grid lines (subtle background detail) ---- */
.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,0,0,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.018) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
}

/* ---- Sections ---- */
.section {
  padding: var(--section-pad) 2rem;
  position: relative;
}

.section--dark {
  background: var(--mo-navy);
  color: var(--mo-pale);
}

.section--dark h2,
.section--dark h3 { color: var(--mo-pure-white); }

.section--dark .label { color: var(--mo-accent); }

.section--subtle {
  background: var(--mo-white);
}

.section-header {
  margin-bottom: 3.5rem;
}

/* ---- Stat Grid ---- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.stat {
  text-align: center;
  padding: 2rem 1rem;
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  color: var(--mo-accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--mo-mid);
}

.section--dark .stat-label { color: var(--mo-light); }

/* ---- Values / Feature Cards ---- */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.value-card {
  padding: 2.5rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  background: var(--mo-pure-white);
  transition: all 0.3s ease;
}

.value-card:hover {
  border-color: var(--mo-accent);
  box-shadow: 0 8px 40px rgba(14, 165, 233, 0.08);
  transform: translateY(-2px);
}

.value-card .label {
  display: block;
  margin-bottom: 1rem;
}

.value-card h3 {
  margin-bottom: 0.75rem;
}

.value-card p {
  color: var(--mo-mid);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ---- Founders ---- */
.founders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.founder-card {
  text-align: center;
}

.founder-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--mo-pure-white);
}

.founder-avatar--kier { background: var(--mo-navy); }
.founder-avatar--henry { background: var(--mo-slate); }
.founder-avatar--bernard { background: var(--mo-mid); }

.founder-card h3 { margin-bottom: 0.25rem; }

.founder-role {
  font-size: 0.82rem;
  color: var(--mo-accent);
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

.founder-bio {
  font-size: 0.9rem;
  color: var(--mo-mid);
  line-height: 1.75;
  max-width: 360px;
  margin: 0 auto;
}

.founder-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--mo-dark);
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--mo-pale);
}

/* ---- Timeline ---- */
.timeline {
  max-width: 640px;
  margin: 3rem auto 0;
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--mo-accent), var(--mo-pale));
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
  padding-left: 1.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.35rem;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--mo-accent);
  border: 2px solid var(--mo-pure-white);
  box-shadow: 0 0 0 3px var(--mo-accent-dim);
}

.timeline-year {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--mo-accent);
  margin-bottom: 0.25rem;
}

.timeline-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.timeline-item p {
  font-size: 0.88rem;
  color: var(--mo-mid);
}

/* ---- Job Listings ---- */
.jobs-list {
  max-width: 800px;
  margin: 3rem auto 0;
}

.job-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.75rem 2rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 10px;
  margin-bottom: 1rem;
  background: var(--mo-pure-white);
  transition: all 0.3s;
  cursor: pointer;
}

.job-card:hover {
  border-color: var(--mo-accent);
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.08);
}

.job-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--mo-navy);
  margin-bottom: 0.3rem;
}

.job-meta {
  font-size: 0.8rem;
  color: var(--mo-light);
}

.job-meta span { margin-right: 1.2rem; }

.job-arrow {
  font-size: 1.2rem;
  color: var(--mo-accent);
  transition: transform 0.2s;
}

.job-card:hover .job-arrow { transform: translateX(4px); }

/* ---- CTA Banner ---- */
.cta-banner {
  text-align: center;
  padding: 5rem 2rem;
  background: var(--mo-navy);
  color: var(--mo-pale);
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 80% at 50% 100%, var(--mo-accent-dim) 0%, transparent 70%);
  pointer-events: none;
}

.cta-banner h2 {
  color: var(--mo-pure-white);
  margin-bottom: 1rem;
  position: relative;
}

.cta-banner p {
  color: var(--mo-light);
  margin-bottom: 2rem;
  position: relative;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.8rem 2rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
}

.btn--primary {
  background: var(--mo-accent);
  color: var(--mo-pure-white);
}

.btn--primary:hover { background: #0284c7; opacity: 1; }

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

.btn--outline:hover { border-color: var(--mo-accent); color: var(--mo-accent); }

.btn--white {
  background: var(--mo-pure-white);
  color: var(--mo-navy);
}

.btn--white:hover { background: var(--mo-white); }

.btn-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- Footer ---- */
.footer {
  background: var(--mo-navy);
  color: var(--mo-light);
  padding: 4rem 2rem 2rem;
  font-size: 0.85rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  max-width: var(--content-max);
  margin: 0 auto;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-brand p {
  margin-top: 0.75rem;
  max-width: 300px;
  font-size: 0.82rem;
  line-height: 1.7;
}

.footer h4 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mo-pale);
  margin-bottom: 1rem;
}

.footer ul { list-style: none; }

.footer li { margin-bottom: 0.6rem; }

.footer a { color: var(--mo-light); font-size: 0.82rem; }
.footer a:hover { color: var(--mo-pure-white); }

.footer-bottom {
  max-width: var(--content-max);
  margin: 0 auto;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--mo-mid);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .footer-bottom { flex-direction: column; gap: 0.5rem; }
}

/* ---- Cookie Consent ---- */
.cookie-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 28, 0.6);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: fadeIn 0.5s 1s forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

.cookie-modal {
  background: var(--mo-pure-white);
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 480px;
  width: 90%;
  text-align: center;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
  transform: translateY(20px);
  animation: slideUp 0.4s 1.2s forwards;
  opacity: 0;
}

@keyframes slideUp {
  to { transform: translateY(0); opacity: 1; }
}

.cookie-modal h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.cookie-modal p {
  font-size: 0.88rem;
  color: var(--mo-mid);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.cookie-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.cookie-accept {
  width: 100%;
  padding: 0.85rem;
  font-size: 0.88rem;
  font-weight: 500;
  font-family: var(--font-body);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: var(--mo-accent);
  color: white;
  transition: background 0.2s;
}

.cookie-accept:hover { background: #0284c7; }

.cookie-decline {
  width: 100%;
  padding: 0.85rem;
  font-size: 0.85rem;
  font-family: var(--font-body);
  border: 1px solid var(--mo-pale);
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
  color: var(--mo-light);
  transition: all 0.3s;
}

.cookie-modal .cookie-subtext {
  font-size: 0.72rem;
  color: var(--mo-light);
  margin-top: 1rem;
  margin-bottom: 0;
}

/* Cookie decline states */
.cookie-decline.state-1 { color: var(--mo-mid); }
.cookie-decline.state-2 { font-size: 0.78rem; color: var(--mo-light); }
.cookie-decline.state-3 { font-size: 0.72rem; color: var(--mo-pale); opacity: 0.6; }
.cookie-decline.state-4 { font-size: 0.65rem; color: var(--mo-pale); opacity: 0.3; border-color: transparent; }
.cookie-decline.state-5 { display: none; }

/* ---- Animations ---- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger > * { transition-delay: calc(var(--i, 0) * 0.1s); }

/* ---- Page Header (for inner pages) ---- */
.page-header {
  padding: 10rem 2rem 4rem;
  text-align: center;
  background: var(--mo-white);
  position: relative;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 60% at 50% 0%, var(--mo-accent-dim) 0%, transparent 70%);
  pointer-events: none;
}

.page-header h1 {
  position: relative;
  margin-bottom: 1rem;
}

.page-header .subtitle {
  position: relative;
  margin: 0 auto;
}

/* ---- Blog ---- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.blog-card {
  padding: 2.25rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  background: var(--mo-pure-white);
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: inherit;
}

.blog-card:hover {
  border-color: var(--mo-accent);
  box-shadow: 0 8px 40px rgba(14, 165, 233, 0.08);
  transform: translateY(-2px);
  opacity: 1;
}

.blog-card .label { display: block; margin-bottom: 0.75rem; }
.blog-card h3 { margin-bottom: 0.75rem; }

.blog-card p {
  color: var(--mo-mid);
  font-size: 0.92rem;
  line-height: 1.7;
}

.blog-meta {
  display: flex;
  gap: 1.2rem;
  font-size: 0.78rem;
  color: var(--mo-light);
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--mo-pale);
}

.blog-back {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--mo-accent);
  margin-bottom: 2.5rem;
}

.blog-back:hover { opacity: 0.7; }

.blog-post-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--mo-pale);
}

.blog-post-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 1rem;
}

.blog-post-header .blog-meta {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.blog-post-body {
  font-size: 1.05rem;
  color: var(--mo-dark);
  line-height: 1.9;
}

.blog-post-body p { margin-bottom: 1.5rem; }

.blog-post-body h3 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.blog-post-body ul, .blog-post-body ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.blog-post-body li {
  margin-bottom: 0.5rem;
  color: var(--mo-mid);
  line-height: 1.8;
}

.blog-post-body strong { color: var(--mo-navy); }

.blog-post-body em { color: var(--mo-mid); }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .hero { min-height: 90vh; padding: 7rem 1.5rem 3rem; }
  .section { padding: clamp(3rem, 8vw, 6rem) 1.5rem; }
  .values-grid { grid-template-columns: 1fr; }
  .founders-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .job-card { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .blog-grid { grid-template-columns: 1fr; }
}
