/* parthships — a diagnostic instrument for AI-built apps.
   Two worlds: graphite BENCH (dark, where work happens) and bone REPORT (light, where it's read).
   One signal accent: lime = stable/shipped, held in tension with ember = broken. Flat fields, never glow.
   Type: Bricolage Grotesque (display), Archivo (body), Martian Mono (readouts). */

:root {
  /* bench (dark) */
  --bg:        #101216;
  --surface:   #171a20;
  --raised:    #1e222a;
  --line:      #2a2f3a;
  --line-soft: #21262f;
  --ink:       #e9ebf0;
  --muted:     #9298a6;
  --faint:     #666c7a;

  /* report (light) — a cool bone, deliberately not cozy cream */
  --doc-bg:    #e9e6dd;
  --doc-raise: #f3f1ea;
  --doc-ink:   #16181c;
  --doc-muted: #565b64;
  --doc-faint: #878275;
  --doc-line:  #d3cec2;

  /* signal */
  --lime:      #c3ec48;   /* stable / shipped */
  --lime-deep: #5f7a0e;   /* lime that passes contrast on light */
  --ember:     #ff6a3d;   /* broken / warning */
  --ember-dim: #b23a1a;

  --disp: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Archivo", system-ui, -apple-system, sans-serif;
  --mono: "Martian Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --maxw: 1200px;
  --gut: clamp(20px, 5vw, 56px);

  --e-out: cubic-bezier(0.16, 1, 0.3, 1);  /* confident arrival */
  --shadow: 0 2px 4px rgba(0,0,0,.2), 0 18px 48px -24px rgba(0,0,0,.65);
  --shadow-doc: 0 2px 4px rgba(40,34,20,.06), 0 24px 48px -28px rgba(40,34,20,.3);

  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* --- themed browser surfaces (the cheapest 'built not assembled' signal) --- */
::selection { background: var(--lime); color: #0c0e12; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 3px; }
html { scrollbar-color: var(--line) var(--bg); }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 0; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--faint); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
svg { display: block; }

/* --- type --- */
h1, h2, h3, h4 {
  font-family: var(--disp);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
h1 { letter-spacing: -0.035em; }
.display { font-size: clamp(2.6rem, 7vw, 5.6rem); line-height: 0.96; letter-spacing: -0.04em; }
p { margin: 0 0 1em; max-width: 68ch; }

.mono { font-family: var(--mono); }
.label {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
}
.label .n { color: var(--lime); }
.tnum { font-variant-numeric: tabular-nums; }

/* --- layout --- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gut); }
.wrap-narrow { max-width: 820px; margin: 0 auto; padding-inline: var(--gut); }
section { position: relative; }
.pad { padding-block: clamp(72px, 12vw, 148px); }
.hr { height: 1px; background: var(--line); border: 0; margin: 0; }

/* section as the light report world */
.report {
  background: var(--doc-bg);
  color: var(--doc-ink);
  --ink: var(--doc-ink); --muted: var(--doc-muted); --faint: var(--doc-faint);
  --line: var(--doc-line); --surface: var(--doc-raise); --raised: var(--doc-raise);
  --shadow: var(--shadow-doc);
}
.report .label .n { color: var(--lime-deep); }
.report ::selection { background: var(--lime-deep); color: #fff; }

/* --- buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--body); font-weight: 600; font-size: 0.98rem;
  padding: 0.85em 1.35em; border-radius: 0; border: 1px solid transparent;
  cursor: pointer; transition: transform .18s var(--e-out), background .18s, color .18s, border-color .18s;
  will-change: transform;
}
.btn .arw { transition: transform .22s var(--e-out); }
.btn:hover .arw { transform: translateX(4px); }
.btn-primary { background: var(--lime); color: #0c0e12; }
.btn-primary:hover { transform: translateY(-2px); background: #d2f765; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.report .btn-primary { background: var(--doc-ink); color: var(--doc-bg); }
.report .btn-primary:hover { background: #000; }
.report .btn-ghost { border-color: var(--doc-ink); color: var(--doc-ink); }

/* --- top nav --- */
.site-head {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px var(--gut);
  mix-blend-mode: normal;
  transition: background .3s, border-color .3s, padding .3s;
  border-bottom: 1px solid transparent;
}
.site-head.scrolled {
  background: rgba(16,18,22,.78);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--line);
  padding-block: 13px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-family: var(--disp); font-weight: 700; font-size: 1.12rem; letter-spacing: -0.02em; }
.brand .mk {
  width: 30px; height: 30px; display: grid; place-items: center; flex: none;
  background: var(--lime); color: #0c0e12; font-family: var(--mono); font-weight: 600; font-size: 0.9rem;
}
.brand .r { color: var(--faint); font-family: var(--mono); font-weight: 400; font-size: 0.7rem; vertical-align: super; }
.nav-links { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 34px); }
.nav-links a.lk {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.04em; color: var(--muted);
  position: relative; padding-block: 4px;
}
.nav-links a.lk::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1.5px; width: 100%;
  background: var(--lime); transform: scaleX(0); transform-origin: left; transition: transform .28s var(--e-out);
}
.nav-links a.lk:hover, .nav-links a.lk[aria-current="page"] { color: var(--ink); }
.nav-links a.lk:hover::after, .nav-links a.lk[aria-current="page"]::after { transform: scaleX(1); }
.nav-cta {
  font-family: var(--body); font-weight: 600; font-size: 0.82rem;
  background: var(--lime); color: #0c0e12; padding: 0.6em 1em; transition: transform .18s var(--e-out), background .18s;
}
.nav-cta:hover { transform: translateY(-1px); background: #d2f765; }
.menu-btn { display: none; }
.mobile-nav { display: none; }

@media (max-width: 760px) {
  .nav-links { display: none; }
  .menu-btn {
    display: inline-flex; align-items: center; gap: 8px; background: none; border: 1px solid var(--line);
    color: var(--ink); font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase;
    padding: 8px 12px; cursor: pointer;
  }
  .mobile-nav { position: fixed; inset: 0; z-index: 60; background: var(--bg); display: none; flex-direction: column;
    padding: 90px var(--gut) 40px; gap: 6px; }
  .mobile-nav.open { display: flex; }
  .mobile-nav a { font-family: var(--disp); font-size: 2rem; font-weight: 700; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .mobile-nav .x { position: absolute; top: 22px; right: var(--gut); background: none; border: 0; color: var(--ink); font-size: 2rem; cursor: pointer; line-height: 1; }
}

/* --- footer --- */
.site-foot { background: var(--bg); border-top: 1px solid var(--line); padding: clamp(56px,8vw,96px) 0 40px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; align-items: start; }
.foot-grid h4 { font-family: var(--mono); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); margin-bottom: 18px; }
.foot-grid a { display: block; color: var(--muted); padding: 5px 0; font-size: 0.95rem; }
.foot-grid a:hover { color: var(--lime); }
.foot-cta { font-family: var(--disp); font-size: clamp(1.6rem,3.4vw,2.3rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.04; }
.foot-cta a { color: var(--lime); }
.foot-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 0.74rem; color: var(--faint); }
@media (max-width: 680px){ .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; } .foot-grid .foot-cta-col { grid-column: 1 / -1; } }

/* --- reveal-on-scroll (content visible by default; JS adds .reveal-ready to arm) --- */
.reveal-ready [data-reveal] { opacity: 0; transform: translateY(26px); }
.reveal-ready [data-reveal].in { opacity: 1; transform: none; transition: opacity .7s var(--e-out), transform .8s var(--e-out); }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal-ready [data-reveal] { opacity: 1 !important; transform: none !important; }
  .btn:hover, .nav-cta:hover, .btn-primary:hover, .btn-ghost:hover { transform: none; }
}
