/* =========================================================================
   SaaS Negotiation Experts — saasnegotiationexperts.com
   Elite editorial system. All-sans, tight tracking, hairline rules.
   Palettes are theme-able via [data-theme] on <html>.
   ========================================================================= */

/* ---- Palettes -------------------------------------------------------- */
:root,
:root[data-theme="ink"] {
  --bg:        oklch(0.966 0.008 83);   /* warm bone        */
  --surface:   oklch(0.992 0.005 83);   /* near white       */
  --surface-2: oklch(0.945 0.010 83);   /* recessed panel   */
  --fg:        oklch(0.235 0.035 258);  /* deep ink navy    */
  --fg-soft:   oklch(0.355 0.030 258);
  --muted:     oklch(0.520 0.022 258);  /* secondary text   */
  --line:      oklch(0.870 0.010 83);   /* hairline         */
  --line-soft: oklch(0.915 0.008 83);
  --accent:    oklch(0.620 0.135 47);   /* warm amber/terra */
  --accent-fg: oklch(0.985 0.005 83);
  --inverse-bg:oklch(0.235 0.035 258);
  --inverse-fg:oklch(0.965 0.008 83);
}

:root[data-theme="carbon"] {
  --bg:        oklch(0.185 0.012 264);
  --surface:   oklch(0.225 0.013 264);
  --surface-2: oklch(0.255 0.013 264);
  --fg:        oklch(0.955 0.006 90);
  --fg-soft:   oklch(0.820 0.008 90);
  --muted:     oklch(0.660 0.012 264);
  --line:      oklch(0.310 0.013 264);
  --line-soft: oklch(0.270 0.013 264);
  --accent:    oklch(0.840 0.175 142);  /* electric green   */
  --accent-fg: oklch(0.185 0.012 264);
  --inverse-bg:oklch(0.965 0.006 90);
  --inverse-fg:oklch(0.205 0.012 264);
}

:root[data-theme="money"] {
  --bg:        oklch(0.960 0.018 116);  /* cream            */
  --surface:   oklch(0.985 0.012 116);
  --surface-2: oklch(0.935 0.022 116);
  --fg:        oklch(0.285 0.050 152);  /* forest           */
  --fg-soft:   oklch(0.390 0.045 152);
  --muted:     oklch(0.470 0.035 152);
  --line:      oklch(0.870 0.025 116);
  --line-soft: oklch(0.910 0.018 116);
  --accent:    oklch(0.515 0.105 153);  /* deep green       */
  --accent-fg: oklch(0.975 0.012 116);
  --inverse-bg:oklch(0.285 0.050 152);
  --inverse-fg:oklch(0.965 0.018 116);
}

:root[data-theme="sand"] {
  --bg:        oklch(0.918 0.020 72);   /* sand             */
  --surface:   oklch(0.955 0.015 72);
  --surface-2: oklch(0.892 0.024 72);
  --fg:        oklch(0.270 0.018 58);   /* warm charcoal    */
  --fg-soft:   oklch(0.380 0.018 58);
  --muted:     oklch(0.500 0.018 58);
  --line:      oklch(0.825 0.022 72);
  --line-soft: oklch(0.872 0.018 72);
  --accent:    oklch(0.555 0.120 42);   /* rust             */
  --accent-fg: oklch(0.965 0.015 72);
  --inverse-bg:oklch(0.270 0.018 58);
  --inverse-fg:oklch(0.945 0.020 72);
}

/* ---- Reset ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.55;
  font-weight: 420;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv01";
  transition: background-color .5s ease, color .5s ease;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: var(--accent); color: var(--accent-fg); }

/* ---- Type scale ------------------------------------------------------ */
.eyebrow {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: "";
  width: 1.6em; height: 1px;
  background: var(--accent);
}
h1, h2, h3 {
  font-weight: 760;
  letter-spacing: -0.028em;
  line-height: 0.98;
  text-wrap: balance;
}
.display {
  font-size: clamp(2.9rem, 7.4vw, 6.6rem);
  letter-spacing: -0.04em;
  line-height: 0.92;
}
h2.section-title {
  font-size: clamp(2rem, 4.4vw, 3.5rem);
  letter-spacing: -0.034em;
}
.lede {
  font-size: clamp(1.12rem, 1.8vw, 1.45rem);
  line-height: 1.45;
  font-weight: 420;
  color: var(--fg-soft);
  letter-spacing: -0.01em;
  text-wrap: pretty;
}
.muted { color: var(--muted); }
.accent { color: var(--accent); }

/* ---- Layout ---------------------------------------------------------- */
.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 32px; }
section { position: relative; }
.section-pad { padding-block: clamp(72px, 11vw, 150px); }
.rule { height: 1px; background: var(--line); border: 0; }

/* ---- Buttons --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  padding: 0.92em 1.4em;
  font-weight: 600; font-size: 0.96rem; letter-spacing: -0.01em;
  border-radius: 2px;
  border: 1px solid transparent;
  transition: transform .25s cubic-bezier(.2,.7,.3,1), background-color .25s, color .25s, border-color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--fg); color: var(--bg); }
.btn-primary:hover { background: var(--accent); color: var(--accent-fg); }
.btn-ghost { border-color: var(--line); color: var(--fg); }
.btn-ghost:hover { border-color: var(--fg); }
.btn .arrow { transition: transform .25s cubic-bezier(.2,.7,.3,1); }
.btn:hover .arrow { transform: translateX(4px); }

.link-underline {
  position: relative; font-weight: 560; color: var(--fg);
  padding-bottom: 2px;
}
.link-underline::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .35s cubic-bezier(.2,.7,.3,1);
}
.link-underline:hover::after { transform: scaleX(1); }

/* ---- Header ---------------------------------------------------------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background-color .3s;
}
.site-head.scrolled { border-bottom-color: var(--line); }
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 740; letter-spacing: -0.03em; font-size: 1.06rem; }
.brand .mark {
  width: 26px; height: 26px; border-radius: 3px;
  background: var(--fg); color: var(--bg);
  display: grid; place-items: center;
  font-weight: 800; font-size: 0.86rem; letter-spacing: -0.05em;
  transition: background-color .25s, color .25s;
}
.brand:hover .mark { background: var(--accent); color: var(--accent-fg); }
.brand .dot { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 30px; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { font-size: 0.95rem; font-weight: 520; color: var(--fg-soft); position: relative; }
.nav-links a:hover { color: var(--fg); }
.nav-links a.active { color: var(--fg); font-weight: 600; }
.nav-links a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--accent); }
@media (max-width: 820px) { .nav-links { display: none; } }

/* ---- Hero ------------------------------------------------------------ */
.hero { padding-top: clamp(56px, 9vw, 110px); padding-bottom: clamp(40px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 40px; }
.hero h1 { margin-top: 26px; }
.hero .lede { max-width: 33ch; margin-top: 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; align-items: center; }
.hero-note { font-size: 0.86rem; color: var(--muted); }

.hero-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  margin-top: clamp(48px, 7vw, 86px);
}
.stat { padding: 28px 28px 28px 0; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat .num {
  font-size: clamp(2.6rem, 5vw, 4.2rem); font-weight: 780;
  letter-spacing: -0.05em; line-height: 0.9; display: flex; align-items: baseline;
}
.stat .num .unit { font-size: 0.42em; font-weight: 680; margin-left: 0.12em; color: var(--accent); letter-spacing: -0.02em; }
.stat .label { margin-top: 12px; font-size: 0.88rem; color: var(--muted); max-width: 22ch; line-height: 1.35; }
@media (max-width: 720px) {
  .hero-stats { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); padding: 22px 0; }
  .stat:last-child { border-bottom: 0; }
}

/* ---- Vendor marquee -------------------------------------------------- */
.vendors { border-block: 1px solid var(--line); padding-block: 34px; overflow: hidden; }
.vendors .label { font-family: "JetBrains Mono", monospace; font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); text-align: center; margin-bottom: 26px; }
.marquee { display: flex; gap: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; align-items: center; gap: 60px; padding-right: 60px; animation: scroll-x 38s linear infinite; flex-shrink: 0; }
.vendors:hover .marquee-track { animation-play-state: paused; }
.vendor-name { font-size: clamp(1.2rem, 2.2vw, 1.7rem); font-weight: 680; letter-spacing: -0.03em; color: var(--fg); opacity: 0.42; white-space: nowrap; transition: opacity .3s; }
.vendor-name:hover { opacity: 1; }
@keyframes scroll-x { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ---- Positioning statement ------------------------------------------ */
.statement .big {
  font-size: clamp(1.8rem, 3.8vw, 3.1rem); font-weight: 640;
  letter-spacing: -0.03em; line-height: 1.08; max-width: 20ch; text-wrap: balance;
}
.statement .big .accent { font-weight: 760; }
.statement-grid { display: grid; grid-template-columns: 1.3fr 0.9fr; gap: clamp(40px, 6vw, 90px); align-items: end; }
.statement .side { color: var(--muted); font-size: 1rem; line-height: 1.5; max-width: 38ch; }
.statement .side p + p { margin-top: 1em; }
@media (max-width: 820px) { .statement-grid { grid-template-columns: 1fr; gap: 36px; } }

/* ---- Process --------------------------------------------------------- */
.section-head { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: end; margin-bottom: clamp(44px, 6vw, 72px); }
.section-head .intro { max-width: 42ch; color: var(--muted); }
@media (max-width: 760px) { .section-head { grid-template-columns: 1fr; gap: 20px; } }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--fg); }
.step { padding: 30px 26px 40px 0; border-right: 1px solid var(--line); }
.step:last-child { border-right: 0; padding-right: 0; }
.step .idx { font-family: "JetBrains Mono", monospace; font-size: 0.8rem; color: var(--accent); letter-spacing: 0.05em; }
.step h3 { font-size: 1.4rem; font-weight: 720; margin-top: 30px; letter-spacing: -0.025em; }
.step p { margin-top: 14px; color: var(--muted); font-size: 0.96rem; line-height: 1.5; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); }
  .step:nth-child(2) { border-right: 0; } .step { padding-right: 24px; }
  .step:nth-child(odd) { padding-right: 24px; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; }
  .step { border-right: 0; border-bottom: 1px solid var(--line); padding: 26px 0; }
  .step:last-child { border-bottom: 0; } }

/* ---- Pricing --------------------------------------------------------- */
.pricing { background: var(--surface-2); transition: background-color .5s; }
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 8px; }
@media (max-width: 820px) { .price-grid { grid-template-columns: 1fr; } }
.price-card {
  background: var(--surface); border: 1px solid var(--line);
  padding: 38px 36px 40px; border-radius: 4px;
  display: flex; flex-direction: column; gap: 18px;
  position: relative; overflow: hidden;
  transition: border-color .3s, transform .35s cubic-bezier(.2,.7,.3,1);
}
.price-card:hover { transform: translateY(-4px); border-color: var(--fg); }
.price-card .tag { font-family: "JetBrains Mono", monospace; font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.price-card.featured { border-color: var(--accent); }
.price-card.featured::before { content: "Most popular"; position: absolute; top: 20px; right: -34px; transform: rotate(45deg); background: var(--accent); color: var(--accent-fg); font-size: 0.64rem; font-family: "JetBrains Mono", monospace; letter-spacing: 0.12em; text-transform: uppercase; padding: 5px 40px; }
.price-card h3 { font-size: 1.9rem; letter-spacing: -0.03em; }
.price-card .model { font-size: 1.02rem; color: var(--fg-soft); line-height: 1.45; }
.price-card .feat { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 11px; margin-top: 4px; }
.price-card .feat li { display: flex; gap: 12px; font-size: 0.95rem; color: var(--fg-soft); align-items: flex-start; }
.price-card .feat li::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: 8px; background: var(--accent); border-radius: 1px; transform: rotate(45deg); }
.price-card .foot { margin-top: auto; padding-top: 10px; }

/* ---- Estimator ------------------------------------------------------- */
.estimator { margin-top: clamp(28px, 4vw, 44px); border: 1px solid var(--line); border-radius: 4px; background: var(--surface); padding: clamp(28px, 4vw, 44px); }
.estimator-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; }
.estimator-head h3 { font-size: 1.4rem; letter-spacing: -0.03em; }
.estimator-head .hint { font-size: 0.86rem; color: var(--muted); }
.est-controls { display: grid; grid-template-columns: 1fr; gap: 24px; margin-top: 30px; }
.est-field label { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.86rem; color: var(--muted); font-family: "JetBrains Mono", monospace; letter-spacing: 0.04em; }
.est-field label .val { color: var(--fg); font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 2px; background: var(--line); margin-top: 16px; border-radius: 2px; outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--fg); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); cursor: grab; transition: background-color .2s; }
input[type="range"]::-webkit-slider-thumb:hover { background: var(--accent); }
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--fg); border: 3px solid var(--surface); cursor: grab; }
.est-results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 34px; border-radius: 4px; overflow: hidden; }
.est-cell { background: var(--surface); padding: 24px 22px; }
.est-cell .k { font-size: 0.78rem; color: var(--muted); font-family: "JetBrains Mono", monospace; letter-spacing: 0.06em; text-transform: uppercase; }
.est-cell .v { font-size: clamp(1.7rem, 3vw, 2.5rem); font-weight: 780; letter-spacing: -0.04em; margin-top: 10px; line-height: 1; }
.est-cell.hl { background: var(--fg); color: var(--bg); }
.est-cell.hl .k { color: color-mix(in oklab, var(--bg) 70%, transparent); }
.est-cell.hl .v { color: var(--bg); }
.est-foot { font-size: 0.8rem; color: var(--muted); margin-top: 18px; line-height: 1.5; }
@media (max-width: 640px) { .est-results { grid-template-columns: 1fr; } }

/* ---- CTA + contact form --------------------------------------------- */
.cta { background: var(--inverse-bg); color: var(--inverse-fg); transition: background-color .5s, color .5s; }
.cta-grid { display: grid; grid-template-columns: 1.02fr 1fr; gap: clamp(40px, 6vw, 86px); align-items: start; }
.cta h2 { font-size: clamp(2.2rem, 4.8vw, 3.7rem); letter-spacing: -0.04em; line-height: 0.98; max-width: 14ch; margin-top: 20px; }
.cta .lede { color: color-mix(in oklab, var(--inverse-fg) 78%, transparent); max-width: 42ch; margin-top: 22px; }
.cta .eyebrow { color: color-mix(in oklab, var(--inverse-fg) 60%, transparent); }
.cta .eyebrow::before { background: var(--accent); }
@media (max-width: 860px) { .cta-grid { grid-template-columns: 1fr; gap: 44px; } }

.contact-form { display: grid; gap: 19px; }
.contact-form .field { display: flex; flex-direction: column; gap: 8px; }
.contact-form label { font-family: "JetBrains Mono", monospace; font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: color-mix(in oklab, var(--inverse-fg) 62%, transparent); }
.contact-form input, .contact-form textarea {
  background: transparent; border: 0;
  border-bottom: 1px solid color-mix(in oklab, var(--inverse-fg) 28%, transparent);
  color: var(--inverse-fg); font: inherit; font-size: 1.02rem; padding: 9px 2px;
  border-radius: 0; transition: border-color .25s; width: 100%;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: color-mix(in oklab, var(--inverse-fg) 36%, transparent); }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-bottom-color: var(--accent); }
.contact-form textarea { resize: vertical; min-height: 62px; line-height: 1.45; }
.contact-form .btn-primary { background: var(--accent); color: var(--accent-fg); justify-self: start; margin-top: 8px; }
.contact-form .btn-primary:hover { background: var(--inverse-fg); color: var(--inverse-bg); }
.contact-form .btn-primary:disabled { opacity: .55; cursor: default; transform: none; }
.form-status { font-size: 0.92rem; margin: 0; min-height: 1.2em; color: color-mix(in oklab, var(--inverse-fg) 75%, transparent); }
.form-status.ok { color: var(--accent); font-weight: 600; }
.form-status.err { color: oklch(0.72 0.16 25); }
.contact-form.is-sent .field, .contact-form.is-sent .btn-primary { display: none; }
.contact-form.is-sent .form-status { font-size: 1.15rem; }

/* ---- Footer ---------------------------------------------------------- */
.site-foot { padding-block: 64px 40px; }
.foot-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.foot-brand .brand { font-size: 1.2rem; }
.foot-brand p { margin-top: 18px; color: var(--muted); font-size: 0.92rem; max-width: 30ch; line-height: 1.5; }
.foot-col h4, .foot-col .foot-h { font-family: "JetBrains Mono", monospace; font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 16px; margin-top: 0; }
.foot-col ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.foot-col a { color: var(--fg-soft); font-size: 0.95rem; }
.foot-col a:hover { color: var(--accent); }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; margin-top: 56px; padding-top: 26px; border-top: 1px solid var(--line); font-size: 0.82rem; color: var(--muted); }
@media (max-width: 760px) { .foot-top { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

/* ---- Reveal animation ------------------------------------------------ */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s cubic-bezier(.2,.7,.3,1), transform .8s cubic-bezier(.2,.7,.3,1);
}
[data-reveal].is-visible { opacity: 1; transform: none; }
/* Throttled-clock fallback: snap to visible with no transition so a frozen
   animation timeline can never leave the page blank. */
.reveal-fallback [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
[data-reveal][data-delay="1"] { transition-delay: .08s; }
[data-reveal][data-delay="2"] { transition-delay: .16s; }
[data-reveal][data-delay="3"] { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* Blog archive list (all articles) */
.all-posts { list-style: none; padding: 0; margin: 28px 0 0; columns: 2; column-gap: 48px; }
.all-posts li { break-inside: avoid; margin-bottom: 12px; padding-left: 16px; position: relative; line-height: 1.4; }
.all-posts li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; background: var(--accent); border-radius: 1px; transform: rotate(45deg); }
.all-posts a { color: var(--fg-soft); font-size: 0.95rem; }
.all-posts a:hover { color: var(--accent); }
@media (max-width: 760px) { .all-posts { columns: 1; } }
