/* ============================================================
   ODYSAIL SYSTEMS — Production AI Consulting
   Night-watch design system: abyss black, chart steel,
   instrument amber. Type: Archivo (expanded) / IBM Plex.
   ============================================================ */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-var-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/plex-sans-var-latin.woff2") format("woff2");
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/plex-mono-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --abyss:      #060A0F;   /* page ground — ocean at night          */
  --ink:        #0B121A;   /* raised panels                         */
  --hairline:   #1E2A36;   /* rules & borders                       */
  --steel:      #4A6478;   /* contour lines & chrome — never text   */
  --steel-text: #93A6B8;   /* dimmest text tier, ~8:1 on abyss      */
  --slate:      #AAB8C5;   /* secondary text, ~10:1 on abyss        */
  --foam:       #E8EDF2;   /* primary text                          */
  --amber:      #E5A13D;   /* night-watch instrument accent         */

  --font-display: "Archivo", sans-serif;
  --font-body:    "IBM Plex Sans", system-ui, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, monospace;

  --pad-x: clamp(1.25rem, 5vw, 5rem);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  background: var(--abyss);
  color: var(--foam);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--amber); color: var(--abyss); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-stretch: 118%;
  text-transform: uppercase;
  line-height: 0.98;
  letter-spacing: 0.005em;
}

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

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

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--pad-x);
  z-index: 100;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--amber);
  color: var(--abyss);
  padding: 0.7rem 1.2rem;
}

.skip-link:focus-visible {
  top: 0.5rem;
}

/* ---------- utilities ---------- */

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate);
}

.accent { color: var(--amber); }

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--foam);
  border: 1px solid var(--foam);
  padding: 1.05rem 2.4rem;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn:hover {
  background: var(--foam);
  color: var(--abyss);
}

.btn-solid {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--abyss);
}

.btn-solid:hover {
  background: var(--foam);
  border-color: var(--foam);
}

.link-plain {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate);
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 0.35rem;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.link-plain:hover { color: var(--foam); border-color: var(--foam); }

/* ---------- nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--pad-x);
  background: linear-gradient(to bottom, rgba(6, 10, 15, 0.85), rgba(6, 10, 15, 0));
  transition: background-color 0.3s ease;
}

.nav.scrolled {
  background: rgba(6, 10, 15, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--foam);
}

.nav-wordmark {
  font-family: var(--font-display);
  font-stretch: 118%;
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.nav-wordmark em {
  font-style: normal;
  font-weight: 300;
  color: var(--slate);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.4rem;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate);
  transition: color 0.2s ease;
}

.nav-links a:hover { color: var(--foam); }

.nav-links a.nav-cta {
  color: var(--amber);
  border: 1px solid rgba(229, 161, 61, 0.45);
  padding: 0.55rem 1.2rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-links a.nav-cta:hover {
  background: var(--amber);
  color: var(--abyss);
}

.nav-burger {
  display: none;
  background: none;
  border: 0;
  width: 2.2rem;
  height: 2.2rem;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
}

.nav-burger span {
  display: block;
  height: 1px;
  width: 100%;
  background: var(--foam);
  transition: transform 0.3s ease;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

#chart {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(6, 10, 15, 0.92) 0%, rgba(6, 10, 15, 0.25) 38%, rgba(6, 10, 15, 0) 60%),
    radial-gradient(120% 90% at 70% 10%, rgba(6, 10, 15, 0) 55%, rgba(6, 10, 15, 0.55) 100%);
}

.course {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.course path#course-line {
  fill: none;
  stroke: var(--amber);
  stroke-width: 1.4;
  opacity: 0.85;
}

.course .wpt circle {
  fill: var(--amber);
  stroke: none;
}

.course .wpt .wpt-ring {
  fill: none;
  stroke: var(--amber);
  stroke-width: 1;
  opacity: 0.4;
}

.course .wpt text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  fill: var(--slate);
}

.js .course .wpt {
  opacity: 0;
  transition: opacity 0.6s ease;
}

body.course-drawn .course .wpt-1 { opacity: 1; transition-delay: 0.9s; }
body.course-drawn .course .wpt-2 { opacity: 1; transition-delay: 1.5s; }
body.course-drawn .course .wpt-3 { opacity: 1; transition-delay: 2.1s; }

.hero-content {
  position: relative;
  z-index: 2;
  padding: 6.5rem var(--pad-x) clamp(4rem, 10vh, 7rem);
  max-width: 60rem;
}

.hero-content .mono-label {
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-weight: 800;
  font-size: clamp(2.9rem, 7.2vw, 6.6rem);
  margin-bottom: 1.6rem;
}

.hero-sub {
  max-width: 34rem;
  color: var(--slate);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  margin-bottom: 2.6rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  right: var(--pad-x);
  bottom: 2.2rem;
  z-index: 2;
  animation: drift-down 2.6s ease-in-out infinite;
}

@keyframes drift-down {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50%      { transform: translateY(6px); opacity: 1; }
}

/* page-load: hero copy rises (JS-gated — visible by default without JS) */

.js .hero-content > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

body.loaded .hero-content > * { opacity: 1; transform: none; }
body.loaded .hero-content > *:nth-child(2) { transition-delay: 0.12s; }
body.loaded .hero-content > *:nth-child(3) { transition-delay: 0.24s; }
body.loaded .hero-content > *:nth-child(4) { transition-delay: 0.36s; }

/* ---------- telemetry ---------- */

.telemetry {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 3.4rem var(--pad-x) 3rem;
  background: var(--ink);
}

.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: calc(84rem - 2 * var(--pad-x));
  margin: 0 auto;
}

.stat { border-left: 1px solid var(--hairline); padding-left: 1.6rem; }

.stat-n {
  display: block;
  font-family: var(--font-display);
  font-stretch: 118%;
  font-weight: 800;
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  line-height: 1;
  color: var(--foam);
  font-variant-numeric: tabular-nums;
}

.stat-l {
  display: block;
  margin-top: 0.7rem;
  font-size: 0.9rem;
  color: var(--slate);
  max-width: 16rem;
}

.telemetry-note {
  max-width: calc(84rem - 2 * var(--pad-x));
  margin: 2.4rem auto 0;
  color: var(--steel-text);
}

/* ---------- sections ---------- */

.section {
  padding: clamp(5rem, 12vh, 9rem) var(--pad-x);
  max-width: 84rem;
  margin: 0 auto;
}

.section-head { margin-bottom: clamp(3rem, 7vh, 5rem); }

.section-head .mono-label { margin-bottom: 1.2rem; }

.section-head h2 {
  font-weight: 800;
  font-size: clamp(2rem, 4.6vw, 3.8rem);
  max-width: 46rem;
}

.section-sub {
  margin-top: 1.1rem;
  color: var(--slate);
  max-width: 32rem;
}

/* ---------- capability legs ---------- */

.leg {
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) 2.5fr;
  gap: 2rem;
  padding: 3rem 0;
  border-top: 1px solid var(--hairline);
}

.leg:last-of-type { border-bottom: 1px solid var(--hairline); }

.leg-index { display: flex; flex-direction: column; gap: 0.9rem; }

.leg-name {
  font-family: var(--font-display);
  font-stretch: 118%;
  font-weight: 700;
  font-size: clamp(1.6rem, 2.6vw, 2.3rem);
  text-transform: uppercase;
  line-height: 1;
}

.leg-body h3 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 0.9rem;
  color: var(--foam);
}

.leg-body p {
  color: var(--slate);
  max-width: 38rem;
}

.leg-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.8rem;
  margin-top: 1.6rem;
}

.leg-list li {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel-text);
}

.leg-list li::before {
  content: "▸ " / "";
  color: var(--amber);
}

/* ---------- manifesto ---------- */

.manifesto {
  background: var(--ink);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.manifesto-inner {
  max-width: 84rem;
  margin: 0 auto;
  padding: clamp(5rem, 14vh, 10rem) var(--pad-x);
}

.manifesto-inner .mono-label { margin-bottom: 1.4rem; }

.manifesto h2 {
  font-weight: 800;
  font-size: clamp(2.1rem, 5vw, 4.2rem);
  max-width: 56rem;
  margin-bottom: 2.8rem;
}

.manifesto-copy {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.4rem;
  max-width: 72rem;
}

.manifesto-copy p { color: var(--slate); }

.manifesto-copy p:first-child { color: var(--foam); }

/* ---------- platform ---------- */

.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
}

.platform-item {
  background: var(--ink);
  padding: 2rem 1.6rem 2.2rem;
}

.platform-item h3 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 0.8rem;
}

.platform-item p {
  font-size: 0.9rem;
  color: var(--slate);
}

.platform-note {
  margin-top: 2rem;
  color: var(--steel-text);
}

/* ---------- proof ---------- */

.proof-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.proof-copy p { color: var(--slate); max-width: 40rem; }
.proof-copy p + p { margin-top: 1.4rem; }

.proof-spec {
  border: 1px solid var(--hairline);
  background: var(--ink);
  padding: 0.4rem 1.6rem;
}

.proof-spec > div {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.05rem 0;
  border-top: 1px solid var(--hairline);
}

.proof-spec > div:first-child { border-top: 0; }

.proof-spec dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel-text);
}

.proof-spec dd {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--foam);
  text-align: right;
}

/* ---------- contact ---------- */

.contact {
  text-align: center;
  padding: clamp(6rem, 16vh, 11rem) var(--pad-x);
}

.contact .mono-label { margin-bottom: 1.4rem; }

.contact h2 {
  font-weight: 800;
  font-size: clamp(2.4rem, 6.5vw, 5.4rem);
  margin-bottom: 1.6rem;
}

.contact-sub {
  color: var(--slate);
  max-width: 32rem;
  margin: 0 auto 3rem;
}

.contact-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.2rem;
  flex-wrap: wrap;
}

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--hairline);
  padding: 3rem var(--pad-x) 2.4rem;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links { display: flex; gap: 2rem; }

.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--slate);
  transition: color 0.2s ease;
}

.footer-links a:hover { color: var(--foam); }

.footer-meta {
  margin-top: 2.2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--hairline);
  color: var(--steel-text);
}

.footer-disclaimer {
  margin-top: 1.6rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  color: var(--steel-text);
  max-width: 52rem;
}

.footer-meta a {
  color: var(--slate);
  transition: color 0.2s ease;
}

.footer-meta a:hover { color: var(--foam); }

/* ---------- scroll reveals (JS-gated — visible by default without JS) ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 2.6rem;
    background: rgba(6, 10, 15, 0.97);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
  }

  .nav-links a { font-size: 1rem; }

  .nav.menu-open .nav-links {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.3s ease;
  }

  .nav-logo,
  .nav-burger {
    position: relative;
    z-index: 2;
  }

  .nav-burger { display: flex; }

  .nav.menu-open .nav-burger span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav.menu-open .nav-burger span:last-child  { transform: translateY(-4px) rotate(-45deg); }

  .course .wpt text { display: none; }

  .telemetry-grid { grid-template-columns: 1fr; gap: 2.4rem; }
  .manifesto-copy { grid-template-columns: 1fr; }
  .leg { grid-template-columns: 1fr; gap: 1.2rem; }
  .leg-index { flex-direction: row; align-items: baseline; gap: 1.2rem; }
  .proof-grid { grid-template-columns: 1fr; }
  .hero-scroll { display: none; }
}

@media (max-width: 520px) {
  body { font-size: 1rem; }

  .hero h1 { font-size: clamp(2.3rem, 12vw, 2.9rem); }

  .hero-content { padding-bottom: 3.2rem; }

  .hero-actions .btn {
    display: block;
    width: 100%;
    text-align: center;
  }

  .hero-actions { gap: 1.4rem; }

  .proof-spec > div {
    flex-direction: column;
    gap: 0.3rem;
  }

  .proof-spec dd { text-align: left; }

  .contact-actions .btn {
    display: block;
    width: 100%;
    text-align: center;
  }

  .footer-row { flex-direction: column; align-items: flex-start; }
  .footer-links { flex-wrap: wrap; }
  .footer-meta { gap: 0.8rem; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .js .hero-content > *,
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .js .course .wpt { opacity: 1; transition: none; }

  .course path#course-line {
    stroke-dasharray: none !important;
    stroke-dashoffset: 0 !important;
  }

  .hero-scroll { animation: none; }
}
