/* SentryCaptcha landing page.
   No external fonts or assets: the page must practise what it preaches. */

:root {
  --bg: #ffffff;
  --bg-alt: #f6f8fa;
  --text: #1f2328;
  --muted: #57606a;
  --line: #d8dee4;
  --accent: #1f6feb;
  --accent-dark: #1a5fce;
  --ok: #1a7f37;
  --radius: 10px;
  --wrap: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --bg-alt: #161b22;
    --text: #e6edf3;
    --muted: #9198a1;
    --line: #30363d;
    --accent: #4493f8;
    --accent-dark: #58a6ff;
    --ok: #3fb950;
  }
}

/* Language switching: both languages live in the DOM with real lang
   attributes; only the active one is displayed. */
html[data-lang="en"] [lang="es"],
html[data-lang="es"] [lang="en"] { display: none !important; }

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; }
h2 { font-size: 30px; margin: 0 0 10px; }
h3 { font-size: 18px; margin: 0 0 8px; }

code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* --- Header --- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 62px; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 17px; color: var(--text); text-decoration: none;
}
.brand svg { width: 22px; height: 22px; fill: var(--accent); }
.site-header nav {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.site-header nav a {
  color: var(--muted); text-decoration: none; font-size: 15px;
}
.site-header nav a:hover { color: var(--text); }
.site-header nav a.nav-cta {
  color: var(--accent); font-weight: 600;
}

.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-switch button {
  border: 0; background: transparent; color: var(--muted);
  padding: 4px 11px; font-size: 12px; font-weight: 700; cursor: pointer;
  font-family: inherit;
}
.lang-switch button[aria-pressed="true"] { background: var(--accent); color: #fff; }

/* --- Hero --- */
.hero { padding: 72px 0 56px; border-bottom: 1px solid var(--line); }
.hero-grid {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 44px; align-items: start;
}
.eyebrow {
  margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent);
}
.hero h1 { font-size: 46px; margin: 0 0 18px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { font-size: 19px; color: var(--muted); margin: 0 0 26px; }

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.btn {
  display: inline-block; padding: 11px 20px; border-radius: 8px;
  font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; font-family: inherit;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
/* background is explicit: a <button> would otherwise take the UA default,
   which is near-white and hides light text in dark mode. */
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--bg-alt); }

.ticks { list-style: none; margin: 0; padding: 0; color: var(--muted); font-size: 15px; }
.ticks li { position: relative; padding-left: 26px; margin-bottom: 7px; }
.ticks li::before {
  content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700;
}

.hero-card {
  background: var(--bg-alt); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; font-size: 15px;
  color: var(--muted);
}
.hero-card p { margin: 0 0 10px; }
.hero-card p:last-child { margin-bottom: 0; }
.hero-card-title { color: var(--text); font-weight: 700; }

/* --- Sections --- */
.section { padding: 62px 0; }
.section.alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section-lead { color: var(--muted); font-size: 17px; margin: 0 0 26px; }

/* --- Demo --- */
.demo-form {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; max-width: 420px;
}
.demo-form label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 16px; }
.demo-form input[type="email"] {
  display: block; width: 100%; margin-top: 6px; padding: 9px 10px;
  font: inherit; font-size: 15px; font-weight: 400;
  border: 1px solid var(--line); border-radius: 7px;
  background: var(--bg); color: var(--text);
}
.demo-form button { margin-top: 16px; width: 100%; }

.demo-slot {
  border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 18px; text-align: center;
}
.demo-slot button { width: 100%; }
.demo-note { margin: 10px 0 0; font-size: 13px; color: var(--muted); }

.demo-result {
  margin-top: 18px; padding: 12px 14px; max-width: 420px;
  border: 1px solid var(--ok); border-radius: 8px;
  color: var(--ok); font-size: 14px;
}
.demo-result code { word-break: break-all; }

/* --- Feature cards --- */
.cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px; margin-top: 26px;
}
.card {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
}
.card p { margin: 0; color: var(--muted); font-size: 15px; }

/* --- Steps --- */
.steps { counter-reset: step; list-style: none; margin: 26px 0; padding: 0; }
.steps li {
  counter-increment: step; position: relative;
  padding: 0 0 20px 46px; border-left: 2px solid var(--line);
  margin-left: 15px;
}
.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps li::before {
  content: counter(step); position: absolute; left: -16px; top: -2px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 14px; font-weight: 700;
  display: grid; place-items: center;
}
.steps code {
  display: inline-block; background: var(--bg-alt); border: 1px solid var(--line);
  border-radius: 6px; padding: 2px 8px; font-size: 14px; margin-bottom: 4px;
}
.steps span { display: block; color: var(--muted); }

.callout {
  background: var(--bg-alt); border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0; padding: 14px 16px; margin: 0; color: var(--muted);
}
.callout strong { color: var(--text); }

/* --- Code blocks --- */
pre {
  background: var(--bg-alt); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; overflow-x: auto;
  font-size: 13.5px; line-height: 1.6; margin: 0 0 26px;
}

/* --- Footer --- */
.site-footer { border-top: 1px solid var(--line); padding: 26px 0; font-size: 14px; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.site-footer p { margin: 0; }

@media (max-width: 820px) {
  .hero { padding: 46px 0 38px; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero h1 { font-size: 34px; }
  .lead { font-size: 17px; }
  h2 { font-size: 25px; }
  .section { padding: 46px 0; }
}
