/* ============================================================
   Solvo.ai — Direction C (Opinionated / dark manifesto)
   Production stylesheet. Fluid, responsive, motion-aware.
   Palette + type tokens mirror shared.jsx so the React
   widgets and the CSS stay in lockstep.
   ============================================================ */

:root {
  /* ink / surfaces */
  --ink:        #06101F;   /* page background        */
  --panel:      #0C1B33;   /* raised panel / alt band */
  --panel-2:    #0A1729;   /* subtle alt             */
  --line:       rgba(255,255,255,0.10);
  --line-soft:  rgba(255,255,255,0.06);

  /* type colors on dark */
  --fg:         #FFFFFF;
  --fg-70:      rgba(255,255,255,0.72);
  --fg-80:      rgba(255,255,255,0.82);
  --fg-55:      rgba(255,255,255,0.55);
  --fg-40:      rgba(255,255,255,0.40);

  /* signal */
  --cyan:       #7BE3F2;
  --cyan-dim:   rgba(123,227,242,0.16);
  --amber:      #F5C172;
  --coral:      #F5A172;

  /* fonts */
  --sans:  'Inter Tight', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --mono:  'Geist Mono', 'JetBrains Mono', ui-monospace, monospace;

  /* fluid type scale (min .. max across 360 → 1440) */
  --fs-eyebrow: 0.72rem;
  --fs-body:    clamp(1rem, 0.92rem + 0.35vw, 1.2rem);
  --fs-lead:    clamp(1.18rem, 1rem + 0.7vw, 1.45rem);
  --fs-h3:      clamp(1.4rem, 1.1rem + 1.2vw, 2rem);
  --fs-h2:      clamp(2.2rem, 1.3rem + 3.8vw, 4.6rem);
  --fs-display: clamp(3rem, 1rem + 9vw, 8.25rem);
  --fs-mega:    clamp(3.4rem, 0.6rem + 11vw, 9rem);
  --fs-stat:    clamp(3rem, 1.4rem + 6vw, 6rem);

  /* rhythm */
  --gutter: clamp(20px, 5vw, 64px);
  --section-y: clamp(64px, 9vw, 120px);
  --maxw: 1440px;

  /* motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* , *::before, *::after { box-sizing: border-box; }

/* the [hidden] attribute must always win over display:flex/grid rules */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
/* offset anchored sections for the sticky nav */
section[id], [id].section, .hero[id] { scroll-margin-top: 84px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--fg);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

/* ---- layout helpers ---------------------------------------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.band { background: var(--panel); border-block: 1px solid var(--line); }

/* numbered section header: "02 — System" + heading.
   Stacked + left-aligned so the eyebrow, heading and the content beneath
   all share the same left edge (consistent alignment across every section). */
.sec-head {
  margin-bottom: clamp(36px, 5vw, 64px);
}
.sec-head .eyebrow { margin-bottom: clamp(14px, 2vw, 20px); }

.eyebrow {
  font-family: var(--mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0;
}
.eyebrow--dim { color: var(--fg-55); }

/* ---- type ------------------------------------------------- */
.h2 {
  font-size: var(--fs-h2);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: 0;
  text-wrap: balance;
}
.h3 {
  font-size: var(--fs-h3);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0;
}
.lead {
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--fg-70);
  font-weight: 400;
}
.serif-it {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--cyan);
  letter-spacing: -0.01em;
}
.muted { color: var(--fg-40); }

/* ---- buttons ---------------------------------------------- */
.btn {
  --btn-bg: var(--cyan);
  --btn-fg: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid transparent;
  padding: 15px 24px;
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -10px var(--cyan-dim); }
.btn:active { transform: translateY(0); }
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translate(3px,-3px); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--fg);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--cyan); box-shadow: none; background: rgba(123,227,242,0.06); }

.btn--sm { padding: 11px 18px; font-size: 0.72rem; }

/* ---- chips / pills ---------------------------------------- */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--fg-55);
  border: 1px solid var(--line); border-radius: 100px; padding: 7px 14px;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px var(--cyan-dim); }

/* ---- scroll reveal ----------------------------------------
   Robust pattern: content is VISIBLE by default so it can never
   get stuck hidden. The hidden start-state only applies once JS
   has flagged <html class="js-ready">, and the reveal uses a
   keyframe animation (fill-mode:both paints reliably across
   engines where bare opacity transitions stall). */
.reveal { opacity: 1; transform: none; }
.js-ready .reveal { opacity: 0; transform: translateY(22px); }
.js-ready .reveal.in {
  animation: reveal-in .7s var(--ease) both;
  animation-delay: var(--reveal-delay, 0ms);
}
@keyframes reveal-in {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .js-ready .reveal, .js-ready .reveal.in { opacity: 1; transform: none; animation: none; }
}

/* ---- divider rules ---------------------------------------- */
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 60;
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s;
}
.nav.is-scrolled {
  background: rgba(6,16,31,0.78);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
          backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--line);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding-block: 18px;
}
.nav__links { display: flex; gap: clamp(20px, 2.4vw, 36px); margin-left: auto; margin-right: clamp(16px, 2vw, 28px); }
.nav__link {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--fg-70); white-space: nowrap;
  position: relative; padding-block: 4px; transition: color .2s;
}
.nav__link::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: -2px; height: 1px;
  background: var(--cyan); transition: right .3s var(--ease);
}
.nav__link:hover { color: var(--fg); }
.nav__link:hover::after, .nav__link.is-active::after { right: 0; }
.nav__link.is-active { color: var(--fg); }
.nav__cta { display: flex; }
.nav__burger { display: none; }

@media (max-width: 920px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 42px; height: 42px; background: transparent; border: 1px solid var(--line);
    border-radius: 8px; cursor: pointer; padding: 0 11px;
  }
  .nav__burger span { height: 1.5px; background: var(--fg); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
  .nav__burger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav__burger.is-open span:nth-child(2) { opacity: 0; }
  .nav__burger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
}

/* mobile sheet */
.navsheet {
  position: fixed; inset: 0; z-index: 55;
  background: rgba(6,16,31,0.96);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none; transition: opacity .3s var(--ease);
}
.navsheet.is-open { opacity: 1; pointer-events: auto; }
.navsheet__inner {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
  gap: 8px; padding: 0 var(--gutter);
}
.navsheet__link {
  display: flex; align-items: baseline; gap: 18px;
  font-size: clamp(2rem, 9vw, 3rem); font-weight: 600; letter-spacing: -0.02em;
  padding-block: 8px; color: var(--fg);
  opacity: 0; transform: translateY(12px);
  transition: opacity .4s var(--ease), transform .4s var(--ease), color .2s;
  transition-delay: calc(var(--i) * 50ms);
}
.navsheet.is-open .navsheet__link { opacity: 1; transform: none; }
.navsheet__link:hover { color: var(--cyan); }
.navsheet__n { font-family: var(--mono); font-size: 0.9rem; color: var(--cyan); letter-spacing: 0; }
.navsheet__cta { margin-top: 24px; align-self: flex-start; }

/* ============================================================
   Footer
   ============================================================ */
.foot { border-top: 1px solid var(--line); padding-block: clamp(48px, 7vw, 88px) 36px; }
.foot__grid {
  display: grid; grid-template-columns: 1.4fr 2fr; gap: clamp(28px, 4vw, 64px);
  padding-bottom: 48px; border-bottom: 1px solid var(--line);
}
.foot__blurb { color: var(--fg-55); font-size: 0.95rem; max-width: 32ch; margin: 18px 0 16px; }
.foot__locs { font-family: var(--mono); font-size: 0.72rem; color: var(--fg-40); letter-spacing: 0.04em; }
.foot__coltitle { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-40); margin-bottom: 16px; }
.foot__col { display: flex; flex-direction: column; gap: 11px; }
.foot__col--row { align-self: start; }
.foot__rowlinks { display: flex; flex-wrap: wrap; gap: 14px 28px; }
.foot__col--row .foot__link { width: auto; }
.foot__link { font-size: 0.92rem; color: var(--fg-70); transition: color .2s; width: fit-content; }
.foot__link:hover { color: var(--cyan); }
.foot__base {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding-top: 28px; font-family: var(--mono); font-size: 0.7rem; color: var(--fg-40); letter-spacing: 0.03em;
}
.foot__legal { display: flex; gap: 18px; }
.foot__legal a:hover { color: var(--fg-70); }
@media (max-width: 760px) {
  .foot__grid { grid-template-columns: 1fr; }
  .foot__brand { grid-column: 1 / -1; }
}
@media (max-width: 440px) {
  .foot__grid { grid-template-columns: 1fr; }
}

/* hairline grid backdrop */
.grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line-soft) 1px, transparent 1px);
  background-size: 100% 120px;
  -webkit-mask-image: linear-gradient(to bottom, black, transparent);
          mask-image: linear-gradient(to bottom, black, transparent);
}

/* tabular nums for data */
.tnum { font-variant-numeric: tabular-nums; }

/* ============================================================
   Recommendations widget
   ============================================================ */
.recs {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,0.6);
  font-family: var(--sans);
}
.recs__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--line);
}
.recs--compact .recs__head { padding: 14px 18px; }
.recs__kicker {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--fg-55); margin-bottom: 5px;
}
.recs__title { font-size: 1.05rem; font-weight: 600; }
.recs--compact .recs__title { font-size: 0.95rem; }
.recs__live {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 0.72rem; color: var(--fg-55);
}

.recs__tabs { display: flex; gap: 6px; padding: 12px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.recs__tab {
  background: transparent; border: 1px solid var(--line); color: var(--fg-55);
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 6px 11px; border-radius: 100px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: color .2s, border-color .2s, background .2s;
}
.recs__tab:hover { color: var(--fg); border-color: var(--fg-40); }
.recs__tab.is-on { color: var(--ink); background: var(--cyan); border-color: var(--cyan); }
.recs__tabn { opacity: 0.7; font-size: 0.62rem; }
.recs__tab.is-on .recs__tabn { opacity: 0.8; }

.recs__cols, .recs__main {
  display: grid;
  grid-template-columns: 1.5fr 0.6fr 0.85fr 0.85fr 0.7fr 1fr 1.4fr;
  align-items: center;
}
.recs__cols {
  padding: 11px 22px;
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--fg-40);
  border-bottom: 1px dashed var(--line);
}
.ta-r { text-align: right; }

.recs__row { border-bottom: 1px solid var(--line); transition: background .2s; }
.recs__row:last-child { border-bottom: 0; }
.recs__row.is-open { background: rgba(255,255,255,0.02); }
.recs__row.is-done { opacity: 0.5; }

.recs__main {
  width: 100%; text-align: left; background: transparent; border: 0; cursor: pointer;
  padding: 14px 22px; color: var(--fg); gap: 0;
}
.recs--compact .recs__main, .recs--compact .recs__cols { padding-inline: 18px; }

.recs__lane { display: inline-flex; align-items: center; gap: 9px; font-size: 0.92rem; font-weight: 500; }
.recs__caret { color: var(--fg-40); font-size: 0.7rem; transition: transform .2s var(--ease); display: inline-block; }
.recs__caret.is-open { transform: rotate(90deg); color: var(--cyan); }
.recs__equip { font-family: var(--mono); font-size: 0.74rem; color: var(--fg-55); }
.recs__num { font-family: var(--mono); font-size: 0.86rem; font-variant-numeric: tabular-nums; }
.recs__num.dim { color: var(--fg-55); }
.recs__delta { font-family: var(--mono); font-size: 0.8rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.recs__delta.is-up { color: var(--cyan); }
.recs__delta.is-down { color: var(--coral); }
.recs__delta.is-hold { color: var(--fg-40); }

.recs__conf { display: inline-flex; align-items: center; gap: 8px; }
.recs__confbar { width: 40px; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.1); overflow: hidden; }
.recs__confbar > span { display: block; height: 100%; background: var(--cyan); }
.recs__confn { font-family: var(--mono); font-size: 0.72rem; color: var(--fg-55); }

.recs__act { display: inline-flex; justify-content: flex-end; gap: 6px; }
.recs__btn {
  font-family: var(--mono); font-size: 0.7rem; padding: 6px 11px; border-radius: 6px; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s; user-select: none;
}
.recs__btn--ghost { border: 1px solid var(--line); color: var(--fg-55); }
.recs__btn--ghost:hover { color: var(--fg); border-color: var(--fg-40); }
.recs__btn--go { background: var(--cyan); color: var(--ink); font-weight: 600; }
.recs__btn--go:hover { box-shadow: 0 6px 16px -6px var(--cyan-dim); }
.recs__accepted { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 0.72rem; color: var(--cyan); }

.recs__detail {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 28px;
  padding: 4px 22px 20px 44px;
}
.recs__whylabel { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-40); margin-bottom: 10px; }
.recs__why ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.recs__why li { display: flex; align-items: center; gap: 10px; font-size: 0.86rem; color: var(--fg-70); }
.recs__meta { display: grid; gap: 10px; align-content: start; }
.recs__meta > div { display: flex; justify-content: space-between; font-size: 0.8rem; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.recs__meta span { color: var(--fg-55); font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; }

.recs__foot {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 13px 22px; background: rgba(255,255,255,0.03);
  font-family: var(--mono); font-size: 0.68rem; color: var(--fg-55);
}
.recs__impact { color: var(--cyan); }
.recs__tally b { color: var(--fg); }

/* ============================================================
   Cookie consent
   ============================================================ */
.cookie {
  position: fixed; left: clamp(16px, 3vw, 28px); bottom: clamp(16px, 3vw, 28px);
  z-index: 200; width: min(380px, calc(100vw - 32px));
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.cookie.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.cookie__card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px 20px 18px; box-shadow: 0 24px 60px -24px rgba(0,0,0,0.7);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.cookie__eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--fg-55); margin-bottom: 12px;
}
.cookie__body { font-size: 0.9rem; line-height: 1.55; color: var(--fg-70); margin: 0 0 16px; text-wrap: pretty; }
.cookie__body a { color: var(--cyan); }
.cookie__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie__actions .btn { flex: 1 1 auto; justify-content: center; }
@media (max-width: 440px) {
  .cookie { left: 12px; right: 12px; bottom: 12px; width: auto; }
}


/* widget responsive: collapse columns on narrow screens */
@media (max-width: 760px) {
  .recs__cols { display: none; }
  .recs__main {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "lane delta"
      "nums act";
    gap: 8px 10px;
    row-gap: 10px;
  }
  .recs__lane { grid-area: lane; }
  .recs__delta { grid-area: delta; text-align: right; justify-self: end; }
  .recs__equip, .recs__conf, .recs__num.dim { display: none; }
  .recs__num:not(.dim) { grid-area: nums; font-size: 0.95rem; }
  .recs__main { position: relative; }
  .recs__act { grid-area: act; justify-self: end; }
  .recs__detail { grid-template-columns: 1fr; gap: 18px; padding-left: 22px; }
  .recs__foot { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ============================================================
   Mobile fit — neutralise fixed inline px widths / oversized
   type so nothing truncates on small screens. Overrides inline
   styles via !important; only active ≤640px (desktop untouched).
   ============================================================ */
@media (max-width: 640px) {
  /* tame oversized horizontal gutters set inline (e.g. 0 59px) */
  .wrap { padding-left: 20px !important; padding-right: 20px !important; }

  /* section headings (inline 72px) → fluid */
  .h2 { font-size: clamp(1.95rem, 8vw, 2.6rem) !important; }

  /* thesis block (inline 45px) */
  .thesis, .thesis .serif-it { font-size: clamp(1.45rem, 6vw, 1.95rem) !important; }

  /* hero lead (inline width 600px) */
  .hero__lead { width: auto !important; max-width: 100% !important; font-size: 1.05rem !important; }

  /* trust marquee phrase (inline 21px) */
  .trust__label { font-size: 0.82rem !important; }

  /* System: drop fixed 600/540/420px widths, scale step text */
  .system__grid, .system__demo, .step__t, .step__d { width: auto !important; max-width: 100% !important; }
  .step__t { font-size: 1.15rem !important; }
  .step__d { font-size: 0.95rem !important; }

  /* case-study quote (inline 36px) */
  .quote, .quote em { font-size: clamp(1.3rem, 5.6vw, 1.7rem) !important; }

  /* pricing tiers: let content set the height */
  .tier { height: auto !important; }

  /* Access CTA: giant inline 120px headline → fit width */
  .access__h2, .access__h2 .serif-it {
    width: auto !important; max-width: 100% !important;
    font-size: clamp(3rem, 17vw, 4.6rem) !important;
  }

  /* generic inline-width content blocks */
  .team__lede, .hiring__t, .hiring__d, .manifesto-close, .access__h2,
  .phead__lead, .hero__lead { width: auto !important; max-width: 100% !important; }
  .hiring__t { font-size: clamp(2rem, 9vw, 3rem) !important; }
}

