/* ==========================================================================
   Awesome SAML Tracer — website styles
   Plain CSS, no build step. Branding follows the extension:
   blue #3367d6 accent, dark indigo hero, system fonts, light/dark aware.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --accent: #3367d6;
  --accent-hover: #2a55b3;
  --accent-soft: rgba(51, 103, 214, 0.1);

  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --bg-card: #ffffff;
  --fg: #1d2433;
  --fg-muted: #5a6473;
  --border: #e3e6eb;
  --code-bg: #f1f3f5;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .07);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, .14);

  /* Hero / dark surfaces — fixed, derived from the extension logo */
  --hero-1: #0c1124;
  --hero-2: #1a1040;
  --hero-fg: #e8ecf6;
  --hero-muted: #9aa3bd;
  --glow-blue: #60a5fa;
  --glow-indigo: #818cf8;
  --glow-cyan: #22d3ee;

  --radius: 12px;
  --radius-sm: 8px;
  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #82a9ff;
    --accent-hover: #9bbcff;
    --accent-soft: rgba(130, 169, 255, 0.14);
    --bg: #15171c;
    --bg-alt: #1d1f25;
    --bg-card: #1f222a;
    --fg: #e6e9ef;
    --fg-muted: #98a1b2;
    --border: #2e323b;
    --code-bg: #262a32;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, .5);
  }
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: 2.6rem; margin: 0 0 .5rem; }
h2 { font-size: 1.9rem; margin: 0 0 1rem; }
h3 { font-size: 1.2rem; margin: 0 0 .4rem; }
p { margin: 0 0 1rem; }
code {
  font-family: var(--mono);
  font-size: .9em;
  background: var(--code-bg);
  padding: .12em .4em;
  border-radius: 4px;
}
hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.center { text-align: center; }
.muted { color: var(--fg-muted); }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 .6rem;
}
.lead { font-size: 1.15rem; color: var(--fg-muted); max-width: 60ch; }
.section-head { max-width: 62ch; margin: 0 0 2.5rem; }
.section-head.center { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: 1rem;
  font-weight: 600;
  padding: .8rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .08s ease, background .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 18px rgba(51, 103, 214, .35);
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { font-size: 1.05rem; padding: .95rem 1.8rem; }
.btn-on-dark.btn-secondary {
  color: var(--hero-fg);
  border-color: rgba(255, 255, 255, .25);
}
.btn-on-dark.btn-secondary:hover {
  border-color: var(--glow-blue);
  color: #fff;
  background: rgba(255, 255, 255, .06);
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--fg);
}
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 7px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  margin-left: auto;
}
.nav-links a {
  color: var(--fg-muted);
  font-weight: 500;
  font-size: .96rem;
}
.nav-links a:hover { color: var(--fg); text-decoration: none; }
.nav-links a.active { color: var(--accent); }
.nav-cta { margin-left: .4rem; }
.nav-links .btn-primary { color: #fff; }
.nav-toggle {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 40px;
  height: 38px;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--fg);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, var(--hero-1), var(--hero-2));
  color: var(--hero-fg);
  text-align: center;
  padding: 84px 0 92px;
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .45;
  pointer-events: none;
}
.hero::before {
  width: 460px; height: 460px;
  background: var(--glow-blue);
  top: -160px; left: -120px;
}
.hero::after {
  width: 420px; height: 420px;
  background: var(--glow-indigo);
  bottom: -200px; right: -120px;
}
.hero .container { position: relative; z-index: 1; }
.hero-logo {
  width: 96px; height: 96px;
  margin: 0 auto 1.4rem;
  border-radius: 22px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .45);
}
.page-hero-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.2rem;
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .4);
  display: block;
}
.hero h1 {
  font-size: 3.1rem;
  background: linear-gradient(180deg, #ffffff, #c7d2fe);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-tagline {
  font-size: 1.25rem;
  color: var(--hero-muted);
  max-width: 36ch;
  margin: .6rem auto 1.8rem;
}
.hero-actions {
  display: flex;
  gap: .9rem;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-meta {
  margin-top: 1.6rem;
  display: flex;
  gap: 1.4rem;
  justify-content: center;
  flex-wrap: wrap;
  font-size: .9rem;
  color: var(--hero-muted);
}
.hero-meta span { display: inline-flex; align-items: center; gap: .4rem; }
.hero-meta .tick { color: var(--glow-cyan); font-weight: 700; }

/* hero screenshot */
.hero-shot {
  margin: 3rem auto 0;
  max-width: 720px;
  position: relative;
  z-index: 1;
}
.hero-shot img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .55);
}

/* ---------- Trust strip ---------- */
.trust {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.trust .container {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  font-size: .92rem;
  color: var(--fg-muted);
}
.trust strong { color: var(--fg); font-weight: 600; }

/* ---------- Feature grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow);
}
.card-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  background: var(--accent-soft);
  margin-bottom: 14px;
}
.card h3 { margin-bottom: .35rem; }
.card p { margin: 0; color: var(--fg-muted); font-size: .96rem; }

/* ---------- Showcase ---------- */
.showcase-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.showcase-row + .showcase-row { margin-top: 72px; }
.showcase-row.flip .showcase-text { order: 2; }
.showcase-figure {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--bg-card);
}
.showcase-figure img { width: 100%; }
.showcase-text h3 { font-size: 1.45rem; margin-bottom: .6rem; }
.showcase-text p { color: var(--fg-muted); }
.feat-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.feat-list li {
  position: relative;
  padding-left: 1.7rem;
  margin-bottom: .5rem;
  color: var(--fg-muted);
}
.feat-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ---------- Comparison table ---------- */
.compare {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.compare th, .compare td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.compare thead th {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--fg-muted);
  background: var(--bg-alt);
}
.compare tbody tr:last-child td { border-bottom: 0; }
.compare td:first-child { font-weight: 600; }
.compare .col-ours { color: var(--accent); font-weight: 600; }
.compare .yes { color: #1a7f37; font-weight: 700; }
.compare .no { color: var(--fg-muted); }
@media (prefers-color-scheme: dark) {
  .compare .yes { color: #56d364; }
  .nav-links .btn-primary { color: #0c1124; }
}

/* ---------- Privacy band ---------- */
.band {
  background: linear-gradient(150deg, var(--hero-1), var(--hero-2));
  color: var(--hero-fg);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.band::before {
  content: "";
  position: absolute;
  width: 380px; height: 380px;
  background: var(--glow-indigo);
  filter: blur(100px);
  opacity: .35;
  top: -160px; right: -80px;
  pointer-events: none;
}
.band .container { position: relative; z-index: 1; }
.band h2 { color: #fff; }
.band p { color: var(--hero-muted); max-width: 60ch; margin-left: auto; margin-right: auto; }
.band .eyebrow { color: var(--glow-cyan); }

/* ---------- CTA ---------- */
.cta-final { text-align: center; }
.cta-final .hero-actions { margin-top: 1.6rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 48px 0 28px;
  font-size: .92rem;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
}
.footer-brand { max-width: 280px; }
.footer-brand .brand { margin-bottom: .6rem; }
.footer-brand p { color: var(--fg-muted); font-size: .9rem; margin: 0; }
.footer-col h4 {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--fg-muted);
  margin: 0 0 .8rem;
}
.footer-col a {
  display: block;
  color: var(--fg-muted);
  margin-bottom: .45rem;
  font-weight: 500;
}
.footer-col a:hover { color: var(--accent); text-decoration: none; }
.footer-bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--fg-muted);
  font-size: .86rem;
}

/* ---------- Sub-page header ---------- */
.page-hero {
  background: linear-gradient(150deg, var(--hero-1), var(--hero-2));
  color: var(--hero-fg);
  padding: 56px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: "";
  position: absolute;
  width: 360px; height: 360px;
  background: var(--glow-blue);
  filter: blur(100px);
  opacity: .35;
  top: -180px; left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; font-size: 2.4rem; }
.page-hero p { color: var(--hero-muted); margin: 0; }

/* ---------- Docs layout (how-to) ---------- */
.docs {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  padding: 56px 0;
}
.docs-toc {
  position: sticky;
  top: 88px;
  align-self: start;
  font-size: .92rem;
}
.docs-toc h4 {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--fg-muted);
  margin: 0 0 .7rem;
}
.docs-toc a {
  display: block;
  color: var(--fg-muted);
  padding: .28rem 0;
  font-weight: 500;
  border-left: 2px solid transparent;
  padding-left: .7rem;
}
.docs-toc a:hover { color: var(--accent); text-decoration: none; }

.docs-body { min-width: 0; }
.docs-body h2 {
  font-size: 1.6rem;
  margin-top: 2.6rem;
  padding-top: .6rem;
  scroll-margin-top: 84px;
}
.docs-body h2:first-child { margin-top: 0; }
.docs-body h3 { margin-top: 1.6rem; font-size: 1.15rem; }
.docs-body ul, .docs-body ol { padding-left: 1.3rem; }
.docs-body li { margin-bottom: .4rem; }
.docs-body img {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin: 1.2rem 0;
}

/* numbered step list */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 1.2rem 0; }
.steps li {
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1rem;
  min-height: 2rem;
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0; top: -2px;
  width: 2rem; height: 2rem;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: .92rem;
}

/* generic data table inside docs/privacy */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0;
  font-size: .95rem;
}
.data-table th, .data-table td {
  text-align: left;
  padding: 10px 14px;
  border: 1px solid var(--border);
  vertical-align: top;
}
.data-table thead th {
  background: var(--bg-alt);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--fg-muted);
}

/* code blocks */
.docs-body pre, .prose pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 1.1rem 0;
  overflow-x: auto;
  font-size: .9rem;
  line-height: 1.55;
}
.docs-body pre code, .prose pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

/* callout box */
.callout {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 1.4rem 0;
}
.callout p { margin: 0; }
.callout strong { color: var(--fg); }

/* ---------- FAQ (support) ---------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.faq summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--accent);
  font-weight: 400;
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-answer { padding: 0 20px 18px; color: var(--fg-muted); }
.faq .faq-answer p:last-child { margin-bottom: 0; }

/* ---------- Support cards ---------- */
.support-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 16px;
}
.support-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow);
}
.support-card .card-icon { margin: 0 auto 14px; }
.support-card h3 { margin-bottom: .4rem; }
.support-card p { color: var(--fg-muted); font-size: .95rem; }

/* ---------- Generic prose page (privacy) ---------- */
.prose { max-width: 760px; margin: 0 auto; padding: 56px 0; }
.prose h2 { font-size: 1.5rem; margin-top: 2.4rem; }
.prose h2:first-of-type { margin-top: 0; }
.prose ul { padding-left: 1.3rem; }
.prose li { margin-bottom: .4rem; }
.prose .updated { color: var(--fg-muted); font-size: .9rem; font-style: italic; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid, .support-grid { grid-template-columns: 1fr 1fr; }
  .showcase-row { grid-template-columns: 1fr; gap: 28px; }
  .showcase-row.flip .showcase-text { order: 0; }
  .docs { grid-template-columns: 1fr; gap: 0; }
  .docs-toc {
    position: static;
    margin-bottom: 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    background: var(--bg-alt);
  }
}
@media (max-width: 680px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .hero h1 { font-size: 2.2rem; }
  .hero { padding: 60px 0 64px; }
  .section { padding: 52px 0; }
  .grid, .support-grid { grid-template-columns: 1fr; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 8px 24px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav-links a:last-of-type { border-bottom: 0; }
  .nav-cta { margin: 12px 0 0; }
  .nav-toggle { display: block; }
  .footer-bottom { flex-direction: column; }
  .compare { font-size: .9rem; }
  .compare th, .compare td { padding: 10px 12px; }
}
