/* ==========================================================================
   Waiz Earn — reset, typography, layout primitives
   ========================================================================== */

/* Self-hosted, subset to latin, variable weight axis. font-display:swap so text
   is readable immediately and reflows once — never invisible while loading. */
@font-face {
  font-family: "Manrope Variable";
  src: url("../fonts/manrope-var.woff2") format("woff2-variations"),
       url("../fonts/manrope-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk Variable";
  src: url("../fonts/space-grotesk-var.woff2") format("woff2-variations"),
       url("../fonts/space-grotesk-var.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* The sticky header must not cover a section you just jumped to. */
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: calc(var(--fs-body) * var(--text-scale));
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  /* Room for the mobile tab bar, plus the device's own safe area. */
  padding-bottom: env(safe-area-inset-bottom);
}

/* One ambient wash behind the hero. Static — no animated blobs, no canvas. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(180deg, rgba(7,10,18,.56) 0%, rgba(7,10,18,.76) 52%, #070A12 96%),
    radial-gradient(52% 58% at 18% 8%, rgba(59,130,246,.10), transparent 72%),
    url("../../../bgimages/waiz-network-desktop.jpg");
  background-size: cover, cover, cover;
  background-position: center top;
  background-repeat: no-repeat;
}
:root[data-theme="light"] body::before {
  background-image:
    linear-gradient(180deg, rgba(244,246,251,.78) 0%, rgba(244,246,251,.90) 54%, #F4F6FB 96%),
    radial-gradient(52% 58% at 18% 8%, rgba(37,99,235,.06), transparent 72%),
    url("../../../bgimages/waiz-network-desktop.jpg");
  filter: saturate(.72) brightness(1.12);
}
@media (max-width: 700px) {
  body::before {
    background-image:
      linear-gradient(180deg, rgba(7,10,18,.52) 0%, rgba(7,10,18,.76) 50%, #070A12 96%),
      radial-gradient(70% 44% at 50% 12%, rgba(59,130,246,.10), transparent 75%),
      url("../../../bgimages/waiz-network-mobile.jpg");
    background-position: center top;
  }
  :root[data-theme="light"] body::before {
    background-image:
      linear-gradient(180deg, rgba(244,246,251,.76) 0%, rgba(244,246,251,.90) 52%, #F4F6FB 96%),
      radial-gradient(70% 44% at 50% 12%, rgba(37,99,235,.05), transparent 75%),
      url("../../../bgimages/waiz-network-mobile.jpg");
  }
}

img, svg, video { max-width: 100%; }
img { height: auto; border: 0; }
svg.ic { flex: none; display: block; }
[data-theme="dark"] .i-light, [data-theme="light"] .i-dark { display: none; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -.028em;
  /* Space Grotesk tops out at 700. Asking for 800 makes the browser synthesise
     a fake bold, which is exactly the smeared look we were trying to fix. */
  font-weight: 700;
  color: var(--text);
}
h1 { font-size: calc(var(--fs-h1) * var(--text-scale)); }
h2 { font-size: calc(var(--fs-h2) * var(--text-scale)); }
h3 { font-size: calc(var(--fs-h3) * var(--text-scale)); font-weight: 700; }
p  { margin: 0; }

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

button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }

/* --------------------------------------------------------------------------
   FOCUS — defined once, never removed. :focus-visible so a mouse click does
   not paint a ring, but every keyboard arrival does.
   -------------------------------------------------------------------------- */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--line-focus);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

/* Skip link — first thing in the tab order, invisible until focused. */
.skip-link {
  position: absolute; left: 50%; top: 8px;
  transform: translate(-50%, -160%);
  z-index: 200;
  padding: 12px 20px;
  background: var(--brand-solid); color: var(--brand-ink);
  border-radius: var(--r-pill); font-weight: 700;
  transition: transform var(--t-fast) var(--ease);
}
.skip-link:focus-visible { transform: translate(-50%, 0); }

/* --------------------------------------------------------------------------
   LAYOUT
   -------------------------------------------------------------------------- */
.shell {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
main { position: relative; z-index: 1; }

.section { padding-block: clamp(40px, 7vw, 76px); }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--sp-4); margin-bottom: var(--sp-6); flex-wrap: wrap;
}
.section-head h2 { display: flex; align-items: center; gap: 10px; }
.section-head .lede { color: var(--muted); font-size: calc(var(--fs-sm) * var(--text-scale)); margin-top: 6px; }
.section-ic {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
  border: 1px solid var(--brand-line);
}
:root[data-theme="light"] .section-ic { color: var(--brand); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: calc(11.5px * var(--text-scale)); font-weight: 800;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--brand);
}
:root[data-theme="dark"] .eyebrow, :root:not([data-theme="light"]) .eyebrow { color: #93B4FF; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   MOTION — the whole page honours the OS preference. This is not a nicety:
   parallax and reveal animations make some people physically unwell.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* :where(html:not([data-preview-motion])) adds no specificity; only the dashboard's card design
     preview marks <html data-preview-motion>, so an operator can judge an effect. */
  :where(html:not([data-preview-motion])) *,
  :where(html:not([data-preview-motion])) *::before,
  :where(html:not([data-preview-motion])) *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
:root[data-motion="reduced"] *,
:root[data-motion="reduced"] *::before,
:root[data-motion="reduced"] *::after {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
}
