/* ─────────────────────────────────────────────────────────────────────────
   CSS CUSTOM PROPERTIES
   All colors, spacing, and design tokens live here. Edit this block to
   retheme the entire site without touching individual component rules.
───────────────────────────────────────────────────────────────────────── */
:root {
  /* ── Colors ── */
  --clr-blue:        #3E6AE1;   /* Primary CTA — Electric Blue (Tesla spec) */
  --clr-blue-dark:   #2F57C9;   /* Hover state for primary CTA */
  --clr-carbon:      #171A20;   /* Headings, hero bg base (Carbon Dark) */
  --clr-graphite:    #393C41;   /* Body text (Graphite) */
  --clr-pewter:      #5C5E62;   /* Secondary / muted text (Pewter) */
  --clr-fog:         #8E8E8E;   /* Placeholder / disabled (Silver Fog) */
  --clr-white:       #FFFFFF;   /* Surfaces, nav background */
  --clr-ash:         #F4F4F4;   /* Alternate section background (Light Ash) */
  --clr-cloud:       #EEEEEE;   /* Borders, dividers (Cloud Gray) */
  --clr-pale:        #D0D1D2;   /* Subtle borders */
  --clr-frost:       rgba(255, 255, 255, 0.85); /* Nav frosted glass on scroll */

  /* Hero-specific: deep navy with a blue-tinted atmosphere */
  --clr-hero-bg:     #0D1421;
  --clr-hero-text:   rgba(255, 255, 255, 0.72);

  /* ── Typography ── */
  --font:            'Inter', -apple-system, Arial, sans-serif;
  --fw-regular:      400;
  --fw-medium:       500;
  --fw-semibold:     600;

  /* Font sizes — base is mobile-first; clamp() handles fluid scaling */
  --fs-hero:         clamp(1.875rem, 5vw, 2.5rem);   /* 30–40px */
  --fs-h2:           clamp(1.625rem, 3.5vw, 2rem);   /* 26–32px */
  --fs-h3:           1.125rem;                        /* 18px */
  --fs-body:         0.9375rem;                       /* 15px */
  --fs-small:        0.875rem;                        /* 14px */
  --fs-eyebrow:      1.125rem;                         /* 12px */

  /* ── Spacing — 8px base unit ── */
  --sp-1:  0.5rem;    /*  8px */
  --sp-2:  1rem;      /* 16px */
  --sp-3:  1.5rem;    /* 24px */
  --sp-4:  2rem;      /* 32px */
  --sp-5:  2.5rem;    /* 40px */
  --sp-6:  3rem;      /* 48px */
  --sp-8:  4rem;      /* 64px */
  --sp-10: 5rem;      /* 80px */
  --sp-12: 6rem;      /* 96px */
  --sp-16: 8rem;      /* 128px */

  /* ── Layout ── */
  --max-w:      1200px;
  --nav-h:      60px;

  /* ── Radii — Tesla uses 4px for buttons, ~8-12px for cards ── */
  --r-btn:  4px;
  --r-card: 8px;

  /* ── Motion — Tesla's universal timing function ── */
  --t: 0.33s cubic-bezier(0.5, 0, 0, 0.75);
}


/* ─────────────────────────────────────────────────────────────────────────
   RESET & BASE
───────────────────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: 1.65;
  color: var(--clr-graphite);
  background-color: var(--clr-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
  list-style: none;
}


/* ─────────────────────────────────────────────────────────────────────────
   BUTTONS
───────────────────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  padding: 0.875rem 2rem;
  background-color: var(--clr-blue);
  color: var(--clr-white);
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  border-radius: var(--r-btn);
  letter-spacing: 0.01em;
  transition: background-color var(--t), transform var(--t), box-shadow var(--t);
  box-shadow: 0 4px 20px rgba(62, 106, 225, 0.35);
  /* Allow text to wrap rather than overflow on narrow screens */
  white-space: normal;
  text-align: center;
  max-width: 100%;
}

.btn-primary:hover {
  background-color: var(--clr-blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(62, 106, 225, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(62, 106, 225, 0.30);
}

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

/* ─────────────────────────────────────────────────────────────────────────
   SKIP LINK — keyboard / screen-reader accessibility
───────────────────────────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -999px;
  left: var(--sp-2);
  padding: var(--sp-1) var(--sp-3);
  background-color: var(--clr-blue);
  color: var(--clr-white);
  font-weight: var(--fw-medium);
  font-size: var(--fs-small);
  border-radius: 0 0 var(--r-btn) var(--r-btn);
  z-index: 500;
}

.skip-link:focus {
  top: 0;
}


/* ─────────────────────────────────────────────────────────────────────────
   NAVIGATION
───────────────────────────────────────────────────────────────────────── */

/* Sticky container — must live on <header> so the full scroll range applies */
body > header {
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav {
  height: var(--nav-h);
  /* Frosted glass — matches Tesla's nav-on-scroll behavior */
  background-color: var(--clr-frost);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--clr-cloud);
  transition: background-color var(--t);
}

.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-3);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
}

/* Logo */
.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  color: var(--clr-carbon);
  letter-spacing: -0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav__logo-img {
  height: 28px;
  width: auto;
  display: block;
}

.nav__logo:focus-visible {
  outline: 2px solid var(--clr-blue);
  outline-offset: 3px;
  border-radius: var(--r-btn);
}

/* Desktop links */
.nav__links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav__links a {
  display: block;
  padding: var(--sp-1) var(--sp-2);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--clr-graphite);
  border-radius: var(--r-btn);
  transition: color var(--t), background-color var(--t);
  white-space: nowrap;
}

.nav__links a:hover {
  color: var(--clr-carbon);
  background-color: rgba(0, 0, 0, 0.05);
}

/* Highlight the active section link (set via JS IntersectionObserver) */
.nav__links a[aria-current="true"] {
  color: var(--clr-blue);
}

.nav__links a:focus-visible {
  outline: 2px solid var(--clr-blue);
  outline-offset: 2px;
}

/* Hamburger button (visible on mobile only) */
.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  border-radius: var(--r-btn);
  flex-shrink: 0;
}

.nav__hamburger:focus-visible {
  outline: 2px solid var(--clr-blue);
  outline-offset: 2px;
}

.nav__hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--clr-carbon);
  border-radius: 1px;
  transition: transform var(--t), opacity var(--t);
}

/* Animate hamburger → X when menu is open */
.nav.is-open .nav__hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav.is-open .nav__hamburger span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav.is-open .nav__hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile dropdown menu */
.nav__mobile-menu {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--clr-white);
  z-index: 99;
  padding: var(--sp-3);
  overflow-y: auto;
}

.nav__mobile-menu ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav__mobile-menu a {
  display: block;
  padding: var(--sp-2);
  font-size: 1rem;
  font-weight: var(--fw-medium);
  color: var(--clr-carbon);
  border-radius: var(--r-btn);
  transition: background-color var(--t);
}

.nav__mobile-menu a:hover,
.nav__mobile-menu a:focus-visible {
  background-color: var(--clr-ash);
  outline: none;
}


/* ─────────────────────────────────────────────────────────────────────────
   HERO
───────────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-10) var(--sp-3);
  overflow: hidden;
  background-color: var(--clr-hero-bg);
}

/* Atmospheric blue glow — feels modern without being cold */
.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url(images/banner.jpg);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  opacity: .25;
}

/* Subtle grid overlay adds technological depth */
.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(62, 106, 225, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(62, 106, 225, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  /* Fade grid toward edges so it doesn't compete with text */
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 20%, transparent 100%);
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 920px;
}

.hero__eyebrow {
  display: inline-block;
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-semibold);
  color: var(--clr-blue);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
}

.hero__headline {
  font-size: var(--fs-hero);
  font-weight: var(--fw-semibold);
  color: var(--clr-white);
  line-height: 1.15;
  margin-bottom: var(--sp-3);
}

.hero__subheadline {
  font-size: 1.0625rem;
  font-weight: var(--fw-regular);
  color: var(--clr-hero-text);
  line-height: 1.7;
  
  margin: 0 auto var(--sp-8);
}

  .hero__subheadline > strong {
    color: var(--clr-white);
  }

/* CTA placeholder — button(s) injected here by implementor */
#cta-hero {
  display: flex;
  justify-content: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  min-height: 44px; /* Reserve space so layout doesn't shift when populated */
}


/* ─────────────────────────────────────────────────────────────────────────
   SHARED SECTION CHROME
   Sections alternate between white and ash backgrounds.
───────────────────────────────────────────────────────────────────────── */
.section {
  padding: var(--sp-12) var(--sp-3);
  scroll-margin-top: var(--nav-h);
}

.section--alt {
  background-color: var(--clr-ash);
}

.section__container {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section__header {
  text-align: center;
  margin-bottom: var(--sp-8);
}

.section__eyebrow {
  display: inline-block;
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-semibold);
  color: var(--clr-blue);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--sp-2);
}

.section__title {
  font-size: var(--fs-h2);
  font-weight: var(--fw-semibold);
  color: var(--clr-carbon);
  line-height: 1.2;
  margin-bottom: var(--sp-2);
}

.section__subtitle {
  font-size: 1rem;
  color: var(--clr-pewter);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}


/* ─────────────────────────────────────────────────────────────────────────
   WHO WE HELP — industry icon grid
───────────────────────────────────────────────────────────────────────── */
.industries {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--sp-2);
}

.industry-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-3) var(--sp-2);
  background-color: var(--clr-white);
  border: 1px solid var(--clr-cloud);
  border-radius: var(--r-card);
  text-align: center;
  transition: border-color var(--t), background-color var(--t);
  cursor: default;
}

.industry-card:hover {
  border-color: var(--clr-blue);
  background-color: #f0f4ff;
}

.industry-card__icon {
  font-size: 2rem;
  line-height: 1;
}

.industry-card__label {
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--clr-carbon);
  line-height: 1.3;
}


/* ─────────────────────────────────────────────────────────────────────────
   SERVICES — 2-column card grid
───────────────────────────────────────────────────────────────────────── */
.services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
}

.service-card {
  padding: var(--sp-4);
  background-color: var(--clr-white);
  border: 1px solid var(--clr-cloud);
  border-radius: var(--r-card);
  transition: border-color var(--t);
}

.service-card:hover {
  border-color: var(--clr-blue);
}

.service-card__icon {
  font-size: 1.75rem;
  margin-bottom: var(--sp-2);
  line-height: 1;
}

.service-card__title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-semibold);
  color: var(--clr-carbon);
  margin-bottom: var(--sp-1);
}

.service-card__desc {
  font-size: var(--fs-small);
  color: var(--clr-pewter);
  line-height: 1.65;
}


/* ─────────────────────────────────────────────────────────────────────────
   HOW IT WORKS — 3-step flow
   Desktop: horizontal row. Mobile: vertical stack.
───────────────────────────────────────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
  position: relative;
}

/* Dashed connector between steps — desktop only, hidden on mobile */
.steps::before {
  content: '';
  position: absolute;
  /* Center of the 56px step-number circles */
  top: 27px;
  /* Start after first circle center, end before last circle center */
  left: calc(16.666% + 28px);
  right: calc(16.666% + 28px);
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    var(--clr-cloud) 0,
    var(--clr-cloud) 6px,
    transparent 6px,
    transparent 14px
  );
  z-index: 0;
  pointer-events: none;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
}

.step__number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--clr-blue);
  color: var(--clr-white);
  font-size: 1.25rem;
  font-weight: var(--fw-semibold);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-3);
  flex-shrink: 0;
}

.step__title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-semibold);
  color: var(--clr-carbon);
  margin-bottom: var(--sp-1);
  line-height: 1.3;
}

.step__desc {
  font-size: var(--fs-small);
  color: var(--clr-pewter);
  line-height: 1.65;
}


/* ─────────────────────────────────────────────────────────────────────────
   TESTIMONIALS — 3-column card grid
───────────────────────────────────────────────────────────────────────── */
.testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
}

.testimonial-card {
  display: flex;
  flex-direction: column;
  padding: var(--sp-4);
  background-color: var(--clr-white);
  border: 1px solid var(--clr-cloud);
  border-radius: var(--r-card);
}

/* Opening quotation mark accent */
.testimonial-card__quote-mark {
  display: block;
  font-size: 2.5rem;
  line-height: 1;
  color: var(--clr-blue);
  margin-bottom: var(--sp-1);
  font-family: Georgia, serif;
  /* Visual only — screen readers skip via aria-hidden on the element */
}

.testimonial-card__quote {
  font-size: var(--fs-body);
  color: var(--clr-graphite);
  line-height: 1.7;
  font-style: italic;
  flex: 1;
  margin-bottom: var(--sp-4);
}

.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.testimonial-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--clr-ash);
  border: 1px solid var(--clr-cloud);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.375rem;
  flex-shrink: 0;
}

.testimonial-card__name {
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--clr-carbon);
}

.testimonial-card__business {
  font-size: 0.8125rem;
  color: var(--clr-pewter);
  margin-top: 2px;
}


/* ─────────────────────────────────────────────────────────────────────────
   CTA BLOCK — full-width dark section
───────────────────────────────────────────────────────────────────────── */
.cta-block {
  padding: var(--sp-16) var(--sp-3);
  scroll-margin-top: var(--nav-h);
  text-align: center;
  background-color: var(--clr-carbon);
  background-image:
    radial-gradient(ellipse 70% 55% at 65% 50%, rgba(62, 106, 225, 0.14) 0%, transparent 65%);
}

.cta-block__title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: var(--fw-semibold);
  color: var(--clr-white);
  line-height: 1.2;
  margin-bottom: var(--sp-2);
}

.cta-block__subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.60);
  max-width: 460px;
  margin: 0 auto var(--sp-8);
  line-height: 1.65;
}

/* CTA placeholder — button(s) injected here by implementor */
#cta-main {
  display: flex;
  justify-content: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  min-height: 44px;
}


/* ─────────────────────────────────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────────────────────────────────── */
.footer {
  padding: var(--sp-8) var(--sp-3);
  border-top: 1px solid var(--clr-cloud);
}

.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  text-align: center;
}

.footer__logo {
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  color: var(--clr-carbon);
  letter-spacing: -0.01em;
}

.footer__tagline {
  font-size: var(--fs-small);
  color: var(--clr-pewter);
}

.footer__copy {
  font-size: 0.8125rem;
  color: var(--clr-fog);
}

.footer__policy-link {
  color: var(--clr-pewter);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--t);
}

.footer__policy-link:hover {
  color: var(--clr-blue);
}


/* ─────────────────────────────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────────────────────────────── */

/* Tablet — 768px */
@media (max-width: 1024px) {
  /*.hero__bg {
    background-position: center center;
  }*/

  .testimonials {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Industry grid: 3 columns → 2 even rows of 3 */
  .industries {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile — 768px */
@media (max-width: 768px) {
  /* Hide desktop nav links, show hamburger */
  .nav__links {
    display: none;
  }

  .nav__hamburger {
    display: flex;
  }

  /* Hero: don't force full-viewport height on mobile — let content size it */
  .hero {
    min-height: auto;
    padding: var(--sp-8) var(--sp-3) var(--sp-6);
  }

  /* Reduce the gap between section header and content (64px → 40px) */
  .section__header {
    margin-bottom: var(--sp-5);
  }

  /* Services and steps go single-column */
  .services {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: var(--sp-5);
  }

  /* Remove the desktop connector line */
  .steps::before {
    display: none;
  }

  /* Steps become left-aligned on mobile for readability */
  .step {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    gap: var(--sp-3);
  }

  .step__number {
    margin-bottom: 0;
  }

  /* Testimonials already handled in 1024px block above */

  /* Section padding tightens on mobile */
  .section {
    padding: var(--sp-8) var(--sp-2);
  }

  .cta-block {
    padding: var(--sp-8) var(--sp-2);
  }

  /* Shrink the gap before the empty CTA placeholder (64px → 32px) */
  .cta-block__subtitle {
    margin-bottom: var(--sp-4);
  }

  /* Industry grid: 2 columns on small screens */
  .industries {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Small mobile — 480px */
@media (max-width: 480px) {
  /* 2-column industry grid stays readable down to 320px */
  .industries {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-1);
  }

  .industry-card {
    padding: var(--sp-2) var(--sp-1);
  }
}


/* ─────────────────────────────────────────────────────────────────────────
   UTILITIES
───────────────────────────────────────────────────────────────────────── */

/* Screen-reader-only helper */
.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;
}

/* Global focus ring */
:focus-visible {
  outline: 2px solid var(--clr-blue);
  outline-offset: 2px;
  border-radius: var(--r-btn);
}
