/*
 * gangify.net, the marketing site. Two pages, hand-written CSS, no framework.
 *
 * ---------------------------------------------------------------------------------------------
 * THE OVERFLOW RULES. Read these before adding anything.
 * ---------------------------------------------------------------------------------------------
 *
 * Three separate bugs produced "white bars at the edges" and a page that scrolled sideways. All
 * three were something creating scrollable area beyond what any element paints:
 *
 *   1. `.skip { left: -9999px }`. The classic off-screen trick for a skip link EXTENDS THE
 *      SCROLLABLE REGION nine thousand pixels to the left. The page then scrolls sideways into
 *      empty, unpainted canvas. It is visually hidden with `clip-path` now, which takes the
 *      element out of the paint but leaves it exactly where it is in layout, so it adds nothing
 *      to scroll.
 *   2. A background on an element that also had `max-width` and `margin: auto`. A constrained
 *      element cannot paint to the viewport edge. Sections paint and are always full width; the
 *      inner `.wrap` measures and never paints. Never both on one element.
 *   3. Relying on background propagation from body to the page canvas. html, body and every
 *      structural block now carry the colour explicitly.
 *
 * `overflow-x: hidden` on BOTH html and body is the backstop, not the fix. If you ever see a
 * horizontal scrollbar again, something is genuinely too wide; find it rather than adding more
 * hiding.
 */

:root {
  --bg: #ffffff;
  --bg-alt: #f4f6f7;
  --ink: #10151a;
  --muted: #57626c;
  --line: #e4e8eb;
  --accent: #00715a;
  --accent-ink: #ffffff;
  --accent-soft: #e6f2ef;
  --max: 64rem;
  --radius: 14px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1012;
    --bg-alt: #14181b;
    --ink: #e9ecee;
    --muted: #9aa4ac;
    --line: #232a2f;
    --accent: #35b190;
    --accent-ink: #06120e;
    --accent-soft: #12241f;
  }
}

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

html {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  padding: 0;
  /* No `width: 100%`. A block element already fills its parent, and an explicit width is one
     more thing that can disagree with a scrollbar and produce overflow. */
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  /* A single long unbroken string (a URL, an email) would otherwise push the page wider than
     the viewport, which is the most common cause of an unexplained sideways scroll. */
  overflow-wrap: break-word;
}

main,
.site-head,
.site-foot,
.s { background-color: var(--bg); }

.s.alt { background-color: var(--bg-alt); }

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

a:focus-visible,
.btn:focus-visible,
.skip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/*
 * Skip link, hidden without leaving the document flow or extending the scroll region.
 *
 * `clip-path: inset(50%)` removes it from the paint while it stays at 1x1 px where it already
 * sits. The old `left: -9999px` is what made the whole page scroll sideways into blank canvas.
 */
.skip {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  font-weight: 600;
  z-index: 10;
}
.skip:focus {
  position: static;
  display: inline-block;
  width: auto;
  height: auto;
  padding: 0.6rem 1rem;
  clip-path: none;
  overflow: visible;
}

/* ---- layout primitives -------------------------------------------------------------------- */

/* Paints. Always full width. Never constrained, never centred. */
.s { padding: 4rem 0; }
.s.tight { padding: 2.5rem 0; }
.s + .s.alt,
.s.alt + .s { border-top: 1px solid var(--line); }

/* Measures. Never paints. */
.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

@media (max-width: 40rem) {
  .s { padding: 3rem 0; }
  .wrap { padding-inline: 1.15rem; }
}

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

/*
 * NOT sticky. A sticky header on a two-page brochure buys nothing and is one more element whose
 * containing block and stacking context have to be reasoned about at every viewport.
 */
.site-head { border-bottom: 1px solid var(--line); }
.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-block: 0.9rem;
}
.brand { display: inline-flex; flex: 0 0 auto; }
.brand img { height: 26px; width: auto; }
.site-head nav { display: flex; gap: 1.4rem; flex: 1 1 auto; flex-wrap: wrap; }
.site-head nav a { color: var(--muted); text-decoration: none; font-size: 0.9375rem; }
.site-head nav a:hover { color: var(--ink); }
.site-head nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.head-cta { flex: 0 0 auto; }

@media (max-width: 44rem) {
  .site-head .wrap { flex-wrap: wrap; gap: 0.7rem 1.1rem; }
  .site-head nav { order: 3; flex-basis: 100%; gap: 1.1rem; font-size: 0.875rem; }
  .head-cta { margin-left: auto; }
}

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

.btn {
  display: inline-block;
  max-width: 100%;
  padding: 0.62rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background-color: var(--bg);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: border-color 120ms ease, filter 120ms ease;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background-color: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.big { padding: 0.85rem 1.6rem; font-size: 1rem; }

/* The listing does not exist yet, so this is a span, not a dead link. */
.btn.soon { opacity: 0.62; cursor: default; }
.btn.soon:hover { filter: none; border-color: var(--accent); }

/* ---- type --------------------------------------------------------------------------------- */

h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.15; }

.h1 { font-size: clamp(2rem, 5vw, 3.1rem); margin: 0 0 1.1rem; max-width: 20ch; }
.h1.wide { max-width: none; }
.h2 { font-size: clamp(1.45rem, 3vw, 1.95rem); margin: 0 0 0.6rem; }

.sub { font-size: 1.0625rem; color: var(--muted); max-width: 60ch; margin: 0 0 2rem; }
.sub.lg { font-size: 1.15rem; }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.7rem;
}

.fine { font-size: 0.8125rem; color: var(--muted); margin: 1.1rem 0 0; }

.cta { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.center { text-align: center; }
.center .cta { justify-content: center; }
/* Spacing goes in the stylesheet, never in a style attribute: the CSP is `style-src 'self'`
   with no 'unsafe-inline', so an inline style is silently dropped by the browser. */
.cta-after { margin-top: 1.6rem; }
.center .sub, .center .h1 { margin-inline: auto; }

/* ---- cards -------------------------------------------------------------------------------- */

/*
 * `minmax(min(100%, 17rem), 1fr)` and not `minmax(17rem, 1fr)`.
 *
 * A bare 17rem minimum cannot shrink below 17rem, so on a narrow viewport the track overflows
 * and the page scrolls sideways. Wrapping it in min() lets the column collapse to the container
 * width instead. This is the single most common way a CSS grid causes horizontal scroll.
 */
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  margin-top: 2rem;
}
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }

.card {
  min-width: 0; /* grid items default to min-content width, which is another overflow source */
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  background-color: var(--bg);
}
.card h3 { margin: 0 0 0.5rem; font-size: 1.0625rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.9375rem; }

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

.steps {
  list-style: none;
  counter-reset: step;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}
.steps li {
  counter-increment: step;
  min-width: 0;
  padding-top: 2.6rem;
  position: relative;
  font-size: 0.9375rem;
  color: var(--muted);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background-color: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.875rem;
  display: grid;
  place-items: center;
}
.steps li b { display: block; color: var(--ink); font-size: 1rem; margin-bottom: 0.2rem; }

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

.plan { display: flex; flex-direction: column; }
.plan .tier {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin: 0;
}
.plan .amount {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  margin: 0.4rem 0 0.15rem;
  line-height: 1;
}
.plan .amount em { font-style: normal; font-size: 0.9375rem; font-weight: 400; color: var(--muted); }
.plan .note { margin: 0 0 1.2rem; font-size: 0.875rem; color: var(--muted); min-height: 2.6em; }
.plan ul { flex: 1; }
.plan.best { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.plan .badge {
  display: inline-block;
  background-color: var(--accent-soft);
  color: var(--accent);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}

/* ---- ticked lists ------------------------------------------------------------------------- */

ul.ticks { list-style: none; margin: 0; padding: 0; }
ul.ticks li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.65rem;
  font-size: 0.9375rem;
  color: var(--muted);
}
/* Drawn, not an emoji: emoji render differently on every platform and read as decoration to a
   screen reader. ::before content is ignored by assistive tech, so no aria-hidden is needed. */
ul.ticks li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.88rem;
  width: 0.55rem;
  height: 0.3rem;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* ---- FAQ ---------------------------------------------------------------------------------- */

.faq { margin-top: 2rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 1.05rem 0; }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "\2013"; }
.faq p { margin: 0.7rem 0 0; color: var(--muted); font-size: 0.9375rem; max-width: 62ch; }

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

.site-foot {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9375rem;
  padding: 2.5rem 0 3rem;
}
.site-foot strong { color: var(--ink); }
.site-foot p { margin: 0.35rem 0 0; }
.site-foot nav { display: flex; gap: 1.3rem; flex-wrap: wrap; margin-top: 1.3rem; }
.site-foot nav a { color: var(--muted); text-decoration: none; }
.site-foot nav a:hover { color: var(--ink); text-decoration: underline; }
.site-foot .legal { margin-top: 1.6rem; font-size: 0.8125rem; }
