/* AntiXchaos marketing site.
   Large sporting type, high contrast, generous spacing. The palette matches
   the app so that the screenshots do not look borrowed. */

:root {
  --bg: #0b0e13;
  --bg-raised: #151a22;
  --bg-card: #1a2029;
  --line: #262d38;

  --text: #f2f5f9;
  --text-muted: #9aa5b6;

  --lime: #b8ff3c;
  --blue: #3d7bff;
  --blue-deep: #16278a;
  --purple: #c084fc;
  --orange: #ff5e3a;
  --red: #ff3b30;

  --gutter: clamp(20px, 5vw, 64px);
  --section: clamp(72px, 11vw, 148px);
  --radius: 18px;

  --z-nav: 50;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  /* Guards against sideways scrolling: the glow behind the hero is meant
     to overflow the edges. */
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Barlow, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

/* Focus always visible: without it the site cannot be used from a keyboard. */
:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--gutter);
  top: 12px;
  z-index: calc(var(--z-nav) + 10);
  background: var(--lime);
  color: #0b0e13;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
}

/* ---------- Type ---------- */

h1, h2, h3, .kicker, .stat-value {
  font-family: "Barlow Condensed", Barlow, "Helvetica Neue", Arial, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 0.95;
  margin: 0;
  text-transform: uppercase;
}

h1 { font-size: clamp(3.1rem, 11vw, 7.6rem); font-weight: 900; }
h2 { font-size: clamp(2.3rem, 6.2vw, 4.4rem); }
h3 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); letter-spacing: 0; }

p { margin: 0 0 1em; max-width: 62ch; }

.lead {
  font-size: clamp(1.05rem, 2.1vw, 1.4rem);
  color: var(--text-muted);
  line-height: 1.55;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.kicker::before {
  content: "";
  width: 34px;
  height: 4px;
  border-radius: 2px;
  background: var(--lime);
}
.kicker--alert::before { background: var(--red); }

.muted { color: var(--text-muted); }

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: rgba(11, 14, 19, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 68px;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-family: "Barlow Condensed", Barlow, sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.nav__brand:hover { text-decoration: none; }
.nav__brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav__links {
  margin-left: auto;
  display: flex;
  gap: clamp(14px, 3vw, 30px);
  /* min-width: 0 is required: without it the flex item refuses to shrink
     and stretches the page sideways on a phone. */
  min-width: 0;
}
.nav__links a {
  color: var(--text-muted);
  font-size: 0.97rem;
  font-weight: 500;
  /* 44px tall: the smallest comfortable tap target on a phone. */
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.nav__links a:hover { color: var(--text); text-decoration: none; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 28px;
  border: 0;
  border-radius: 14px;
  font-family: Barlow, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }

.btn--primary { background: var(--lime); color: #0b0e13; }
.btn--primary:hover { background: #c8ff63; }

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--line);
}
.btn--ghost:hover { border-color: var(--text-muted); }

.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 9vw, 104px) 0 var(--section);
}
.hero::before {
  content: "";
  position: absolute;
  inset: -40% 40% 55% -25%;
  background: radial-gradient(circle, rgba(61, 123, 255, 0.42), transparent 62%);
  pointer-events: none;
}
.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(44px, 7vw, 76px);
  align-items: center;
}
.hero h1 span { color: var(--lime); display: block; }
.hero .lead { margin-top: 26px; }

.hero__note {
  margin-top: 26px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.phone {
  position: relative;
  width: min(300px, 78vw);
  margin: 0 auto;
  border-radius: 40px;
  padding: 9px;
  background: linear-gradient(160deg, #2b3340, #12161d);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6);
}
.phone img { border-radius: 32px; }

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

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

.section-head { max-width: 46ch; margin-bottom: clamp(38px, 5vw, 62px); }
.section-head p { margin-top: 20px; }

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 34px);
}
.card h3 { margin-bottom: 12px; }
.card p { margin: 0; color: var(--text-muted); }
.card__icon {
  width: 46px;
  height: 46px;
  margin-bottom: 20px;
  color: var(--lime);
}
.card__icon--blue { color: var(--blue); }
.card__icon--orange { color: var(--orange); }

/* Steps. Scoped with .card, otherwise .card p wins on colour and spacing. */
.card .step__num {
  font-family: "Barlow Condensed", Barlow, sans-serif;
  font-size: 3.4rem;
  font-weight: 900;
  line-height: 1;
  color: var(--lime);
  margin: 0 0 12px;
}

/* Numerals */
.stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.stat {
  background: linear-gradient(150deg, var(--blue) 0%, var(--blue-deep) 100%);
  border-radius: var(--radius);
  padding: clamp(26px, 3vw, 36px);
}
.stat-value {
  font-size: clamp(3rem, 7vw, 4.6rem);
  line-height: 0.9;
  color: #fff;
}
.stat-label {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 500;
}
.stat-note {
  margin: 6px 0 0;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.72);
}

/* Screen gallery */
/* Exactly 2 or 3 per row: with auto-fit the six screens fell into 4+2 and
   the last row sat half empty. */
.shots {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(18px, 3vw, 34px);
}
.shot figure { margin: 0; }
.shot img {
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
}
.shot figcaption {
  margin-top: 14px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Privacy block */
.privacy-strip {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(28px, 4vw, 48px);
}
.privacy-strip ul {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}
.privacy-strip li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--text-muted);
}
.privacy-strip li svg { flex: none; width: 22px; height: 22px; color: var(--lime); margin-top: 2px; }

/* Closing call to action */
.final { text-align: center; }
.final .btn-row { justify-content: center; }
.final .section-head { margin-left: auto; margin-right: auto; }

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

.footer {
  border-top: 1px solid var(--line);
  padding: 46px 0;
  color: var(--text-muted);
  font-size: 0.94rem;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
}
.footer__links { margin-left: auto; display: flex; gap: 22px; flex-wrap: wrap; }
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--text); }

/* ---------- Text page (privacy policy) ---------- */

.doc { padding: clamp(48px, 7vw, 92px) 0 var(--section); }
.doc__inner { max-width: 72ch; }
.doc h1 { font-size: clamp(2.6rem, 7vw, 4.4rem); }
.doc h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 52px 0 16px;
  letter-spacing: 0;
}
.doc p, .doc li { color: var(--text-muted); max-width: none; }
.doc strong { color: var(--text); }
.doc ul { padding-left: 22px; display: grid; gap: 10px; margin: 0 0 1em; }
.doc__meta {
  margin-top: 22px;
  font-size: 0.95rem;
  color: var(--text-muted);
}
/* Contact card: on the support page this is what people look for first. */
.contact-card {
  margin: 34px 0 8px;
  padding: clamp(24px, 3.5vw, 34px);
  background: linear-gradient(150deg, var(--blue) 0%, var(--blue-deep) 100%);
  border-radius: var(--radius);
}
.contact-card__label {
  margin: 0;
  font-family: "Barlow Condensed", Barlow, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}
/* The address is one long unbreakable string that people read off the screen.
   The size is chosen so it fits on one line on a desktop; on a narrow screen
   it breaks at the <wbr> after the @, never in the middle of a word. */
.contact-card__value {
  margin: 10px 0 0;
  font-size: clamp(1.05rem, 2.6vw, 1.45rem);
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.contact-card__value a { color: #fff; }
.contact-card__note {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.97rem;
}

/* Template for a bug report: monospaced so it gets copied verbatim. */
.snippet {
  margin: 0 0 1em;
  padding: 20px 22px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92rem;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.doc .faq__q {
  margin: 38px 0 10px;
  color: var(--text);
  text-transform: none;
  letter-spacing: -0.01em;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1em;
}
.doc th, .doc td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.doc th { color: var(--text); font-weight: 600; }
.doc td { color: var(--text-muted); }

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

/* On a narrow screen the header keeps only two links: four do not fit and
   break the page width. */
@media (max-width: 639px) {
  /* Scoped with .nav__links: that rule has higher specificity and would
     otherwise override a bare .nav__hide-sm with display: inline-flex. */
  .nav__links a.nav__hide-sm { display: none; }
  .nav__links { gap: 16px; }
  .nav__brand { font-size: 1.25rem; }
}

@media (min-width: 700px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 960px) {
  .hero__grid { grid-template-columns: 1.05fr 0.95fr; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .shots { grid-template-columns: repeat(3, 1fr); }
  .phone { width: min(340px, 40vw); }
}

/* Respect the system setting: animation is switched off entirely. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .btn:hover { transform: none; }
}
