/* ==========================================================================
   Growth Library marketing pages (landing, sign-in). Same system as playbooks.html:
   neutral greyscale chrome, Inter + JetBrains Mono, Osmo motion tokens.
   ========================================================================== */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f7;
  --bg-tertiary: #ebebef;
  --bg-tertiary-hover: #e2e2e8;
  --bg-inverse: #111214;
  --bg-inverse-hover: #27282c;
  --text-primary: #111214;
  --text-secondary: #6e6e73;
  --text-tertiary: #98989f;
  --text-inverse: #ffffff;
  --line-subtle: rgba(17, 18, 20, 0.06);
  --line-default: rgba(17, 18, 20, 0.1);
  --line-strong: rgba(17, 18, 20, 0.16);
  --pos-fg: #0d7a52;
  --pos-bg: #e8f5ef;
  --neg-fg: #b92b27;
  --neg-bg: #fbeae9;
  --focus: #0066ff;
  --shadow-sm: 0px 2px 3px -1px rgba(0, 0, 0, 0.06), 0px 1px 0px 0px rgba(25, 28, 33, 0.02), 0px 0px 0px 1px rgba(25, 28, 33, 0.06);
  --shadow-md: 0px 0px 0px 1px rgba(0, 0, 0, 0.05), 0px 1px 1px -0.5px rgba(0, 0, 0, 0.04), 0px 3px 3px -1.5px rgba(0, 0, 0, 0.04), 0px 6px 6px -3px rgba(0, 0, 0, 0.04), 0px 12px 12px -6px rgba(0, 0, 0, 0.04), 0px 24px 24px -12px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 2.8px 2.2px rgba(0, 0, 0, 0.02), 0 6.7px 5.3px rgba(0, 0, 0, 0.028), 0 12.5px 10px rgba(0, 0, 0, 0.035), 0 22.3px 17.9px rgba(0, 0, 0, 0.042), 0 41.8px 33.4px rgba(0, 0, 0, 0.05), 0 100px 80px rgba(0, 0, 0, 0.07);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --cubic-default: cubic-bezier(0.625, 0.05, 0, 1);
  --duration-default: 0.6s;
  --duration-half: 0.3s;
  --max-w: 1240px;
  --nav-bg: rgba(255, 255, 255, 0.86);
  --nav-bg-scrolled: rgba(255, 255, 255, 0.95);
  --hover-tint: rgba(17, 18, 20, 0.04);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-primary: #0b0c0f;
    --bg-secondary: #14161b;
    --bg-tertiary: #191c23;
    --bg-tertiary-hover: #222630;
    --bg-inverse: #f1f1f3;
    --bg-inverse-hover: #ffffff;
    --text-primary: #f1f1f3;
    --text-secondary: #a3a5ad;
    --text-tertiary: #6c6f77;
    --text-inverse: #0b0c0f;
    --line-subtle: rgba(255, 255, 255, 0.06);
    --line-default: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.18);
    --pos-fg: #3dc58f;
    --pos-bg: rgba(61, 197, 143, 0.13);
    --neg-fg: #ff6b63;
    --neg-bg: rgba(255, 107, 99, 0.13);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.06);
    --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
    --shadow-lg: 0 16px 40px -8px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.1);
    --nav-bg: rgba(20, 22, 27, 0.72);
    --nav-bg-scrolled: rgba(20, 22, 27, 0.9);
    --hover-tint: rgba(255, 255, 255, 0.06);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --nav-bg: rgba(20, 22, 27, 0.72);
  --nav-bg-scrolled: rgba(20, 22, 27, 0.9);
  --hover-tint: rgba(255, 255, 255, 0.06);
  --bg-primary: #0b0c0f;
  --bg-secondary: #14161b;
  --bg-tertiary: #191c23;
  --bg-tertiary-hover: #222630;
  --bg-inverse: #f1f1f3;
  --bg-inverse-hover: #ffffff;
  --text-primary: #f1f1f3;
  --text-secondary: #a3a5ad;
  --text-tertiary: #6c6f77;
  --text-inverse: #0b0c0f;
  --line-subtle: rgba(255, 255, 255, 0.06);
  --line-default: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --pos-fg: #3dc58f;
  --pos-bg: rgba(61, 197, 143, 0.13);
  --neg-fg: #ff6b63;
  --neg-bg: rgba(255, 107, 99, 0.13);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
  --shadow-lg: 0 16px 40px -8px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
body { background: var(--bg-primary); color: var(--text-primary); font-family: var(--font-sans); font-size: 15px; line-height: 1.5; overflow-x: hidden; transition: background-color 0.25s ease, color 0.25s ease; }
h1, h2, h3, h4 { text-wrap: balance; letter-spacing: -0.03em; color: var(--text-primary); }
p { text-wrap: pretty; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.tabular, .num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); }
.container { width: 100%; max-width: var(--max-w); margin-inline: auto; padding-inline: clamp(16px, 4vw, 56px); }
.eyebrow { font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-tertiary); }
.section { padding-block: clamp(80px, 11vw, 148px); }
.section-head { max-width: 760px; margin: 0 auto clamp(40px, 6vw, 72px); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.section-head h2 { font-size: clamp(34px, 4.6vw, 58px); font-weight: 650; line-height: 1.05; letter-spacing: -0.036em; }
.section-head p { font-size: clamp(16px, 1.4vw, 18.5px); color: var(--text-secondary); max-width: 600px; line-height: 1.55; }
.section-head.left { text-align: left; align-items: flex-start; margin-inline: 0; }

/* ---------- Floating pill navigation ---------- */
.nav-wrapper { position: fixed; top: 16px; left: 0; right: 0; z-index: 100; display: flex; justify-content: center; padding-inline: 16px; pointer-events: none; }
.nav-pill { pointer-events: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; max-width: 1120px; height: 52px; padding: 0 8px 0 16px; border-radius: 9999px; background: var(--nav-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: var(--shadow-sm); transition: box-shadow 0.3s, background 0.3s; }
body[data-scrolling-started="true"] .nav-pill { box-shadow: var(--shadow-md); background: var(--nav-bg-scrolled); }
.brand-link { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-primary); font-weight: 650; font-size: 15px; letter-spacing: -0.02em; white-space: nowrap; }
.brand-mark { width: 24px; height: 24px; border-radius: 7px; background: var(--bg-inverse); color: var(--text-inverse); display: grid; place-items: center; flex: none; }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav-links a { white-space: nowrap; text-decoration: none; color: var(--text-secondary); font-size: 14px; font-weight: 500; padding: 6px 12px; border-radius: 999px; transition: color 150ms ease-out, background-color 150ms ease-out; }
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); background: var(--hover-tint); }

.nav-item-dropdown { position: relative; }
.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: color 150ms ease-out, background-color 150ms ease-out;
}
.nav-dropdown-trigger:hover,
.nav-item-dropdown:hover .nav-dropdown-trigger,
.nav-item-dropdown:focus-within .nav-dropdown-trigger {
  color: var(--text-primary);
  background: var(--hover-tint);
}
.nav-dropdown-trigger svg.chevron {
  width: 12px;
  height: 12px;
  transition: transform 180ms ease-out;
}
.nav-item-dropdown:hover .nav-dropdown-trigger svg.chevron,
.nav-item-dropdown:focus-within .nav-dropdown-trigger svg.chevron,
.nav-item-dropdown.is-open .nav-dropdown-trigger svg.chevron {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  min-width: 290px;
  background: var(--bg-primary);
  border: 1px solid var(--line-default);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 160ms cubic-bezier(0.16, 1, 0.3, 1), transform 160ms cubic-bezier(0.16, 1, 0.3, 1), visibility 160ms;
  z-index: 200;
}
.nav-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}
.nav-item-dropdown:hover .nav-dropdown-menu,
.nav-item-dropdown:focus-within .nav-dropdown-menu,
.nav-item-dropdown.is-open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px !important;
  border-radius: 10px !important;
  text-decoration: none;
  color: var(--text-primary) !important;
  transition: background-color 140ms ease-out;
}
.nav-dropdown-item:hover {
  background: var(--bg-secondary) !important;
}
.nav-dropdown-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.nav-dropdown-icon svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}
.nav-dropdown-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  text-align: left;
}
.nav-dropdown-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}
.nav-dropdown-desc {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.35;
}
.nav-actions { display: flex; align-items: center; gap: 6px; flex: none; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 16px; border-radius: 9999px; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; text-decoration: none; border: none; cursor: pointer; white-space: nowrap; transition: transform 150ms ease-out, background-color 150ms ease-out, opacity 150ms; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; pointer-events: none; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; }
.btn-inverse { background: var(--bg-inverse); color: var(--text-inverse); }
.btn-inverse:hover { background: var(--bg-inverse-hover); }
.btn-tertiary { background: var(--bg-tertiary); color: var(--text-primary); }
.btn-tertiary:hover { background: var(--bg-tertiary-hover); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--text-primary); background: var(--hover-tint); }
.btn svg { width: 15px; height: 15px; flex: none; }

/* Osmo rotating labels */
[data-button-rotate] { --r: 20deg; position: relative; overflow: hidden; }
.button-label__wrap { z-index: 1; display: grid; place-items: center; position: relative; overflow: hidden; padding-block: 2px; }
.button-label { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 7px; line-height: 1.15; transform-origin: 50% var(--y, 1100%); will-change: transform; transition: transform 0.52s var(--cubic-default); }
.button-label:nth-of-type(2) { transform: rotate(calc(var(--r) * -1)); }
@media (hover: hover) {
  [data-button-rotate]:hover .button-label:nth-of-type(1) { transform: rotate(var(--r)); }
  [data-button-rotate]:hover .button-label:nth-of-type(2) { transform: rotate(0deg); }
}

[data-underline-link] { text-decoration: none; position: relative; cursor: pointer; }
[data-underline-link]::before { content: ""; position: absolute; bottom: -2px; left: 0; width: 100%; height: 1.25px; background-color: currentColor; transition: transform var(--duration-default) var(--cubic-default); transform-origin: right; transform: scaleX(0) rotate(0.001deg); }
[data-underline-link]:hover::before { transform-origin: left; transform: scaleX(1) rotate(0.001deg); }

/* ---------- Architectural hero background ---------- */
.hero-bg__wrap { position: absolute; inset: 0; pointer-events: none; z-index: 0; display: flex; align-items: center; justify-content: center; color: rgba(17, 18, 20, 0.06); overflow: hidden; }
.hero-bg__horizontal { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background-image: linear-gradient(90deg, transparent 0%, currentColor 12%, currentColor 88%, transparent 100%); animation: osmoScaleX 1.2s var(--ease-out-expo) 0.1s both; }
.hero-bg__vertical { position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background-image: linear-gradient(180deg, transparent 10%, currentColor 50%, currentColor 90%, transparent 100%); animation: osmoScaleY 1.2s var(--ease-out-expo) 0.15s both; }
.hero-bg__circle { position: absolute; width: min(78vw, 860px); aspect-ratio: 1; border-radius: 50%; border: 1px dashed currentColor; animation: osmoCircleIn 1.4s var(--ease-out-expo) 0.1s both; }
.hero-bg__circle.inner { width: min(50vw, 540px); border-style: solid; animation-delay: 0.22s; }
@keyframes osmoScaleX { from { transform: scaleX(0); } }
@keyframes osmoScaleY { from { transform: scaleY(0); } }
@keyframes osmoCircleIn { from { transform: scale(0.55) rotate(-120deg); opacity: 0; } }

/* ---------- Scroll reveals ---------- */
.word-mask { display: inline-block; overflow: hidden; vertical-align: bottom; margin: -0.14em -0.04em; padding: 0.14em 0.04em; }
.word-inner { display: inline-block; transform: translateY(110%) rotate(7deg); transform-origin: bottom left; opacity: 0; transition: transform 0.85s var(--ease-out-expo), opacity 0.6s var(--ease-out-expo); transition-delay: calc(var(--word-idx, 0) * 32ms + var(--reveal-base, 0ms)); will-change: transform, opacity; }
.is-revealed .word-inner { transform: translateY(0%) rotate(0.001deg); opacity: 1; }
[data-osmo-reveal] { opacity: 0; transform: translateY(28px) scale(0.985) rotate(0.001deg); transition: opacity 0.75s var(--cubic-default), transform 0.75s var(--cubic-default); transition-delay: calc(var(--reveal-idx, 0) * 70ms); }
[data-osmo-reveal].is-revealed { opacity: 1; transform: none; }
/* Without JS everything is visible */
html:not(.js) [data-osmo-reveal], html:not(.js) .word-inner { opacity: 1; transform: none; }

/* ---------- Marquee ---------- */
.trustedby-marquee { display: flex; overflow: hidden; width: 100%; padding-block: 8px; mask-image: linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%); -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%); }
.trustedby-track { display: flex; align-items: center; gap: clamp(36px, 5vw, 64px); padding-right: clamp(36px, 5vw, 64px); flex-shrink: 0; animation: osmoMarqueeX 46s linear infinite; }
.trustedby-marquee:hover .trustedby-track { animation-play-state: paused; }
@keyframes osmoMarqueeX { to { transform: translateX(-100%); } }

/* ---------- FAQ accordion ---------- */
.osmo-faq-list { border-top: 1px solid var(--line-default); max-width: 880px; margin-inline: auto; }
.osmo-faq-item { border-bottom: 1px solid var(--line-default); }
.osmo-faq-trigger { width: 100%; padding: 24px 8px; display: flex; align-items: center; justify-content: space-between; gap: 20px; text-align: left; background: none; border: 0; font-size: clamp(16px, 1.9vw, 19px); font-weight: 600; letter-spacing: -0.02em; color: var(--text-primary); cursor: pointer; }
.osmo-faq-icon { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-secondary); display: grid; place-items: center; flex-shrink: 0; transition: transform var(--duration-default) var(--cubic-default), background-color var(--duration-half) ease, color var(--duration-half) ease; }
.osmo-faq-item[data-accordion-status="active"] .osmo-faq-icon { transform: rotate(315deg); background: var(--bg-inverse); color: var(--text-inverse); }
.osmo-faq-bottom { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--duration-default) var(--cubic-default); }
.osmo-faq-item[data-accordion-status="active"] .osmo-faq-bottom { grid-template-rows: 1fr; }
.osmo-faq-inner { overflow: hidden; }
.osmo-faq-inner p { padding: 0 56px 24px 8px; font-size: 15.5px; line-height: 1.65; color: var(--text-secondary); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line-subtle); padding-block: 56px; font-size: 13.5px; color: var(--text-secondary); }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 32px; margin-bottom: 48px; }
.footer-col h4 { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 12px; letter-spacing: -0.01em; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { text-decoration: none; color: var(--text-secondary); transition: color 150ms ease-out; }
.footer-col a:hover { color: var(--text-primary); }
.footer-base { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid var(--line-subtle); }

@media (max-width: 980px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 1000px) { .nav-links > li[data-nav-optional] { display: none; } }
@media (max-width: 800px) { .nav-links { display: none; } }
@media (max-width: 420px) { .nav-actions .btn-inverse[data-when-signed-out] { display: none; } .nav-actions .btn-ghost { color: var(--text-primary); background: var(--bg-tertiary); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .trustedby-track { animation: none !important; }
  .word-inner, [data-osmo-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* Dark chrome: brand mark as a quiet tile instead of a bright inverse block */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-mark { background: var(--bg-tertiary); color: var(--text-primary); box-shadow: inset 0 0 0 1px var(--line-default); }
  :root:not([data-theme="light"]) .nav-pill { border: 1px solid var(--line-subtle); }
}
:root[data-theme="dark"] .brand-mark { background: var(--bg-tertiary); color: var(--text-primary); box-shadow: inset 0 0 0 1px var(--line-default); }
:root[data-theme="dark"] .nav-pill { border: 1px solid var(--line-subtle); }
