/* voxyn - editorial layout, no decorative gimmicks */

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

html { scroll-behavior: smooth; }

:root {
  /* Sticky bar: min-height 56px + 1px border */
  --site-header-h: 57px;
  /* Warm stone: full-page canvas (was default section tint) */
  --bg-page: #f3f2ef;
  /* Slightly warmer band for alternated sections */
  --bg-warm: #e8e4dc;
  --bg-header: rgba(243, 242, 239, 0.92);
  /* Subtle lift on tables / hovers over warm base */
  --bg-muted: #f0efec;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #141414;
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

code {
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, monospace;
  font-size: 0.9em;
  background: #ecebe8;
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(20px, 4vw, 40px);
  padding-right: clamp(20px, 4vw, 40px);
}

.narrow { max-width: 680px; }

/* -- Header -- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-header);
  border-bottom: 1px solid #e8e7e4;
  backdrop-filter: saturate(180%) blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 56px;
}

.brand {
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }

.nav {
  display: none;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

@media (min-width: 880px) {
  .nav { display: flex; }
}

.nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: #525252;
  text-decoration: none;
}
.nav a:hover { color: #141414; text-decoration: none; }

.nav a[aria-current="page"],
.mobile-nav-inner a[aria-current="page"] {
  color: #141414;
  font-weight: 600;
}

.header-cta {
  display: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 16px;
  border: 1px solid #141414;
  border-radius: 6px;
  text-decoration: none;
  color: #fafaf9;
  background: #141414;
}
.header-cta:hover { background: #2a2a2a; border-color: #2a2a2a; text-decoration: none; color: #fafaf9; }

@media (min-width: 880px) {
  .header-cta { display: inline-flex; }
}

.menu-toggle {
  margin-left: auto;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  border: 1px solid #e8e7e4;
  background: #fff;
  position: relative;
}
.menu-toggle::before,
.menu-toggle::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  height: 1.5px;
  background: #141414;
}
.menu-toggle::before { top: 15px; }
.menu-toggle::after { bottom: 15px; }

@media (min-width: 880px) {
  .menu-toggle { display: none; }
}

.mobile-nav {
  border-bottom: 1px solid #e8e7e4;
  background: var(--bg-page);
}

.mobile-nav[hidden] { display: none; }

@media (min-width: 880px) {
  .mobile-nav { display: none !important; }
}

.mobile-nav-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-top: 8px;
  padding-bottom: 16px;
}

.mobile-nav-inner a {
  display: block;
  padding: 12px 0;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #141414;
  border-bottom: 1px solid #f0efec;
  text-decoration: none;
}
.mobile-nav-inner a:last-child { border-bottom: none; }
.mobile-nav-inner a:hover { color: #525252; }

/* -- Hero - one viewport below header -- */

.hero {
  display: flex;
  flex-direction: column;
  /* Fill first screen: stable viewport minus header (mobile browser UI–friendly) */
  min-height: calc(100svh - var(--site-header-h));
  min-height: calc(100dvh - var(--site-header-h));
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
  border-bottom: 1px solid #e8e7e4;
}

/* Main block grows and stays vertically centered in remaining space */
.hero > .wrap.hero-grid {
  flex: 1 1 auto;
  display: grid;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
  align-content: center;
  min-height: 0;
  padding-top: clamp(1.25rem, 4vh, 2.5rem);
  padding-bottom: clamp(1rem, 3vh, 1.75rem);
}

@media (min-width: 880px) {
  .hero > .wrap.hero-grid {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 64px;
  }
}

.hero-strip-row {
  flex: 0 0 auto;
  padding-top: clamp(0.75rem, 2vh, 1.25rem);
  padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
}

.hero-kicker {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #737373;
  margin-bottom: 1rem;
}

.hero-title {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(2.5rem, 5.5vw, 3.5rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #0a0a0a;
  margin-bottom: 1.35rem;
}

.hero-strip {
  margin: 0;
  padding-top: clamp(0.875rem, 2vh, 1.25rem);
  border-top: 1px solid #e8e7e4;
  font-size: clamp(0.75rem, 1.5vw, 0.8125rem);
  line-height: 1.55;
  color: #737373;
  max-width: 72ch;
}

.lead {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: #404040;
  max-width: 52ch;
  margin-bottom: 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid transparent;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: #141414;
  color: #fafaf9;
  border-color: #141414;
}
.btn-primary:hover { background: #2a2a2a; border-color: #2a2a2a; color: #fafaf9; }

.btn-secondary {
  background: #fff;
  color: #141414;
  border-color: #d4d3cf;
}
.btn-secondary:hover { background: #f5f5f4; border-color: #c4c3be; color: #141414; }

/* Hero sprout mark (inline SVG) */
.hero-aside {
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-sprout {
  width: min(260px, 100%);
  padding: 8px 0;
}

.hero-sprout-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.hero-sprout-svg path {
  fill: none;
  stroke: #141414;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-sprout-svg .sprout-vein {
  opacity: 0.88;
}

/* Noun leaf path is scaled ~0.36 so stroke matches the rest of the mark */
.hero-sprout-svg .sprout-noun-leaf {
  stroke-width: 8.9;
}

/* Pivot at stem crossing: calm, slightly out-of-phase sway (Anthropic-like) */
.hero-sprout .sprout-left {
  transform-origin: 50px 47px;
  animation: heroSproutLeafL 6.8s cubic-bezier(0.45, 0.02, 0.25, 1) infinite;
  will-change: transform;
}

.hero-sprout .sprout-right {
  transform-origin: 50px 47px;
  animation: heroSproutLeafR 6.8s cubic-bezier(0.45, 0.02, 0.25, 1) infinite;
  animation-delay: -1.15s;
  will-change: transform;
}

.hero-sprout .sprout-roots {
  animation: heroSproutRoots 5.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes heroSproutLeafL {
  0%, 100% { transform: rotate(-2.2deg); }
  50% { transform: rotate(3deg); }
}

@keyframes heroSproutLeafR {
  0%, 100% { transform: rotate(2.3deg); }
  50% { transform: rotate(-3.2deg); }
}

@keyframes heroSproutRoots {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-sprout .sprout-left,
  .hero-sprout .sprout-right,
  .hero-sprout .sprout-roots {
    animation: none;
  }
}

/* -- Sections -- */

.section {
  padding-top: clamp(56px, 8vw, 88px);
  padding-bottom: clamp(56px, 8vw, 88px);
}

.section-tint {
  background: var(--bg-warm);
  border-top: 1px solid #ded9cf;
  border-bottom: 1px solid #ded9cf;
}

.section-heading {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.5rem, 2.5vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #0a0a0a;
  margin-bottom: 1.5rem;
}

.section-lead {
  font-size: 1.0625rem;
  color: #525252;
  margin-top: -0.75rem;
  margin-bottom: 2rem;
  max-width: 42ch;
}

.prose {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: #404040;
  margin-bottom: 1.25rem;
}
.prose:last-child { margin-bottom: 0; }

.inline-link {
  color: #141414;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.inline-link:hover { color: #525252; }

/* -- Research hub & paper list -- */

.research-intro-lead {
  font-size: 1.125rem;
  line-height: 1.7;
  color: #404040;
  max-width: 52ch;
}

.research-catalog-head {
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
  max-width: 38rem;
}

.research-catalog-eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #737373;
  margin-bottom: 0.65rem;
}

.research-catalog-title {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: #0a0a0a;
  margin: 0 0 0.75rem;
}

.research-catalog-blurb {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: #525252;
  margin: 0;
}

.research-papers {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #fff;
  border: 1px solid #e4e3df;
  border-radius: 12px;
  box-shadow:
    0 1px 2px rgba(20, 20, 20, 0.04),
    0 4px 20px rgba(20, 20, 20, 0.05);
  overflow: hidden;
}

.research-papers li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 1.25rem 1.35rem;
  border-bottom: 1px solid #f0efec;
  transition: background 0.15s ease;
}

.research-papers li:last-child {
  border-bottom: none;
}

.research-papers li:hover {
  background: #fcfcfb;
}

.research-papers a {
  font-weight: 500;
  color: #141414;
  text-decoration: none;
}

.research-papers a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.research-paper-meta {
  font-size: 0.875rem;
  color: #737373;
  flex-shrink: 0;
}

.research-papers-empty {
  display: none;
  margin: 1.5rem 0 0;
  padding: 1.5rem 1.35rem;
  text-align: center;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #737373;
  background: rgba(255, 255, 255, 0.65);
  border: 1px dashed #d6d3cd;
  border-radius: 12px;
}

.research-papers:empty + .research-papers-empty {
  display: block;
}

/* -- Workflow steps (#workflow cards only) -- */

#workflow .steps {
  list-style: none;
  counter-reset: workflow-step;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(18px, 3vw, 28px);
  margin: 0;
  padding: 0;
}

@media (min-width: 900px) {
  #workflow .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }
}

#workflow .step {
  counter-increment: workflow-step;
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: clamp(22px, 3vw, 28px) clamp(22px, 3vw, 26px) clamp(20px, 2.5vw, 24px);
  background: #fff;
  border: 1px solid #e4e3df;
  border-radius: 12px;
  box-shadow:
    0 1px 2px rgba(20, 20, 20, 0.04),
    0 4px 16px rgba(20, 20, 20, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#workflow .step:hover {
  border-color: #d0cfc9;
  box-shadow:
    0 1px 3px rgba(20, 20, 20, 0.06),
    0 12px 32px rgba(20, 20, 20, 0.08);
}

#workflow .step-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

#workflow .step-num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: #fafaf9;
  background: #141414;
  border-radius: 8px;
}

#workflow .step-num::before {
  content: counter(workflow-step);
}

#workflow .step-title {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.1875rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: #0a0a0a;
  margin: 0;
  padding-top: 2px;
}

#workflow .step-text {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: #525252;
  margin: 0 0 1.125rem;
  flex: 1;
}

#workflow .step-text code {
  font-size: 0.84em;
  background: #ecebe8;
}

/* Fixed terminal height: same outer size on every card; overflow scrolls inside */
#workflow .code-block {
  margin: 0;
  margin-top: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 13.75rem;
  background: #1c1c1c;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#workflow .code-block::before {
  content: "";
  flex: 0 0 32px;
  height: 32px;
  background-color: #2a2a2a;
  border-bottom: 1px solid #333;
  background-image:
    radial-gradient(circle at 18px 50%, #ff5f57 4px, transparent 4px),
    radial-gradient(circle at 38px 50%, #febc2e 4px, transparent 4px),
    radial-gradient(circle at 58px 50%, #28c840 4px, transparent 4px);
  background-repeat: no-repeat;
}

#workflow .code-block code {
  flex: 1 1 auto;
  min-height: 0;
  font-family: ui-monospace, "Cascadia Code", Menlo, monospace;
  font-size: 0.78125rem;
  line-height: 1.6;
  color: #e4e4e1;
  background: none;
  padding: 12px 14px 14px;
  white-space: pre;
  display: block;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 899px) {
  #workflow .code-block {
    height: 15rem;
  }
}

/* -- Specification dl -- */

.spec-list {
  display: grid;
  gap: 0;
  border-top: 1px solid #e8e7e4;
}

.spec-item {
  display: grid;
  gap: 6px;
  padding: 20px 0;
  border-bottom: 1px solid #e8e7e4;
}

@media (min-width: 720px) {
  .spec-item {
    grid-template-columns: 200px 1fr;
    gap: 24px;
    align-items: baseline;
  }
}

.spec-item dt {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0a0a0a;
}

.spec-item dd {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #525252;
}

.spec-em {
  font-weight: 600;
  color: #0a0a0a;
}

/* -- NeuralHAT split -- */

.split {
  display: grid;
  gap: 40px;
  align-items: start;
}

@media (min-width: 800px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }
}

.hat-table-wrap {
  margin: 0;
}

.hat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  background: #fff;
  border: 1px solid #e8e7e4;
  border-radius: 8px;
  overflow: hidden;
}

.hat-table th,
.hat-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid #f0efec;
  vertical-align: top;
}

.hat-table tr:last-child th,
.hat-table tr:last-child td {
  border-bottom: none;
}

.hat-table th {
  font-weight: 600;
  color: #0a0a0a;
  width: 38%;
  background: var(--bg-muted);
}

.hat-table td {
  color: #525252;
}

/* -- Install -- */

.install-block {
  border-top: 1px solid #e8e7e4;
}

.install-steps {
  margin: 0 0 1.5rem 1.25rem;
  padding: 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: #404040;
}

.install-steps li {
  margin-bottom: 0.65rem;
}

.install-steps li:last-child {
  margin-bottom: 0;
}

.install-steps strong {
  font-weight: 600;
  color: #0a0a0a;
}

.install-copy-label {
  font-size: 0.9375rem;
  color: #525252;
  margin-bottom: 0.75rem;
}

.install-note {
  font-size: 0.875rem;
  color: #737373;
  margin-bottom: 1rem;
}

.install-command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  margin-top: 1rem;
  margin-bottom: 1rem;
  padding: 16px 20px;
  text-align: left;
  font: inherit;
  background: #fff;
  border: 1px solid #e8e7e4;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.install-command:hover {
  border-color: #c4c3be;
  background: var(--bg-muted);
}

.install-command code {
  font-size: 0.9375rem;
  background: none;
  padding: 0;
  color: #141414;
}

.install-command-hint {
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #737373;
}

.install-meta {
  font-size: 0.9375rem;
  color: #525252;
}

/* -- Footer -- */

.site-footer {
  border-top: 1px solid #e8e7e4;
  padding: 32px 0 40px;
  background: var(--bg-page);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 28rem;
}

.footer-brand {
  font-weight: 600;
  font-size: 0.9375rem;
  color: #0a0a0a;
}

.footer-meta {
  font-size: 0.8125rem;
  color: #737373;
}

.footer-tagline {
  font-size: 0.875rem;
  font-weight: 500;
  color: #525252;
  font-style: italic;
  margin: 0.35rem 0 0;
  line-height: 1.45;
}

.footer-tagline--second {
  font-size: 0.8125rem;
  font-weight: 400;
  font-style: normal;
  color: #737373;
  margin-top: 0.2rem;
}

.footer-nav {
  display: flex;
  gap: 20px;
}

.footer-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: #525252;
  text-decoration: none;
}
.footer-nav a:hover { text-decoration: underline; color: #141414; }
