/* Homepage-only header and hero approved in the DeepSeek harness study.
   The rest of the site continues to use the canonical Nori design system. */

:root { --hero-existing-fold-gap: 144px; }

/* The homepage keeps the drafting-paper texture without the outer rails. The
   hero escapes the content column; body clipping prevents horizontal scroll. */
html,
.home-page { overflow-x: clip; }
.home-page .frame {
  overflow-x: visible;
  border-left: 0;
  border-right: 0;
}
.home-page .sect::before,
.home-page .sect::after { display: none; }

.frame > .nav {
  position: fixed;
  z-index: 100;
  top: 20px;
  left: 0;
  width: 100%;
  min-height: 54px;
  color: var(--fg);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 15px;
  transition: background .45s ease, border-color .45s ease, box-shadow .45s ease, padding .45s ease;
}

.frame > .nav.scrolled {
  background: rgba(14, 18, 16, .78);
  border-color: rgba(255, 255, 255, .12);
  box-shadow: 0 12px 44px rgba(0, 0, 0, .22);
  backdrop-filter: blur(18px);
}

.frame > .nav .nav-inner {
  width: 100%;
  min-height: 52px;
  padding: 0 100px;
  gap: 26px;
}

.frame > .nav.scrolled .nav-inner { padding: 0 100px; }
.frame > .nav .nav-logo { gap: 9px; height: 38px; color: var(--fg); }
.frame > .nav .nav-logo:visited { color: var(--fg); }
.frame > .nav .nav-logo .logo-icon { flex: none; color: var(--fg); }
.frame > .nav .nav-logo .logo-icon rect { opacity: .7; }
.frame > .nav .nav-logo .logo-icon rect:first-child { opacity: .46; }
.nav-brand-word { font: 600 24px/1 var(--mono); letter-spacing: -.04em; }

.frame > .nav .nav-links { gap: 26px; font: 500 13px/1.2 var(--mono); }
.frame > .nav .nav-links > a,
.frame > .nav .nav-dropdown-toggle { color: rgba(255, 255, 255, .76); font: inherit; }
.frame > .nav .nav-links > a:visited { color: rgba(255, 255, 255, .76); }
.frame > .nav .nav-links > a:hover,
.frame > .nav .nav-dropdown-toggle:hover { color: var(--fg); }
.frame > .nav .nav-links > a:not(.nav-cta)::after { display: none; }
.frame > .nav .nav-dropdown-menu { background: rgba(22, 22, 22, .9); backdrop-filter: blur(18px); }

.fluid-hero {
  position: relative;
  left: 50%;
  width: 100vw;
  height: 100svh;
  min-height: 720px;
  margin-left: -50vw;
  overflow: hidden;
  color: var(--fg);
  background: var(--deep);
  border: 0;
  isolation: isolate;
}

#fluidCanvas,
#netCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  image-rendering: auto;
}
#fluidCanvas { z-index: 0; }
#netCanvas { z-index: 1; }
#particleCanvas {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: min(840px, 155vw);
  height: min(840px, 155vw);
  transform: translate(-50%, -50%);
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: .7;
  image-rendering: auto;
}

.fluid-hero::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .92) 0%, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, 0) 90%, rgba(0, 0, 0, .94) 100%),
    linear-gradient(90deg, rgba(2, 8, 5, .30), transparent 52%, rgba(2, 8, 5, .18));
  pointer-events: none;
}

.frame .fluid-hero-inner {
  position: relative;
  z-index: 5;
  width: min(1240px, calc(100% - 96px));
  height: 100%;
  min-height: 720px;
  margin-inline: auto;
  padding: 160px 0;
  display: grid;
  grid-template-columns: 60fr 40fr;
  gap: 80px;
  align-items: center;
}

.fluid-hero-copy { align-self: center; font-family: var(--mono); }
.fluid-hero-eyebrow {
  margin: 0 0 24px;
  color: var(--fg);
  font: 500 13px/1.2 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.fluid-hero-eyebrow::before { display: none; }
.hero.fluid-hero h1 {
  width: max-content;
  max-width: min(760px, 100%);
  margin: 0 0 32px;
  color: var(--fg);
  font: 600 clamp(46px, 5vw, 72px)/1.06 var(--mono);
  letter-spacing: .018em;
  word-spacing: .10em;
  text-align: left;
}
.fluid-hero .hero-lede {
  max-width: 560px;
  color: rgba(255, 255, 255, .50);
  font: 400 15px/1.75 var(--mono);
  letter-spacing: 0;
}
.fluid-hero .hero-lede { margin: 0 0 8px; }
.fluid-hero .hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 44px; }

.fluid-hero-button {
  position: relative;
  min-height: 44px;
  padding: 0 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  color: var(--fg);
  font: 500 14px/1.2 var(--mono);
  cursor: pointer;
  isolation: isolate;
  transition: color .4s ease, border-color .4s ease;
}
.fluid-hero-button span { position: relative; z-index: 2; }
.fluid-button-icon {
  position: relative;
  z-index: 2;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.fluid-hero-button::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .20);
  transform: translate(-50%, -50%) scale(0);
  transition: transform .55s cubic-bezier(.16, 1, .3, 1);
}
.fluid-hero-button:hover { color: var(--fg); text-decoration: none; }
.fluid-hero-button:hover::before { transform: translate(-50%, -50%) scale(38); }
.fluid-hero-button--light { color: var(--deep); background: var(--fg); border-color: transparent; }
.fluid-hero-button--light::before { background: rgba(0, 0, 0, .20); }
.fluid-hero-button--light:hover { color: var(--deep); border-color: transparent; }
.fluid-hero-button--ghost { background: rgba(255, 255, 255, .06); }
.fluid-hero-button--ghost:visited { color: var(--fg); }
.fluid-hero-button--ghost:hover { border-color: rgba(255, 255, 255, .60); }

.hero-terminal-wrap { width: 424px; justify-self: end; align-self: center; font-family: var(--mono); }
.hero-terminal { display: flex; flex-direction: column; gap: 12px; overflow: visible; background: transparent; }
.hero-terminal .terminal-tab-controls {
  display: flex;
  align-items: stretch;
  height: 36.5px;
  margin-left: 6px;
  padding: 0 4px;
}
.hero-terminal .terminal-tabs {
  display: flex;
  align-items: stretch;
  gap: 4px;
}
.hero-terminal .terminal-tab {
  width: auto;
  height: 36.5px;
  padding: 8px 19px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: rgba(255, 255, 255, .50);
  font: 500 13px/19.5px var(--mono);
  transition: color .25s ease, background .25s ease, border-color .25s ease;
}
.hero-terminal .terminal-tab.active {
  color: var(--fg);
  background: rgba(0, 0, 0, .20);
  border-color: rgba(255, 255, 255, .08);
  backdrop-filter: blur(20px);
}
.hero-terminal .terminal-repo-link {
  margin-left: -1px;
  padding: 0 10px 0 4px;
  display: flex;
  align-items: center;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 0 8px 0 0;
  color: rgba(255, 255, 255, .50);
}
.hero-terminal .terminal-tab[data-tab="source"] { padding-right: 7px; }
.hero-terminal .terminal-tab[data-tab="source"].active {
  border-right-color: transparent;
  border-radius: 8px 0 0 0;
}
.hero-terminal .terminal-tab-controls:has([data-tab="source"].active) .terminal-repo-link {
  background: rgba(0, 0, 0, .20);
  border-color: rgba(255, 255, 255, .08);
  border-left-color: transparent;
  backdrop-filter: blur(20px);
}
.hero-terminal .terminal-repo-link:visited { color: rgba(255, 255, 255, .50); }
.hero-terminal .terminal-repo-link:hover { color: var(--fg); text-decoration: none; }
.hero-terminal .terminal-repo-link svg { width: 14px; fill: currentColor; }
.hero-terminal .terminal-window {
  position: relative;
  min-height: 138.5px;
  margin-top: -13px;
  overflow: hidden;
  cursor: copy;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 10px;
  background: rgba(0, 0, 0, .20);
  backdrop-filter: blur(20px);
}
.hero-terminal .terminal-copy-target {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  cursor: copy;
  border: 0;
  border-radius: inherit;
  background: transparent;
}
.hero-terminal .terminal-copy-target:focus-visible {
  outline: 2px solid var(--green-bright);
  outline-offset: -2px;
}
.hero-terminal .terminal-titlebar {
  position: relative;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .30);
  font: 10px var(--mono);
}
.hero-terminal .traffic-lights { position: absolute; left: 16px; display: flex; gap: 7px; }
.hero-terminal .traffic-lights span { width: 11px; height: 11px; border-radius: 50%; background: var(--red); }
.hero-terminal .traffic-lights span:nth-child(2) { background: var(--yellow); }
.hero-terminal .traffic-lights span:nth-child(3) { background: var(--green); }
.hero-terminal .copy-button {
  position: absolute;
  right: 12px;
  padding: 7px 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, .50);
  font: 12px/18px var(--mono);
}
.hero-terminal .copy-button:hover { color: var(--fg); background: rgba(255, 255, 255, .08); }
.hero-terminal .copy-button svg { width: 13px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.hero-terminal .terminal-body {
  height: 93.5px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, .62);
  font: 14px/22px var(--mono);
}
/* Commands wrap; the card never widens to fit one. */
.hero-terminal .terminal-body p { margin: 0; }
.hero-terminal .terminal-body.hidden { display: none; }
.hero-terminal .terminal-prompt { color: var(--green-bright); }
.hero-terminal .command { color: var(--fg); }

/* Move half the old post-belt whitespace above the customer row. */
.fluid-hero + .logos-section {
  padding-top: calc(16px + var(--hero-existing-fold-gap) * .8125);
  padding-bottom: calc(var(--hero-existing-fold-gap) * .8125);
}
.fluid-hero + .logos-section > .belt-eyebrow { text-align: center; }

/* Homepage footer: three centered rows (brand/copyright, links, EOF mark). */
.home-page .footer-inner {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.home-page .footer-left,
.home-page .footer-links,
.home-page .footer-colophon {
  width: 100%;
  justify-content: center;
  text-align: center;
}
.home-page .footer-links {
  margin-left: 0;
  flex-wrap: wrap;
}
.home-page .footer-colophon { align-items: center; }
.home-page .footer-exit { text-align: center; }

@media (max-width: 900px) {
  :root { --hero-existing-fold-gap: 88px; }
  .frame .fluid-hero-inner { gap: 40px; }
}

@media (max-height: 640px) {
  :root { --hero-existing-fold-gap: 48px; }
}

@media (max-width: 768px) {
  .home-page .frame { overflow-x: clip; }
  .frame > .nav { top: 13px; }
  .frame > .nav .nav-inner { padding: 0 10px; }
  .frame > .nav .nav-burger { display: flex; }
  .frame > .nav .nav-links {
    position: absolute;
    top: 58px;
    left: 0;
    width: 100%;
    padding: 8px 14px 14px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    background: rgba(14, 18, 16, .94);
    backdrop-filter: blur(18px);
  }
  .fluid-hero { height: auto; min-height: 900px; }
  .frame .fluid-hero-inner {
    width: calc(100% - 40px);
    min-height: 900px;
    padding: 120px 0 70px;
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .hero.fluid-hero h1 { width: auto; font-size: 40px; }
  .fluid-hero .hero-lede { font-size: 14px; }
  .hero-terminal-wrap { width: 100%; justify-self: stretch; }
  .hero-terminal .terminal-body { padding: 0 16px; font-size: 12px; }
  #particleCanvas { width: min(760px, 190vw); height: min(760px, 190vw); }
  .home-page .footer-inner { align-items: center; }
  .home-page .footer-links {
    display: flex;
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .fluid-hero .hero-actions { flex-direction: column; align-items: stretch; }
  .fluid-hero-button { width: 100%; }
  .hero-terminal .terminal-tab { padding-inline: 13px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .fluid-hero-button::before { display: none; }
  .home-page .frame { overflow-x: clip; }
}
