/* ------------------------------------------------------------
   commercestream.com: the one style sheet of all pages (home, terms,
   privacy, 404). Hand-made site (owner decision 2026-11-19, option A:
   design "Blueprint" version 2), uploaded as plain files; fab gen does
   not build it.
   Every color is one token with both values: light-dark(<light>, <dark>).
   The browser picks the value from color-scheme: the system setting, or
   the choice of the sun/moon button (data-theme on <html>, theme.js).
   ------------------------------------------------------------ */
:root {
  color-scheme: light dark;
  --page: light-dark(#ffffff, #0a1224);
  --tint: light-dark(#f3f7ff, #0d1730);
  --card: light-dark(#ffffff, #111c38);
  --line: light-dark(#dbe5fb, #1f2d50);
  --heading: light-dark(#0b1b3f, #f1f5ff);
  --text: light-dark(#13234a, #d9e2f5);
  --muted: light-dark(#4c5b7c, #9badd0);
  --link: light-dark(#1d4ed8, #7cb2ff);
  --button: light-dark(#1d4ed8, #2563eb);
  --button-hover: light-dark(#1a43bd, #1d4ed8);
  --pill-bg: light-dark(#e6eeff, #16285a);
  --pill-text: light-dark(#1d4ed8, #a9c8ff);
  --grid: light-dark(#e4ecfd, #14203d);
  --hero-top: light-dark(#f7faff, #0c1631);
  --header-bg: light-dark(rgba(255, 255, 255, .92), rgba(10, 18, 36, .86));
  --shadow: light-dark(rgba(11, 27, 63, .35), rgba(0, 0, 0, .65));
  --check-bg: light-dark(#dbeafe, #1b2f63);
  --step-border: light-dark(#b9cbf5, #2c4174);
  --step-dot: light-dark(#0b1b3f, #2563eb);
  --d-box: light-dark(#ffffff, #13203f);
  --d-box-line: light-dark(#c4d4f7, #2c3f6e);
  --d-line: light-dark(#1d4ed8, #6aa5ff);
  --d-report: light-dark(#f3f7ff, #0f1a36);
  --foot-bg: light-dark(#0b1b3f, #060c1a);
  --foot-line: light-dark(#22355f, #18233f);
  /* the sky blue for text and focus rings: darker in light mode for at least 3:1 contrast */
  --sky-strong: light-dark(#0284c7, #0ea5e9);
  --sky: #0ea5e9; --blue: #1d4ed8; --navy: #0b1b3f; --white: #fff;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--page); color: var(--text); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
main { flex: 1 0 auto; }
a { color: inherit; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
section { scroll-margin-top: 80px; }
:focus-visible { outline: 3px solid var(--sky-strong); outline-offset: 2px; border-radius: 4px; }
.nowrap { white-space: nowrap; }
.pill { display: inline-block; font: 600 .78rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--pill-text); background: var(--pill-bg); border-radius: 999px; padding: 6px 14px; margin: 0; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); line-height: 1.15; letter-spacing: -.02em; margin: 14px 0 12px; color: var(--heading); }
.lead { color: var(--muted); font-size: 1.12rem; max-width: 38em; margin: 0; }
.center { text-align: center; } .center .lead { margin: 0 auto; }

/* ---- Header (same on every page), with the sun/moon button ---- */
.top { position: sticky; top: 0; z-index: 10; background: var(--header-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.1rem; color: var(--heading); letter-spacing: -.01em; white-space: nowrap; }
.brand span span { color: var(--link); }
.nav { display: flex; align-items: center; gap: 4px; font: 600 .92rem var(--sans); }
.nav a { text-decoration: none; color: var(--muted); padding: 8px 14px; border-radius: 8px; }
.nav a:hover { color: var(--heading); background: var(--tint); }
.nav a[aria-current="page"] { color: var(--heading); }
.nav a.cta { color: var(--white); background: var(--button); margin-left: 6px; }
.nav a.cta:hover { background: var(--button-hover); }
.theme-toggle { display: inline-grid; place-items: center; width: 38px; height: 38px; margin-left: 8px; padding: 0; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--heading); cursor: pointer; }
.theme-toggle:hover { background: var(--tint); }
/* without JavaScript the button cannot work, so it is not shown (colors still follow the system) */
:root:not([data-theme]) .theme-toggle { display: none; }
/* in light mode the button shows a moon (go dark); in dark mode a sun (go light) */
:root[data-theme="dark"] .icon-moon, :root:not([data-theme="dark"]) .icon-sun { display: none; }

/* ---- Home: hero with blueprint grid and flow diagram ---- */
.hero { position: relative; padding: 88px 0 96px; background:
  linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 32px 32px,
  linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 32px 32px,
  linear-gradient(180deg, var(--hero-top), var(--page)); }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
h1 { font-size: clamp(2.3rem, 4.6vw, 3.6rem); line-height: 1.07; letter-spacing: -.035em; margin: 20px 0 22px; color: var(--heading); }
h1 em { font-style: normal; background: linear-gradient(90deg, var(--link), var(--sky-strong)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.btn.primary { background: var(--button); color: var(--white); box-shadow: 0 10px 24px -10px rgba(29, 78, 216, .7); }
.btn.primary:hover { background: var(--button-hover); }
.btn.secondary { background: var(--card); color: var(--heading); border: 1px solid var(--line); }
.diagram { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: 0 30px 60px -30px var(--shadow); }
.diagram svg { display: block; width: 100%; height: auto; }
.diagram figcaption { font-size: .82rem; color: var(--muted); text-align: center; margin-top: 10px; }
.d-box { fill: var(--d-box); stroke: var(--d-box-line); }
.d-lines { fill: none; stroke: var(--d-line); stroke-width: 1.6; }
.d-arrow { fill: var(--d-line); }
.d-report { fill: var(--d-report); stroke: var(--d-line); stroke-dasharray: 5 4; }
.d-label { fill: var(--text); font: 600 13px var(--sans); }
.d-small { fill: var(--muted); font: 10px ui-monospace, Menlo, Consolas, monospace; }

/* ---- Home: strip of capabilities ---- */
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--page); }
.strip ul { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; margin: 0; padding: 22px 0; list-style: none; font-weight: 600; color: var(--muted); font-size: .95rem; }
.strip li::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--sky); margin-right: 10px; vertical-align: 1px; }

/* ---- Home: services (2 x 2 cards), then the engagement steps ---- */
.services { padding: 96px 0; background: var(--tint); }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 48px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 30px; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: 0 20px 40px -24px var(--shadow); transform: translateY(-2px); }
.ico { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; color: var(--white); background: linear-gradient(135deg, var(--blue), var(--sky)); margin-bottom: 18px; }
.card h3 { font-size: 1.22rem; margin: 0 0 10px; color: var(--heading); letter-spacing: -.01em; }
.card p { color: var(--muted); margin: 0; }
.checks { margin: 16px 0 0; padding: 0; list-style: none; font-size: .93rem; font-weight: 600; color: var(--text); }
.checks li { padding-left: 26px; position: relative; margin-top: 6px; }
.checks li::before { content: "\2713"; position: absolute; left: 0; top: 3px; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 900; color: var(--link); background: var(--check-bg); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 56px 0 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; background: var(--card); border: 1px dashed var(--step-border); border-radius: 14px; padding: 22px 24px; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--step-dot); color: var(--white); font-weight: 800; margin-bottom: 12px; }
.steps b { display: block; color: var(--heading); margin-bottom: 4px; }
.steps span { color: var(--muted); font-size: .93rem; }

/* ---- Home: contact (split card) ---- */
.contact { padding: 96px 0 104px; }
.contact-card { display: grid; grid-template-columns: 1fr 1.1fr; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 30px 60px -36px var(--shadow); }
.contact-side { background: radial-gradient(circle at 85% 15%, rgba(14, 165, 233, .55), transparent 45%), linear-gradient(140deg, var(--navy), var(--blue)); color: var(--white); padding: 44px; }
.contact-side h2 { color: var(--white); margin-top: 0; }
.contact-side p { color: #d6e2ff; margin: 0; font-size: 1.05rem; }
.contact-side .btn { margin-top: 28px; background: var(--white); color: var(--navy); }
.contact-list { margin: 0; padding: 20px 44px; background: var(--card); list-style: none; }
.contact-list li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-list li:last-child { border-bottom: 0; }
.contact-list svg { color: var(--link); }
.contact-list p { margin: 0; font-weight: 600; color: var(--heading); }
.contact-list small { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.contact-list a { color: var(--link); text-decoration: none; }

/* ---- Terms, privacy and the 404 page: one readable text column ---- */
.page { padding: 64px 0 96px; background: linear-gradient(180deg, var(--hero-top), var(--page) 360px); }
.legal { max-width: 760px; margin: 0 auto; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 18px 0 6px; }
.legal .effective { color: var(--muted); margin: 0 0 32px; }
.legal h2 { font-size: 1.3rem; letter-spacing: -.01em; margin: 36px 0 10px; }
.legal p, .legal li { color: var(--text); }
.legal ul { padding-left: 22px; }
.legal li { margin: 6px 0; }
.legal a { color: var(--link); }
.legal address { font-style: normal; line-height: 1.7; }

/* ---- Footer (same on every page) ---- */
.foot { background: var(--foot-bg); color: #b8c6e6; padding: 40px 0; font-size: .92rem; }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.foot .brand { color: var(--white); }
.foot .brand span span { color: #7fb3ff; }
.foot nav { display: flex; flex-wrap: wrap; gap: 24px; }
.foot nav a { text-decoration: none; color: var(--white); }
.foot nav a:hover { text-decoration: underline; }
.foot p { margin: 0; width: 100%; border-top: 1px solid var(--foot-line); padding-top: 18px; font-size: .84rem; }

/* ---- Phones and tablets ---- */
@media (max-width: 900px) {
  .hero .wrap, .grid, .contact-card { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .hero { padding-top: 56px; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .top .wrap { height: auto; flex-direction: column; gap: 6px; padding-top: 10px; padding-bottom: 10px; }
  /* the menu may wrap to a second line on very small phones (320 px) instead of running off screen */
  .nav { flex-wrap: wrap; justify-content: center; }
  .nav a { padding: 6px 10px; } .nav a.cta { margin-left: 2px; }
  .theme-toggle { width: 34px; height: 34px; margin-left: 4px; }
  .contact-side, .contact-list { padding-left: 22px; padding-right: 22px; }
  .diagram { padding: 12px; }
  .page { padding-top: 40px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .card { transition: none; } }

/* ------------------------------------------------------------
   Browsers without light-dark() (Safari before 17.5, Chrome and Edge before
   123, Firefox before 120): every token above would be invalid there, which
   leaves white text on white. They get the light values and no sun/moon button.
   ------------------------------------------------------------ */
@supports not (color: light-dark(#000, #fff)) {
  :root {
    --page: #ffffff; --tint: #f3f7ff; --card: #ffffff; --line: #dbe5fb;
    --heading: #0b1b3f; --text: #13234a; --muted: #4c5b7c; --link: #1d4ed8;
    --button: #1d4ed8; --button-hover: #1a43bd; --pill-bg: #e6eeff; --pill-text: #1d4ed8;
    --grid: #e4ecfd; --hero-top: #f7faff; --header-bg: rgba(255, 255, 255, .92); --shadow: rgba(11, 27, 63, .35);
    --check-bg: #dbeafe; --step-border: #b9cbf5; --step-dot: #0b1b3f;
    --d-box: #ffffff; --d-box-line: #c4d4f7; --d-line: #1d4ed8; --d-report: #f3f7ff;
    --foot-bg: #0b1b3f; --foot-line: #22355f; --sky-strong: #0284c7;
  }
  .theme-toggle { display: none; }
  /* theme.js may still set data-theme="dark"; keep the browser's own parts (scrollbars) light */
  :root[data-theme] { color-scheme: light; }
}
