/* ============================================================
   SYNAPTATION — style.css
   ============================================================ */

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

/* Self-hosted fonts (variable, latin subset) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('assets/fonts/inter-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('assets/fonts/space-grotesk-latin.woff2') format('woff2');
}

:root {
  --bg:       #060D1A;
  --cyan:     #00E5FF;
  --text:     #FFFFFF;
  --muted:    #8899AA;
  --divider:  #2A3A4A;
  --card-bg:  #0C1524;
  --card-border: #162234;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --radius: 8px;
  --max-w: 1100px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }

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

.section { padding: 96px 0; }

.section + .section { border-top: 1px solid var(--divider); }

.section__header { margin-bottom: 56px; }

h1, h2, h3 { font-family: var(--font-display); }

.section__header h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.section__sub {
  color: var(--muted);
  font-size: 16px;
  max-width: 600px;
  line-height: 1.6;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease,
              color 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
  border: 1.5px solid transparent;
  white-space: nowrap;
  text-decoration: none;
}

.btn--primary {
  background: var(--cyan);
  color: #060D1A;
  border-color: var(--cyan);
}
.btn--primary:hover {
  background: #2DEBFF;
  border-color: #2DEBFF;
  transform: translateY(-1px);
}

.btn--outline {
  background: transparent;
  color: var(--cyan);
  border-color: var(--cyan);
}
.btn--outline:hover { background: rgba(0,229,255,0.08); }

.btn--ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--divider);
}
.btn--ghost:hover {
  color: var(--text);
  border-color: var(--muted);
}

.btn--nav {
  padding: 9px 20px;
  font-size: 14px;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.25s ease, border-color 0.25s ease;
  border-bottom: 1px solid transparent;
}

.nav--scrolled {
  background: rgba(6,13,26,0.92);
  border-bottom-color: var(--divider);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

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

.nav__logo img {
  height: 44px;
  width: auto;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__links a:not(.btn) {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}
.nav__links a:not(.btn):hover { color: var(--text); }

/* Hamburger */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  width: 36px;
  height: 36px;
}
.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 70px;
}

.hero__nodes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero__nodes svg {
  position: absolute;
  top: 0; right: 0;
  width: 65%;
  max-width: 750px;
  height: 100%;
}

/* Synapse artwork */
.syn-path {
  fill: none;
  stroke: var(--cyan);
  stroke-opacity: 0.16;
  stroke-width: 1.2;
  stroke-linecap: round;
}
.syn-path--axon {
  stroke-opacity: 0.3;
  stroke-width: 1.6;
}
.syn-soma {
  fill: var(--cyan);
  fill-opacity: 0.55;
}
.syn-bouton {
  fill: var(--cyan);
  fill-opacity: 0.7;
}
.syn-receptor {
  fill: none;
  stroke: var(--cyan);
  stroke-opacity: 0.6;
  stroke-width: 1.2;
}
.syn-tip circle {
  fill: var(--cyan);
  fill-opacity: 0.3;
}

/* Traveling signal: a short dash looping along the path */
.syn-signal {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-opacity: 0;
  stroke-dasharray: 16 600;
  stroke-dashoffset: 616;
}

@media (prefers-reduced-motion: no-preference) {
  .syn-signal {
    stroke-opacity: 0.8;
    animation: syn-fire 5s linear infinite;
  }
  .syn-signal--2 { animation-delay: 1.8s; animation-duration: 6s; }
  .syn-signal--3 { animation-delay: 3.2s; animation-duration: 7s; }
}

@keyframes syn-fire {
  0%   { stroke-dashoffset: 616; stroke-opacity: 0; }
  8%   { stroke-opacity: 0.8; }
  38%  { stroke-dashoffset: 320; }
  60%  { stroke-dashoffset: 96; stroke-opacity: 0.6; }
  70%  { stroke-dashoffset: 16; stroke-opacity: 0; }
  100% { stroke-dashoffset: 16; stroke-opacity: 0; }
}

.hero__content {
  position: relative;
  max-width: 680px;
  padding: 80px 0;
}

.hero__eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero__eyebrow::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--cyan);
  opacity: 0.6;
  flex-shrink: 0;
}

.hero__headline {
  font-size: clamp(38px, 5.5vw, 60px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.hero__sub {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.65;
  max-width: 520px;
  margin-bottom: 44px;
}

.hero__cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

/* ============================================================
   SERVICES
   ============================================================ */
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover {
  border-color: rgba(0,229,255,0.28);
  transform: translateY(-2px);
}

/* Featured service card: spans the full grid row */
.card--featured {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 28px;
  border-color: rgba(0,229,255,0.3);
  background: linear-gradient(135deg, rgba(0,229,255,0.06) 0%, var(--card-bg) 55%);
}
.card--featured:hover { border-color: rgba(0,229,255,0.5); }

.card--featured .card__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin-bottom: 0;
}

.card--featured h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.card--featured p {
  font-size: 15px;
  max-width: 760px;
}

.card__icon {
  width: 38px;
  height: 38px;
  color: var(--cyan);
  margin-bottom: 22px;
}
.card__icon svg { width: 100%; height: 100%; }

.card h3 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 12px;
}

.card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}

/* ============================================================
   BUILT DIFFERENT
   ============================================================ */
.built-different {
  background: linear-gradient(135deg, rgba(0,229,255,0.025) 0%, transparent 55%);
}

.built-different__inner { max-width: 780px; }

.built-different__eyebrow { margin-bottom: 22px; }

.eyebrow-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
}
.eyebrow-label::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--cyan);
  opacity: 0.45;
}

.built-different h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 36px;
}

.built-different__body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 52px;
}

.built-different__body p {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.75;
}

.built-different__body p.lead {
  font-size: 17px;
  color: rgba(255,255,255,0.85);
}

.built-different__stats {
  display: flex;
  gap: 56px;
  padding-top: 36px;
  border-top: 1px solid var(--divider);
}

.stat__num {
  display: block;
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 6px;
}
.stat__plus { font-size: 30px; }

.stat__label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

/* ============================================================
   PRODUCTS
   ============================================================ */
.products__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  overflow: hidden;
}

.product-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 28px 32px;
  border-bottom: 1px solid var(--divider);
  border-right: 1px solid var(--divider);
  transition: background 0.15s ease;
}
.product-item:hover { background: rgba(0,229,255,0.03); }

/* Right column: no right border */
.product-item:nth-child(even) { border-right: none; }

/* Last two items: no bottom border */
.product-item:nth-last-child(1),
.product-item:nth-last-child(2) { border-bottom: none; }

.product-item__dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  opacity: 0.65;
  margin-top: 9px;
}

.product-item p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.65;
}

/* ============================================================
   CASE STUDIES
   ============================================================ */
.case-studies__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.case-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.case-card__tag {
  display: block;
  padding: 12px 20px;
  background: rgba(0,229,255,0.05);
  border-bottom: 1px solid var(--divider);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
}

.case-card__body {
  padding: 44px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
}

.case-card__soon {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--divider);
}

/* ============================================================
   ABOUT
   ============================================================ */
.about__inner {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 64px;
  align-items: start;
}

.about__photo-placeholder {
  width: 220px;
  height: 220px;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.about__photo-placeholder svg { width: 80px; height: 80px; }

/* When a real photo is swapped in */
.about__photo-wrap img {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--divider);
}

.about__eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 8px;
}

.about__content h2 {
  font-size: clamp(26px, 3.5vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.about__role {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 28px;
}

.about__content p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 18px;
}
.about__content p:last-of-type { margin-bottom: 24px; }

.about__linkedin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-size: 14px;
  font-weight: 500;
  transition: opacity 0.15s;
}
.about__linkedin:hover { opacity: 0.75; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  background: linear-gradient(180deg, transparent 0%, rgba(0,229,255,0.018) 100%);
}

.contact__inner {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 80px;
  align-items: start;
}

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.form__group label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
}

.form__group input,
.form__group textarea {
  background: var(--card-bg);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  padding: 13px 16px;
  transition: border-color 0.15s ease;
  resize: vertical;
  width: 100%;
}
.form__group input::placeholder,
.form__group textarea::placeholder {
  color: var(--muted);
  opacity: 0.55;
}
.form__group input:focus,
.form__group textarea:focus {
  outline: none;
  border-color: var(--cyan);
}

.contact__details {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 6px;
}
.contact__details a {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  transition: color 0.15s ease;
  word-break: break-all;
}
.contact__details a:hover { color: var(--cyan); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--divider);
  padding: 40px 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer__logo img {
  height: 28px;
  width: auto;
  opacity: 0.65;
}

.footer__copy {
  font-size: 13px;
  color: var(--muted);
}

.footer__links {
  display: flex;
  gap: 24px;
}
.footer__links a {
  font-size: 13px;
  color: var(--muted);
  transition: color 0.15s;
}
.footer__links a:hover { color: var(--text); }

/* ============================================================
   RESPONSIVE — tablet (≤ 900px)
   ============================================================ */
@media (max-width: 900px) {
  .services__grid     { grid-template-columns: repeat(2, 1fr); }
  .case-studies__grid { grid-template-columns: repeat(2, 1fr); }

  .about__inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .about__photo-placeholder,
  .about__photo-wrap img {
    width: 180px;
    height: 180px;
  }

  .contact__inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .built-different__stats { gap: 40px; }
}

/* ============================================================
   RESPONSIVE — mobile (≤ 640px)
   ============================================================ */
@media (max-width: 640px) {
  .section { padding: 72px 0; }

  /* Show hamburger */
  .nav__toggle { display: flex; }

  /* Slide-down mobile nav */
  .nav__links {
    display: none;
    position: absolute;
    top: 70px; left: 0; right: 0;
    background: rgba(6,13,26,0.97);
    border-bottom: 1px solid var(--divider);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    gap: 22px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }
  .nav__links--open { display: flex; }
  .nav__links .btn--outline { align-self: flex-start; }

  /* Hero */
  .hero__content  { padding: 56px 0; }
  .hero__nodes svg { opacity: 0.35; width: 100%; }
  .hero__headline { font-size: clamp(32px, 8vw, 44px); }
  .hero__sub      { font-size: 16px; }
  .hero__cta      { flex-direction: column; align-items: flex-start; }

  /* Grids collapse to 1 col */
  .services__grid,
  .case-studies__grid { grid-template-columns: 1fr; }

  /* Featured card stacks like the others */
  .card--featured { flex-direction: column; gap: 18px; }

  /* Products grid: single column, reset borders */
  .products__grid { grid-template-columns: 1fr; }
  .product-item { border-right: none; border-bottom: 1px solid var(--divider); }
  .product-item:nth-last-child(2) { border-bottom: 1px solid var(--divider); }
  .product-item:nth-last-child(1) { border-bottom: none; }

  /* Stats */
  .built-different__stats { gap: 32px; flex-wrap: wrap; }
  .stat__num { font-size: 36px; }

  /* Footer */
  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}
