/* Go2 public site
   Single stylesheet, no framework, light and dark via colour-scheme.
   Placeholder brand: "Go2" is a working name, not a registered trademark. */

:root {
  --bg: #ffffff;
  --bg-alt: #f7f8fa;
  --bg-elevated: #ffffff;
  --text: #16191d;
  --text-muted: #5c6570;
  --text-faint: #858e99;
  --border: #e3e6ea;
  --border-strong: #cfd4da;
  --accent: #1f5fd8;
  --accent-hover: #1a51b8;
  --accent-soft: #eef3fd;
  --accent-contrast: #ffffff;
  --max-width: 1140px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 4px 16px rgba(16, 24, 40, 0.08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1116;
    --bg-alt: #14181f;
    --bg-elevated: #171c24;
    --text: #eef1f5;
    --text-muted: #a3adb9;
    --text-faint: #6f7883;
    --border: #262c35;
    --border-strong: #333b46;
    --accent: #6ea0ff;
    --accent-hover: #8ab4ff;
    --accent-soft: #16203a;
    --accent-contrast: #0e1116;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.45);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  line-height: 1.2;
  letter-spacing: -0.021em;
  font-weight: 700;
}

h1 { font-size: clamp(2.25rem, 5.2vw, 3.75rem); letter-spacing: -0.032em; }
h2 { font-size: clamp(1.65rem, 3.2vw, 2.25rem); }
h3 { font-size: 1.1875rem; }
h4 { font-size: 0.9375rem; }

p { margin: 0 0 1rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: var(--mono);
  font-size: 0.875em;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 0.75rem 1.25rem;
  z-index: 100;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    color 0.15s ease, transform 0.1s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--accent); color: var(--accent-contrast); }
.btn-primary:hover { background: var(--accent-hover); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--bg-alt); border-color: var(--text-faint); }

.btn-lg { padding: 0.8125rem 1.5rem; font-size: 1rem; }

/* ---------- 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(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1875rem;
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #7c3aed));
  position: relative;
  flex-shrink: 0;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0.4375rem 0.375rem 0.4375rem 0.375rem;
  border-radius: 2px;
  background: var(--accent-contrast);
  opacity: 0.95;
  clip-path: polygon(0 40%, 38% 40%, 38% 0, 62% 0, 62% 60%, 100% 60%, 100% 100%, 0 100%);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.site-nav a {
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
}
.site-nav a:hover { color: var(--text); text-decoration: none; }
.site-nav .btn { color: var(--text); }
.site-nav .btn-primary { color: var(--accent-contrast); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 1.5rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.mobile-nav a {
  padding: 0.6875rem 0;
  color: var(--text);
  font-weight: 500;
}
.mobile-nav .btn { margin-top: 0.5rem; justify-content: center; }

@media (max-width: 780px) {
  .site-nav { display: none; }
  .nav-toggle { display: flex; }
  .mobile-nav[data-open="true"] { display: flex; }
}

/* ---------- Hero ---------- */

.hero {
  padding: clamp(4rem, 10vw, 7.5rem) 0 clamp(3rem, 7vw, 5rem);
  background:
    radial-gradient(60rem 30rem at 50% -12rem, var(--accent-soft), transparent 70%),
    var(--bg);
  text-align: center;
}
.hero .container { max-width: 52rem; }

.eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.3125rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.hero h1 { margin-bottom: 1.25rem; }

.lede {
  font-size: clamp(1.0625rem, 1.8vw, 1.1875rem);
  color: var(--text-muted);
  max-width: 40rem;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-note {
  margin-top: 1.75rem;
  font-size: 0.875rem;
  color: var(--text-faint);
}

/* ---------- Sections ---------- */

.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }

.section > .container > h2 { margin-bottom: 0.75rem; }

.section-lede {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 44rem;
  margin-bottom: 2.5rem;
}

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.card p { margin: 0; color: var(--text-muted); font-size: 0.9375rem; }
.card h3 { margin-bottom: 0.375rem; }

/* ---------- Steps ---------- */

.steps {
  display: grid;
  gap: 1.75rem;
  max-width: 46rem;
  margin-left: auto;
  margin-right: auto;
}
.step { display: flex; gap: 1.125rem; align-items: flex-start; }
.step-num {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.9375rem;
}
.step h3 { margin-bottom: 0.25rem; }
.step p { margin: 0; color: var(--text-muted); }

/* ---------- Alias demo ---------- */

.alias-demo {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  max-width: 42rem;
  /* Centred within the section: without this the block sat hard against the
     left edge of the container. */
  margin-left: auto;
  margin-right: auto;
}
.alias-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.75rem 0;
}
.alias-row + .alias-row { border-top: 1px dashed var(--border); }
.alias-label {
  flex-shrink: 0;
  width: 13rem;
  font-size: 0.8125rem;
  color: var(--text-faint);
}
.alias-row code {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 0.25rem 0.5rem;
  border-radius: 5px;
  word-break: break-all;
}
.alias-arrow {
  text-align: center;
  padding: 0.875rem 0;
  font-size: 0.8125rem;
  color: var(--text-faint);
  letter-spacing: 0.03em;
}
.alias-target code { border-color: var(--accent); color: var(--accent); }

@media (max-width: 640px) {
  .alias-label { width: 100%; }
}

/* ---------- Pricing ---------- */

.price-card { display: flex; flex-direction: column; }
.price { margin: 0.25rem 0 0.75rem; }
.price-value {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-faint);
}
.price-note { margin-top: auto; }

.pricing-disclaimer {
  margin-top: 1.75rem;
  padding: 1rem 1.25rem;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  color: var(--text-muted);
}
.pricing-disclaimer strong { color: var(--text); }

/* ---------- Contact form ---------- */

.contact-form {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  max-width: 42rem;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.field { margin-bottom: 1rem; }
.field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}
.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.625rem 0.75rem;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: #d92d20;
  box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.12);
}

/* "Optional" is part of the label, not a tooltip. A visitor deciding whether to
   give up their employer's name should not have to submit the form to find out
   that it was never required. */
.field-optional {
  font-weight: 400;
  color: var(--text-muted, var(--text));
  opacity: 0.75;
}

.form-status {
  margin: 1rem 0 0;
  font-size: 0.9375rem;
  min-height: 1.25rem;
}
.form-status[data-kind="error"] { color: #d92d20; }
.form-status[data-kind="ok"] { color: #067647; }

.form-note {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--text-faint);
}
.form-note strong { color: var(--text-muted); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 3rem 0 1.5rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
}
.footer-tag { color: var(--text-faint); font-size: 0.875rem; margin: 0.5rem 0 0; }
.footer-col h4 {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  margin-bottom: 0.75rem;
}
.footer-col a {
  display: block;
  color: var(--text-muted);
  font-size: 0.9375rem;
  padding: 0.1875rem 0;
}
.footer-col a:hover { color: var(--text); }

.footer-legal {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}
.footer-legal p { margin: 0; font-size: 0.8125rem; color: var(--text-faint); }

@media (max-width: 640px) {
  .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
}
/* ---------- Figures ---------- */

/* These live here rather than in docs.css because the public home page loads
   this file only. Without them a <figure> gets the browser's default 40px side
   margin and a left-aligned caption. */
.figure {
  margin: 2rem auto;
}

.figure-wide {
  max-width: 50rem;
}

.figure-sm {
  max-width: 20rem;
}

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

.figure figcaption {
  margin-top: 0.875rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-faint);
  text-align: center;
  text-wrap: balance;
}

/* A section whose content is centred needs a centred heading too, otherwise the
   heading visibly disagrees with everything beneath it. */
.section-centered {
  text-align: center;
}

.section-centered .section-lede {
  margin-left: auto;
  margin-right: auto;
}

/* Numbered steps read as a list, so they stay left-aligned. */
.section-centered .steps {
  text-align: left;
}

/* ---------- QR feature split ---------- */

.qr-split {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 3rem;
  align-items: center;
}

.qr-copy h2 { margin-bottom: 0.875rem; }
.qr-copy .section-lede { margin-bottom: 1.5rem; }

.feature-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}
.feature-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 2px;
  background: var(--accent);
}

.qr-note {
  font-size: 0.875rem;
  color: var(--text-faint);
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.qr-pair {
  margin: 0;
  text-align: center;
  justify-self: center;
  width: 100%;
}
.qr-pair figcaption {
  margin-top: 0.875rem;
  font-size: 0.875rem;
  color: var(--text-faint);
}

.qr-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.qr-variant img {
  background: #ffffff;
  padding: 0.625rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  display: block;
  width: 100%;
  height: auto;
}

.qr-variant-label {
  margin: 0.625rem 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.qr-pair figcaption {
  grid-column: 1 / -1;
}

@media (max-width: 860px) {
  .qr-split {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}
