/* ==========================================================================
   Optivity | Master Stylesheet
   Design system, layout, components, and page-specific styles.
   ========================================================================== */

/* ---------- Design Tokens ---------- */
:root {
  /* Brand colours sampled from logo */
  --magenta:       #B74891;
  --magenta-deep:  #962F73;
  --magenta-soft:  #E8B7D5;
  --purple:        #533584;
  --purple-deep:   #3C2466;
  --purple-soft:   #C9BCDE;
  --indigo:        #1B1338;
  --indigo-mid:    #2C2155;

  /* Neutrals */
  --ink:           #14102A;
  --graphite:      #3A3550;
  --slate:         #6B6480;
  --mist:          #A8A2B8;
  --bone:          #F6F4FA;
  --paper:         #FBFAFD;
  --white:         #FFFFFF;
  --line:          #E5E1ED;
  --line-strong:   #CFC8DD;

  /* Accents */
  --gradient-brand: linear-gradient(135deg, var(--magenta) 0%, var(--purple) 60%, var(--indigo) 100%);
  --gradient-soft:  linear-gradient(135deg, #FBF4F8 0%, #F4EEF7 50%, #EFEAF6 100%);
  --gradient-dark:  linear-gradient(135deg, var(--indigo) 0%, var(--purple-deep) 100%);

  /* Typography */
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body:    'Inter Tight', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Spacing scale (8px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;

  /* Layout */
  --max-content: 1200px;
  --max-prose: 720px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in: cubic-bezier(0.55, 0, 1, 0.45);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(20, 16, 42, 0.04), 0 1px 3px rgba(20, 16, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(20, 16, 42, 0.06), 0 2px 4px rgba(20, 16, 42, 0.04);
  --shadow-lg: 0 24px 48px -12px rgba(83, 53, 132, 0.15), 0 8px 16px rgba(20, 16, 42, 0.06);
  --shadow-brand: 0 24px 48px -12px rgba(183, 72, 145, 0.25);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: var(--purple);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
a:hover { color: var(--magenta); }

button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
h3 {
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}
h4 { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.015em; }

p { margin-bottom: 1.1em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--magenta-deep);
  margin-bottom: var(--space-4);
  display: inline-block;
}

.lede {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.55;
  color: var(--graphite);
  font-weight: 400;
  max-width: 60ch;
}

.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--max-content);
  margin: 0 auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

@media (max-width: 640px) {
  .container { padding-left: var(--space-5); padding-right: var(--space-5); }
}

.section {
  padding-top: var(--space-9);
  padding-bottom: var(--space-9);
}
.section-tight { padding-top: var(--space-8); padding-bottom: var(--space-8); }

.section-bone     { background: var(--bone); }
.section-paper    { background: var(--paper); }
.section-gradient { background: var(--gradient-soft); }
.section-dark     { background: var(--gradient-dark); color: var(--paper); }
.section-dark h1, .section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark .eyebrow { color: var(--magenta-soft); }
.section-dark .lede { color: rgba(255,255,255,0.78); }

/* ---------- Top Bar / Navigation ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.topbar.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 1px 12px rgba(20, 16, 42, 0.04);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding: var(--space-2) 0;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}
.nav-logo img { height: 56px; width: auto; object-fit: contain; }
.nav-logo:hover { color: var(--ink); }

@media (max-width: 1024px) {
  .nav-logo img { height: 48px; }
}
@media (max-width: 640px) {
  .nav-logo img { height: 40px; }
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
}
.nav-menu a {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  color: var(--graphite);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav-menu a:hover { color: var(--ink); background: var(--bone); }
.nav-menu a.active { color: var(--purple); }
.nav-menu a.active::after {
  content: '';
  display: block;
  width: 18px;
  height: 2px;
  background: var(--gradient-brand);
  margin: 4px auto 0;
  border-radius: 2px;
}

.nav-cta { margin-left: var(--space-3); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bone);
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; stroke: var(--ink); }

@media (max-width: 880px) {
  .nav-menu, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .topbar.is-open .nav-menu {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: var(--space-4) var(--space-5) var(--space-6);
    background: var(--white);
    border-bottom: 1px solid var(--line);
    align-items: stretch;
    gap: 0;
  }
  .topbar.is-open .nav-menu a {
    padding: var(--space-4) var(--space-3);
    border-bottom: 1px solid var(--line);
    font-size: 1.05rem;
  }
  .topbar.is-open .nav-cta {
    display: inline-flex;
    margin: var(--space-4) var(--space-5) var(--space-5);
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.85rem 1.6rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
  white-space: nowrap;
  border: 1.5px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--gradient-brand);
  color: var(--white);
  box-shadow: var(--shadow-md);
}
.btn-primary:hover {
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-brand);
}
.btn-secondary {
  background: var(--white);
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-secondary:hover {
  border-color: var(--purple);
  color: var(--purple);
  background: var(--white);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  padding: 0.85rem 0.5rem;
}
.btn-ghost:hover {
  color: var(--purple);
  background: transparent;
}
.btn-arrow::after {
  content: '→';
  transition: transform 0.2s var(--ease);
}
.btn-arrow:hover::after { transform: translateX(4px); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: var(--space-9);
  padding-bottom: var(--space-9);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: var(--space-8);
  align-items: center;
}
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--space-7); }
}

.hero h1 {
  margin-bottom: var(--space-5);
}
.hero-cta {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-7);
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Decorative gradient blob behind hero visuals */
.hero-blob {
  position: absolute;
  inset: 5% 5%;
  background: var(--gradient-brand);
  border-radius: 50% 40% 60% 30% / 40% 50% 50% 60%;
  filter: blur(30px);
  opacity: 0.18;
  animation: blob 18s var(--ease) infinite alternate;
  z-index: 0;
}
@keyframes blob {
  0%   { border-radius: 50% 40% 60% 30% / 40% 50% 50% 60%; transform: translate(0,0) rotate(0deg); }
  50%  { border-radius: 30% 60% 40% 50% / 60% 30% 70% 40%; transform: translate(2%,-3%) rotate(8deg); }
  100% { border-radius: 60% 30% 50% 40% / 30% 60% 40% 70%; transform: translate(-2%,3%) rotate(-6deg); }
}

/* Hero card stack */
.hero-card-stack {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.hero-card {
  position: absolute;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-5);
  border: 1px solid var(--line);
}
.hero-card-1 {
  top: 8%; left: 4%; width: 58%;
  transform: rotate(-3deg);
}
.hero-card-2 {
  top: 30%; right: 4%; width: 52%;
  transform: rotate(2deg);
}
.hero-card-3 {
  bottom: 6%; left: 18%; width: 56%;
  transform: rotate(-1deg);
}
.hero-card .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--slate);
  font-weight: 600;
  margin-bottom: var(--space-3);
}
.hero-card .value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--ink);
  margin-bottom: var(--space-2);
}
.hero-card .desc { font-size: 0.85rem; color: var(--graphite); line-height: 1.45; }
.hero-card .bar {
  margin-top: var(--space-3);
  height: 5px;
  background: var(--bone);
  border-radius: 999px;
  overflow: hidden;
}
.hero-card .bar-fill {
  height: 100%;
  background: var(--gradient-brand);
  border-radius: 999px;
}

/* ---------- Section header ---------- */
.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto var(--space-8);
}
.section-header.left {
  text-align: left;
  margin-left: 0;
}

/* ---------- Cards ---------- */
.cards {
  display: grid;
  gap: var(--space-5);
}
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 880px) {
  .cards-3 { grid-template-columns: 1fr; }
  .cards-2 { grid-template-columns: 1fr; }
}

.card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.card-num {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--magenta);
  letter-spacing: 0.04em;
  margin-bottom: var(--space-4);
  display: block;
}
.card h3 { margin-bottom: var(--space-3); }
.card p { color: var(--graphite); font-size: 0.96rem; }

/* Service cards */
.service-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-decoration: none;
  color: var(--ink);
  transition: all 0.3s var(--ease);
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-brand);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  z-index: 0;
}
.service-card > * { position: relative; z-index: 1; }
.service-card:hover {
  color: var(--white);
  transform: translateY(-4px);
  box-shadow: var(--shadow-brand);
  border-color: transparent;
}
.service-card:hover::before { opacity: 1; }
.service-card:hover .service-meta,
.service-card:hover .service-card p { color: rgba(255,255,255,0.88); }
.service-card:hover .service-id { color: rgba(255,255,255,0.7); }

.service-id {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--slate);
  letter-spacing: 0.06em;
  transition: color 0.3s var(--ease);
}
.service-card h3 {
  margin: 0;
  font-size: 1.45rem;
  transition: color 0.3s var(--ease);
}
.service-card:hover h3 { color: var(--white); }
.service-card p {
  margin: 0;
  flex: 1;
  color: var(--graphite);
  font-size: 0.95rem;
  transition: color 0.3s var(--ease);
}
.service-meta {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--slate);
  font-weight: 500;
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.service-card:hover .service-meta { border-top-color: rgba(255,255,255,0.18); }
.service-meta span::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--magenta);
  border-radius: 999px;
  margin-right: 6px;
  vertical-align: middle;
}
.service-card:hover .service-meta span::before { background: var(--white); }

/* ---------- Pillars ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}
@media (max-width: 880px) { .pillars { grid-template-columns: 1fr; } }
.pillar {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.pillar::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 60px; height: 4px;
  background: var(--gradient-brand);
  border-radius: 0 0 999px 999px;
}
.pillar h3 { margin-bottom: var(--space-3); }
.pillar p { color: var(--graphite); font-size: 0.95rem; }

/* ---------- Differentiator strip ---------- */
.diff-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  text-align: center;
}
@media (max-width: 880px) {
  .diff-strip { grid-template-columns: repeat(2, 1fr); }
}
.diff-strip .stat-num {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  font-weight: 400;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: var(--space-2);
}
.diff-strip .stat-label {
  font-size: 0.9rem;
  color: var(--graphite);
  font-weight: 500;
  max-width: 22ch;
  margin: 0 auto;
}

/* ---------- CTA Banner ---------- */
.cta-banner {
  position: relative;
  background: var(--gradient-dark);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-7), 6vw, var(--space-9));
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
}
.cta-banner::before {
  content: '';
  position: absolute;
  width: 60%;
  height: 200%;
  top: -50%;
  right: -10%;
  background: radial-gradient(circle, rgba(183, 72, 145, 0.45) 0%, transparent 60%);
  z-index: -1;
  filter: blur(40px);
}
.cta-banner h2 { color: var(--white); margin-bottom: var(--space-4); max-width: 18ch; }
.cta-banner .lede { color: rgba(255,255,255,0.78); margin-bottom: var(--space-6); max-width: 50ch; }
.cta-banner .btn-secondary {
  background: rgba(255,255,255,0.06);
  color: var(--white);
  border-color: rgba(255,255,255,0.18);
}
.cta-banner .btn-secondary:hover {
  background: rgba(255,255,255,0.12);
  color: var(--white);
  border-color: rgba(255,255,255,0.4);
}

/* ---------- Logo wall ---------- */
.logo-wall {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-7);
  opacity: 0.7;
}
.logo-wall span {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  color: var(--slate);
  font-style: italic;
}

/* ---------- Inner page hero ---------- */
.page-hero {
  position: relative;
  padding-top: var(--space-9);
  padding-bottom: var(--space-8);
  background: var(--gradient-soft);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  top: -300px; right: -100px;
  background: radial-gradient(circle, rgba(183, 72, 145, 0.18) 0%, transparent 70%);
  z-index: 0;
}
.page-hero > .container { position: relative; z-index: 1; }
.page-hero .lede { margin-top: var(--space-5); }

/* ---------- Prose / long-form content ---------- */
.prose {
  max-width: var(--max-prose);
  margin: 0 auto;
}
.prose h2 {
  margin-top: var(--space-8);
  margin-bottom: var(--space-5);
}
.prose h3 {
  margin-top: var(--space-7);
  margin-bottom: var(--space-4);
}
.prose p, .prose ul, .prose ol {
  margin-bottom: var(--space-5);
  color: var(--graphite);
  font-size: 1.05rem;
}
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: var(--space-2); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose blockquote {
  border-left: 3px solid;
  border-image: var(--gradient-brand) 1;
  padding: var(--space-3) var(--space-5);
  margin: var(--space-6) 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--graphite);
}

/* ---------- Service detail layouts ---------- */
.service-detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-8);
  align-items: start;
}
@media (max-width: 980px) {
  .service-detail-grid { grid-template-columns: 1fr; }
}
.service-aside {
  position: sticky;
  top: 110px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}
.service-aside h4 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--slate);
  margin-bottom: var(--space-4);
}
.service-aside dl { font-size: 0.95rem; }
.service-aside dt {
  font-weight: 600;
  color: var(--ink);
  margin-top: var(--space-4);
}
.service-aside dt:first-child { margin-top: 0; }
.service-aside dd { color: var(--graphite); margin-top: var(--space-1); }
.service-aside .btn { width: 100%; margin-top: var(--space-5); }

.phase-list {
  list-style: none;
  counter-reset: phase;
}
.phase-list li {
  counter-increment: phase;
  padding: var(--space-5) 0 var(--space-5) 4rem;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.phase-list li:last-child { border-bottom: none; }
.phase-list li::before {
  content: counter(phase, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: var(--space-5);
  font-family: var(--font-display);
  font-size: 1.4rem;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.phase-list h4 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: var(--space-2);
}
.phase-list p { color: var(--graphite); font-size: 0.98rem; }

.deliverables {
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  border: 1px solid var(--line);
}
.deliverables ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3) var(--space-5);
}
@media (max-width: 640px) { .deliverables ul { grid-template-columns: 1fr; } }
.deliverables li {
  padding-left: 1.6rem;
  position: relative;
  font-size: 0.95rem;
  color: var(--graphite);
  margin-bottom: 0;
}
.deliverables li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--gradient-brand);
  opacity: 0.85;
}
.deliverables li::after {
  content: '';
  position: absolute;
  left: 4px; top: 0.75rem;
  width: 6px; height: 3px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg);
}

/* ---------- About / Team ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: center;
}
@media (max-width: 880px) {
  .about-grid { grid-template-columns: 1fr; }
}
.about-image {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-image::before {
  content: '';
  position: absolute;
  inset: 1px;
  background: var(--gradient-soft);
  border-radius: calc(var(--radius-lg) - 1px);
}
.about-image .monogram {
  position: relative;
  font-family: var(--font-display);
  font-size: 18rem;
  font-weight: 700;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.07em;
  line-height: 1;
  z-index: 1;
}

.timeline {
  list-style: none;
  position: relative;
  padding-left: var(--space-6);
}
.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--line-strong);
}
.timeline li {
  position: relative;
  padding-bottom: var(--space-6);
}
.timeline li::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-6) + 1px);
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--gradient-brand);
  box-shadow: 0 0 0 4px var(--paper);
}
.timeline .year {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--magenta-deep);
  letter-spacing: 0.06em;
  margin-bottom: var(--space-2);
}
.timeline h4 { margin-bottom: var(--space-2); font-size: 1.1rem; }
.timeline p { font-size: 0.95rem; color: var(--graphite); }

/* ---------- FAQ ---------- */
.faq {
  border-top: 1px solid var(--line);
}
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-question {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--space-5) 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--ink);
  font-weight: 500;
}
.faq-question .plus {
  flex-shrink: 0;
  width: 28px; height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--bone);
  color: var(--purple);
  transition: transform 0.3s var(--ease), background 0.2s var(--ease);
  font-size: 1rem;
}
.faq-item.is-open .faq-question .plus {
  transform: rotate(45deg);
  background: var(--gradient-brand);
  color: var(--white);
}
.faq-answer {
  display: none;
  padding-bottom: var(--space-5);
  color: var(--graphite);
  font-size: 1rem;
  max-width: 70ch;
}
.faq-item.is-open .faq-answer { display: block; }

/* ---------- Form ---------- */
.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-5), 4vw, var(--space-7));
  box-shadow: var(--shadow-md);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: var(--space-4);
}
.field-full { grid-column: 1 / -1; }
.field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--graphite);
  letter-spacing: 0.01em;
}
.field label .req { color: var(--magenta-deep); margin-left: 2px; }

.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.78rem 0.95rem;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
  width: 100%;
  outline: none;
}
.field textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: var(--mist); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--purple);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(83, 53, 132, 0.12);
}
.field-hint { font-size: 0.82rem; color: var(--slate); }
.form-consent-row { margin-top: var(--space-2); }
.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--graphite);
  line-height: 1.55;
  font-weight: 400;
}
.consent-label input[type="checkbox"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  margin-top: 0.2rem;
  accent-color: var(--magenta);
  cursor: pointer;
  border-radius: 3px;
}
.consent-label span { flex: 1; }

.form-status {
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  display: none;
}
.form-status.is-success {
  display: block;
  background: rgba(83, 53, 132, 0.06);
  color: var(--purple-deep);
  border: 1px solid var(--purple-soft);
}
.form-status.is-error {
  display: block;
  background: rgba(183, 72, 145, 0.06);
  color: var(--magenta-deep);
  border: 1px solid var(--magenta-soft);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: rgba(255,255,255,0.78);
  padding-top: var(--space-9);
  padding-bottom: var(--space-6);
  position: relative;
  overflow: hidden;
}
.footer::before {
  content: '';
  position: absolute;
  width: 800px; height: 800px;
  bottom: -500px; left: -200px;
  background: radial-gradient(circle, rgba(183, 72, 145, 0.18) 0%, transparent 70%);
  z-index: 0;
}
.footer > .container { position: relative; z-index: 1; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: var(--space-7);
  padding-bottom: var(--space-7);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-brand img {
  height: 220px;
  margin-bottom: var(--space-4);
  filter: brightness(0) invert(1);
}
.footer-brand p { font-size: 0.92rem; max-width: 32ch; line-height: 1.6; }
.footer h5 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.55);
  margin-bottom: var(--space-4);
  font-weight: 600;
}
.footer ul { list-style: none; }
.footer li { margin-bottom: var(--space-3); }
.footer a {
  color: rgba(255,255,255,0.78);
  font-size: 0.94rem;
  transition: color 0.2s var(--ease);
}
.footer a:hover { color: var(--magenta-soft); }

.footer-bottom {
  padding-top: var(--space-5);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mt-7 { margin-top: var(--space-7); }
.flex-row { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Legal pages prose ---------- */
.legal-prose h2 {
  font-size: 1.4rem;
  margin-top: var(--space-7);
  margin-bottom: var(--space-3);
  color: var(--ink);
}
.legal-prose h2:first-child {
  margin-top: 0;
}
.legal-prose p {
  color: var(--graphite);
  line-height: 1.7;
  margin-bottom: var(--space-4);
}
.legal-prose ul {
  margin-bottom: var(--space-4);
  padding-left: 1.4em;
}
.legal-prose li {
  color: var(--graphite);
  line-height: 1.7;
  margin-bottom: var(--space-2);
}
.legal-prose a {
  color: var(--violet);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-prose a:hover {
  color: var(--magenta);
}
.legal-prose strong { color: var(--ink); font-weight: 600; }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  bottom: var(--space-4);
  left: var(--space-4);
  right: var(--space-4);
  max-width: 720px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(20, 16, 42, 0.18);
  padding: var(--space-5);
  z-index: 9999;
  display: none;
  font-size: 0.93rem;
  line-height: 1.55;
}
.cookie-banner.is-visible { display: block; }
.cookie-banner h2 {
  font-size: 1.05rem;
  margin: 0 0 var(--space-2) 0;
  color: var(--ink);
  font-weight: 700;
}
.cookie-banner p {
  color: var(--graphite);
  margin: 0 0 var(--space-4) 0;
}
.cookie-banner p a {
  color: var(--violet);
  text-decoration: underline;
}
.cookie-banner-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.cookie-banner .btn {
  font-size: 0.9rem;
  padding: 0.55rem 1rem;
}
.cookie-banner .btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--graphite);
}
.cookie-banner .btn-ghost:hover {
  border-color: var(--violet);
  color: var(--violet);
}

/* Customise panel - hidden by default */
.cookie-customise {
  display: none;
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}
.cookie-banner.is-customising .cookie-customise { display: block; }
.cookie-banner.is-customising .cookie-banner-actions-main { display: none; }

.cookie-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--line);
}
.cookie-toggle-row:last-of-type { border-bottom: none; }
.cookie-toggle-row .info {
  flex: 1;
}
.cookie-toggle-row .info strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 2px;
}
.cookie-toggle-row .info span {
  color: var(--slate);
  font-size: 0.85rem;
}

/* Toggle switch */
.cookie-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.cookie-switch input { opacity: 0; width: 0; height: 0; }
.cookie-switch .slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--line);
  transition: 0.2s;
  border-radius: 22px;
}
.cookie-switch .slider::before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.2s;
}
.cookie-switch input:checked + .slider {
  background: var(--violet);
}
.cookie-switch input:checked + .slider::before {
  transform: translateX(18px);
}
.cookie-switch input:disabled + .slider {
  background: var(--slate);
  opacity: 0.6;
  cursor: not-allowed;
}

.cookie-customise-actions {
  margin-top: var(--space-4);
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* Re-open cookie preferences link in footer */
.footer .cookie-prefs-link {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
  font: inherit;
  text-align: left;
}
.footer .cookie-prefs-link:hover {
  color: var(--paper);
}

@media (max-width: 540px) {
  .cookie-banner {
    bottom: var(--space-3);
    left: var(--space-3);
    right: var(--space-3);
    padding: var(--space-4);
  }
  .cookie-banner-actions {
    flex-direction: column;
  }
  .cookie-banner-actions .btn {
    width: 100%;
  }
}
