/* SynaptrixAI — "Studio" direction.
   Warm paper + ink + a single electric-indigo signal accent.
   Display: Fraunces · Body: Hanken Grotesk · Labels/data: JetBrains Mono.
   Signature: a synapse thread on the left rail that fills with signal as you scroll. */

:root {
  --paper: #f6f3ec;
  --paper-2: #efeada;
  --ink: #16161b;
  --ink-soft: #2b2b33;
  --muted: #6b675e;
  --line: #e2dccd;
  --accent: #3d2fe6;
  --accent-press: #2f23c4;
  --accent-soft: #ecebfb;

  --font-display: "Fraunces", Georgia, serif;
  --font-sans: "Hanken Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --maxw: 1120px;
  --rail: clamp(18px, 4.2vw, 60px);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
em { font-style: italic; }

.wrap { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 0.6rem 1rem;
  font-family: var(--font-mono); font-size: 0.8rem;
}
.skip:focus { left: 1rem; top: 1rem; }

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

/* ---- Eyebrow / mono labels (the "node" markers) ------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
}
.eyebrow--node::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--paper); border: 1.5px solid var(--muted);
  transition: all 0.5s var(--ease);
}
[data-node].is-active .eyebrow--node::before,
.eyebrow--node.is-active::before {
  background: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}
.eyebrow--invert { color: rgba(246, 243, 236, 0.6); }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.02em;
  padding: 0.85rem 1.5rem; border-radius: 2px; border: 1px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--accent); transform: translateY(-2px); }
.btn--ghost { border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn--paper { background: var(--paper); color: var(--ink); font-size: 0.95rem; padding: 1rem 1.8rem; }
.btn--paper:hover { background: var(--accent); color: var(--paper); transform: translateY(-2px); }

/* ---- Signature: the synapse thread -------------------------------------- */
.spine { position: fixed; left: var(--rail); top: 0; bottom: 0; width: 2px; z-index: 5; pointer-events: none; }
.spine__track { position: absolute; inset: 0; background: var(--line); }
.spine__progress { position: absolute; top: 0; left: 0; width: 100%; height: 0;
  background: linear-gradient(180deg, var(--accent), #6a5cff); transition: height 0.1s linear; }
.spine__pulse {
  position: absolute; left: 50%; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); margin-left: -3.5px;
  box-shadow: 0 0 12px 2px rgba(61, 47, 230, 0.6);
  animation: travel 5.5s var(--ease) infinite;
}
@keyframes travel {
  0% { top: 0; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* ---- Nav ---------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent; transition: border-color 0.3s var(--ease);
}
.nav.is-stuck { border-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; }
.brand__mark { display: grid; place-items: center; width: 30px; height: 30px; color: var(--accent); }
.brand__mark svg { width: 22px; height: 22px; }
.brand__ai { color: var(--accent); }
.nav__links { display: flex; gap: 2rem; font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.04em; }
.nav__links a { color: var(--muted); transition: color 0.2s var(--ease); }
.nav__links a:hover { color: var(--ink); }
.nav__cta { padding: 0.55rem 1.1rem; }

/* ---- Hero --------------------------------------------------------------- */
.hero { padding: clamp(4.5rem, 13vh, 9rem) 0 clamp(3.5rem, 8vh, 6rem); }
.hero__title {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(2.9rem, 8.2vw, 6rem); line-height: 1.0; letter-spacing: -0.025em;
  margin: 1.6rem 0 0; max-width: 16ch; overflow-wrap: break-word;
}
.hero__title em { color: var(--accent); font-weight: 500; }
.hero__lede { margin-top: 1.8rem; max-width: 46ch; font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--ink-soft); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.4rem; }
.hero__now {
  display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: 3.5rem; padding-top: 1.4rem;
  border-top: 1px solid var(--line); list-style: none;
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.04em;
}
.hero__now li { position: relative; }
.hero__now a { color: var(--muted); transition: color 0.2s var(--ease); }
.hero__now a::before { content: "●"; color: var(--accent); font-size: 0.6em; vertical-align: middle; margin-right: 0.45rem; }
.hero__now a:hover { color: var(--ink); }

/* ---- Studio / about ----------------------------------------------------- */
.studio { padding: clamp(3.5rem, 9vh, 7rem) 0; border-top: 1px solid var(--line); }
.studio__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 6vw, 5rem); margin-top: 2.2rem; align-items: start; }
.studio__statement { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.9rem, 4.2vw, 3rem); line-height: 1.08; letter-spacing: -0.02em; }
.studio__body p { color: var(--ink-soft); margin-bottom: 1.1rem; max-width: 52ch; }
.studio__capabilities { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem 1.5rem; margin-top: 2rem; }
.studio__capabilities li { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink); padding-top: 0.7rem; border-top: 1px solid var(--line); }
.studio__capabilities span::before { content: "→ "; color: var(--accent); }

/* ---- Products ----------------------------------------------------------- */
.products { padding: clamp(3.5rem, 9vh, 7rem) 0 clamp(2rem, 5vh, 4rem); border-top: 1px solid var(--line); }
.products__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.9rem, 4.2vw, 3rem); line-height: 1.08; letter-spacing: -0.02em; margin-top: 1rem; max-width: 18ch; }
.plist { list-style: none; margin-top: 1.5rem; }
.prod {
  display: grid; grid-template-columns: 96px 1fr; gap: clamp(1rem, 4vw, 3rem);
  padding: clamp(2.2rem, 5vw, 3.4rem) 0; border-top: 1px solid var(--line);
}
.prod__index { font-family: var(--font-mono); font-size: 1rem; color: var(--muted); padding-top: 0.5rem; transition: color 0.3s var(--ease); }
.prod:hover .prod__index { color: var(--accent); }
.prod__top { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.prod__name { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.7rem, 3.4vw, 2.5rem); letter-spacing: -0.02em; line-height: 1; }
.prod__thesis { font-size: clamp(1.1rem, 2vw, 1.3rem); font-weight: 500; margin-top: 0.9rem; color: var(--ink); }
.prod__desc { margin-top: 0.7rem; color: var(--muted); max-width: 58ch; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.3rem; }
.chips li { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.03em; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 999px; padding: 0.35rem 0.8rem; }
.prod__link { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 1.5rem; font-family: var(--font-mono); font-size: 0.82rem; color: var(--accent); border-bottom: 1px solid transparent; transition: border-color 0.2s var(--ease); }
.prod__link:hover { border-color: var(--accent); }
.prod__link span { transition: transform 0.2s var(--ease); }
.prod__link:hover span { transform: translate(2px, -2px); }

.tag { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.28rem 0.6rem; border-radius: 2px; }
.tag--live { background: var(--accent-soft); color: var(--accent-press); }
/* Available now (in beta) — filled, the most prominent state. */
.tag--beta { background: var(--accent-soft); color: var(--accent-press); }
/* Dated launch ahead — solid hairline outline. */
.tag--soon { background: transparent; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent); }
/* Earliest stage, no date — dashed. */
.tag--build { background: transparent; color: var(--accent); border: 1px dashed var(--accent); }

.prod__soon { display: inline-block; margin-top: 1.5rem; font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); }
.prod__soon::before { content: "○ "; color: var(--accent); }

/* ---- Contact ------------------------------------------------------------ */
.contact { padding: clamp(2.5rem, 6vh, 5rem) 0 clamp(4rem, 9vh, 7rem); }
.contact__card { background: var(--ink); color: var(--paper); border-radius: 8px; padding: clamp(2.5rem, 7vw, 5rem); position: relative; overflow: hidden; }
.contact__card::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(61, 47, 230, 0.55), transparent 65%); filter: blur(10px);
}
.contact__title { position: relative; font-family: var(--font-display); font-weight: 400; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.06; letter-spacing: -0.02em; margin-top: 1.2rem; max-width: 16ch; }
.contact__lede { position: relative; margin-top: 1.3rem; color: rgba(246, 243, 236, 0.72); max-width: 50ch; }
.contact .btn--paper { position: relative; margin-top: 2.2rem; }

/* ---- Footer ------------------------------------------------------------- */
.foot { border-top: 1px solid var(--line); padding: 3rem 0 2.5rem; }
.foot__inner { display: flex; flex-wrap: wrap; gap: 2rem 3rem; align-items: flex-start; justify-content: space-between; }
.foot__brand .brand__word { font-weight: 700; font-size: 1.1rem; }
.foot__brand p { color: var(--muted); font-family: var(--font-mono); font-size: 0.76rem; margin-top: 0.4rem; }
.foot__links { display: flex; flex-wrap: wrap; gap: 1.4rem; font-family: var(--font-mono); font-size: 0.82rem; }
.foot__links a { color: var(--muted); transition: color 0.2s var(--ease); }
.foot__links a:hover { color: var(--accent); }
.foot__soon { color: var(--muted); opacity: 0.55; }
.foot__soon::after { content: " · soon"; color: var(--accent); opacity: 0.8; }
.foot__mail { font-family: var(--font-mono); font-size: 0.82rem; color: var(--ink); border-bottom: 1px solid var(--line); }
.foot__mail:hover { border-color: var(--accent); color: var(--accent); }
.foot__copy { margin-top: 2.5rem; font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }

/* ---- Reveal on scroll --------------------------------------------------- */
[data-node] { opacity: 0; transform: translateY(14px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
[data-node].is-seen { opacity: 1; transform: none; }

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 860px) {
  .spine { display: none; }
  .nav__links { display: none; }
  .studio__grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero__title { font-size: clamp(2.1rem, 9.5vw, 3rem); max-width: 100%; }
  .hero__title br { display: none; }
  .hero__lede, .studio__statement, .studio__body p, .prod__desc, .prod__thesis, .contact__lede { max-width: 100%; }
  .studio__statement, .products__title, .contact__title { overflow-wrap: break-word; }
  .hero__actions .btn { flex: 1 1 100%; }
  .prod { grid-template-columns: 1fr; gap: 0.4rem; }
  .prod__index { padding-top: 0; }
  .nav__cta { display: none; }
  .studio__capabilities { grid-template-columns: 1fr; }
}

/* ---- Reduced motion ----------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  [data-node] { opacity: 1; transform: none; }
  .spine__pulse { display: none; }
}
