/* ============================================================
   Noema — marketing site layout. Built from the same tokens as
   the app: hairline borders, no decorative shadows, near-mono,
   brand-accent on ~2 elements per view. Density is the argument.
   ============================================================ */

/* ---------- layout primitives ---------- */
.wrap { width:100%; max-width:1280px; margin:0 auto; padding:0 32px; }
.wrap-narrow { max-width:780px; }
/* use more of the screen on big monitors so the page isn't a narrow column in a sea of gutter,
   but cap it so this dense layout never stretches into uncomfortably long lines */
@media (min-width:1600px) { .wrap { max-width:1500px; } }
@media (min-width:2000px) { .wrap { max-width:1640px; } }
section { position:relative; }
.section-pad { padding:96px 0; }
.divider-top { border-top:1px solid var(--border-subtle); }

.eyebrow-row { display:flex; align-items:center; gap:10px; margin-bottom:20px; }
.eyebrow-num { font-family:var(--font-mono); font-size:var(--text-xs); color:var(--text-tertiary);
  border:1px solid var(--border-subtle); border-radius:var(--radius-sm); padding:1px 6px; letter-spacing:0; }

/* ---------- marketing type ---------- */
h1,h2,h3,h4,p { margin:0; }
.display {
  font-size:clamp(34px, 5.2vw, 56px); line-height:1.06; letter-spacing:-.02em;
  font-weight:600; text-wrap:balance;
}
.h2 {
  font-size:clamp(26px, 3.4vw, 38px); line-height:1.12; letter-spacing:-.018em;
  font-weight:600; text-wrap:balance;
}
.h3 { font-size:var(--text-2xl); line-height:1.2; letter-spacing:-.012em; font-weight:600; }
.lede {
  font-size:clamp(16px, 1.6vw, 19px); line-height:1.55; color:var(--text-secondary);
  font-weight:400; text-wrap:pretty; max-width:60ch;
}
.body { font-size:var(--text-md); line-height:1.6; color:var(--text-secondary); text-wrap:pretty; }
.kicker { color:var(--brand-accent); font-weight:600; }

/* ---------- buttons (app hierarchy) ---------- */
.btn { display:inline-flex; align-items:center; gap:8px; font-family:var(--font-sans);
  font-size:var(--text-base); font-weight:500; line-height:1; border-radius:var(--radius-md);
  padding:11px 16px; border:1px solid transparent; cursor:pointer; text-decoration:none;
  transition:background .15s var(--ease), border-color .15s var(--ease), transform .1s var(--ease); white-space:nowrap; }
.btn:active { transform:translateY(.5px); }
/* primary — the one committing action: Book a demo. solid locked-green */
.btn-primary { background:var(--status-locked-bg); color:#fff; }
[data-theme="dark"] .btn-primary { color:#06210F; }
.btn-primary:hover { background:color-mix(in oklab, var(--status-locked-bg) 88%, #000); }
[data-theme="dark"] .btn-primary:hover { background:color-mix(in oklab, var(--status-locked-bg) 90%, #fff); }
/* secondary — quiet, never rivals primary */
.btn-secondary { background:var(--btn-secondary-bg); border-color:var(--btn-secondary-border); color:var(--text-primary); }
.btn-secondary:hover { background:var(--bg-hover); }
/* tertiary text link — the "See a sample" quiet link */
.link-quiet { display:inline-flex; align-items:center; gap:6px; color:var(--text-secondary);
  font-size:var(--text-base); font-weight:500; text-decoration:none; border-bottom:1px solid transparent;
  transition:color .15s, border-color .15s; }
.link-quiet:hover { color:var(--text-primary); border-bottom-color:var(--border-default); }
.link-quiet .arr { color:var(--text-tertiary); transition:transform .15s var(--ease); }
.link-quiet:hover .arr { transform:translateX(2px); color:var(--text-secondary); }

/* ---------- nav ---------- */
.nav { position:sticky; top:0; z-index:60; background:color-mix(in oklab, var(--bg-canvas) 86%, transparent);
  backdrop-filter:saturate(1.4) blur(10px); border-bottom:1px solid transparent; transition:border-color .2s, background .2s; }
.nav.scrolled { border-bottom-color:var(--border-subtle); background:color-mix(in oklab, var(--bg-canvas) 92%, transparent); }
.nav-inner { display:flex; align-items:center; gap:16px; height:60px; }
.brand-lockup { display:flex; align-items:center; gap:10px; text-decoration:none; color:var(--text-primary); }
.brand-name { display:block; font-weight:500; font-size:var(--text-lg); letter-spacing:.02em; line-height:1.1; }
.brand-sub { display:block; font-size:10px; letter-spacing:.06em; text-transform:uppercase; color:var(--text-tertiary); font-weight:500; }
.nav-links { display:flex; align-items:center; gap:4px; margin-left:auto; }
.nav-link { color:var(--text-secondary); text-decoration:none; font-size:var(--text-base); font-weight:500;
  padding:7px 11px; border-radius:var(--radius-md); transition:color .15s, background .15s; }
.nav-link:hover { color:var(--text-primary); background:var(--bg-hover); }
.nav-actions { display:flex; align-items:center; gap:8px; margin-left:8px; }
.icon-btn { display:grid; place-items:center; width:34px; height:34px; border-radius:var(--radius-md);
  border:1px solid var(--border-subtle); background:var(--bg-surface); color:var(--text-secondary); cursor:pointer;
  transition:background .15s, color .15s, border-color .15s; }
.icon-btn:hover { background:var(--bg-hover); color:var(--text-primary); border-color:var(--border-default); }

/* ---------- base-tone picker ---------- */
.palette-wrap { position:relative; }
.palette-pop { position:absolute; top:calc(100% + 8px); right:0; z-index:70; width:212px;
  background:var(--bg-surface); border:1px solid var(--border-default); border-radius:var(--radius-lg);
  box-shadow:var(--shadow-sm); padding:8px; }
.pal-opt { display:flex; align-items:center; gap:10px; width:100%; padding:8px; border:none; background:transparent;
  border-radius:var(--radius-md); cursor:pointer; text-align:left; color:var(--text-secondary);
  transition:background .14s var(--ease); }
.pal-opt:hover { background:var(--bg-hover); color:var(--text-primary); }
.pal-sw { display:inline-flex; flex:0 0 auto; border-radius:var(--radius-sm); overflow:hidden;
  border:1px solid var(--border-default); }
.pal-sw i { width:16px; height:24px; display:block; }
.pal-name { font-size:var(--text-base); font-weight:500; color:var(--text-primary); flex:1; line-height:1.2; }
.pal-meta { display:block; font-size:11px; font-weight:400; color:var(--text-tertiary); margin-top:2px; }
.pal-tick { color:var(--brand-accent); opacity:0; flex:0 0 auto; }
.pal-opt[aria-current="true"] .pal-tick { opacity:1; }
.pal-opt[aria-current="true"] .pal-name { color:var(--text-primary); }

/* ---------- brand mark ---------- */
.mark { display:grid; place-items:center; color:var(--brand-accent); flex:0 0 auto; }

/* ---------- generic surface card ---------- */
.surface { background:var(--bg-surface); border:1px solid var(--border-default); border-radius:var(--radius-lg); }
.panel-label { display:flex; align-items:center; gap:8px; }

/* ---------- chips (app vocabulary) ---------- */
.chip { display:inline-flex; align-items:center; gap:6px; font-size:var(--text-xs); font-weight:500;
  line-height:1; padding:4px 8px; border-radius:99px; white-space:nowrap; }
.chip-soft { border:1px solid var(--border-subtle); }
.chip.kind { font-weight:600; }
.chip-dot { width:7px; height:7px; border-radius:99px; flex:0 0 auto; }
.meta-chip { display:inline-flex; align-items:center; gap:5px; font-size:var(--text-xs); font-weight:500;
  color:var(--text-secondary); background:var(--bg-subtle); border:1px solid var(--border-subtle);
  border-radius:99px; padding:3px 9px; white-space:nowrap; }
.mono-tag { font-family:var(--font-mono); font-size:11px; color:var(--text-tertiary);
  border:1px solid var(--border-subtle); border-radius:var(--radius-sm); padding:1px 6px; }

/* status pills */
.pill { display:inline-flex; align-items:center; gap:6px; font-size:var(--text-xs); font-weight:600;
  line-height:1; padding:4px 9px; border-radius:99px; white-space:nowrap; }
.pill-draft   { color:var(--status-draft-fg); background:var(--status-draft-bg); }
.pill-edited  { color:var(--status-edited-fg); background:var(--status-edited-bg); }
.pill-locked  { color:var(--status-locked-fg); background:var(--status-locked-bg); }

/* confidence badges */
.conf { display:inline-flex; align-items:center; gap:5px; font-size:var(--text-xs); font-weight:600;
  line-height:1; padding:4px 8px; border-radius:99px; white-space:nowrap; }
.conf-high   { color:var(--confidence-high-fg);   background:var(--confidence-high-bg); }
.conf-medium { color:var(--confidence-medium-fg); background:var(--confidence-medium-bg); }
.conf-low    { color:var(--confidence-low-fg);    background:var(--confidence-low-bg); }
.conf-verify { color:var(--confidence-verify-fg); background:var(--confidence-verify-bg); }

/* ---------- product-screen frame (the "real app" device) ---------- */
.screen { background:var(--bg-surface); border:1px solid var(--border-default); border-radius:10px;
  box-shadow:var(--shadow-sm); overflow:hidden; }
.screen-bar { display:flex; align-items:center; gap:8px; height:34px; padding:0 12px;
  border-bottom:1px solid var(--border-subtle); background:var(--bg-subtle); }
.screen-dot { width:9px; height:9px; border-radius:99px; background:var(--border-default); }
.screen-title { font-family:var(--font-mono); font-size:11px; color:var(--text-tertiary); margin-left:6px; }
.screen-body { padding:0; }

/* tab strip inside a screen */
.tabstrip { display:flex; align-items:center; gap:2px; padding:8px 14px 0; border-bottom:1px solid var(--border-subtle); }
.tab { display:inline-flex; align-items:center; gap:7px; font-size:var(--text-base); font-weight:500;
  color:var(--text-secondary); padding:8px 10px 11px; border-bottom:2px solid transparent; }
.tab.active { color:var(--text-primary); border-bottom-color:var(--text-primary); }
.tab .ct { font-family:var(--font-mono); font-size:11px; color:var(--text-tertiary); }

/* dotgrid canvas (diagram surface) */
.dotgrid { background-image:radial-gradient(circle, var(--canvas-dot) 1px, transparent 1px);
  background-size:22px 22px; }

/* ---------- AI Draft Card (moldability spine) ---------- */
.draft-card { background:var(--bg-surface); border:1px solid var(--border-default); border-radius:var(--radius-md); }
.draft-card.edited  { border-left:2px solid var(--accent); }
.draft-card.locked  { background:var(--bg-subtle); }
.draft-head { display:flex; align-items:center; gap:8px; padding:12px 14px 0; }
.draft-body { padding:10px 14px 14px; }

/* sparkle helper for "AI" rows */
.spark { color:var(--brand-accent); flex:0 0 auto; }

/* ---------- generic grids ---------- */
.grid { display:grid; gap:24px; }
/* two product screens side-by-side; stack on tablet/phone so each stays readable */
.grid-2up { grid-template-columns:1fr 1fr; }
@media (max-width:760px) { .grid-2up { grid-template-columns:1fr; } }
.feature-list { display:flex; flex-direction:column; gap:0; }
.feature-row { display:flex; gap:14px; padding:18px 0; border-top:1px solid var(--border-subtle); }
.feature-row:first-child { border-top:none; }
.feature-ix { font-family:var(--font-mono); font-size:var(--text-xs); color:var(--text-tertiary); flex:0 0 auto; padding-top:3px; }

/* flow rail (discovery pipeline) */
.flowrail { display:flex; align-items:stretch; gap:0; flex-wrap:wrap; }
.flowstep { flex:1 1 0; min-width:120px; padding:14px 16px; border:1px solid var(--border-subtle);
  border-right:none; background:var(--bg-surface); position:relative; }
.flowstep:first-child { border-top-left-radius:var(--radius-md); border-bottom-left-radius:var(--radius-md); }
.flowstep:last-child { border-right:1px solid var(--border-subtle); border-top-right-radius:var(--radius-md); border-bottom-right-radius:var(--radius-md); }
.flowstep .n { display:block; font-family:var(--font-mono); font-size:11px; color:var(--text-tertiary); }
.flowstep .t { display:block; font-size:var(--text-base); font-weight:500; color:var(--text-primary); margin-top:6px; line-height:1.3; }
.flowstep .d { display:block; font-size:var(--text-sm); color:var(--text-secondary); margin-top:4px; line-height:1.4; }
.flowstep.accentstep { background:var(--brand-accent-tint); border-color:color-mix(in oklab, var(--brand-accent) 30%, transparent); }

/* ---------- footer ---------- */
.footer { border-top:1px solid var(--border-subtle); padding:44px 0 56px; }
.footer-grid { display:flex; align-items:flex-start; justify-content:space-between; gap:32px; flex-wrap:wrap; }
.footer small { color:var(--text-tertiary); font-size:var(--text-sm); }

/* ---------- reveal-on-scroll ---------- */
.reveal { opacity:0; transform:translateY(14px); transition:opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity:1; transform:none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity:1; transform:none; transition:none; } }

/* ---------- responsive ---------- */
.two-col { display:grid; grid-template-columns:1fr 1fr; gap:48px; align-items:center; }
.hero-grid { display:grid; grid-template-columns:1fr; gap:40px; }

@media (max-width:900px) {
  .two-col { grid-template-columns:1fr; gap:32px; }
  .section-pad { padding:72px 0; }
  .nav-links { display:none; }
}
@media (max-width:560px) {
  .wrap { padding:0 18px; }
  .section-pad { padding:56px 0; }
  .flowstep { border-right:1px solid var(--border-subtle); border-radius:var(--radius-md); }
  .flowstep:not(:first-child) { border-top:none; }
}
