/*
  Nanflows "next" site: shared base for every page built from new-plan.md.
  Same design language as the live site (public/site.css): Geist, ink on white, hairlines,
  mono eyebrows, Nanflows violet as the one accent, pastel light for glows only.
*/
@font-face {
  font-family: 'Geist';
  src: url('/fonts/geist-latin-variable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('/fonts/geist-mono-latin-variable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --surface-1: #fafafa;
  --surface-2: #f4f4f5;
  --surface-3: #e9e9ec;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --ink: #09090b;
  --ink-2: #52525b;
  --ink-3: #71717a;
  --ink-4: #a1a1aa;

  --violet: #6d28d9;
  --violet-2: #8b5cf6;
  --violet-soft: #f3eefe;
  --violet-line: #ddd0fb;
  --green: #16a34a;
  --green-soft: #e8f7ee;
  --amber: #d97706;
  --rose: #e11d48;

  --lilac: #d8c8ff;
  --sky: #bcdcff;
  --mint: #bdf2d8;
  --peach: #ffd9bf;
  --pink: #ffcfe6;

  --woo: #7f54b3;
  --shopify: #5e8e3e;

  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;

  --shadow-1: 0 1px 2px rgb(9 9 11 / 0.05);
  --shadow-2: 0 1px 2px rgb(9 9 11 / 0.04), 0 8px 24px -8px rgb(30 20 60 / 0.14);
  --shadow-3: 0 1px 0 rgb(255 255 255 / 0.7) inset, 0 24px 60px -18px rgb(40 20 90 / 0.28);

  --font: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.2, 0, 0.38, 0.9);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);

  --page: 1600px; /* owner 2026-11-12: was 1200px */
  --gutter: clamp(20px, 3.2vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* Owner 2026-11-12: no text selection except on clickable/typeable elements. */
body { -webkit-user-select: none; user-select: none; }
a, button, input, textarea, select, label, summary, [role='button'], [role='switch'], [contenteditable], [tabindex]:not([tabindex='-1']) { -webkit-user-select: text; user-select: text; }
img { -webkit-user-drag: none; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
/* Icons from the original pages (svg.icon, no width/height of their own) are text-sized everywhere; without this a
   lone icon fills its box, e.g. the arrow in "Read the docs" on phones. */
svg.icon { width: 1em; height: 1em; flex: none; }
.btn svg.icon { width: 16px; height: 16px; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }

/* Type */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow.violet { color: var(--violet); }
.display {
  font-size: clamp(40px, 6.6vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 640;
}
.h2 {
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 620;
}
.h3 { font-size: 20px; line-height: 1.25; letter-spacing: -0.015em; font-weight: 600; }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); line-height: 1.5; }
.muted { color: var(--ink-3); }
.grad {
  background: linear-gradient(100deg, var(--violet) 10%, #a855f7 50%, #ec4899 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Buttons */
.btn {
  --h: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--h);
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  font-size: 15px;
  font-weight: 550;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), background 160ms var(--ease), border-color 160ms var(--ease);
}
.btn:hover { transform: translateY(-1px); border-color: var(--ink-4); box-shadow: var(--shadow-1); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: #1c1c22; border-color: #1c1c22; box-shadow: 0 8px 24px -8px rgb(109 40 217 / 0.55); }
.btn-violet { background: var(--violet); border-color: var(--violet); color: #fff; }
.btn-violet:hover { background: #5b21b6; border-color: #5b21b6; box-shadow: 0 8px 24px -8px rgb(109 40 217 / 0.6); }
.btn-lg { --h: 52px; padding: 0 24px; font-size: 16px; }
.btn-sm { --h: 36px; padding: 0 14px; font-size: 14px; }
.btn .arr { transition: transform 160ms var(--ease); }
.btn:hover .arr { transform: translateX(3px); }

/* Platform badges */
.pf {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 560;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink-2);
  white-space: nowrap;
}
.pf::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pf.woo { color: var(--woo); border-color: #e3d8f2; background: #f8f4fc; }
.pf.shopify { color: var(--shopify); border-color: #d6e6cb; background: #f4f9f0; }

/* Header */
.nx-header {
  position: sticky;
  top: var(--sale-h, 0px); /* under the sale banner when there is one (site.js sets --sale-h) */
  z-index: 50;
  background: rgb(255 255 255 / 0.72);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease);
}
.nx-header.scrolled { border-bottom-color: var(--border); }
.nx-header .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.nx-logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 650; letter-spacing: -0.02em; font-size: 17px; }
.nx-logo img { width: 24px; height: 24px; }
.nx-nav { display: flex; gap: 4px; margin-right: auto; }
.nx-nav a { padding: 8px 12px; border-radius: 999px; font-size: 14.5px; color: var(--ink-2); transition: color 120ms, background 120ms; }
.nx-nav a:hover { color: var(--ink); background: var(--surface-2); }
/* Products dropdown (menu.js; assets/nav.js toggles .open for click and touch) */
.nx-dd { position: relative; }
.nx-dd-b { display: inline-flex; align-items: center; gap: 5px; padding: 8px 12px; border: 0; border-radius: 999px; background: none; font: inherit; font-size: 14.5px; color: var(--ink-2); cursor: pointer; transition: color 120ms, background 120ms; }
.nx-dd-b svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform 200ms var(--ease); }
.nx-dd:hover .nx-dd-b, .nx-dd.open .nx-dd-b { color: var(--ink); background: var(--surface-2); }
.nx-dd.open .nx-dd-b svg { transform: rotate(180deg); }
.nx-dd-p {
  position: absolute; top: calc(100% + 10px); left: -12px; z-index: 60; width: 640px;
  padding: 10px; border-radius: 18px; background: #fff; border: 1px solid var(--border);
  box-shadow: 0 24px 60px -18px rgb(30 10 60 / 0.25), 0 2px 6px rgb(0 0 0 / 0.04);
  opacity: 0; visibility: hidden; transform: translateY(-6px) scale(0.98); transform-origin: 20% 0;
  transition: opacity 180ms var(--ease), transform 220ms var(--ease-out), visibility 0s 220ms;
}
.nx-dd-p::before { content: ''; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.nx-dd.open .nx-dd-p { opacity: 1; visibility: visible; transform: none; transition: opacity 180ms var(--ease), transform 220ms var(--ease-out); }
.nx-dd-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.nx-dd-h { padding: 8px 10px 6px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-4); }
.nx-nav .nx-dd-i { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 12px; color: var(--ink); }
.nx-nav .nx-dd-i:hover, .nx-nav .nx-dd-i.on { background: var(--surface-1); }
.nx-dd-ic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: color-mix(in srgb, var(--tint) 70%, #fff); border: 1px solid color-mix(in srgb, var(--tint) 90%, #000 6%); font-weight: 650; font-size: 14px; color: var(--ink); }
.nx-dd-i b { display: block; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.nx-dd-i b em { font-style: normal; font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 99px; background: var(--surface-2); color: var(--ink-3); vertical-align: 1px; }
.nx-dd-i small { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.4; color: var(--ink-3); }
.nx-dd-f { display: flex; gap: 6px; margin-top: 8px; padding: 10px 10px 4px; border-top: 1px solid var(--surface-3); }
.nx-nav .nx-dd-f a { padding: 6px 10px; font-size: 13px; font-weight: 550; color: var(--violet); }
.nx-nav .nx-dd-f a:hover { background: var(--violet-soft); }
.nx-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nx-actions .login { font-size: 14.5px; color: var(--ink-2); padding: 8px 12px; }
.nx-actions .login:hover { color: var(--ink); }

/* Footer */
.nx-footer { border-top: 1px solid var(--border); padding: 56px 0 40px; margin-top: 40px; background: var(--surface-1); }
.nx-footer .cols { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; }
.nx-footer h4 { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; margin-bottom: 14px; }
.nx-footer li { margin-bottom: 9px; }
.nx-footer li a { font-size: 14px; color: var(--ink-2); }
.nx-footer li a:hover { color: var(--ink); }
.nx-footer .blurb { font-size: 14px; color: var(--ink-3); max-width: 260px; margin-top: 12px; }
.nx-footer .legal { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 13px; color: var(--ink-3); }

/* Reveal on scroll */
.rv { opacity: 0; transform: translateY(18px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
.rv.in { opacity: 1; transform: none; }
.rv[data-d='1'] { transition-delay: 80ms; }
.rv[data-d='2'] { transition-delay: 160ms; }
.rv[data-d='3'] { transition-delay: 240ms; }
.rv[data-d='4'] { transition-delay: 320ms; }

/* Phone menu (chrome.js phoneMenu): only where the nav is hidden */
.nx-mnav { display: none; position: relative; }
.nx-mnav > summary { list-style: none; display: grid; place-content: center; gap: 4px; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; background: var(--bg); }
.nx-mnav > summary::-webkit-details-marker { display: none; }
.nx-mnav > summary span { display: block; width: 16px; height: 1.5px; border-radius: 2px; background: var(--ink); transition: transform 200ms var(--ease), opacity 200ms; }
.nx-mnav[open] > summary span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nx-mnav[open] > summary span:nth-child(2) { opacity: 0; }
.nx-mnav[open] > summary span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }
.nx-mnav-p { position: fixed; left: 12px; right: 12px; top: 72px; max-height: calc(100vh - 88px); overflow: auto; display: grid; gap: 2px; padding: 14px; border: 1px solid var(--border); border-radius: 20px; background: #fff; box-shadow: var(--shadow-3); z-index: 80; animation: rise 250ms var(--ease-out); }
.nx-mnav-p .nx-dd-h { margin: 8px 10px 4px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.nx-mnav-i { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; font-size: 15px; font-weight: 550; color: var(--ink); }
.nx-mnav-i .nx-dd-ic { width: 30px; height: 30px; font-size: 13px; }
.nx-mnav-i.all { color: var(--violet); font-size: 14px; }
.nx-mnav-l { padding: 11px 10px; border-radius: 12px; font-size: 16px; color: var(--ink); }
.nx-mnav-i:hover, .nx-mnav-l:hover { background: var(--surface-1); }
.nx-mnav-p hr { border: 0; border-top: 1px solid var(--border); margin: 8px 0; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 900px) {
  .nx-mnav { display: block; }
  .nx-nav { display: none; }
  .nx-actions .login { display: none; }
  .nx-footer .cols { grid-template-columns: 1fr 1fr; }
  .nx-footer .cols > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  :root { --gutter: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .rv { opacity: 1; transform: none; }
}
