/* ============================================================
   Ctoryteller — shared design system
   Dark, editorial, premium. Fraunces (display) + Inter (UI).
   ============================================================ */

:root {
  --bg: #0b0c11;
  --bg-raised: #12141c;
  --bg-card: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eceef4;
  --text-dim: #a4a9b8;
  --text-faint: #6b7183;

  /* Ctoryteller brand: warm candlelight gold */
  --brand-1: #f6c45a;
  --brand-2: #ee7a4b;
  --brand-glow: rgba(246, 196, 90, 0.14);

  /* Product accents (overridden per page) */
  --accent-1: var(--brand-1);
  --accent-2: var(--brand-2);
  --accent-glow: var(--brand-glow);

  --mf-1: #8f7bff;
  --mf-2: #c86bfa;
  --mf-glow: rgba(143, 123, 255, 0.16);
  --ll-1: #2fd58f;
  --ll-2: #21b8c9;
  --ll-glow: rgba(47, 213, 143, 0.14);

  --radius: 18px;
  --radius-sm: 12px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --maxw: 1120px;
}

.theme-memberflow {
  --accent-1: var(--mf-1);
  --accent-2: var(--mf-2);
  --accent-glow: var(--mf-glow);
}
.theme-ledgerlink {
  --accent-1: var(--ll-1);
  --accent-2: var(--ll-2);
  --accent-glow: var(--ll-glow);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: rgba(246, 196, 90, 0.28); color: #fff; }

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

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

/* ---------- ambient background ---------- */
.backdrop {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 500px at 15% -5%, var(--accent-glow), transparent 60%),
    radial-gradient(800px 500px at 90% 10%, rgba(143, 123, 255, 0.07), transparent 60%),
    radial-gradient(1000px 700px at 50% 110%, rgba(33, 184, 201, 0.06), transparent 60%);
}
.backdrop::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 55% at 50% 0%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 55% at 50% 0%, black 30%, transparent 75%);
}

/* ---------- typography ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 560; letter-spacing: -0.015em; }

.display {
  font-size: clamp(2.6rem, 6.2vw, 4.6rem);
  line-height: 1.06;
  font-weight: 480;
}
.display em {
  font-style: italic;
  font-weight: 420;
  background: linear-gradient(100deg, var(--accent-1), var(--accent-2), var(--accent-1));
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 7s ease-in-out infinite;
}
@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.section-title {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  line-height: 1.15;
  margin-bottom: 14px;
}
.section-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-1); margin-bottom: 18px;
}
.section-kicker::before {
  content: ""; width: 22px; height: 1px;
  background: linear-gradient(90deg, var(--accent-1), transparent);
}
.lede { color: var(--text-dim); font-size: 1.12rem; max-width: 640px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(11, 12, 17, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.logo {
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; letter-spacing: -0.01em;
  display: inline-flex; align-items: baseline;
}
.logo .c {
  background: linear-gradient(120deg, var(--brand-1), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-style: italic; font-weight: 700; margin-right: 1px;
}
.nav-links { display: flex; align-items: center; gap: 26px; font-size: 0.92rem; color: var(--text-dim); }
.nav-links a { transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-links .btn { color: var(--bg); }

/* breadcrumb variant used on inner pages */
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 0.92rem; color: var(--text-faint); min-width: 0; }
.crumbs a { color: var(--text-dim); transition: color .2s; white-space: nowrap; }
.crumbs a:hover { color: var(--text); }
.crumbs .sep { opacity: 0.5; }
.crumbs .here { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem; line-height: 1;
  background: linear-gradient(120deg, var(--accent-1), var(--accent-2));
  color: #0b0c11; border: none; cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter .18s ease;
  box-shadow: 0 8px 28px -10px var(--accent-glow);
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 14px 34px -10px var(--accent-glow); }
.btn.ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border-strong); box-shadow: none;
}
.btn.ghost:hover { border-color: var(--accent-1); color: var(--accent-1); }
.btn .arr { transition: transform .18s ease; }
.btn:hover .arr { transform: translateX(3px); }

/* ---------- hero ---------- */
.hero { padding: 108px 0 84px; position: relative; }
.hero .lede { margin: 26px 0 38px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  border: 1px solid var(--border); border-radius: 999px;
  padding: 7px 16px; font-size: 0.83rem; color: var(--text-dim);
  background: var(--bg-card); margin-bottom: 30px;
}
.hero-badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-1);
  box-shadow: 0 0 10px var(--accent-1);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.45; } }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- sections ---------- */
section { padding: 84px 0; }
.section-head { margin-bottom: 48px; }

/* ---------- product cards (landing) ---------- */
.products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.product-card {
  position: relative; display: flex; flex-direction: column; gap: 18px;
  padding: 40px 36px 34px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015));
  border: 1px solid var(--border);
  overflow: hidden; isolation: isolate;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.product-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
  transition: opacity 0.3s ease;
  background: radial-gradient(600px 260px at 30% -10%, var(--card-glow), transparent 70%);
}
.product-card:hover { transform: translateY(-5px); border-color: var(--border-strong); box-shadow: 0 24px 60px -24px rgba(0,0,0,0.7); }
.product-card:hover::before { opacity: 1; }
.product-card.mf { --card-1: var(--mf-1); --card-2: var(--mf-2); --card-glow: var(--mf-glow); }
.product-card.ll { --card-1: var(--ll-1); --card-2: var(--ll-2); --card-glow: var(--ll-glow); }

/* diagonal corner ribbon — absolutely positioned, stays out of the card's flow */
.product-card .ribbon {
  position: absolute; top: 26px; right: -50px; width: 200px; z-index: 2;
  padding: 7px 0; text-align: center; pointer-events: none;
  transform: rotate(45deg);
  font-size: 0.6rem; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: #0b0c11;
  background: linear-gradient(100deg, var(--card-1), var(--card-2));
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.9);
}

.app-mark {
  width: 54px; height: 54px; border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--card-1), var(--card-2));
  color: #0b0c11; font-weight: 800; font-size: 1.3rem; font-family: var(--font-body);
  box-shadow: 0 10px 26px -8px var(--card-glow);
}
.app-mark.logo { background: none; overflow: hidden; }
.app-mark.logo img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.product-card h3 { font-size: 1.75rem; }
.product-card .tag {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  background: linear-gradient(100deg, var(--card-1), var(--card-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.product-card p { color: var(--text-dim); font-size: 0.99rem; }
.chiprow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip {
  font-size: 0.8rem; color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px;
  background: rgba(255,255,255,0.02);
}
.product-card .go {
  margin-top: auto; padding-top: 14px;
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 0.95rem;
  background: linear-gradient(100deg, var(--card-1), var(--card-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.product-card .go svg { stroke: var(--card-1); transition: transform .2s ease; }
.product-card:hover .go svg { transform: translateX(4px); }

/* ---------- highlights grid ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.tile {
  padding: 28px 26px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--border);
  transition: border-color .25s ease, background .25s ease, transform .25s ease;
}
.tile:hover { border-color: var(--border-strong); background: rgba(255,255,255,0.05); transform: translateY(-3px); }
.tile .ico {
  width: 42px; height: 42px; border-radius: 11px; margin-bottom: 18px;
  display: grid; place-items: center;
  background: var(--accent-glow);
  border: 1px solid var(--border);
}
.tile .ico svg { stroke: var(--accent-1); }
.tile h4 { font-family: var(--font-body); font-size: 1.05rem; font-weight: 650; margin-bottom: 8px; letter-spacing: 0; }
.tile p { color: var(--text-dim); font-size: 0.93rem; }

/* ---------- steps (onboarding) ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; padding: 30px 26px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-card); }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--font-display); font-style: italic; font-size: 2.4rem;
  background: linear-gradient(120deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  display: block; margin-bottom: 12px; opacity: 0.9;
}
.step h4 { font-family: var(--font-body); font-size: 1.05rem; font-weight: 650; margin-bottom: 8px; }
.step p { color: var(--text-dim); font-size: 0.93rem; }

/* ---------- audience / industry pills ---------- */
.pillcloud { display: flex; flex-wrap: wrap; gap: 12px; }
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-card);
  color: var(--text-dim); font-size: 0.95rem;
  transition: border-color .2s ease, color .2s ease;
}
.pill:hover { border-color: var(--accent-1); color: var(--text); }
.pill .em { font-size: 1.1rem; }

/* ---------- stats strip ---------- */
.strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-card); overflow: hidden;
}
.strip > div { padding: 30px 26px; border-left: 1px solid var(--border); }
.strip > div:first-child { border-left: none; }
.strip b {
  display: block; font-family: var(--font-display); font-size: 1.7rem; font-weight: 560;
  background: linear-gradient(120deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 4px;
}
.strip span { color: var(--text-dim); font-size: 0.88rem; }

/* ---------- big CTA panel ---------- */
.cta-panel {
  position: relative; text-align: center;
  padding: 76px 32px; border-radius: 24px; overflow: hidden;
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(700px 300px at 50% -20%, var(--accent-glow), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
}
.cta-panel h2 { font-size: clamp(1.9rem, 4vw, 3rem); margin-bottom: 14px; }
.cta-panel p { color: var(--text-dim); max-width: 560px; margin: 0 auto 34px; }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 40px; margin-top: 40px;
  background: rgba(255,255,255,0.015);
  font-size: 0.92rem;
}
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 36px; margin-bottom: 44px; }
.foot-grid h5 {
  font-size: 0.78rem; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 16px;
}
.foot-grid ul { list-style: none; display: grid; gap: 10px; }
.foot-grid a { color: var(--text-dim); transition: color .2s; }
.foot-grid a:hover { color: var(--text); }
.foot-brand p { color: var(--text-dim); margin-top: 14px; max-width: 300px; }
.foot-contact li { color: var(--text-dim); }
.foot-bottom {
  border-top: 1px solid var(--border); padding-top: 26px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--text-faint); font-size: 0.85rem;
}

/* ---------- app page hero split ---------- */
.app-hero { padding: 96px 0 72px; }
.app-hero .app-mark { width: 66px; height: 66px; border-radius: 17px; font-size: 1.6rem; margin-bottom: 28px;
  --card-1: var(--accent-1); --card-2: var(--accent-2); --card-glow: var(--accent-glow); }

/* ---------- policy (prose) pages ---------- */
.policy-shell { padding: 64px 0 90px; }
.policy-head { margin-bottom: 44px; max-width: 760px; }
.policy-head h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); line-height: 1.12; margin-bottom: 20px; }
.meta-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.meta-badge {
  font-size: 0.82rem; color: var(--text-dim);
  border: 1px solid var(--border); background: var(--bg-card);
  border-radius: 999px; padding: 6px 14px;
}
.meta-badge b { color: var(--text); font-weight: 600; }

.prose { max-width: 760px; color: #c9cdda; }
.prose h2 {
  font-size: 1.55rem; margin: 52px 0 16px; color: var(--text);
  padding-top: 26px; border-top: 1px solid var(--border);
}
.prose h3 { font-size: 1.13rem; font-family: var(--font-body); font-weight: 650; color: var(--text); margin: 32px 0 10px; }
.prose p { margin: 14px 0; }
.prose ul, .prose ol { margin: 14px 0 14px 22px; display: grid; gap: 7px; }
.prose li::marker { color: var(--accent-1); }
.prose strong { color: var(--text); font-weight: 640; }
.prose em { color: var(--text); }
.prose a { color: var(--accent-1); border-bottom: 1px solid transparent; transition: border-color .2s; word-break: break-word; }
.prose a:hover { border-color: var(--accent-1); }
.prose code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 0.87em;
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  border-radius: 6px; padding: 1.5px 6px;
}
.prose blockquote {
  margin: 20px 0; padding: 16px 22px;
  border-left: 3px solid var(--accent-1); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--bg-card); color: var(--text-dim);
}
.prose hr { border: none; border-top: 1px solid var(--border); margin: 40px 0; }
.prose .tablewrap { overflow-x: auto; margin: 20px 0; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 560px; }
.prose th, .prose td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th {
  font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-dim); background: rgba(255,255,255,0.03);
}
.prose tr:last-child td { border-bottom: none; }

/* unfilled legal placeholders like [LEGAL ENTITY NAME] */
.ph {
  background: rgba(246, 196, 90, 0.13); color: var(--brand-1);
  border: 1px dashed rgba(246, 196, 90, 0.45);
  border-radius: 6px; padding: 0 6px; font-size: 0.92em; white-space: nowrap;
}

.note-banner {
  max-width: 760px; margin: 0 0 36px;
  border: 1px solid rgba(246, 196, 90, 0.35); border-radius: var(--radius-sm);
  background: rgba(246, 196, 90, 0.07); color: var(--text-dim);
  padding: 14px 20px; font-size: 0.9rem;
}
.note-banner b { color: var(--brand-1); }

/* policy index cards on app pages */
.doc-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.doc-card {
  display: flex; align-items: center; gap: 16px;
  padding: 22px 24px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-card);
  transition: border-color .2s ease, transform .2s ease;
}
.doc-card:hover { border-color: var(--accent-1); transform: translateY(-2px); }
.doc-card .ico {
  width: 40px; height: 40px; flex: none; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--accent-glow); border: 1px solid var(--border);
}
.doc-card .ico svg { stroke: var(--accent-1); }
.doc-card b { display: block; font-weight: 640; }
.doc-card span { color: var(--text-faint); font-size: 0.85rem; }

/* ---------- ambient drifting orbs (home) ---------- */
.orb {
  position: fixed; border-radius: 50%; filter: blur(90px);
  z-index: -1; pointer-events: none;
  animation: drift 28s ease-in-out infinite alternate;
}
.orb.o1 { width: 440px; height: 440px; left: -130px; top: -90px;
  background: radial-gradient(circle, rgba(246,196,90,0.20), transparent 70%); }
.orb.o2 { width: 500px; height: 500px; right: -160px; top: 28%;
  background: radial-gradient(circle, rgba(143,123,255,0.16), transparent 70%);
  animation-duration: 34s; animation-delay: -9s; }
.orb.o3 { width: 400px; height: 400px; left: 28%; bottom: -170px;
  background: radial-gradient(circle, rgba(47,213,143,0.13), transparent 70%);
  animation-duration: 40s; animation-delay: -18s; }
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(70px, 45px) scale(1.18); }
}

/* ---------- hero entrance (staggered, on load) ---------- */
.enter { opacity: 0; animation: fadeUp .9s cubic-bezier(.2, .7, .2, 1) forwards; }
.enter.d1 { animation-delay: .05s; }
.enter.d2 { animation-delay: .20s; }
.enter.d3 { animation-delay: .38s; }
.enter.d4 { animation-delay: .55s; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}

/* gentle float on product-card app marks */
.product-card .app-mark { animation: floaty 6s ease-in-out infinite; }
.product-card.ll .app-mark { animation-delay: -3s; }
@keyframes floaty {
  50% { transform: translateY(-6px) rotate(-2deg); }
}

/* "more apps coming" teaser */
.coming {
  margin-top: 26px; padding: 26px 30px;
  border: 1px dashed var(--border-strong); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; gap: 12px;
  color: var(--text-dim); text-align: center; font-size: 0.98rem;
  background: rgba(255,255,255,0.015);
}
.coming .quill { font-size: 1.25rem; animation: floaty 5s ease-in-out infinite; }
.coming em {
  font-family: var(--font-display); font-style: italic;
  background: linear-gradient(100deg, var(--brand-1), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ============================================================
   Homepage v2 — 3D & motion
   ============================================================ */

/* ember particle canvas */
#embers { position: fixed; inset: 0; z-index: -1; pointer-events: none; }

/* full-height hero with scroll cue */
.hero.tall { min-height: min(86vh, 860px); display: flex; align-items: center; position: relative; }

/* homepage headline — this is the introduction, so it gets the full display treatment:
   larger, tighter, and set on Fraunces' high-contrast optical cut */
.hero.tall .display {
  font-size: clamp(2.7rem, 7vw, 5.3rem);
  line-height: 0.99;
  letter-spacing: -0.032em;
  font-variation-settings: "opsz" 144, "wght" 450;
}
.hero.tall .display em {
  font-variation-settings: "opsz" 144, "wght" 400;
  letter-spacing: -0.018em;
  padding-right: 0.012em;       /* just enough that the italic overhang clears the full stop */
}
.scroll-cue {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  width: 26px; height: 42px; border: 1.5px solid var(--border-strong); border-radius: 14px;
  opacity: 0; animation: fadeUp 1s ease 1.4s forwards;
}
.scroll-cue::after {
  content: ""; position: absolute; left: 50%; top: 8px; margin-left: -2px;
  width: 4px; height: 8px; border-radius: 2px;
  background: var(--accent-1);
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* word-by-word hero headline */
.display .w {
  display: inline-block; opacity: 0;
  transform: translateY(0.55em) rotate(2deg); filter: blur(8px);
  animation: wordIn .85s cubic-bezier(.2, .7, .2, 1) forwards;
  animation-delay: calc(.12s + var(--i) * .09s);
}
@keyframes wordIn { to { opacity: 1; transform: none; filter: blur(0); } }

/* 3D tilt cards (JS sets transform + --mx/--my) */
.tilt { transform-style: preserve-3d; will-change: transform; }
.tilt.tilting { transition: transform .12s ease-out; }
.tilt.tilting:hover { box-shadow: 0 34px 80px -28px rgba(0, 0, 0, 0.75); }
.product-card > * { transform: translateZ(26px); }
.product-card .app-mark { transform: translateZ(46px); }
.product-card::after {
  content: ""; position: absolute; inset: 0; z-index: 2; opacity: 0;
  transition: opacity .3s ease; pointer-events: none; border-radius: inherit;
  background: radial-gradient(440px 320px at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.09), transparent 60%);
}
.product-card:hover::after { opacity: 1; }

/* cursor spotlight on tiles */
.tile { position: relative; overflow: hidden; }
.tile::after {
  content: ""; position: absolute; inset: 0; opacity: 0;
  transition: opacity .35s ease; pointer-events: none;
  background: radial-gradient(280px 220px at var(--mx, 50%) var(--my, 50%), var(--accent-glow), transparent 65%);
}
.tile:hover::after { opacity: 1; }

/* italic serif marquee band */
.marquee {
  overflow: hidden; padding: 20px 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
  mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 12%, black 88%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: scrollx 38s linear infinite; }
.marquee-track > span {
  display: flex; align-items: center; gap: 44px; padding-right: 44px; white-space: nowrap;
  font-family: var(--font-display); font-style: italic; font-size: 1.3rem; color: var(--text-faint);
}
.marquee-track b {
  font-weight: 560;
  background: linear-gradient(100deg, var(--brand-1), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.marquee-track .st { font-size: 0.8em; opacity: 0.55; }
@keyframes scrollx { to { transform: translateX(-50%); } }

/* rotating gradient ring around the CTA panel */
@property --ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.cta-panel::before {
  content: ""; position: absolute; inset: 0; border-radius: 24px; padding: 1.5px;
  background: conic-gradient(from var(--ang), transparent 0deg, var(--accent-1) 55deg, var(--accent-2) 95deg, transparent 150deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: ring 7s linear infinite; opacity: 0.9; pointer-events: none;
}
@keyframes ring { to { --ang: 360deg; } }

/* ---------- app screenshot gallery ---------- */
.shots {
  display: flex; gap: 24px; overflow-x: auto;
  padding: 12px 6px 26px; scroll-snap-type: x proximity;
  scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent;
}
.shots::-webkit-scrollbar { height: 8px; }
.shots::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
.shot { flex: 0 0 auto; width: 232px; margin: 0; scroll-snap-align: start; }
.shot .frame {
  border-radius: 28px; border: 1px solid var(--border-strong);
  background: #14161d; padding: 9px;
  box-shadow: 0 26px 54px -24px rgba(0, 0, 0, 0.8);
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.shot:hover .frame {
  transform: translateY(-7px) rotate(-1.2deg);
  border-color: var(--accent-1);
  box-shadow: 0 32px 64px -24px var(--accent-glow), 0 26px 54px -24px rgba(0, 0, 0, 0.8);
}
.shot img { width: 100%; height: auto; border-radius: 20px; display: block; }
.shot figcaption { text-align: center; color: var(--text-dim); font-size: 0.88rem; margin-top: 13px; }

/* wide brand panel (used when an app has no screenshots yet) */
.brand-panel {
  display: flex; align-items: center; justify-content: center;
  padding: 48px 32px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg-card);
}
/* mark + wordmark lockup, sized to match the LedgerLink logo panel */
.brand-panel .brand-card {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  max-width: min(580px, 92%); width: 100%;
  font-size: clamp(1.6rem, 7.4vw, 4rem);   /* ascender height matches the LedgerLink wordmark */
}
.brand-panel .brand-card .brand-row {
  display: flex; align-items: center; gap: 0.36em;
  width: 100%; justify-content: center;
  min-height: 1.45em;           /* matches the height the LedgerLink lockup renders at */
}
.brand-panel .brand-card .app-mark.logo {
  font-size: 1em;               /* .app-mark sets its own font-size — reset so the em sizing below tracks the lockup */
  display: block; width: auto; height: auto;   /* bare two-tone mark, no tile — the image sizes itself */
  border-radius: 0; overflow: visible;
  background: none; box-shadow: none;
  flex-shrink: 0;
}
.brand-panel .brand-card .app-mark.logo img {
  height: 1.3em; width: auto;   /* matches the height the LedgerLink mark renders at */
  display: block;
}
.brand-panel .brand-card .brand-name-row {
  display: flex; align-items: baseline; gap: 0.04em;
  flex-wrap: wrap; justify-content: center;
}
.brand-panel .brand-card .brand-word {
  font-family: var(--font-display); font-size: 1em; line-height: 1.02;
  font-weight: 700; margin: 0;
}
.brand-panel .brand-card .brand-word.member { color: #fff; }
.brand-panel .brand-card .brand-word.flow { color: #2f7fe0; }
.brand-panel .brand-card p {
  display: none;
}
.brand-panel img { max-height: 300px; width: auto; }

/* faint brand artwork inside the CTA panel */
.cta-art {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0.1; pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 90% at 50% 50%, black, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at 50% 50%, black, transparent 85%);
}
.cta-panel > *:not(.cta-art) { position: relative; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .enter, .display .w, .scroll-cue { opacity: 1; transform: none; filter: none; transition: none; animation: none; }
  .orb, .display em, .product-card .app-mark, .coming .quill,
  .marquee-track, .cta-panel::before, .scroll-cue::after { animation: none; }
  #embers { display: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .products, .grid-3, .steps, .doc-list, .grid-2 { grid-template-columns: 1fr 1fr; }
  .strip { grid-template-columns: 1fr 1fr; }
  .strip > div:nth-child(3) { border-left: none; }
  .strip > div:nth-child(n+3) { border-top: 1px solid var(--border); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .products, .grid-3, .steps, .doc-list, .grid-2 { grid-template-columns: 1fr; }
  .hero { padding: 72px 0 60px; }
  section { padding: 60px 0; }
  .nav-links { display: none; }
  .nav-links.always { display: flex; }
  .strip { grid-template-columns: 1fr; }
  .strip > div { border-left: none; }
  .strip > div:nth-child(n+2) { border-top: 1px solid var(--border); }
  .foot-grid { grid-template-columns: 1fr; }
}
