/* S3Access marketing site. Dark-only: <html class="dark"> activates the dark
   values in tokens.css, and everything below paints with var(--gm-*). */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--gm-text);
  background: var(--gm-bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0 0 1em; }

a { color: var(--gm-primary); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--gm-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

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

.btn {
  border: 0;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border-radius: 0.6rem;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}

.btn-primary {
  background: var(--gm-cta);
  color: #0b1220;
}
.btn-primary:hover { background: var(--gm-cta-hover); }

.btn-ghost {
  color: var(--gm-text);
  border: 1px solid var(--gm-border-strong);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--gm-primary); color: var(--gm-primary); }

.btn-sm { padding: 0.5rem 1rem; font-size: 0.9rem; }

/* ---- Nav ---- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--gm-bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gm-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.nav-wordmark {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--gm-text);
  letter-spacing: -0.01em;
}

/* BRAND.md: on dark backgrounds the mark sits on a white chip, never recoloured */
.mark-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.55rem;
  background: #ffffff;
  box-shadow: var(--gm-elev-1);
}
.mark-chip-sm { width: 1.7rem; height: 1.7rem; border-radius: 0.45rem; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-links > a:not(.btn) {
  color: var(--gm-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 200ms ease;
}
.nav-links > a:not(.btn):hover { color: var(--gm-text); }

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

.hero {
  position: relative;
  overflow: hidden;
  padding: 5rem 0 4rem;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 32rem;
  background: radial-gradient(42rem 22rem at 70% 20%, rgba(78, 163, 217, 0.14), transparent 70%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: var(--gm-primary-weak);
  color: var(--gm-primary-on);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
}

.lede {
  font-size: 1.15rem;
  color: var(--gm-muted);
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.8rem;
}

.hero-note {
  margin-top: 1.2rem;
  font-size: 0.9rem;
  color: var(--gm-subtle);
}

/* ---- Terminal mockup ---- */

.term {
  background: var(--gm-surface);
  border: 1px solid var(--gm-border);
  border-radius: 1rem;
  box-shadow: var(--gm-elev-4);
  overflow: hidden;
  font-size: 0.85rem;
}

.term-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--gm-border);
}
.term-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--gm-text);
}
.term-top-right { display: inline-flex; gap: 0.5rem; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: var(--gm-surface-2);
  border: 1px solid var(--gm-border);
  color: var(--gm-muted);
  font-weight: 600;
  font-size: 0.78rem;
}
/* green = positive status only (Synced), per BRAND.md */
.chip-success {
  background: var(--gm-success-weak);
  border-color: transparent;
  color: var(--gm-success-on);
}

.term-community {
  padding: 0.5rem 1rem;
  background: var(--gm-surface-2);
  border-bottom: 1px solid var(--gm-border);
  color: var(--gm-primary);
  font-weight: 600;
}

.term-body { padding: 1.1rem 1rem 1.2rem; }
.term-h { font-size: 1.25rem; font-weight: 800; color: var(--gm-text); }
.term-sub { color: var(--gm-muted); margin-bottom: 0.9rem; }

.term-controls { display: flex; gap: 0.6rem; margin-bottom: 0.9rem; }
.term-search {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--gm-border-strong);
  border-radius: 0.55rem;
  color: var(--gm-subtle);
  white-space: nowrap;
  overflow: hidden;
}
.term-scan {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--gm-primary);
  border-radius: 0.55rem;
  color: var(--gm-primary);
  font-weight: 600;
  white-space: nowrap;
}

.term-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--gm-border);
  border-radius: 0.7rem;
  overflow: hidden;
}
.term-rows li {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 0.9rem;
}
.term-rows li + li { border-top: 1px solid var(--gm-border); }
.term-rows strong { display: block; color: var(--gm-text); font-size: 0.95rem; }
.term-rows small { color: var(--gm-muted); }
.term-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.5rem;
  background: var(--gm-primary-weak);
  color: var(--gm-primary);
  flex-shrink: 0;
}

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

.section { padding: 4.5rem 0; }
.section-alt {
  background: var(--gm-surface-2);
  border-top: 1px solid var(--gm-border);
  border-bottom: 1px solid var(--gm-border);
}
.section h2 { text-align: center; }
.section-lede {
  text-align: center;
  color: var(--gm-muted);
  max-width: 38rem;
  margin: 0 auto 2.5rem;
}

.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.card {
  background: var(--gm-surface);
  border: 1px solid var(--gm-border);
  border-radius: 0.9rem;
  box-shadow: var(--gm-elev-2);
  padding: 1.6rem;
  transition: border-color 200ms ease;
}
.card:hover { border-color: var(--gm-border-strong); }

.card-icon, .feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 0.7rem;
  background: var(--gm-primary-weak);
  color: var(--gm-primary);
  margin-bottom: 1rem;
}

.card p { color: var(--gm-muted); font-size: 0.95rem; }

.card-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  font-size: 0.92rem;
}
.card-list li {
  position: relative;
  padding: 0.25rem 0 0.25rem 1.4rem;
  color: var(--gm-text);
}
.card-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: var(--gm-primary);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.feature {
  background: var(--gm-surface);
  border: 1px solid var(--gm-border);
  border-radius: 0.9rem;
  padding: 1.4rem;
  transition: border-color 200ms ease;
}
.feature:hover { border-color: var(--gm-border-strong); }
.feature p { color: var(--gm-muted); font-size: 0.92rem; margin: 0; }

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

.contact-card {
  text-align: center;
  background: var(--gm-surface);
  border: 1px solid var(--gm-border);
  border-radius: 1.2rem;
  box-shadow: var(--gm-elev-3);
  padding: 3.5rem 1.5rem;
  max-width: 44rem;
  margin: 0 auto;
}
.contact-card p { color: var(--gm-muted); max-width: 30rem; margin: 0 auto 1.6rem; }
.contact-email { margin-top: 1.4rem; font-size: 0.95rem; }

/* ---- Demo request dialog ---- */

.demo-dialog {
  width: min(26rem, calc(100vw - 2rem));
  padding: 2rem;
  border: 1px solid var(--gm-border-strong);
  border-radius: 1rem;
  background: var(--gm-surface);
  color: var(--gm-text);
  box-shadow: var(--gm-elev-4);
}
.demo-dialog::backdrop {
  background: rgba(4, 8, 16, 0.6);
  backdrop-filter: blur(4px);
}

.demo-dialog-title { font-size: 1.4rem; margin-bottom: 0.3em; }
.demo-dialog-sub { color: var(--gm-muted); font-size: 0.95rem; margin-bottom: 1.4rem; }

.field { margin-bottom: 1rem; }
.field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.field input {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border-radius: 0.55rem;
  border: 1px solid var(--gm-border-strong);
  background: var(--gm-surface-2);
  color: var(--gm-text);
  font: inherit;
}
.field input:focus-visible {
  outline: 2px solid var(--gm-primary);
  outline-offset: 1px;
}

/* Honeypot: hidden from humans, present for bots */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-error { color: var(--gm-danger); font-size: 0.9rem; margin: 0; }
.form-error a { color: var(--gm-primary); }
.form-actions {
  display: flex;
  gap: 0.7rem;
  justify-content: flex-end;
  margin-top: 1.3rem;
}

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

.footer {
  border-top: 1px solid var(--gm-border);
  padding: 2.2rem 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
}
.footer-links { display: inline-flex; gap: 1.4rem; }
.footer-links a {
  color: var(--gm-muted);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 200ms ease;
}
.footer-links a:hover { color: var(--gm-text); }
.footer-copy { margin: 0; color: var(--gm-subtle); font-size: 0.85rem; }

/* ---- Responsive ---- */

@media (max-width: 900px) {
  .hero { padding: 3.5rem 0 3rem; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .cards-3, .cards-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav-links { gap: 0.9rem; }
  .nav-links > a:not(.btn) { display: none; }
  .cards-3, .cards-grid { grid-template-columns: 1fr; }
  .section { padding: 3.2rem 0; }
}

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