/* BlueHomer.ai — interior pages (platform, solutions, industries, glossary, resources).
 *
 * The landing page (site/index.html) keeps its own inline CSS: it is a designed artefact with
 * bespoke animation and is deliberately left untouched. Interior pages are content pages, so they
 * share this one cacheable stylesheet instead of inlining ~40 KB into every document.
 *
 * Tokens mirror the landing page so the two never drift apart visually. Dark is the default and
 * [data-theme="light"] overrides it — same contract as the landing page's toggle. */

:root {
  --void: #0D2247;
  --deep: #102A52;
  --lift: #153060;
  --line: rgba(255, 255, 255, .10);
  --line-2: rgba(255, 255, 255, .18);
  --surf: rgba(255, 255, 255, .05);
  --surf-2: rgba(255, 255, 255, .03);
  --card-grad: linear-gradient(165deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
  --nav-bg: rgba(8, 11, 24, .92);

  --txt: #EFF2FB;
  --txt-2: #A3ADCB;
  --txt-3: #7A85A6;

  --iris: #5B6CFF;
  --cyan: #22D3EE;
  --violet: #A855F7;
  --mint: #34E8B0;
  --amber: #FBBF24;

  --f-b: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-m: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --nav-h: 68px;
}

[data-theme="light"] {
  --void: #EEF3FA;
  --deep: #E3EBF7;
  --lift: #D8E3F4;
  --line: rgba(12, 38, 84, .12);
  --line-2: rgba(12, 38, 84, .22);
  --surf: rgba(255, 255, 255, .72);
  --surf-2: rgba(255, 255, 255, .5);
  --card-grad: linear-gradient(165deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .6));
  --nav-bg: rgba(238, 243, 250, .92);
  --txt: #0A1E50;
  --txt-2: #3B4A70;
  --txt-3: #5D6A8C;
  --iris: #3B4BE0;
  --cyan: #0B8FA8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--txt);
  font-family: var(--f-b);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .4s ease, color .4s ease;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--iris); color: #fff; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  padding: 12px 18px; background: var(--iris); color: #fff; border-radius: 0 0 10px 0;
}
.skip:focus { left: 0; }

/* ── Navigation ─────────────────────────────────────────────────────────── */

.nav {
  position: sticky; top: 0; z-index: 60;
  height: var(--nav-h);
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease;
}
.nav.on { border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 14px; height: 100%; max-width: 1240px; }

.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; letter-spacing: -.01em; }
.logo img { border-radius: 6px; }

.pills { display: flex; gap: 4px; margin-left: 12px; flex: 1; flex-wrap: wrap; }
.pills a {
  padding: 7px 12px; border-radius: 999px;
  color: var(--txt-2); font-size: .88rem; font-weight: 600;
  transition: color .2s, background .2s;
}
.pills a:hover { color: var(--txt); background: var(--surf); }
.pills a[aria-current="page"] { color: var(--txt); background: var(--surf); }

.theme-toggle {
  position: relative; flex-shrink: 0;
  width: 50px; height: 26px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surf);
}
.tk-knob {
  position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #5B8DEF, #22D3EE);
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 700; font-size: .94rem; white-space: nowrap;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn-sm { padding: 9px 16px; font-size: .86rem; }
.btn-hi { background: linear-gradient(120deg, var(--iris), #7C4DFF); color: #fff; box-shadow: 0 12px 30px -12px rgba(91, 108, 255, .8); }
.btn-hi:hover { transform: translateY(-1px); box-shadow: 0 16px 34px -12px rgba(91, 108, 255, .9); }
.btn-gh { border: 1px solid var(--line-2); color: var(--txt); background: var(--surf-2); }
.btn-gh:hover { background: var(--surf); }

/* ── Page head ──────────────────────────────────────────────────────────── */

.page { padding-block: clamp(36px, 6vw, 64px) clamp(50px, 8vw, 90px); }

.crumbs { font-size: .82rem; color: var(--txt-3); margin-bottom: 26px; }
.crumbs a { color: var(--txt-3); }
.crumbs a:hover { color: var(--txt-2); text-decoration: underline; }
.crumbs span { margin: 0 7px; opacity: .55; }

.page-head { max-width: 46rem; margin-bottom: clamp(34px, 5vw, 52px); }

.kick {
  display: inline-block; margin-bottom: 14px;
  font-family: var(--f-m); font-size: .74rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--cyan);
}

h1 {
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  line-height: 1.08; letter-spacing: -.03em; font-weight: 800;
}

.lede { margin-top: 20px; font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--txt-2); line-height: 1.6; }

.head-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ── Sections ───────────────────────────────────────────────────────────── */

.sec { padding-top: clamp(30px, 4vw, 46px); scroll-margin-top: calc(var(--nav-h) + 20px); }
.sec + .sec { border-top: 1px solid var(--line); margin-top: clamp(30px, 4vw, 46px); }

.sec h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  line-height: 1.2; letter-spacing: -.02em; font-weight: 800;
  max-width: 34rem;
}

.sec h3 { margin-top: 26px; font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; }

.sec p, .sec li { color: var(--txt-2); max-width: 46rem; }
.sec p { margin-top: 16px; }
.sec p strong, .sec li strong { color: var(--txt); font-weight: 700; }

/* The answer-first paragraph: the 40–60 words search engines and AI assistants quote. */
.answer {
  margin-top: 18px; padding: 18px 20px;
  border-left: 3px solid var(--cyan);
  border-radius: 0 12px 12px 0;
  background: var(--surf-2);
  color: var(--txt) !important;
  font-size: 1.04rem;
}

.sec ul, .sec ol { margin-top: 16px; padding-left: 22px; display: grid; gap: 10px; }
.sec li { padding-left: 4px; }
.sec li::marker { color: var(--iris); }

.note {
  margin-top: 20px; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surf-2);
  color: var(--txt-2); font-size: .93rem;
}
.note strong { color: var(--txt); }

/* ── Tables (the extraction asset on most pages) ────────────────────────── */

.tbl-wrap { margin-top: 22px; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 520px; }
thead th {
  text-align: left; padding: 13px 16px;
  background: var(--surf-2); color: var(--txt);
  font-weight: 700; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}
tbody td { padding: 13px 16px; color: var(--txt-2); vertical-align: top; border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 0; }
tbody td:first-child { color: var(--txt); font-weight: 600; }

/* ── Cards ──────────────────────────────────────────────────────────────── */

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 24px; }
.card {
  padding: 20px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--card-grad);
}
.card h3 { margin: 0 0 8px; font-size: 1rem; font-weight: 700; }
.card p { margin: 0; font-size: .9rem; color: var(--txt-2); }
.card a.more { display: inline-block; margin-top: 12px; font-size: .86rem; font-weight: 700; color: var(--cyan); }
.card a.more:hover { text-decoration: underline; }

/* Numbered steps */
.steps { counter-reset: step; display: grid; gap: 12px; margin-top: 22px; list-style: none; padding: 0; }
.steps li {
  counter-increment: step; position: relative;
  padding: 16px 18px 16px 54px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surf-2);
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 18px; top: 16px;
  width: 24px; height: 24px; border-radius: 8px;
  display: grid; place-items: center;
  background: rgba(91, 108, 255, .18); color: var(--cyan);
  font-family: var(--f-m); font-size: .78rem; font-weight: 500;
}

/* ── Long-form documents (white papers rendered from Markdown) ──────────── */

.toc { margin-top: 18px; padding-left: 22px; display: grid; gap: 8px; }
.toc li { color: var(--txt-2); }
.toc a { color: var(--txt-2); }
.toc a:hover { color: var(--txt); text-decoration: underline; }

.prose { max-width: 48rem; }
.prose h3 {
  margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line);
  font-size: clamp(1.2rem, 2.2vw, 1.55rem); font-weight: 800; letter-spacing: -.02em;
  scroll-margin-top: calc(var(--nav-h) + 20px);
}
.prose h4 { margin-top: 30px; font-size: 1.05rem; font-weight: 700; }
.prose h5 { margin-top: 24px; font-size: .95rem; font-weight: 700; color: var(--txt-2); }
.prose p { margin-top: 16px; color: var(--txt-2); }
.prose ul, .prose ol { margin-top: 16px; padding-left: 22px; display: grid; gap: 10px; }
.prose li { color: var(--txt-2); }
.prose li::marker { color: var(--iris); }
.prose strong { color: var(--txt); }
.prose em { color: var(--txt-2); }
.prose code {
  padding: 2px 6px; border-radius: 6px;
  background: var(--surf); font-family: var(--f-m); font-size: .88em;
}
.prose blockquote {
  margin-top: 22px; padding: 18px 22px;
  border-left: 3px solid var(--iris); border-radius: 0 14px 14px 0;
  background: var(--surf-2);
}
.prose blockquote p { margin: 0; color: var(--txt); font-size: 1.04rem; }
.prose .tbl-wrap { margin-block: 22px; }

/* Printing a white paper is a real use — it is how it reaches people who do not click links. */
@media print {
  .nav, .cta-band, .foot, .crumbs, .head-cta, .related, .skip { display: none !important; }
  body { background: #fff; color: #111; }
  .prose p, .prose li, .sec p, .sec li { color: #222; }
  .prose h3 { break-after: avoid; }
  .tbl-wrap { break-inside: avoid; }
  a[href^="/"]::after { content: " (bluehomer.ai" attr(href) ")"; font-size: .85em; color: #555; }
}

/* ── FAQ ────────────────────────────────────────────────────────────────── */

.faq { padding-top: clamp(30px, 4vw, 46px); border-top: 1px solid var(--line); margin-top: clamp(30px, 4vw, 46px); }
.faq h2 { font-size: clamp(1.35rem, 2.4vw, 1.8rem); letter-spacing: -.02em; font-weight: 800; }
.faq details { margin-top: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surf-2); }
.faq summary {
  padding: 16px 18px; cursor: pointer; font-weight: 700; list-style: none;
  display: flex; justify-content: space-between; gap: 14px; align-items: flex-start;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--cyan); font-size: 1.25rem; line-height: 1; flex-shrink: 0; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 18px 18px; color: var(--txt-2); max-width: 46rem; }

/* ── Related links ──────────────────────────────────────────────────────── */

.related { margin-top: clamp(30px, 4vw, 46px); padding-top: clamp(24px, 3vw, 36px); border-top: 1px solid var(--line); }
.related h2 { font-size: 1.1rem; font-weight: 800; letter-spacing: -.01em; }
.related-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.related-list a {
  padding: 9px 15px; border: 1px solid var(--line-2); border-radius: 999px;
  font-size: .88rem; font-weight: 600; color: var(--txt-2); background: var(--surf-2);
}
.related-list a:hover { color: var(--txt); background: var(--surf); }

/* ── Glossary index ─────────────────────────────────────────────────────── */

.term-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 26px; }
.term-grid a {
  display: block; padding: 18px 20px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--card-grad);
  transition: border-color .2s, transform .2s;
}
.term-grid a:hover { border-color: var(--line-2); transform: translateY(-2px); }
.term-grid strong { display: block; font-size: 1rem; font-weight: 700; }
.term-grid span { display: block; margin-top: 6px; font-size: .88rem; color: var(--txt-2); }

/* ── CTA band ───────────────────────────────────────────────────────────── */

.cta-band {
  padding-block: clamp(48px, 7vw, 80px);
  border-top: 1px solid var(--line);
  background:
    radial-gradient(ellipse 60% 100% at 50% 0%, rgba(91, 108, 255, .16), transparent 70%),
    var(--deep);
  text-align: center;
}
.cta-band h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); letter-spacing: -.025em; font-weight: 800; }
.cta-band p { max-width: 44rem; margin: 16px auto 0; color: var(--txt-2); }
.cta-band .btn { margin: 24px 6px 0; }

/* ── Footer ─────────────────────────────────────────────────────────────── */

.foot { padding-block: clamp(40px, 5vw, 60px) 28px; border-top: 1px solid var(--line); background: var(--void); }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 30px; }
.foot-brand p { margin-top: 14px; max-width: 30rem; font-size: .88rem; color: var(--txt-3); }
.foot-grid h2 { margin-bottom: 12px; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--txt-3); font-weight: 700; }
.foot-grid > div > a { display: block; padding: 5px 0; font-size: .9rem; color: var(--txt-2); }
.foot-grid > div > a:hover { color: var(--txt); }
.foot-bot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line);
  font-size: .82rem; color: var(--txt-3);
}
.foot-bot a { color: var(--txt-2); font-weight: 600; }

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .pills { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .foot-grid { grid-template-columns: 1fr; }
  .nav .wrap { gap: 10px; }
  .btn { padding: 11px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
