/* ShieldBrain — shared stylesheet
   Brand: monochrome black/white (app Doom theme) + mint-green accent from screenshots.
   Mobile-first, dark-mode aware, no external fonts (Core Web Vitals). */

:root {
  --bg: #ffffff;
  --surface: #f5f5f5;
  --surface-2: #ececec;
  --text: #0b0b0b;
  --text-muted: #6f6f6f;
  --outline: #e4e4e4;
  --accent: #16a34a;        /* accessible green on white */
  --accent-bright: #3ddc84; /* screenshot green, for buttons/badges */
  --accent-ink: #052e16;    /* text on bright green */
  --shadow: 0 8px 30px rgba(0, 0, 0, .08);
  --radius: 16px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #0b0b0b;
    --surface-2: #141414;
    --text: #ffffff;
    --text-muted: #a8a8a8;
    --outline: #2a2a2a;
    --accent: #3ddc84;
    --shadow: 0 8px 30px rgba(0, 0, 0, .6);
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--outline);
}
.site-header .container {
  display: flex; align-items: center; gap: 16px;
  min-height: 64px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.site-nav a {
  color: var(--text-muted); font-size: .95rem; font-weight: 500;
  padding: 8px 10px; border-radius: 8px;
}
.site-nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.site-nav a.nav-cta {
  background: var(--accent-bright); color: var(--accent-ink); font-weight: 700;
}
.site-nav a.nav-cta:hover { filter: brightness(1.05); }

/* Mobile header: brand row on top, nav as swipeable pill strip below */
@media (max-width: 767px) {
  .site-header .container { min-height: 0; gap: 8px; padding-top: 10px; padding-bottom: 10px; }
  .brand { font-size: 1rem; }
  .brand img { width: 30px; height: 30px; border-radius: 8px; }
  .site-nav {
    margin-left: 0; width: 100%;
    flex-wrap: nowrap; overflow-x: auto; gap: 8px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
    padding: 2px 0 4px;
  }
  .site-nav::-webkit-scrollbar { display: none; width: 0; height: 0; }
  .site-nav a {
    flex: 0 0 auto; white-space: nowrap;
    font-size: .88rem; padding: 7px 14px;
    border: 1px solid var(--outline); border-radius: 999px;
    background: var(--surface); color: var(--text);
  }
  .site-nav a.nav-cta { border-color: transparent; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 14px 28px; border-radius: 999px;
  font-weight: 700; font-size: 1rem; text-align: center;
  transition: transform .15s ease, filter .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent-bright); color: var(--accent-ink); box-shadow: 0 6px 24px rgba(61, 220, 132, .35); }
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--outline); }
.btn-secondary:hover { background: var(--surface-2); }

/* ---------- Hero ---------- */
.hero { padding: 48px 0 40px; }
.hero .container {
  display: grid; gap: 32px; align-items: center;
  grid-template-areas: "copy" "phone" "meta";
}
.hero-copy { grid-area: copy; }
.hero-phone { grid-area: phone; }
.hero-meta { grid-area: meta; }
@media (min-width: 900px) {
  .hero { padding: 56px 0 40px; }
  .hero .container {
    grid-template-columns: 1.15fr .85fr;
    grid-template-areas: "copy phone" "meta phone";
    gap: 20px 48px;
  }
}
@media (max-width: 899px) {
  .hero-copy, .hero-meta { text-align: center; }
  .hero .subtitle { margin-inline: auto; }
  .hero-ctas, .platform-strip { justify-content: center; }
  .hero-phone { max-width: min(68vw, 300px); }
}
@media (max-width: 480px) {
  .hero-ctas .btn { width: 100%; }
}
.hero h1 { font-size: clamp(2rem, 5.5vw, 3.4rem); line-height: 1.12; letter-spacing: -.02em; font-weight: 900; }
.hero h1 .accent { color: var(--accent); }
.hero .subtitle { margin-top: 18px; font-size: 1.15rem; color: var(--text-muted); max-width: 56ch; }
.hero-ctas { margin-top: 28px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-note { font-size: .9rem; color: var(--text-muted); }
.hero-phone { margin: 0 auto; max-width: 340px; }
.hero-phone img { border-radius: 24px; box-shadow: var(--shadow); }

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--outline);
  color: var(--text-muted); font-size: .85rem; font-weight: 600;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-bright); }

.platform-strip { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.platform-strip li {
  list-style: none; font-size: .85rem; font-weight: 600; color: var(--text-muted);
  border: 1px solid var(--outline); border-radius: 999px; padding: 5px 12px;
}

/* ---------- Sections ---------- */
section { padding: 64px 0; }
section.alt { background: var(--surface); }
.section-head { max-width: 720px; margin-bottom: 40px; }
.kicker { color: var(--accent); font-weight: 800; text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; }
h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); line-height: 1.2; letter-spacing: -.01em; margin-top: 8px; }
.section-head p { margin-top: 12px; color: var(--text-muted); font-size: 1.05rem; }

/* Cards */
.grid { display: grid; gap: 20px; }
@media (min-width: 640px) { .grid.cols-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--surface); border: 1px solid var(--outline);
  border-radius: var(--radius); padding: 26px;
}
section.alt .card { background: var(--bg); }
.card .icon { font-size: 1.8rem; line-height: 1; }
.card .platform-icon { width: 48px; height: 48px; object-fit: contain; }
.card h3 { margin: 12px 0 8px; font-size: 1.12rem; }
.card p { color: var(--text-muted); font-size: .97rem; }
.card a.more { display: inline-block; margin-top: 10px; font-weight: 600; font-size: .92rem; }

/* Steps */
.steps { display: grid; gap: 20px; counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius); padding: 26px; }
.step .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent-bright); color: var(--accent-ink); font-weight: 800;
}
.step h3 { margin: 14px 0 8px; font-size: 1.1rem; }
.step p { color: var(--text-muted); font-size: .97rem; }

/* Screenshots gallery — full-bleed filmstrip, hidden scrollbar */
.gallery-wrap { position: relative; }
.gallery {
  display: flex; gap: clamp(14px, 2.5vw, 24px);
  overflow-x: auto; overscroll-behavior-x: contain;
  padding: 16px 0 26px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-inline: calc(50% - 50vw);
  padding-inline: max(20px, calc(50vw - 530px));
  scroll-padding-inline: max(20px, calc(50vw - 530px));
}
.gallery::-webkit-scrollbar { display: none; width: 0; height: 0; }
.gallery figure { flex: 0 0 auto; scroll-snap-align: center; }
.gallery img {
  height: clamp(340px, 58vh, 520px); width: auto; max-width: none;
  border-radius: 20px; border: 1px solid var(--outline); box-shadow: var(--shadow);
  transition: transform .35s cubic-bezier(.22, 1, .36, 1), box-shadow .35s ease;
}
.gallery figure:hover img { transform: translateY(-8px) rotate(-1deg); box-shadow: 0 18px 44px rgba(0, 0, 0, .18); }
.gallery figcaption { margin-top: 12px; font-size: .88rem; font-weight: 600; color: var(--text-muted); text-align: center; }

/* gallery arrows (desktop pointer devices only) */
.gal-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--outline); background: var(--bg); color: var(--text);
  font-size: 1.5rem; line-height: 1; cursor: pointer; box-shadow: var(--shadow);
  display: none; align-items: center; justify-content: center;
  transition: background .2s ease, transform .2s ease;
}
.gal-btn:hover { background: var(--surface-2); transform: translateY(-50%) scale(1.08); }
.gal-btn.prev { left: -10px; }
.gal-btn.next { right: -10px; }
@media (min-width: 900px) and (hover: hover) { .gal-btn { display: flex; } }

/* Scroll-in animations — active only when JS adds .js-anim to <html>,
   so pages without the script (and no-JS visitors) render everything visible. */
.js-anim .gallery figure {
  opacity: 0;
  transform: translateY(38px) rotate(var(--tilt, -2.5deg)) scale(.95);
  transition: opacity .55s ease var(--d, 0s), transform .7s cubic-bezier(.22, 1, .36, 1) var(--d, 0s);
}
.js-anim .gallery figure:nth-child(even) { --tilt: 2.5deg; --lift: 20px; }
.js-anim .gallery figure.in-view { opacity: 1; transform: translateY(var(--lift, 0px)) rotate(0deg) scale(1); }
.js-anim .section-head > * {
  opacity: 0; transform: translateY(18px);
  transition: opacity .5s ease, transform .6s cubic-bezier(.22, 1, .36, 1);
}
.js-anim .section-head.in-view > * { opacity: 1; transform: none; }
.js-anim .section-head.in-view h2 { transition-delay: .1s; }
.js-anim .section-head.in-view p:not(.kicker) { transition-delay: .2s; }

/* Comparison table */
.table-wrap { overflow-x: auto; border: 1px solid var(--outline); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 560px; }
caption { text-align: left; padding: 14px 16px; font-weight: 700; }
th, td { padding: 12px 16px; text-align: left; border-top: 1px solid var(--outline); }
thead th { background: var(--surface-2); border-top: none; }
td .yes { color: var(--accent); font-weight: 700; }
td .no { color: var(--text-muted); }

/* FAQ */
.faq-item { border: 1px solid var(--outline); border-radius: 12px; margin-bottom: 12px; background: var(--surface); }
.faq-item summary {
  cursor: pointer; padding: 16px 20px; font-weight: 700; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.3rem; color: var(--text-muted); flex-shrink: 0; }
.faq-item[open] summary::after { content: "–"; }
.faq-item .answer { padding: 0 20px 18px; color: var(--text-muted); }
.faq-item .answer p + p { margin-top: 10px; }

/* CTA band */
.cta-band { text-align: center; background: var(--surface); border-top: 1px solid var(--outline); border-bottom: 1px solid var(--outline); }
.cta-band h2 { margin-bottom: 10px; }
.cta-band p { color: var(--text-muted); max-width: 60ch; margin: 0 auto 26px; }

/* ---------- Article / guide pages ---------- */
.breadcrumbs { font-size: .85rem; color: var(--text-muted); padding: 18px 0 0; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumbs li + li::before { content: "›"; margin-right: 6px; color: var(--text-muted); }

article.guide { padding: 28px 0 56px; }
article.guide header h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); line-height: 1.15; letter-spacing: -.01em; }
article.guide header .meta { margin-top: 10px; color: var(--text-muted); font-size: .92rem; }
article.guide h2 { margin: 40px 0 14px; font-size: 1.5rem; }
article.guide h3 { margin: 26px 0 10px; font-size: 1.15rem; }
article.guide p { margin-bottom: 14px; }
article.guide ul, article.guide ol { margin: 0 0 16px 22px; }
article.guide li { margin-bottom: 8px; }
article.guide .lead { font-size: 1.12rem; color: var(--text-muted); margin-top: 14px; }
article.guide img.inline-shot { max-width: 320px; margin: 20px auto; border-radius: 18px; border: 1px solid var(--outline); box-shadow: var(--shadow); }

.key-takeaway {
  background: var(--surface); border: 1px solid var(--outline);
  border-left: 4px solid var(--accent-bright);
  border-radius: 12px; padding: 18px 20px; margin: 22px 0;
}
.key-takeaway strong { display: block; margin-bottom: 6px; }

.guide-cta {
  margin: 44px 0 8px; padding: 30px; text-align: center;
  background: var(--surface); border: 1px solid var(--outline); border-radius: var(--radius);
}
.guide-cta h2 { margin: 0 0 8px; }
.guide-cta p { color: var(--text-muted); margin-bottom: 20px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--outline); padding: 48px 0 36px; font-size: .92rem; }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.site-footer h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 12px; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--text); }
.site-footer a:hover { color: var(--accent); }
.footer-about p { color: var(--text-muted); margin-top: 10px; max-width: 42ch; }
.footer-bottom { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--outline); color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; }

/* Accessibility */
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--accent-bright);
  color: var(--accent-ink); padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 100; font-weight: 700;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--accent-bright); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover { transform: none; }
  .js-anim .gallery figure,
  .js-anim .section-head > * { opacity: 1 !important; transform: none !important; transition: none !important; }
  .gallery figure:hover img { transform: none; }
}
