/* =============================================================================
 * styles.css — solutions.io Sourcebook · calm presentation redesign
 * -----------------------------------------------------------------------------
 * Quiet, editorial, read-through feel: warm paper background, soft ink text,
 * one restrained accent, generous whitespace, gentle one-time reveals.
 *
 * BRAND TOKENS live in :root below. These are calm placeholders — replace the
 * colours and fonts with the real solutions.io brand values (and update the
 * <link> font in index.html) and the whole page follows.
 * ===========================================================================*/

:root {
  /* --- Palette (calm placeholder — swap for real brand) --- */
  --paper:     #FBFAF6;   /* warm off-white page background      */
  --paper-2:   #F4F2EB;   /* soft tinted panel                   */
  --ink:       #1E2731;   /* deep restful near-black             */
  --text:      #2C343E;   /* body text                           */
  --text-soft: #5B6571;   /* secondary text                      */
  --text-faint:#8A949F;   /* meta / captions                     */
  --line:      #E7E2D8;   /* warm hairline                       */
  --accent:    #F1673F;   /* solutions.io primary — fills & large elements */
  --accent-2:  #F59478;   /* lighter accent                      */
  --accent-bg: #FCEDE7;   /* faint warm accent wash              */
  --accent-strong: #B5431F; /* darker orange for small text (WCAG AA on light) */

  /* --- Type --- */
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* --- Shape & layout --- */
  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 980px;          /* narrow, calm reading measure */
  --maxw-wide: 1120px;
  --gutter: clamp(22px, 5vw, 56px);

  /* --- Motion (slow + gentle) --- */
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ----------------------------- Reset / base ------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--paper);
  font-size: 1.0625rem;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.18; letter-spacing: -0.01em; margin: 0; color: var(--ink); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }

/* ------------------------------ Utilities -------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.container--wide { max-width: var(--maxw-wide); }

.eyebrow {
  display: inline-block; font-family: var(--font-sans);
  font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-strong); margin-bottom: 18px;
}

.section { padding-block: clamp(64px, 9vw, 116px); position: relative; }
.section + .section { border-top: 1px solid var(--line); }
.section__head { max-width: 640px; margin-bottom: clamp(34px, 5vw, 56px); }
.section__head h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
.section__lead { margin-top: 18px; font-size: 1.15rem; color: var(--text-soft); max-width: 60ch; }

/* Links & buttons — understated */
.link {
  font-weight: 600; color: var(--accent-strong); display: inline-flex; align-items: center; gap: .4rem;
  border-bottom: 1px solid transparent; transition: border-color .25s var(--ease);
}
.link:hover { border-color: var(--accent); }
.link .arrow { transition: transform .25s var(--ease); }
.link:hover .arrow { transform: translateX(3px); }

.btn {
  display: inline-flex; align-items: center; gap: .5rem; font: inherit; font-weight: 600;
  font-size: 1rem; cursor: pointer; padding: .8rem 1.6rem; border-radius: 999px;
  border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn:hover { background: transparent; color: var(--ink); }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn--invert { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.btn--invert:hover { background: transparent; color: var(--paper); }

/* =============================== Header ================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.site-header.is-scrolled { border-color: var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 66px; max-width: var(--maxw-wide); margin-inline: auto; padding-inline: var(--gutter); }
.brand { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; color: var(--ink); display: flex; align-items: center; gap: .6rem; }
.brand__logo { height: 30px; width: auto; display: block; }
.brand__wordmark { line-height: 1; }
.brand__dot { color: var(--accent); }
.brand__tag { font-family: var(--font-sans); font-size: .72rem; font-weight: 500; letter-spacing: .04em; color: var(--text-faint); text-transform: uppercase; white-space: nowrap; }
/* Stacked wordmark: "Sourcebook" over a right-aligned "by solutions.io",
   with only "solutions.io" set in Roboto Slab. Colour follows currentColor
   so it inverts cleanly on dark backgrounds. */
.brand__wm { display: inline-flex; flex-direction: column; align-items: stretch; line-height: 1.05; }
.brand__wm-name { font-family: var(--font-sans); font-weight: 700; font-size: 1.25rem; letter-spacing: -.02em; color: inherit; }
.brand__wm-by { font-family: var(--font-sans); font-size: .6875rem; font-weight: 500; opacity: .6; margin-top: .12rem; text-align: right; white-space: nowrap; }
.brand__wm-io { font-family: 'Roboto Slab', Georgia, serif; }
.nav { display: flex; align-items: center; gap: 1.4rem; }
.nav__menu { display: flex; align-items: center; gap: 1.7rem; }
.nav__links { display: flex; gap: 1.7rem; }
.nav__links a { font-size: .92rem; font-weight: 500; color: var(--text-soft); white-space: nowrap; transition: color .2s; }
.nav__links a:hover, .nav__links a.is-active { color: var(--ink); }
.nav__cta { font-size: .92rem; font-weight: 600; color: var(--accent-strong); white-space: nowrap; border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav__cta:hover { border-color: var(--accent); }
.lang-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); }
.lang-switch__btn {
  font: inherit; font-size: .72rem; font-weight: 600; letter-spacing: .04em; cursor: pointer;
  color: var(--text-faint); background: transparent; border: 0; border-radius: 999px;
  padding: .28rem .55rem; line-height: 1; transition: color .2s, background .2s;
}
.lang-switch__btn:hover { color: var(--ink); }
.lang-switch__btn.is-active { color: var(--ink); background: var(--paper-2); }

/* Hamburger toggle (mobile only) */
.nav__toggle { display: none; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); cursor: pointer; place-items: center; }
.nav__toggle-bars { position: relative; display: block; width: 18px; height: 12px; }
.nav__toggle-bars span { position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .25s var(--ease), opacity .2s; }
.nav__toggle-bars span:nth-child(1) { top: 0; }
.nav__toggle-bars span:nth-child(2) { top: 5px; }
.nav__toggle-bars span:nth-child(3) { top: 10px; }
.site-header.nav-open .nav__toggle-bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.site-header.nav-open .nav__toggle-bars span:nth-child(2) { opacity: 0; }
.site-header.nav-open .nav__toggle-bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* Tablet/phone: collapse the menu into a dropdown panel */
@media (max-width: 880px) {
  .nav__toggle { display: grid; }
  .nav { gap: .9rem; }
  .nav__menu {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 6px var(--gutter) 18px; box-shadow: 0 20px 30px -24px rgba(30,39,49,.4);
    display: none;
  }
  .site-header.nav-open .nav__menu { display: flex; }
  .nav__links { flex-direction: column; gap: 0; }
  .nav__links a { padding: 14px 2px; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav__menu .nav__cta { padding: 16px 2px 2px; font-size: 1rem; }
}
@media (max-width: 560px) { .brand__tag { display: none; } }

/* =============================== Hero =================================== */
.hero { padding-block: clamp(72px, 12vw, 150px); text-align: center; }
.hero h1 { font-size: clamp(2.2rem, 5.4vw, 3.7rem); font-weight: 500; max-width: 18ch; margin-inline: auto; }
.hero__lead { margin: 26px auto 0; font-size: clamp(1.12rem, 2.2vw, 1.3rem); color: var(--text-soft); max-width: 56ch; }
.hero__pillars { margin-top: 26px; font-family: var(--font-sans); font-size: .9rem; letter-spacing: .04em; color: var(--text-faint); }
.hero__pillars span { color: var(--accent); margin-inline: .55rem; }
.hero__actions { margin-top: 36px; display: flex; gap: 1.4rem; justify-content: center; align-items: center; flex-wrap: wrap; }
.hero__note { margin-top: 22px; font-size: .9rem; color: var(--text-faint); }

/* Citations (used in the chat answer) */
.cites { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 16px; }
.cite { font: 500 .78rem/1.4 var(--font-mono); padding: .35rem .6rem; border-radius: 7px; background: var(--accent-bg); color: var(--accent-strong); }
.cite::before { content: "↗ "; opacity: .6; }

/* ============================== Problem ================================= */
.stack { display: grid; gap: 0; }
.stack__item { padding: 28px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 56px 1fr; gap: 24px; align-items: start; }
.stack__item:last-child { border-bottom: 1px solid var(--line); }
.stack__num { font-family: var(--font-mono); font-size: .9rem; color: var(--accent-strong); padding-top: 4px; }
.stack__item h3 { font-size: 1.3rem; font-weight: 500; margin-bottom: 8px; }
.stack__item p { color: var(--text-soft); }
@media (max-width: 560px) { .stack__item { grid-template-columns: 1fr; gap: 8px; } }

/* =============================== Demo =================================== */
.chip { font-size: .8rem; font-weight: 500; padding: .35rem .7rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--text-soft); }

/* Claude-style chat window */
.chat {
  max-width: 660px; margin-inline: auto; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 70px -45px rgba(30,39,49,.55);
}
.chat__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 18px; border-bottom: 1px solid var(--line); background: var(--paper);
}
.chat__app { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; color: var(--ink); font-size: .95rem; }
.chat__app .spark { width: 18px; height: 18px; color: var(--accent); }
.chat__conn { display: inline-flex; align-items: center; gap: .45rem; font-size: .78rem; color: var(--text-faint); }
.chat__conn i { width: 7px; height: 7px; border-radius: 50%; background: #36b37e; box-shadow: 0 0 0 3px rgba(54,179,126,.18); }
@media (max-width: 460px) { .chat__conn { display: none; } }

.chat__thread { padding: 22px 20px; display: flex; flex-direction: column; gap: 18px; min-height: 150px; }
.msg { opacity: 0; transform: translateY(8px); transition: opacity .45s var(--ease), transform .45s var(--ease); }
.msg--in { opacity: 1; transform: none; }
.msg--user { align-self: flex-end; max-width: 85%; }
.msg--user .msg__body {
  background: var(--accent-bg); border: 1px solid #f3d7cc; color: var(--ink);
  padding: 11px 15px; border-radius: 14px 14px 4px 14px; font-size: .98rem;
}
.msg--bot { align-self: stretch; display: grid; grid-template-columns: 30px 1fr; gap: 12px; }
.msg__avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-bg); color: var(--accent); }
.msg__avatar .spark { width: 18px; height: 18px; }
.msg__body { transition: opacity .4s var(--ease); font-size: .98rem; color: var(--text); line-height: 1.6; }
.msg__body > p { margin: 0 0 4px; }
.msg__recall { display: flex; align-items: flex-start; gap: .5rem; margin-top: 10px; font-size: .9rem; color: var(--text-soft); }
.msg__recall svg { width: 16px; height: 16px; color: var(--accent); flex: 0 0 auto; margin-top: 2px; }
.msg__body .cites { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 12px; }

/* "Searching…" indicator + source chips */
.searching { display: inline-flex; align-items: center; gap: .55rem; font-size: .9rem; color: var(--text-faint); }
.searching .dots { display: inline-flex; gap: 4px; }
.searching .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); animation: dot 1.2s infinite ease-in-out; }
.searching .dots i:nth-child(2) { animation-delay: .18s; }
.searching .dots i:nth-child(3) { animation-delay: .36s; }
@keyframes dot { 0%,60%,100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.search-chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 12px; }
.search-chips .chip { background: var(--paper-2); opacity: 0; transform: translateY(5px); transition: opacity .35s var(--ease), transform .35s var(--ease); }
.search-chips.show .chip { opacity: 1; transform: none; }
.search-chips.show .chip:nth-child(2) { transition-delay: .1s; }
.search-chips.show .chip:nth-child(3) { transition-delay: .2s; }
.search-chips.show .chip:nth-child(4) { transition-delay: .3s; }
.search-chips.show .chip:nth-child(5) { transition-delay: .4s; }

/* Composer */
.chat__composer { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--line); }
.chat__input {
  flex: 1; min-height: 22px; display: flex; align-items: center; gap: 1px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 14px; font-size: .98rem; color: var(--text);
}
.chat__input .caret { display: inline-block; width: 2px; height: 1.15em; background: var(--accent); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.chat__send {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 11px; border: 0; cursor: pointer;
  background: var(--accent); color: #fff; display: grid; place-items: center;
}
.chat__send svg { width: 19px; height: 19px; }

/* LLM-choice note + "behind the scenes" trio */
.demo__note { max-width: 620px; margin: 26px auto 0; text-align: center; color: var(--text-soft); font-size: 1.02rem; }
.behind { margin-top: clamp(40px, 6vw, 72px); display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(22px, 3vw, 40px); }
@media (max-width: 720px) { .behind { grid-template-columns: 1fr; gap: 24px; } }
.behind__item { padding-top: 18px; border-top: 2px solid var(--line); }
.behind__item h3 { font-size: 1.1rem; font-weight: 500; margin-bottom: 6px; }
.behind__item p { color: var(--text-soft); font-size: .96rem; }

/* ============================== Features ================================ */
.label-soft { font-family: var(--font-sans); font-size: .78rem; font-weight: 600; letter-spacing: .04em; color: var(--text-faint); display: inline-flex; align-items: center; gap: .5rem; margin-bottom: 16px; }
.label-soft .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 52px) clamp(32px, 5vw, 64px); }
@media (max-width: 680px) { .grid-2 { grid-template-columns: 1fr; gap: 36px; } }
.feature { display: grid; grid-template-columns: 40px 1fr; gap: 18px; align-items: start; }
.feature__icon { color: var(--ink); padding-top: 3px; }
.feature__icon svg { width: 26px; height: 26px; }
.feature h3 { font-size: 1.2rem; font-weight: 500; margin-bottom: 7px; }
.feature p { color: var(--text-soft); font-size: 1rem; }

/* Connectors — calm static wrap, no marquee */
.connectors { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 8px; }
.connectors .chip { background: var(--paper-2); }
.chip--conn { display: inline-flex; align-items: center; gap: .5rem; }
.conn-icon { width: 15px; height: 15px; color: var(--ink); opacity: .75; flex: 0 0 auto; }

/* ============================ How it works ============================= */
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3.5vw, 48px); }
@media (max-width: 720px) { .how { grid-template-columns: 1fr; gap: 30px; } }
.how__num {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent-bg); color: var(--accent-strong);
  font-family: var(--font-mono); font-weight: 600; font-size: 1rem; margin-bottom: 16px;
}
.how__step h3 { font-size: 1.2rem; font-weight: 500; margin-bottom: 8px; }
.how__step p { color: var(--text-soft); font-size: 1rem; }
.how__note {
  margin-top: clamp(34px, 4vw, 54px); padding: 20px 24px; border-radius: var(--radius);
  background: var(--paper-2); border: 1px solid var(--line);
  color: var(--text-soft); font-size: .98rem; max-width: 760px;
}

/* =============================== Trust ================================== */
.trust { background: var(--paper-2); }
.trust-list { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(22px, 3vw, 36px) clamp(32px, 5vw, 56px); }
@media (max-width: 680px) { .trust-list { grid-template-columns: 1fr; } }
.trust-item { display: grid; grid-template-columns: 26px 1fr; gap: 14px; align-items: start; }
.trust-item__check { color: var(--accent); padding-top: 3px; }
.trust-item h3 { font-size: 1.12rem; font-weight: 500; margin-bottom: 5px; }
.trust-item p { color: var(--text-soft); font-size: .98rem; }

/* ============================== Limits ================================= */
.limits-quote { max-width: 760px; }
.limits-quote .eyebrow { display: block; }
.limits-quote blockquote { margin: 0; font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 400; line-height: 1.4; color: var(--ink); }
.limits-quote .lead-line { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }

/* ============================= Use cases =============================== */
.usecase { padding: 32px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.usecase .kicker { font-family: var(--font-sans); font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-strong); }
.usecase h3 { font-size: 1.3rem; font-weight: 500; margin: 12px 0 10px; }
.usecase p { color: var(--text-soft); }

/* ============================== Roadmap ================================ */
.roadmap-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 40px); }
@media (max-width: 720px) { .roadmap-list { grid-template-columns: 1fr; gap: 28px; } }
.roadmap-item { padding-top: 20px; border-top: 2px solid var(--line); }
.roadmap-item h3 { font-size: 1.18rem; font-weight: 500; margin-bottom: 8px; }
.roadmap-item p { color: var(--text-soft); font-size: .98rem; }

/* ================================ FAQ ================================== */
.faq { max-width: 760px; }
.faq__item { border-top: 1px solid var(--line); }
.faq__item:last-child { border-bottom: 1px solid var(--line); }
.faq__item summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between;
  align-items: center; gap: 1.5rem; padding: 22px 0;
  font-family: var(--font-display); font-size: 1.18rem; font-weight: 500; color: var(--ink);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+"; font-family: var(--font-sans); font-weight: 400; font-size: 1.5rem;
  line-height: 1; color: var(--accent-strong); flex: 0 0 auto;
}
.faq__item[open] summary::after { content: "–"; }
.faq__item summary:hover { color: var(--accent-strong); }
.faq__item p { margin: -2px 0 24px; color: var(--text-soft); max-width: 68ch; }

/* =============================== CTA =================================== */
.cta-band { background: var(--ink); color: var(--paper); text-align: center; }
.cta-band .eyebrow { color: var(--accent-2); }
.cta-band h2 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 500; }
.cta-band p { color: color-mix(in srgb, var(--paper) 72%, transparent); font-size: 1.18rem; margin: 16px auto 32px; max-width: 48ch; }

/* =============================== Footer ================================ */
.site-footer { background: var(--ink); color: color-mix(in srgb, var(--paper) 66%, transparent); padding-block: 44px; }
.site-footer__inner { max-width: var(--maxw-wide); margin-inline: auto; padding-inline: var(--gutter); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; align-items: center; }
.site-footer .brand { color: var(--paper); }
.site-footer .brand__tag { color: color-mix(in srgb, var(--paper) 55%, transparent); }
.site-footer__note { font-size: .9rem; max-width: 42ch; }
.site-footer__tag { color: var(--paper); font-family: var(--font-display); }

/* ====================== Gentle one-time reveal ========================= */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
[data-reveal].in-view { opacity: 1; transform: none; }
[data-stagger] > * { opacity: 0; transform: translateY(14px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
[data-stagger].in-view > * { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-stagger] > *, .msg { opacity: 1 !important; transform: none !important; transition: none !important; }
  .chat__input .caret, .searching .dots i { animation: none; }
  .chat__input .caret { display: none; }
}

/* noscript fallback */
.noscript { padding: 14px; text-align: center; background: var(--ink); color: var(--paper); font-size: .92rem; }
