/* ============================================================
   Nabu landing — locked visual system (hero mockup v5)
   ground #F6F7FB · ink #191E38 · lapis #2B389E (single accent)
   ============================================================ */

:root {
  --ground: #f6f7fb;
  --ink: #191e38;
  --ink-hover: #262d54;
  --lapis: #2b389e;
  --lapis-600: #243182;
  --tint: #ebedf8;
  --card: #ffffff;
  --muted: #565d7a;
  --line: #e6e8f2;
  --line-strong: #d6dbec;

  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --wrap: 1120px;
  --r-win: 16px;
  --r-card: 14px;
  --r-btn: 11px;

  --shadow-win: 0 1px 2px rgba(20, 22, 40, .04), 0 24px 54px -22px rgba(24, 28, 70, .24);
  --shadow-card: 0 1px 2px rgba(20, 22, 40, .04), 0 10px 30px -18px rgba(24, 28, 70, .16);

  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- base ---------- */

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

html {
  scroll-behavior: smooth;
}

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

h1, h2, h3, p, ul, ol, figure { margin: 0; }

img, svg { display: block; max-width: 100%; }

::selection { background: #d8dcf2; color: var(--ink); }

a { color: var(--lapis); text-decoration: none; }
a:hover { color: var(--lapis-600); }

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

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 10px 10px;
  font-size: 14px;
  transition: top .15s ease;
}
.skip-link:focus { top: 0; color: #fff; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 40px;
}

section[id] { scroll-margin-top: 28px; }

/* ---------- type ---------- */

h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(42px, 5.6vw, 60px);
  line-height: 1.02;
  letter-spacing: -.021em;
  text-wrap: balance;
  margin-bottom: 22px;
}

.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.08;
  letter-spacing: -.018em;
  text-wrap: balance;
  margin-bottom: 18px;
}

.eyebrow {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--lapis);
  margin-bottom: 18px;
}

.prose {
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 62ch;
  text-wrap: pretty;
}

.section-head { max-width: 720px; }

/* ---------- buttons & links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 500;
  font-size: 15.5px;
  line-height: 1.2;
  padding: 13px 24px;
  border: 0;
  border-radius: var(--r-btn);
  cursor: pointer;
  transition: background .15s ease;
}
.btn:hover { background: var(--ink-hover); }
/* guard: never let a link rule dim the button label */
a.btn, a.btn:hover, a.btn:visited { color: #fff; }
.btn:disabled { opacity: .6; cursor: default; }

.btn-small {
  padding: 9px 16px;
  font-size: 14.5px;
  border-radius: 10px;
}

.btn-ghost,
a.btn-ghost, a.btn-ghost:visited {
  background: transparent;
  color: var(--lapis);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover,
a.btn-ghost:hover {
  background: #fff;
  border-color: var(--lapis);
  color: var(--lapis-600);
}

.see {
  font-size: 15px;
  color: var(--ink);
  border-bottom: 1.5px solid var(--lapis);
  padding-bottom: 2px;
}
.see:hover { color: var(--lapis); }

/* ---------- header ---------- */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -.01em;
  color: var(--ink);
}
.brand svg { width: 22px; height: 22px; color: var(--lapis); flex: none; }

.bar-right { display: flex; align-items: center; gap: 26px; }

.nav { display: flex; align-items: center; gap: 26px; font-size: 14.5px; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--ink); }

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

.hero-zone {
  position: relative;
  overflow: hidden;
  overflow: clip;
}

.wm {
  position: absolute;
  right: -150px;
  top: 24px;
  width: 640px;
  height: 640px;
  color: var(--lapis);
  opacity: .05;
  z-index: 0;
  pointer-events: none;
}

.hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
  padding: 56px 0 96px;
}
/* let tracks shrink below nowrap content (the mono log scrolls in place) */
.hero > * { min-width: 0; }

.hero .sub {
  font-size: 19px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 31ch;
  margin-bottom: 30px;
}

.cta-row {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
}

.trust {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}
.trust span { display: inline-flex; align-items: center; gap: 7px; }
.trust .dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--lapis);
  opacity: .55;
  flex: none;
}

/* real app capture — window chrome and drop-shadow are baked into the PNG,
   so it renders bare: no frame, no extra shadow */
.hero-shot {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---------- window mock ---------- */

.win {
  background: var(--card);
  border: .5px solid var(--line);
  border-radius: var(--r-win);
  box-shadow: var(--shadow-win);
  overflow: hidden;
}

.win-top {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 15px;
  border-bottom: .5px solid var(--line);
}
.tl { width: 11px; height: 11px; border-radius: 50%; }
.tl-r { background: #ff5f57; }
.tl-y { background: #febc2e; }
.tl-g { background: #28c840; }

.win-body {
  padding: 19px 18px;
  min-height: 232px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.ubub {
  align-self: flex-end;
  background: var(--tint);
  color: #26215c;
  font-size: 13.5px;
  line-height: 1.45;
  padding: 9px 13px;
  border-radius: 12px;
  max-width: 76%;
}

.aline {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.5;
}

.log {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.75;
  overflow-x: auto;
}
.log-line { white-space: nowrap; }
.log b { color: var(--lapis); font-weight: 500; }
.log .dim { opacity: .7; }

/* permission gate (illustrative) */
.gate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--ground);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--ink);
}
.gate .mono { font-family: var(--mono); font-size: 11.5px; color: var(--lapis); }
.gate-actions { display: flex; gap: 8px; }
.gate-btn {
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  padding: 6px 11px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  white-space: nowrap;
}
.gate-btn.primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.visual-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- §2 live demo loop ----------
   JS adds .demo-anim (only when motion is allowed) and steps the
   [data-step] elements through .is-on / .is-active. Without JS, or
   under prefers-reduced-motion, the full log + gate show statically. */

@media (prefers-reduced-motion: no-preference) {
  .demo-anim [data-step] {
    visibility: hidden;
    transition: opacity .45s ease;
  }
  .demo-anim [data-step].is-on { visibility: visible; }
  .demo-anim.demo-fade [data-step] { opacity: 0; }

  .demo-anim .log-line {
    overflow: hidden;
    max-width: 100%;
    width: calc((var(--n, 40) + 1) * 1ch);
    border-right: 2px solid transparent;
  }
  .demo-anim .log-line.is-on {
    animation: type-line calc(var(--n, 40) * 26ms) steps(30, end) both;
  }
  /* the active line carries the blinking caret (border tracks the typed edge) */
  .demo-anim .log-line.is-active {
    border-right-color: var(--lapis);
    animation:
      type-line calc(var(--n, 40) * 26ms) steps(30, end) both,
      caret-blink 1.1s steps(1) infinite;
  }
  .demo-anim .gate.is-on { animation: gate-in .5s var(--ease) both; }
}

/* implicit "to" keyframes on purpose: they resolve to the underlying
   value, so the .demo-fade opacity transition still shows through */
@keyframes type-line { from { width: 0; } }
@keyframes caret-blink { 50% { border-right-color: transparent; } }
@keyframes gate-in { from { opacity: 0; transform: translateY(5px); } }

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

.section { padding: clamp(76px, 9vw, 116px) 0; }
.section-tight { padding-bottom: clamp(64px, 7vw, 96px); }

/* §2 split layout */
.split {
  display: grid;
  grid-template-columns: .96fr 1.04fr;
  gap: 64px;
  align-items: center;
}
.split > * { min-width: 0; }

/* wedge bullet list */
.points {
  list-style: none;
  padding: 0;
  margin-top: 28px;
  display: grid;
  gap: 15px;
}
.points li {
  position: relative;
  padding-left: 27px;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--muted);
}
.points li strong { color: var(--ink); font-weight: 600; }
.points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .48em;
  width: 10px;
  height: 10px;
  background: var(--lapis);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.chip-soon {
  display: inline-block;
  vertical-align: 1px;
  margin-left: 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--lapis);
  background: var(--tint);
  padding: 2.5px 8px;
  border-radius: 999px;
}

/* §3 capability cards */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 46px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 24px 22px;
  box-shadow: 0 1px 2px rgba(20, 22, 40, .03);
}
.card-ic {
  width: 22px;
  height: 22px;
  color: var(--lapis);
  margin-bottom: 14px;
}
.tool-chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1;
  color: var(--lapis);
  background: var(--tint);
  padding: 5px 9px;
  border-radius: 6px;
}
.card h3 {
  font-size: 16.5px;
  font-weight: 600;
  margin: 16px 0 8px;
}
.card p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
}

/* §3 direction panel (soft tint = "where it's going") */
.direction {
  margin-top: 28px;
  background: var(--tint);
  border-radius: var(--r-card);
  padding: 30px 34px;
}
.direction-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--lapis);
  margin-bottom: 12px;
}
.direction-lead {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  max-width: 58ch;
}
.quotes {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}
.quotes li {
  background: #fff;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.45;
  padding: 8px 14px;
  border-radius: 12px 12px 12px 4px;
}
.direction-fwd {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 60ch;
}
.direction-fwd em { font-family: var(--serif); font-size: 1.06em; }

/* §4 pillar quadrants */
.pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 46px;
  border-bottom: 1px solid var(--line);
}
.pillar {
  border-top: 1px solid var(--line);
  padding: 34px 48px 36px 0;
}
.pillar-ic {
  width: 22px;
  height: 22px;
  color: var(--lapis);
  margin-bottom: 16px;
}
.pillar:nth-child(even) {
  border-left: 1px solid var(--line);
  padding-left: 48px;
  padding-right: 0;
}
.pillar h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 23px;
  letter-spacing: -.012em;
  margin-bottom: 10px;
}
.pillar p {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 48ch;
}

/* §5 audience panels */
.icp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 46px;
}
.icp {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 30px 28px;
}
.icp h3 { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.icp .who { font-size: 13.5px; color: var(--muted); margin-bottom: 20px; }
.asks {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.asks li {
  background: var(--tint);
  color: #26215c;
  font-size: 14px;
  line-height: 1.5;
  padding: 9px 14px;
  border-radius: 12px 12px 12px 4px;
}

/* card hovers (pointer devices, motion allowed) */
@media (hover: hover) {
  .card, .icp { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
  .card:hover, .icp:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
    border-color: var(--line-strong);
  }
}

/* §6 the beginning */
.beginning {
  position: relative;
  overflow: hidden;
  overflow: clip;
  text-align: center;
}
.wm-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -54%);
  width: 540px;
  height: 540px;
  color: var(--lapis);
  opacity: .045;
  pointer-events: none;
}
.beginning-inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
}
.beginning .prose {
  margin: 0 auto;
  font-size: 18px;
}
.beginning .prose em { font-family: var(--serif); font-size: 1.05em; }
.name-line {
  margin-top: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.glyphs {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--lapis);
}
.glyphs svg { flex: none; }
.name-note {
  font-size: 14.5px;
  color: var(--muted);
  max-width: 46ch;
}

/* §7 early access */
.access-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  padding: clamp(40px, 6vw, 64px) clamp(24px, 5vw, 64px);
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.access-card .mark {
  width: 26px; height: 26px;
  color: var(--lapis);
  margin: 0 auto 18px;
}
.access-card .section-title { margin-bottom: 12px; }
.access-card .prose { margin: 0 auto; }

.form-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}
.form-row input[type="email"] {
  flex: 1;
  max-width: 340px;
  min-width: 0;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-btn);
  padding: 12px 16px;
}
.form-row input[type="email"]::placeholder { color: #6b7290; }
.form-row input[type="email"]:focus-visible {
  outline: 2px solid var(--lapis);
  outline-offset: 1px;
  border-color: var(--lapis);
}
.form-row input[type="email"]:disabled { opacity: .6; }

/* honeypot — visually removed, still in the form for bots */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  min-height: 1.5em;
  margin-top: 14px;
  font-size: 14.5px;
  color: var(--muted);
}
.form-status.ok { color: var(--ink); font-weight: 500; }
.form-status.ok::before { content: "\2713\00a0"; color: var(--lapis); }
.form-status.error { color: var(--ink); }

.form-note {
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--muted);
}

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

.footer {
  border-top: 1px solid var(--line);
  padding: 44px 0 52px;
  font-size: 14px;
  color: var(--muted);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 28px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 600;
  font-size: 16px;
}
.footer-brand svg { width: 18px; height: 18px; color: var(--lapis); flex: none; }
.footer .tag {
  margin-top: 10px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--muted);
}
.footer-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.footer-meta .sep { opacity: .5; }
.footer-meta a { color: var(--lapis); }
.footer-meta a:hover { color: var(--lapis-600); text-decoration: underline; text-underline-offset: 3px; }

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

/* scroll reveal — hidden only when JS is confirmed present */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.js .reveal[data-delay="1"] { transition-delay: .07s; }
.js .reveal[data-delay="2"] { transition-delay: .14s; }
.js .reveal[data-delay="3"] { transition-delay: .21s; }
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* hero entrance (CSS-only, ends visible even without JS) */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise .7s var(--ease) both; }
  .hero-copy > *:nth-child(2) { animation-delay: .05s; }
  .hero-copy > *:nth-child(3) { animation-delay: .1s; }
  .hero-copy > *:nth-child(4) { animation-delay: .15s; }
  .hero-copy > *:nth-child(5) { animation-delay: .2s; }
  .hero-visual { animation: rise .8s .22s var(--ease) both; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .card, .icp { transition: none; }
  .card:hover, .icp:hover { transform: none; }
}

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

@media (max-width: 1000px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 861px) {
  /* visual sits left of the copy in §2 to alternate rhythm with the hero */
  .split-visual { order: -1; }
}

@media (max-width: 860px) {
  .nav { display: none; }

  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 34px 0 64px;
  }
  .hero .sub { max-width: none; }
  .wm { display: none; }

  .split {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .pillars { grid-template-columns: 1fr; border-bottom: 0; }
  .pillar,
  .pillar:nth-child(even) {
    border-left: 0;
    padding: 28px 0;
  }
  .pillar:last-child { padding-bottom: 8px; }

  .icp-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 22px; }
  .cta-row { gap: 18px; }
  .direction { padding: 24px 22px; }
}

@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }

  .cta-row { flex-wrap: wrap; }

  .form-row { flex-direction: column; }
  .form-row input[type="email"] { max-width: none; }

  .footer-inner { flex-direction: column; }
}
