/* =========================================
   Sypnapse – styles.css
   Tokens · Reset · Nav · Hero · Sections ·
   Neural Logo · Support · Footer · Utilities
   ========================================= */

/* --- Self-hosted font --- */
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/CormorantGaramond-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* --- Design Tokens --- */
:root {
  --bg: #fafaf8;
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --accent-blue: #5c839c;
  --border-white: #ffffff;

  --section-nav: #f8f9fa;
  --section-hero: #f5f6f7;
  --section-content: #f0f2f3;
  --section-alt: #eaeced;
  --section-footer: #eef0f1;

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;

  --max-width: 980px;
  --padding-h: 40px;
  --padding-h-mobile: 24px;
}

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

html {
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Smooth scroll only for users who are OK with motion */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.47059;
  font-weight: 400;
  letter-spacing: -0.022em;
}

/* ===========================================
   NAVIGATION
   =========================================== */

nav {
  position: sticky;
  top: 0;
  background: var(--section-nav);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 2px solid var(--border-white);
  z-index: 100;
  transition: box-shadow 0.2s ease;
}

nav.scrolled {
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

.nav-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--padding-h);
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.05882rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--text-primary);
  text-decoration: none;
  font-family: var(--font-serif);
}

.nav-back {
  font-size: 0.82353rem;
  color: var(--accent-blue);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-back:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ===========================================
   HERO — shared base
   =========================================== */

.hero {
  background: var(--section-hero);
  border-bottom: 2px solid var(--border-white);
}

.hero-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--padding-h);
}

.hero h1 {
  font-size: 3.5rem;
  line-height: 1.07143;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.hero .subhead {
  font-size: 1.23529rem;
  line-height: 1.381;
  font-weight: 400;
  letter-spacing: 0.012em;
  color: var(--text-secondary);
}

/* HERO — homepage variant */
.hero--home              { padding: 88px 0 104px; }
.hero--home h1           { max-width: 720px; }
.hero--home .subhead     { max-width: 660px; }

/* HERO — support page variant */
.hero--support           { padding: 72px 0 80px; }
.hero--support h1        { max-width: 640px; }
.hero--support .subhead  { max-width: 580px; }

.hero-eyebrow {
  font-size: 0.82353rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: 14px;
}

/* ===========================================
   NEURAL LOGO (homepage only)
   =========================================== */

.neural-logo {
  position: relative;
  display: inline-block;
  margin-bottom: 48px;
}

.logo-container {
  position: relative;
  display: inline-block;
}

.connections {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.logo-text {
  font-size: 3.5rem;
  font-weight: 400;
  letter-spacing: 0.3rem;
  color: var(--text-primary);
  position: relative;
  display: inline-block;
  font-family: var(--font-serif);
  opacity: 0.9;
}

.neuron {
  display: inline-block;
  position: relative;
  animation: letter-drift 5s ease-in-out infinite;
}

.neuron:nth-child(1) { animation-delay: 0s;   animation-duration: 4.8s; }
.neuron:nth-child(2) { animation-delay: 0.6s; animation-duration: 5.3s; }
.neuron:nth-child(3) { animation-delay: 1.2s; animation-duration: 4.5s; }
.neuron:nth-child(4) { animation-delay: 1.8s; animation-duration: 5.1s; }
.neuron:nth-child(5) { animation-delay: 2.4s; animation-duration: 4.9s; }
.neuron:nth-child(6) { animation-delay: 3s;   animation-duration: 5.2s; }
.neuron:nth-child(7) { animation-delay: 3.6s; animation-duration: 4.7s; }
.neuron:nth-child(8) { animation-delay: 4.2s; animation-duration: 5s;   }

.neuron::before {
  content: '';
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(92, 131, 156, 0.35);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.synapse-p { position: relative; }

.synaptic-cleft {
  position: absolute;
  top: -35px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 45px;
}

.vesicle {
  position: absolute;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(92, 131, 156, 0.5),
    rgba(92, 131, 156, 0.3) 50%,
    rgba(92, 131, 156, 0.1)
  );
  border-radius: 50%;
  border: 1px solid rgba(92, 131, 156, 0.25);
}

.vesicle-1 {
  width: 16px; height: 16px;
  top: 10px; left: 50%;
  transform: translateX(-50%);
  animation: vesicle-release 3s ease-in-out infinite;
}
.vesicle-2 {
  width: 12px; height: 12px;
  top: 5px; left: 25%;
  animation: vesicle-release 3s ease-in-out infinite 1s;
}
.vesicle-3 {
  width: 14px; height: 14px;
  top: 8px; left: 65%;
  animation: vesicle-release 3s ease-in-out infinite 2s;
}

.gap-line {
  position: absolute;
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(92, 131, 156, 0.3) 50%, transparent);
}

.dendrite {
  stroke: rgba(61, 53, 49, 0.12);
  stroke-width: 1;
  fill: none;
  stroke-linecap: round;
  animation: dendrite-pulse 5s ease-in-out infinite;
}

@keyframes letter-drift {
  0%, 100% { opacity: 0.85; transform: translate(0, 0); }
  25%       { opacity: 0.88; transform: translate(0.5px, -1px); }
  50%       { opacity: 0.92; transform: translate(-0.3px, -0.5px); }
  75%       { opacity: 0.89; transform: translate(0.2px, -0.8px); }
}

@keyframes vesicle-release {
  0%, 100% { transform: translateY(0) scale(1);        opacity: 0.5; }
  50%       { transform: translateY(-6px) scale(1.12); opacity: 0.75; }
}

@keyframes dendrite-pulse {
  0%, 100% { opacity: 0.25; }
  50%       { opacity: 0.5; }
}

/* ===========================================
   CONTENT SECTIONS — shared
   =========================================== */

.section {
  border-bottom: 2px solid var(--border-white);
  padding: 72px 0;
}

.section--primary { background: var(--section-content); }
.section--alt     { background: var(--section-alt); }

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--padding-h);
}

.section h2 {
  font-size: 2rem;
  line-height: 1.125;
  font-weight: 600;
  letter-spacing: 0.004em;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.section p {
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: -0.022em;
  color: var(--text-primary);
  margin-bottom: 16px;
  max-width: 620px;
}

.section p:last-child {
  margin-bottom: 0;
}

/* ===========================================
   CONTACT BLOCK (support page)
   =========================================== */

.contact-block {
  margin-top: 32px;
  padding: 28px 32px;
  background: var(--section-hero);
  border-radius: 12px;
  border: 1.5px solid rgba(92, 131, 156, 0.15);
  max-width: 420px;
}

.contact-block .label {
  font-size: 0.76471rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.contact-block a {
  font-size: 1.11765rem;
  color: var(--accent-blue);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.contact-block a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ===========================================
   FOOTER
   =========================================== */

footer {
  background: var(--section-footer);
  padding: 56px 0 40px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--padding-h);
}

footer p {
  font-size: 0.70588rem;
  line-height: 1.33337;
  font-weight: 400;
  letter-spacing: -0.016em;
  color: var(--text-secondary);
}

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

footer a:hover {
  color: var(--accent-blue);
}

/* ===========================================
   SCROLL REVEAL
   =========================================== */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================================
   ACCESSIBILITY
   =========================================== */

a:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ===========================================
   RESPONSIVE — mobile
   =========================================== */

@media (max-width: 734px) {
  .nav-content {
    padding: 0 var(--padding-h-mobile);
  }

  .hero--home    { padding: 64px 0 80px; }
  .hero--support { padding: 56px 0 64px; }

  .hero-content,
  .section-inner,
  .footer-inner {
    padding: 0 var(--padding-h-mobile);
  }

  .hero h1 {
    font-size: 2.5rem;
    line-height: 1.1;
    letter-spacing: -0.009em;
  }

  .hero .subhead {
    font-size: 1.05882rem;
    line-height: 1.381;
  }

  .logo-text {
    font-size: 2.5rem;
    letter-spacing: 0.2rem;
  }

  .synaptic-cleft {
    top: -28px;
    width: 55px;
    height: 35px;
  }

  .vesicle-1             { width: 13px; height: 13px; }
  .vesicle-2, .vesicle-3 { width: 10px; height: 10px; }

  .neural-logo { margin-bottom: 40px; }

  .section { padding: 56px 0; }

  .section h2 {
    font-size: 1.70588rem;
    line-height: 1.235;
  }

  .contact-block {
    padding: 22px 24px;
    max-width: 100%;
  }

  footer { padding: 48px 0 36px; }
}

/* ===========================================
   REDUCED MOTION
   =========================================== */

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
