/* =========================================================
   Gatekick Labs — Base
   Reset, typography defaults, ambient texture, a11y.
   Direction: Clean, modern SaaS — warm light mode,
   bold grotesque display, purple accent.
   ========================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "ss02", "cv11", "kern";
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-wrap: break-word;
  font-feature-settings: "ss01", "cv11", "kern", "tnum" 0;
}

/* Subtle ambient texture — very light purple tint for warmth */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(ellipse at 15% 0%, rgba(72, 164, 149, 0.03), transparent 55%),
    radial-gradient(ellipse at 100% 100%, rgba(72, 164, 149, 0.02), transparent 55%);
  mix-blend-mode: multiply;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.02 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.4;
  mix-blend-mode: multiply;
}

/* Dark scope — used for footer */
.inverse {
  background: var(--bg-inverse);
  color: var(--fg-inverse);
  --fg: var(--fg-inverse);
  --fg-muted: #A6AEAC;
  --fg-subtle: #7C8785;
  --rule: #3A3A3A;
  --rule-strong: #4A4A4A;
  --bg: var(--bg-inverse);
  --bg-raised: #222222;
}
.inverse p { color: var(--fg-inverse); }

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
}
ul, ol { padding: 0; list-style: none; }

/* Display headings — Plus Jakarta Sans, bold grotesque */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  color: var(--fg);
}

h1 { font-size: var(--text-4xl); font-weight: 800; }
h2 { font-size: var(--text-3xl); font-weight: 700; }
h3 { font-size: var(--text-xl); letter-spacing: var(--tracking-snug); line-height: var(--leading-snug); }
h4 { font-size: var(--text-lg); font-family: var(--font-sans); font-weight: 600; letter-spacing: 0; }

/* Italic for emphasis */
em, i {
  font-style: italic;
}

p {
  color: var(--fg-muted);
  line-height: var(--leading-prose);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-2) var(--ease-out);
}
a:hover { color: var(--accent); }

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

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

hr { border: 0; border-top: var(--hairline); margin: 0; }

::selection { background: var(--accent); color: #FFFFFF; }

/* Focus — visible, clean */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 0;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #FFFFFF;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  z-index: 1000;
}
.skip-link:focus { left: var(--space-4); top: var(--space-4); }

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

/* Mobile performance: disable fixed compositing layers */
@media (max-width: 768px) {
  body::before,
  body::after {
    display: none;
  }
}

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