/*
 * GatewayWatch — marketing site.
 *
 * Hand-written, no framework and no build step: a landing page that a solo
 * maintainer has to keep alive for years is better served by 400 lines of CSS
 * than by a toolchain that needs upgrading.
 *
 * The look is deliberately technical rather than "modern SaaS". The audience
 * is developers and agency owners who see three gradient-and-blob landing
 * pages a week; the thing that earns their trust is being shown the actual
 * product output, in the typeface it actually arrives in.
 */

:root {
  --bg: #0b0d10;
  --bg-raised: #12151a;
  --bg-inset: #0f1216;
  --border: #232830;
  --border-soft: #1a1e25;

  --text: #e8eaed;
  --text-muted: #98a1ae;
  --text-faint: #6b7482;

  --accent: #4ea1ff;
  --accent-dim: #1d4d80;
  --danger: #ff6b6b;
  --warn: #ffbe5c;
  --ok: #56d364;

  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;

  --max: 1060px;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ---------------------------------------------------------------- header */

header {
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  background: rgba(11, 13, 16, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 650;
  font-size: 17px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.logo:hover { text-decoration: none; }
.logo svg { display: block; }

.nav { display: flex; align-items: center; gap: 26px; }
.nav a { color: var(--text-muted); font-size: 15px; }
.nav a:hover { color: var(--text); text-decoration: none; }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 550;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--accent);
  color: #06121f;
  font-weight: 600;
}
.btn-primary:hover { background: #6fb4ff; }

.btn-ghost {
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: #39414d; background: var(--bg-raised); }

.btn-lg { padding: 14px 26px; font-size: 16px; }

/* ---------------------------------------------------------------- hero */

.hero { padding: 88px 0 64px; }

.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-faint);
  letter-spacing: 0.02em;
  margin: 0 0 20px;
}

h1 {
  font-size: clamp(38px, 6vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 660;
  margin: 0 0 22px;
  max-width: 17ch;
}

.lede {
  font-size: 20px;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 60ch;
  margin: 0 0 34px;
}

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.cta-note {
  font-size: 14px;
  color: var(--text-faint);
  margin: 16px 0 0;
}

/* ---------------------------------------------------------------- sections */

section { padding: 76px 0; border-top: 1px solid var(--border-soft); }

h2 {
  font-size: clamp(27px, 3.4vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 640;
  margin: 0 0 14px;
  max-width: 22ch;
}

.section-lede {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 62ch;
  margin: 0 0 40px;
}

/* ---------------------------------------------------------------- email */

.email {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 720px;
}

.email-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-inset);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-faint);
}
.email-subject {
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  margin-top: 6px;
}

.email-body { padding: 24px 20px; }

.email-body h3 {
  margin: 0 0 12px;
  font-size: 21px;
  letter-spacing: -0.01em;
  font-weight: 620;
}

.email-body p { margin: 0 0 18px; color: var(--text-muted); font-size: 16px; }

.email-body .label {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin: 0 0 10px;
}

.email-body ol { margin: 0; padding-left: 20px; color: var(--text-muted); }
.email-body li { margin-bottom: 9px; font-size: 15.5px; }

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--bg-inset);
  border: 1px solid var(--border-soft);
  padding: 1px 5px;
  border-radius: 4px;
  color: #cfd6e0;
}

.contrast {
  margin: 34px 0 0;
  padding: 18px 20px;
  border-left: 2px solid var(--accent-dim);
  background: var(--bg-inset);
  border-radius: 0 8px 8px 0;
  max-width: 720px;
}
.contrast p { margin: 0; color: var(--text-muted); font-size: 16px; }
.contrast strong { color: var(--text); }

/* ---------------------------------------------------------------- shot */

.shot {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-raised);
}
.shot img { display: block; width: 100%; height: auto; }

/* ---------------------------------------------------------------- steps */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
  counter-reset: step;
}
.step { counter-increment: step; }
.step::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.step h3 { margin: 0 0 7px; font-size: 17px; font-weight: 600; }
.step p { margin: 0; color: var(--text-muted); font-size: 15.5px; }

/* ---------------------------------------------------------------- detects */

.detects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.detect { background: var(--bg); padding: 20px 22px; }
.detect h3 {
  margin: 0 0 6px;
  font-size: 15.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 9px;
}
.detect p { margin: 0; color: var(--text-muted); font-size: 14.5px; line-height: 1.5; }

.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dot-danger { background: var(--danger); }
.dot-warn { background: var(--warn); }
.dot-ok { background: var(--ok); }

/* ---------------------------------------------------------------- privacy */

.privacy-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 26px;
  margin-top: 8px;
}
.privacy-col {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  background: var(--bg-raised);
}
.privacy-col h3 {
  margin: 0 0 14px;
  font-size: 14px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  font-weight: 500;
}
.privacy-col ul { margin: 0; padding: 0; list-style: none; }
.privacy-col li {
  font-family: var(--mono);
  font-size: 14px;
  padding: 5px 0;
  color: var(--text-muted);
}
.privacy-col li::before { margin-right: 9px; }
.sends li::before { content: "+"; color: var(--ok); }
.never li::before { content: "\00d7"; color: var(--danger); }

/* ---------------------------------------------------------------- pricing */

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  gap: 18px;
  align-items: start;
}
.plan {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  background: var(--bg-raised);
}
.plan.featured { border-color: var(--accent-dim); }
.plan-name {
  font-size: 14px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  margin: 0 0 12px;
}
.plan-price {
  font-size: 32px;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}
.plan-price span { font-size: 15px; font-weight: 400; color: var(--text-faint); }
.plan-limit { margin: 0 0 20px; color: var(--text-muted); font-size: 15px; }
.plan .btn { width: 100%; text-align: center; }

.pricing-note {
  margin: 30px 0 0;
  font-size: 15px;
  color: var(--text-faint);
  max-width: 60ch;
}

/* ---------------------------------------------------------------- final */

.final { text-align: center; }
.final h2 { margin-left: auto; margin-right: auto; }
.final .section-lede { margin-left: auto; margin-right: auto; }
.final .hero-cta { justify-content: center; }

/* ---------------------------------------------------------------- footer */

footer {
  border-top: 1px solid var(--border-soft);
  padding: 36px 0;
  color: var(--text-faint);
  font-size: 14.5px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.footer-inner a { color: var(--text-muted); }

/* ---------------------------------------------------------------- responsive */

@media (max-width: 680px) {
  body { font-size: 16px; }
  .hero { padding: 56px 0 44px; }
  section { padding: 56px 0; }
  .nav { display: none; }
  .lede { font-size: 18px; }
}

/* Respect a reader who has asked for less motion. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ================================================================ docs */

.doc { padding: 56px 0 80px; }

.doc-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 52px;
  align-items: start;
}

.doc-toc { position: sticky; top: 92px; }
.doc-toc-title {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin: 0 0 12px;
}
.doc-toc nav { display: flex; flex-direction: column; gap: 9px; }
.doc-toc a {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.35;
  border-left: 2px solid var(--border-soft);
  padding-left: 12px;
}
.doc-toc a:hover { color: var(--text); border-left-color: var(--accent-dim); text-decoration: none; }

.doc-body { max-width: 68ch; }
.doc-body h1 {
  font-size: clamp(30px, 4vw, 40px);
  max-width: none;
  margin-bottom: 14px;
}
.doc-body .lede { font-size: 18px; margin-bottom: 40px; }

.doc-body h2 {
  font-size: 22px;
  max-width: none;
  margin: 44px 0 12px;
  padding-top: 22px;
  border-top: 1px solid var(--border-soft);
  scroll-margin-top: 88px;
}
.doc-body h3 {
  font-size: 17px;
  margin: 26px 0 8px;
  scroll-margin-top: 88px;
}
.doc-body p { color: var(--text-muted); margin: 0 0 16px; }
.doc-body ul { color: var(--text-muted); padding-left: 20px; margin: 0 0 18px; }
.doc-body li { margin-bottom: 8px; }

.doc-rule { border: none; border-top: 1px solid var(--border-soft); margin: 48px 0 22px; }
.doc-foot { color: var(--text-faint); font-size: 15px; }

/* ================================================================ contact */

.contact-section { padding: 72px 0 88px; }

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}

.contact-title { font-size: clamp(34px, 5vw, 46px); margin-bottom: 18px; }
.contact-aside {
  margin-top: 24px;
  padding: 16px 18px;
  border-left: 2px solid var(--accent-dim);
  background: var(--bg-inset);
  border-radius: 0 8px 8px 0;
  color: var(--text-muted);
  font-size: 15.5px;
}

.form { display: flex; flex-direction: column; gap: 18px; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 14.5px; font-weight: 550; color: var(--text); }
.field .opt { color: var(--text-faint); font-weight: 400; }

.field input,
.field textarea {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 13px;
  color: var(--text);
  font-family: inherit;
  font-size: 15.5px;
  width: 100%;
  transition: border-color 0.15s;
}
.field textarea { resize: vertical; min-height: 130px; line-height: 1.55; }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 3px rgba(78, 161, 255, 0.12);
}
.field input::placeholder { color: var(--text-faint); }

/* Off-screen rather than display:none — some bots skip hidden inputs, and a
   honeypot only works if it looks fillable. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form button { align-self: flex-start; }
.form button:disabled { opacity: 0.6; cursor: default; }

.form-status { margin: 0; font-size: 15px; color: var(--text-muted); min-height: 22px; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--danger); }

@media (max-width: 860px) {
  .doc-layout { grid-template-columns: 1fr; gap: 30px; }
  .doc-toc { position: static; }
  .doc-toc nav { flex-direction: row; flex-wrap: wrap; gap: 8px 16px; }
  .doc-toc a { border-left: none; padding-left: 0; }
  .contact-layout { grid-template-columns: 1fr; gap: 38px; }
}

/* Tables and quotes inside the guide. The troubleshooting table is the one
   place the source markdown uses either. */

.doc-body blockquote {
  margin: 0 0 20px;
  padding: 14px 18px;
  border-left: 2px solid var(--accent-dim);
  background: var(--bg-inset);
  border-radius: 0 8px 8px 0;
}
.doc-body blockquote p { margin: 0; font-size: 15.5px; }

.doc-table { overflow-x: auto; margin: 0 0 22px; }
.doc-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 460px;
}
.doc-table th,
.doc-table td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}
.doc-table th {
  font-size: 12px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  font-weight: 500;
  border-bottom-color: var(--border);
}
.doc-table td { color: var(--text-muted); }
.doc-table tr:last-child td { border-bottom: none; }
