/* FocusGate website. Colours, radii and type follow the extension (src/ui/styles.css),
   so the site and the product look like one thing. Light and dark follow the system. */

:root {
  color-scheme: light dark;

  --bg: #e8ebfc;
  --surface: #ffffff;
  --surface-2: #dfe4f7;
  --border: #bfc7e8;
  --text: #131a2b;
  --text-muted: #4a5873;
  --text-subtle: #525f78;
  --accent: #4349c9;
  --accent-contrast: #ffffff;
  --accent-soft: #d5dafb;
  --accent-edge: #a3acee;
  --break: #0a704c;
  --break-soft: #d2eee0;
  --break-edge: #86c9a8;
  --warning: #8f5200;
  --warning-soft: #fae8c2;
  --warning-edge: #deb460;
  --shadow-pop: 0 8px 24px rgba(19, 26, 43, 0.14);

  --radius-card: 10px;
  --radius-ctl: 6px;
  --font-ui: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-num: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --wrap: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1420;
    --surface: #151c2b;
    --surface-2: #1d2638;
    --border: #2a3550;
    --text: #e9edf6;
    --text-muted: #9aa6bd;
    --text-subtle: #8c98b0;
    --accent: #7c83ff;
    --accent-contrast: #0f1420;
    --accent-soft: #1d2550;
    --accent-edge: #39448f;
    --break: #4bd6a0;
    --break-soft: #123628;
    --break-edge: #21694d;
    --warning: #ffb23e;
    --warning-soft: #3a2a0c;
    --warning-edge: #7a5516;
    --shadow-pop: 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--font-ui);
  border-top: 3px solid var(--accent);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 20;
  background: var(--accent); color: var(--accent-contrast);
  padding: 8px 14px; border-radius: var(--radius-ctl); font-weight: 600;
}
.skip:focus { top: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 60px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 18px; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.nav a { color: var(--text-muted); text-decoration: none; font-size: 15px; font-weight: 500; padding: 6px 10px; border-radius: var(--radius-ctl); }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--text); background: var(--accent-soft); }

/* ---------- buttons, pills, chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--radius-ctl);
  border: 1px solid transparent; font: 600 15px/1 var(--font-ui);
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn--primary { background: var(--accent); color: var(--accent-contrast); }
.btn--primary:hover { filter: brightness(1.07); }
.btn--secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn--secondary:hover { border-color: var(--text-subtle); }
.btn--small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn small { font-weight: 500; opacity: 0.85; font-size: 13px; }
.pill {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 4px;
  background: var(--warning-soft); color: var(--text); border: 1px solid var(--warning); font-size: 13px; font-weight: 600;
}
.pill--accent { background: var(--accent-soft); border-color: var(--accent-edge); color: var(--text); }
.chip {
  display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--accent-edge); font-size: 14px; font-weight: 500; color: var(--text);
}
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }

/* ---------- type & sections ---------- */
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(34px, 5.4vw, 54px); font-weight: 800; }
h2 { font-size: clamp(26px, 3.6vw, 36px); font-weight: 800; }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--text-muted); max-width: 62ch; }
.muted { color: var(--text-muted); }
.small { font-size: 14.5px; }
.eyebrow { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.section { padding: 56px 0; }
.section--alt { background: var(--surface); border-block: 1px solid var(--border); }
.section__head { display: grid; gap: 10px; margin-bottom: 28px; max-width: 70ch; }
.section__head p { margin: 0; color: var(--text-muted); font-size: 18px; }

/* ---------- hero ---------- */
.hero { padding: 48px 0 56px; }
.hero__grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.hero h1 span { color: var(--accent); }
.hero .lead { margin: 18px 0 26px; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; }
.hero__note { margin-top: 16px; font-size: 14.5px; color: var(--text-muted); }
.shots { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.shots .shot:nth-child(2) { margin-top: 36px; }

.shot {
  margin: 0; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-pop);
}
.shot img { width: 100%; }
.shot figcaption { padding: 10px 14px; font-size: 14px; color: var(--text-muted); border-top: 1px solid var(--border); }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 20px; }
.section--alt .card { background: var(--bg); }
.card h3 { margin-bottom: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card p { margin: 0 0 10px; color: var(--text-muted); font-size: 16px; }
.card p:last-child { margin-bottom: 0; }
.card .btn { margin-top: 6px; }
.card--accent { border-color: var(--accent-edge); background: var(--accent-soft); }
.section--alt .card--accent { background: var(--accent-soft); }

/* sand status strip: the same strip the extension shows when something is blocking */
.status {
  background: var(--warning-soft); border: 1px solid var(--warning-edge);
  border-left: 4px solid var(--warning); border-radius: var(--radius-card); padding: 14px 16px;
}
.status strong { display: block; }
.status p { margin: 4px 0 0; font-size: 16px; }
.status--ok { background: var(--break-soft); border-color: var(--break-edge); border-left-color: var(--break); }

/* ---------- facts ---------- */
.facts { display: grid; grid-template-columns: max-content 1fr; margin: 0; border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; background: var(--surface); }
.facts dt, .facts dd { margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.facts dt { font-weight: 600; background: var(--surface-2); }
.facts dt:last-of-type, .facts dd:last-of-type { border-bottom: 0; }

/* ---------- split rows ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.split + .split { margin-top: 56px; }
.split--flip .split__media { order: -1; }
.split__media .shot { max-width: 560px; margin-inline: auto; }
.split__media .shot--narrow { max-width: 300px; }
.ticks { list-style: none; margin: 0 0 1em; padding: 0; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: 0.42em; width: 14px; height: 8px;
  border-left: 3px solid var(--break); border-bottom: 3px solid var(--break); transform: rotate(-45deg);
}

/* ---------- steps ---------- */
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps > li {
  counter-increment: step; position: relative; padding: 16px 18px 16px 64px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
}
.steps > li::before {
  content: counter(step); position: absolute; left: 16px; top: 14px; width: 32px; height: 32px;
  display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft);
  border: 1px solid var(--accent-edge); font: 700 16px/1 var(--font-num); color: var(--text);
}
.steps h3 { font-size: 17px; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--text-muted); font-size: 16px; }
.steps p + p { margin-top: 8px; }

code, kbd { font: 500 0.88em var(--font-mono); background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; overflow-wrap: anywhere; }
kbd { border-bottom-width: 2px; }

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 16px; min-width: 560px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface-2); font-weight: 700; }
tr:last-child td { border-bottom: 0; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); }
.section--alt .faq details { background: var(--bg); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 52px 16px 18px; font-weight: 700; font-size: 17px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font: 600 24px/1 var(--font-num); color: var(--accent); }
.faq details[open] summary::after { content: "\2212"; }
.faq .answer { padding: 0 18px 16px; color: var(--text-muted); }
.faq .answer p:last-child { margin-bottom: 0; }

/* ---------- prose (legal and long pages) ---------- */
.page-head { padding: 44px 0 8px; }
.page-head .lead { margin-top: 14px; }
.crumbs { font-size: 14.5px; color: var(--text-muted); margin-bottom: 14px; }
.crumbs a { color: var(--text-muted); }
.prose { max-width: 74ch; }
.prose h2 { font-size: 26px; margin: 40px 0 12px; }
.prose h3 { margin: 26px 0 8px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.toc a { display: inline-flex; padding: 6px 12px; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; text-decoration: none; font-size: 15px; font-weight: 500; color: var(--text); }
.toc a:hover { border-color: var(--accent-edge); background: var(--accent-soft); }

/* ---------- footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 40px 0 28px; font-size: 15px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.footer__grid h2 { font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px; font-weight: 700; }
.footer__grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer__grid a { color: var(--text); text-decoration: none; }
.footer__grid a:hover { color: var(--accent); text-decoration: underline; }
.footer__fine { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 14px; display: flex; gap: 8px 20px; flex-wrap: wrap; justify-content: space-between; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero__grid, .split { grid-template-columns: 1fr; gap: 28px; }
  .split--flip .split__media { order: 0; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .nav { margin-left: 0; width: 100%; }
}
@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .section { padding: 40px 0; }
  .shots { grid-template-columns: 1fr; }
  .shots .shot:nth-child(2) { margin-top: 0; display: none; }
  .facts { grid-template-columns: 1fr; }
  .facts dt { border-bottom: 0; padding-bottom: 2px; }
  .footer__grid { grid-template-columns: 1fr; }
  .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
