@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Space+Grotesk:wght@500;700&display=swap');

:root {
  --onyx: #0B0F14;
  --steel: #18212B;
  --mist: #C7D0DA;
  --porcelain: #F5F8FB;
  --azure: #2E90FA;
  --muted: #8A96A3;
  --glass: rgba(245, 248, 251, 0.07);
  --glass-border: rgba(199, 208, 218, 0.22);
  --header-h: 76px;
  --radius: 6px;
  --transition: 0.35s ease;
  --max-w: 1200px;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --section-pad: clamp(5.5rem, 8vw, 8rem);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a { color: currentColor; text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: 0.78; }
a.btn, a.btn:hover, a.btn-primary, a.btn-primary:hover, a.btn-outline, a.btn-outline:hover { opacity: 1; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.875rem, 6vw, 5.25rem); font-weight: 700; line-height: 1.2; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.625rem); margin-bottom: 1rem; }
h3 { font-size: 1.3rem; margin-bottom: 0.75rem; font-weight: 500; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 1rem 1.25rem; }
li { margin-bottom: 0.45rem; }

.surface-onyx { background: var(--onyx); color: var(--porcelain); }
.surface-porcelain { background: var(--porcelain); color: var(--onyx); }
.surface-steel { background: var(--steel); color: var(--porcelain); }
.surface-azure { background: var(--azure); color: var(--onyx); }

.surface-onyx p, .surface-onyx li, .surface-steel p, .surface-steel li { color: rgba(245, 248, 251, 0.85); }
.surface-porcelain p, .surface-porcelain li { color: rgba(11, 15, 20, 0.78); }
.surface-onyx h1, .surface-onyx h2, .surface-onyx h3,
.surface-steel h1, .surface-steel h2, .surface-steel h3 { color: var(--porcelain); }
.surface-porcelain h1, .surface-porcelain h2, .surface-porcelain h3 { color: var(--onyx); }

.text-azure { color: var(--azure); }
.surface-porcelain .text-azure { color: var(--azure); }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--azure);
  margin-bottom: 1.25rem;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

.hairline {
  border: none;
  height: 1px;
  background: var(--mist);
  opacity: 0.35;
  margin: 0;
}

.surface-onyx .hairline, .surface-steel .hairline { background: var(--mist); opacity: 0.25; }

/* Loop motif */
.loop-trace {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.loop-trace svg {
  width: 48px;
  height: 24px;
  flex-shrink: 0;
}

.loop-nodes {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 1.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mist);
}

.loop-nodes span { position: relative; padding-top: 0.75rem; }
.loop-nodes span::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--azure);
}

/* Frosted glass */
.glass-card {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.surface-porcelain .glass-card {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(199, 208, 218, 0.5);
  box-shadow: 0 4px 24px rgba(11, 15, 20, 0.06);
}

/* Header */
.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 200;
  padding: 1.25rem 0;
  color: var(--porcelain);
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

.site-header.is-sticky {
  position: fixed;
  background: rgba(245, 248, 251, 0.94);
  backdrop-filter: blur(14px);
  color: var(--onyx);
  padding: 0.75rem 0;
  box-shadow: 0 1px 0 rgba(199, 208, 218, 0.5);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--azure);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--azure);
}

.site-header.is-sticky .logo-mark { border-color: var(--azure); color: var(--azure); }

.main-nav ul {
  list-style: none;
  margin: 0;
  display: flex;
  gap: 1.75rem;
  align-items: center;
}

.main-nav a {
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid currentColor;
  border-radius: var(--radius);
  padding: 0.45rem 0.65rem;
  cursor: pointer;
  color: inherit;
  font-family: var(--font-body);
  font-size: 0.85rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.65rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: filter var(--transition), box-shadow var(--transition);
}

.btn-primary {
  background: var(--azure);
  color: var(--onyx);
}

.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 4px 20px rgba(46, 144, 250, 0.35); }

.btn-outline {
  background: transparent;
  color: currentColor;
  border: 1px solid currentColor;
}

.btn-outline:hover { filter: brightness(1.15); box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12); }

.btn-group { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }

/* Hero — GROWTH LOOP */
.hero-loop {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-sizing: border-box;
  padding-top: calc(var(--header-h) + 2.5rem);
  padding-bottom: 4.5rem;
}

.hero-loop__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.hero-loop__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 15, 20, 0.55) 0%, rgba(11, 15, 20, 0.72) 45%, rgba(11, 15, 20, 0.88) 100%);
  z-index: 1;
  pointer-events: none;
}

.hero-loop__badge {
  position: absolute;
  top: calc(var(--header-h) + 1.5rem);
  right: 1.5rem;
  z-index: 3;
  max-width: 280px;
}

.hero-loop__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 0 1.5rem;
  flex-shrink: 0;
}

.hero-loop__content .container { max-width: 680px; margin-left: 1.5rem; margin-right: auto; }

.hero-loop__content h1 {
  font-size: clamp(2.125rem, 4.5vw, 4.5rem);
  line-height: 1.22;
  padding-top: 0.15em;
  margin-top: 0.75rem;
  margin-bottom: 1.25rem;
  overflow: visible;
}

.hero-loop__trust {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  flex-shrink: 0;
  padding: 0.85rem 0;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--mist);
  border-top: 1px solid rgba(199, 208, 218, 0.25);
}

/* Page hero (inner pages) */
.page-hero {
  padding-top: calc(var(--header-h) + 4.5rem);
  padding-bottom: 3rem;
}

.page-hero--photo {
  position: relative;
  min-height: 42vh;
  display: flex;
  align-items: flex-end;
  padding-top: calc(var(--header-h) + 3rem);
  padding-bottom: 3rem;
  background-size: cover;
  background-position: center;
}

.page-hero--photo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 15, 20, 0.4), rgba(11, 15, 20, 0.85));
}

.page-hero--photo .container { position: relative; z-index: 1; }

/* Grid layouts */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.grid-6 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }

.card {
  border: 1px solid rgba(199, 208, 218, 0.25);
  border-radius: var(--radius);
  padding: 1.75rem;
  height: 100%;
}

.surface-porcelain .card { border-color: rgba(199, 208, 218, 0.55); background: #fff; }
.surface-steel .card, .surface-onyx .card { border-color: rgba(199, 208, 218, 0.18); }

.card-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: rgba(46, 144, 250, 0.2);
  line-height: 1;
  margin-bottom: 0.75rem;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

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

.stat-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--azure);
  margin-bottom: 0.35rem;
}

.stat-item span { font-size: 0.85rem; color: var(--muted); }

.surface-onyx .stat-item span, .surface-steel .stat-item span { color: var(--mist); }

.stat-note { font-size: 0.8rem; color: var(--muted); margin-top: 1rem; text-align: center; }
.surface-onyx .stat-note, .surface-steel .stat-note { color: rgba(199, 208, 218, 0.7); }

/* Loop stages rail */
.loop-rail {
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid var(--azure);
}

.loop-rail .card { margin-bottom: 1.25rem; }
.loop-rail .card:last-child { margin-bottom: 0; }

/* Photo frames */
.photo-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(199, 208, 218, 0.3);
}

.photo-frame img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }

.photo-caption { font-size: 0.8rem; color: var(--muted); margin-top: 0.65rem; }
.surface-onyx .photo-caption, .surface-steel .photo-caption { color: var(--mist); }

/* Case studies */
.case-study { margin-bottom: 3.5rem; padding-bottom: 3.5rem; border-bottom: 1px solid rgba(199, 208, 218, 0.2); }
.case-study:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.case-tag { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--azure); margin-bottom: 0.5rem; }

/* FAQ */
.faq-list { list-style: none; margin: 0; }
.faq-item { border-bottom: 1px solid rgba(199, 208, 218, 0.35); padding: 1.75rem 0; }
.faq-item:first-child { padding-top: 0; }
.faq-q { font-family: var(--font-display); font-size: 1.15rem; font-weight: 500; margin-bottom: 0.75rem; }

/* Forms */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4rem; }

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid rgba(199, 208, 218, 0.65);
  border-radius: var(--radius);
  background: #fff;
  color: var(--onyx);
}

.form-group textarea { min-height: 140px; resize: vertical; }

.form-check { display: flex; gap: 0.65rem; align-items: flex-start; }
.form-check input { width: auto; margin-top: 0.3rem; }

.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.form-error {
  background: rgba(46, 144, 250, 0.12);
  border: 1px solid var(--azure);
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.contact-block address { font-style: normal; line-height: 1.8; }

/* Legal prose */
.legal-content h2 { margin-top: 2.5rem; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 { margin-top: 1.75rem; font-size: 1.1rem; }

/* Footer */
.site-footer {
  padding: 3.5rem 0 2rem;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; margin-bottom: 0.75rem; }

.footer-nav ul { list-style: none; margin: 0; }
.footer-nav li { margin-bottom: 0.4rem; }

.footer-bottom {
  padding-top: 1.75rem;
  border-top: 1px solid rgba(199, 208, 218, 0.2);
  font-size: 0.8rem;
  color: var(--muted);
}

.surface-onyx .footer-bottom, .surface-steel .footer-bottom { color: rgba(199, 208, 218, 0.65); }

.disclaimer { font-size: 0.78rem; line-height: 1.6; margin-top: 1.25rem; opacity: 0.85; }

/* Cookie banner */
#cookie-banner, #cookie-panel {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9999;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 -4px 24px rgba(11, 15, 20, 0.15);
}

#cookie-banner[hidden], #cookie-panel[hidden] { display: none; }

.cookie-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

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

.cookie-actions .btn { padding: 0.6rem 1.1rem; font-size: 0.85rem; }

.cookie-panel-inner { max-width: 520px; margin: 0 auto; }
.cookie-panel-inner h3 { margin-bottom: 1rem; }
.cookie-option { margin-bottom: 1rem; }

/* Reveal animation */
.js .reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0.001;
    transform: translateY(16px);
  }
  .js .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* CTA band */
.cta-band { text-align: center; }
.cta-band p { max-width: 540px; margin: 0 auto 1.5rem; }

/* 404 */
.error-page { min-height: 70vh; display: flex; align-items: center; padding-top: var(--header-h); }

/* Thanks */
.thanks-page { min-height: 60vh; display: flex; align-items: center; padding-top: var(--header-h); text-align: center; }

/* Responsive */
@media (max-height: 780px) and (min-width: 961px) {
  .hero-loop {
    padding-top: calc(var(--header-h) + 1.5rem);
    padding-bottom: 4rem;
  }
  .hero-loop__content h1 {
    font-size: clamp(1.875rem, 4vw, 3.25rem);
  }
}

@media (max-width: 960px) {
  .grid-2, .grid-3, .grid-4, .grid-6, .footer-grid, .stat-row { grid-template-columns: 1fr; }
  .hero-loop {
    min-height: 100svh;
    justify-content: flex-start;
    padding-top: calc(var(--header-h) + 10rem);
    padding-bottom: 4.5rem;
  }
  .hero-loop__badge {
    position: absolute;
    top: calc(var(--header-h) + 0.75rem);
    right: 1rem;
    left: 1rem;
    margin: 0;
    max-width: none;
  }
  .hero-loop__content {
    padding: 0;
    margin-top: 0;
  }
  .hero-loop__content .container { margin-left: auto; margin-right: auto; }
  .hero-loop__content h1 {
    font-size: clamp(1.875rem, 7vw, 2.75rem);
    line-height: 1.28;
    padding-top: 0.2em;
  }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed;
    top: 0; right: 0;
    width: min(300px, 85vw);
    height: 100vh;
    background: var(--porcelain);
    color: var(--onyx);
    padding: 5rem 1.5rem 2rem;
    transform: translateX(100%);
    transition: transform var(--transition);
    box-shadow: -4px 0 24px rgba(11, 15, 20, 0.12);
  }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
}

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