/* ============================================================
   CAVAS CONSULTING — style.css
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  --navy:        #001F3F;
  --electric:    #0074D9;
  --slate:       #7A8A9A;
  --slate-light: #AAAAAA;
  --white:       #FFFFFF;
  --off-white:   #F4F6F9;
  --dark-text:   #0D1B2A;

  --max-w: 1200px;
  --px: clamp(20px, 5vw, 80px);
  --section-py: clamp(72px, 10vw, 120px);

  --transition-base: 0.25s ease;
  --transition-slow: 0.5s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 400;
  color: var(--dark-text);
  background-color: var(--navy);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  text-decoration: none;
  color: inherit;
}

/* ---------- Utility ---------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--px);
}

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

/* ---------- Eyebrow labels ---------- */
.eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--electric);
  margin-bottom: 16px;
  display: block;
}

.eyebrow--light {
  color: var(--electric);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: background-color var(--transition-base),
              box-shadow var(--transition-base),
              transform var(--transition-base);
  border: none;
  text-decoration: none;
}

.btn--pill {
  border-radius: 999px;
}

.btn--electric {
  background-color: var(--electric);
  color: var(--white);
}

.btn--electric:hover,
.btn--electric:focus-visible {
  filter: brightness(1.12);
  box-shadow: 0 0 20px rgba(0, 116, 217, 0.55);
  outline: none;
}

.btn--large {
  height: 56px;
  padding: 0 36px;
  font-size: 17px;
  letter-spacing: 0.01em;
}

.btn:focus-visible {
  outline: 2px solid var(--electric);
  outline-offset: 3px;
}

/* ---------- Link styles ---------- */
.link--electric {
  color: var(--electric);
  position: relative;
  display: inline-block;
  font-weight: 500;
}

.link--electric::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background-color: var(--electric);
  transition: width 0.25s ease;
}

.link--electric:hover::after,
.link--electric:focus-visible::after {
  width: 100%;
}

.link--electric:focus-visible {
  outline: 2px solid var(--electric);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--navy);
  border-bottom: 1px solid rgba(0, 116, 217, 0.3);
  animation: navFadeIn 0.4s ease forwards;
}

@keyframes navFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--px);
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.nav__logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav__logo {
  height: 40px;
  width: auto;
  /* Logo has white background — white bg box on dark nav */
  background-color: var(--white);
  border-radius: 4px;
  padding: 3px 6px;
}

.nav__cta {
  height: 40px;
  padding: 0 22px;
  font-size: 14px;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav__cta-short {
  display: none;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  background-color: var(--navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Animated orb background */
.hero__bg-animation {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  background: var(--electric);
  filter: blur(80px);
  opacity: 0.06;
  animation: drift linear infinite;
}

.orb--1 { width: 340px; height: 340px; top: -80px;  left: -60px;  animation-duration: 22s; animation-delay: 0s; }
.orb--2 { width: 260px; height: 260px; top: 40%;   left: 60%;   animation-duration: 28s; animation-delay: -7s; }
.orb--3 { width: 200px; height: 200px; top: 70%;   left: 10%;   animation-duration: 20s; animation-delay: -3s; }
.orb--4 { width: 300px; height: 300px; top: 20%;   left: 30%;   animation-duration: 35s; animation-delay: -12s; }
.orb--5 { width: 180px; height: 180px; top: 55%;   left: 75%;   animation-duration: 18s; animation-delay: -5s; }
.orb--6 { width: 240px; height: 240px; top: 85%;   left: 45%;   animation-duration: 25s; animation-delay: -9s; }

@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(30px, -20px) scale(1.05); }
  66%  { transform: translate(-20px, 30px) scale(0.95); }
  100% { transform: translate(0, 0) scale(1); }
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 60% 40%;
  align-items: center;
  gap: 60px;
  padding-top: 80px;
  padding-bottom: 80px;
  width: 100%;
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}

.hero__h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(40px, 5.5vw, 72px);
  line-height: 1.08;
  color: var(--white);
  letter-spacing: -0.02em;
}

.hero__sub {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: clamp(16px, 1.8vw, 20px);
  line-height: 1.6;
  color: var(--slate-light);
}

.hero__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.hero__ghost-link {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 15px;
  color: var(--slate-light);
  position: relative;
  display: inline-block;
}

.hero__ghost-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--slate-light);
  transition: width 0.25s ease;
}

.hero__ghost-link:hover::after,
.hero__ghost-link:focus-visible::after {
  width: 100%;
}

.hero__ghost-link:focus-visible {
  outline: 2px solid var(--electric);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Circuit SVG */
.hero__illustration {
  display: flex;
  align-items: center;
  justify-content: center;
}

.circuit-svg {
  width: 100%;
  max-width: 400px;
  height: auto;
}

/* Pulse animation on nodes */
.pulse-node {
  animation: nodePulse 2.4s ease-in-out infinite;
}
.pulse-node--1 { animation-delay: 0s; }
.pulse-node--2 { animation-delay: 0.8s; }
.pulse-node--3 { animation-delay: 1.6s; }

@keyframes nodePulse {
  0%, 100% { r: 6; opacity: 1; }
  50%       { r: 10; opacity: 0.4; }
}

/* Scroll indicator */
.hero__scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  animation: scrollFadeIn 0.6s ease 1.5s forwards, scrollBounce 1.8s ease-in-out 1.5s infinite;
}

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

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ============================================================
   PAGE LOAD ANIMATIONS
   ============================================================ */
.animate-load {
  opacity: 0;
  transform: translateY(20px);
  animation: loadReveal 0.6s ease forwards;
}
.animate-load--1 { animation-delay: 0.1s; }
.animate-load--2 { animation-delay: 0.2s; }
.animate-load--3 { animation-delay: 0.35s; }
.animate-load--4 { animation-delay: 0.5s; }
.animate-load--5 { animation-delay: 0.4s; }
.animate-load--6 { /* handled by hero__scroll-indicator keyframe */ animation: none; opacity: 0; }

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

/* ============================================================
   SCROLL REVEAL (added via JS IntersectionObserver)
   ============================================================ */
.scroll-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.scroll-reveal--left {
  transform: translateX(-40px);
}

.scroll-reveal--right {
  transform: translateX(40px);
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* Stagger delay for service cards */
.services__grid .scroll-reveal:nth-child(1) { transition-delay: 0ms; }
.services__grid .scroll-reveal:nth-child(2) { transition-delay: 50ms; }
.services__grid .scroll-reveal:nth-child(3) { transition-delay: 100ms; }

/* ============================================================
   ABOUT
   ============================================================ */
.about {
  background-color: var(--off-white);
}

.about__inner {
  display: grid;
  grid-template-columns: 45% 55%;
  align-items: start;
  gap: 60px;
}

/* Founder Card */
.founder-card {
  background-color: var(--white);
  border-top: 4px solid var(--navy);
  border-radius: 4px;
  padding: 36px 32px;
  box-shadow: 0 4px 24px rgba(0, 31, 63, 0.08), 0 1px 4px rgba(0, 31, 63, 0.04);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.founder-card__header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.founder-card__name {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 26px;
  color: var(--navy);
  line-height: 1.2;
}

.founder-card__title {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--slate);
  letter-spacing: 0.01em;
}

.founder-card__location {
  font-size: 13px;
  color: var(--slate);
  margin-top: 4px;
}

.founder-card__rule {
  border: none;
  border-top: 1px solid rgba(0, 116, 217, 0.3);
}

.founder-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--navy);
  background-color: var(--off-white);
  border: 1px solid var(--navy);
  border-radius: 999px;
  padding: 5px 12px;
  white-space: nowrap;
}

.founder-card__linkedin {
  margin-top: 4px;
  font-size: 14px;
}

/* Bio copy */
.about__bio-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about__bio {
  font-size: clamp(16px, 1.5vw, 17px);
  font-weight: 400;
  line-height: 1.8;
  color: var(--dark-text);
}

/* ============================================================
   SERVICES
   ============================================================ */
.services {
  background-color: var(--navy);
}

.services .container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.services__heading {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: clamp(30px, 3.5vw, 42px);
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 52px;
  letter-spacing: -0.02em;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
}

/* Service Card */
.service-card {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 116, 217, 0.3);
  border-left: 4px solid var(--electric);
  border-radius: 6px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition:
    border-color var(--transition-base),
    background-color var(--transition-base),
    transform var(--transition-base),
    box-shadow var(--transition-base);
  cursor: default;
}

.service-card:hover,
.service-card:focus-visible {
  border-color: rgba(0, 116, 217, 0.8);
  background-color: rgba(255, 255, 255, 0.09);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 116, 217, 0.15);
  outline: none;
}

.service-card:focus-visible {
  outline: 2px solid var(--electric);
  outline-offset: 3px;
}

/* Featured card — slightly elevated */
.service-card--featured {
  border-left-width: 4px;
  border-color: rgba(0, 116, 217, 0.7);
  background-color: rgba(0, 116, 217, 0.07);
  position: relative;
}

.service-card--featured:hover,
.service-card--featured:focus-visible {
  border-color: var(--electric);
  background-color: rgba(0, 116, 217, 0.12);
  box-shadow: 0 8px 40px rgba(0, 116, 217, 0.25);
}

.service-card__icon {
  display: flex;
  align-items: center;
}

.service-card__badge {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  border-radius: 999px;
  padding: 4px 12px;
  letter-spacing: 0.04em;
  align-self: flex-start;
}

.service-card__badge--electric {
  background-color: rgba(0, 116, 217, 0.18);
  color: var(--electric);
  border: 1px solid rgba(0, 116, 217, 0.4);
}

.service-card__badge--white {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.service-card__badge--muted {
  background-color: rgba(170, 170, 170, 0.1);
  color: var(--slate-light);
  border: 1px solid rgba(170, 170, 170, 0.2);
}

.service-card__title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--white);
  line-height: 1.25;
}

.service-card__desc {
  font-size: 15px;
  font-weight: 400;
  color: var(--slate-light);
  line-height: 1.65;
  flex: 1;
}

.service-card__link {
  font-size: 14px;
  font-weight: 500;
  align-self: flex-start;
  margin-top: auto;
}

/* ============================================================
   NUMBERS / SOCIAL PROOF
   ============================================================ */
.numbers {
  background-color: var(--off-white);
}

.numbers__label {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
  text-align: center;
  margin-bottom: 52px;
}

.numbers__grid {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
}

.stat-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 32px;
  gap: 12px;
}

.stat-divider {
  width: 1px;
  align-self: stretch;
  min-height: 80px;
  background-color: rgba(122, 138, 154, 0.3);
}

.stat-block__number {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(36px, 4vw, 52px);
  color: var(--electric);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  display: block;
}

.stat-block__label {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: clamp(13px, 1.2vw, 15px);
  color: var(--dark-text);
  line-height: 1.5;
  max-width: 180px;
  display: block;
}

.stat-gap {
  color: var(--electric);
  font-weight: 700;
}

.numbers__source {
  text-align: center;
  margin-top: 52px;
  font-size: 13px;
  color: var(--slate);
  font-style: italic;
  font-family: 'DM Sans', sans-serif;
}

/* ============================================================
   CTA FOOTER SECTION
   ============================================================ */
.cta-footer {
  background-color: var(--navy);
  padding-top: 120px;
  padding-bottom: 120px;
}

.cta-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 28px;
}

.cta-footer__heading {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(36px, 4.5vw, 52px);
  color: var(--white);
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 700px;
}

.cta-footer__sub {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 18px;
  color: var(--slate-light);
  line-height: 1.65;
  max-width: 600px;
}

.cta-footer__reassurance {
  font-size: 14px;
  color: var(--slate-light);
  font-weight: 400;
}

/* ============================================================
   FOOTER BAR
   ============================================================ */
.footer-bar {
  background-color: rgba(255, 255, 255, 0.04);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
  font-size: 13px;
  color: var(--slate-light);
  gap: 16px;
  flex-wrap: wrap;
}

.footer-bar__linkedin {
  color: var(--slate-light);
  transition: color var(--transition-base);
  position: relative;
  display: inline-block;
}

.footer-bar__linkedin::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--electric);
  transition: width 0.25s ease;
}

.footer-bar__linkedin:hover {
  color: var(--electric);
}

.footer-bar__linkedin:hover::after,
.footer-bar__linkedin:focus-visible::after {
  width: 100%;
}

.footer-bar__linkedin:focus-visible {
  outline: 2px solid var(--electric);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* Tablet: 768px–1024px */
@media (max-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

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

  /* Third card centered */
  .service-card:last-child {
    grid-column: 1 / -1;
    max-width: 480px;
    margin: 0 auto;
  }

  .numbers__grid {
    flex-wrap: wrap;
    gap: 40px;
  }

  .stat-divider {
    display: none;
  }

  .stat-block {
    flex: 1 1 40%;
    min-width: 160px;
    padding: 0 16px;
  }
}

/* Mobile: < 768px */
@media (max-width: 768px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 48px;
    padding-top: 60px;
    padding-bottom: 60px;
  }

  .hero__illustration {
    order: -1;
    max-width: 280px;
    margin: 0 auto;
  }

  .hero__h1 {
    font-size: clamp(38px, 9vw, 52px);
  }

  .about__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

  .service-card:last-child {
    grid-column: auto;
    max-width: none;
    margin: 0;
  }

  .numbers__grid {
    flex-direction: column;
    align-items: center;
    gap: 40px;
  }

  .stat-block {
    padding: 0;
    flex: none;
    width: 100%;
    max-width: 280px;
  }

  .nav__cta-full { display: none; }
  .nav__cta-short { display: inline; }
}

/* Small mobile: < 480px */
@media (max-width: 480px) {
  .hero__h1 {
    font-size: clamp(36px, 10vw, 44px);
  }

  .nav__logo {
    height: 34px;
  }

  .services__heading {
    font-size: 28px;
  }

  .cta-footer__heading {
    font-size: 32px;
  }

  .btn--large {
    height: 52px;
    padding: 0 28px;
    font-size: 16px;
  }
}

/* Ensure no horizontal overflow */
@media (max-width: 600px) {
  .hero__sub br {
    display: none;
  }
}
