/* ------------------------------------------------------------------
   Shared foundation: tokens, reset, typography, layout helpers.
   Every section stylesheet builds on these variables.
------------------------------------------------------------------- */
:root {
  /* greys */
  --white: #fff;
  --grey-50: #e6e6e6;
  --grey-100: #cdcece;
  --grey-200: #9c9c9d;
  --grey-300: #6a6b6c;
  --grey-400: #434345;
  --grey-500: #2f3031;
  --grey-600: #1b1c1e;
  --grey-700: #111214;
  --grey-800: #0c0d0f;
  --grey-900: #07080a;
  --black: #000;

  /* surfaces & text */
  --bg: var(--grey-900);
  --bg-100: #101111;
  --bg-200: #18191a;
  --bg-300: #313133;
  --fg: #f4f4f6;
  --fg-200: #c2c7ca;
  --fg-300: #78787c;
  --fg-400: #5e6366;
  --border: #242728;
  --card-border: rgba(255, 255, 255, 0.06);

  /* accents */
  --red: #ff6363;
  --red-strong: #ff3b4b;
  --blue: #56c2ff;
  --green: #59d499;
  --yellow: #ffc533;

  /* radii */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-2xl: 20px;
  --r-3xl: 24px;

  /* spacing scale */
  --s-0-5: 4px;
  --s-1: 8px;
  --s-1-5: 12px;
  --s-2: 16px;
  --s-2-5: 20px;
  --s-3: 24px;
  --s-4: 32px;
  --s-5: 40px;
  --s-6: 48px;
  --s-7: 56px;
  --s-8: 64px;
  --s-9: 80px;
  --s-10: 96px;
  --s-11: 112px;
  --s-12: 168px;
  --s-13: 224px;

  /* layout */
  --container: 1204px;
  --container-sm: 1064px;
  --container-xs: 746px;
  --navbar-height: 58px;

  /* fonts */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "Geist Mono", Menlo, Monaco, monospace;
  --mono-geist: "Geist Mono", "JetBrains Mono", Menlo, monospace;
  --emoji: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;

  /* motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
  background: var(--bg);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.2px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss02" on, "ss08" on;
  overflow-x: hidden;
}

h1, h2, h3, h4, p { margin: 0; font-weight: inherit; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, svg, canvas, video { display: block; max-width: 100%; }
ul, ol { list-style: none; margin: 0; padding: 0; }

::selection { background: rgba(255, 99, 99, 0.35); }

/* ---------- layout helpers ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--s-3));
  margin: 0 auto;
  padding: 0 var(--s-3);
}
.container-sm { max-width: calc(var(--container-sm) + 2 * var(--s-3)); }

/* each top-level section: vertical rhythm similar to the reference page */
.section { position: relative; }
.section-pad { padding: var(--s-13) 0 0; }

/* ---------- section titles: bold white line + muted grey line ---------- */
.section-title h2,
.section-title p {
  font-size: 20px;
  font-weight: 500;
  line-height: normal;
  letter-spacing: 0.2px;
}
.section-title h2 { color: var(--white); }
.section-title p { color: var(--grey-300); }
.section-title.center { text-align: center; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-1);
  min-height: 36px;
  padding: var(--s-1) var(--s-1-5);
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 0.2px;
  white-space: nowrap;
  transition: background-color 0.2s, box-shadow 0.2s ease-in-out, transform 0.1s ease-in-out;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:active { transform: scale(0.97); }
.btn-light {
  color: var(--grey-500);
  background: var(--grey-50);
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.5),
    0 0 14px rgba(255, 255, 255, 0.19),
    inset 0 -1px 0.4px rgba(0, 0, 0, 0.2),
    inset 0 1px 0.4px #fff;
}
.btn-light:hover { background: #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.5), 0 0 20px rgba(255,255,255,.28), inset 0 -1px .4px rgba(0,0,0,.2), inset 0 1px .4px #fff; }

/* arrow link ("Browse thousands more →") */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--grey-200);
  font-size: 16px;
  font-weight: 500;
  transition: color 0.2s;
}
.arrow-link:hover { color: var(--white); }
.arrow-link .arrow { transition: transform 0.2s var(--ease-out); }
.arrow-link:hover .arrow { transform: translateX(3px); }

/* keyboard key chip used in many mock UIs (⌘ K, ↵) */
.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--grey-200);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
}

/* ---------- scroll reveal utility (driven by js/base.js) ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

.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;
}

.hide-scrollbar { scrollbar-width: none; }
.hide-scrollbar::-webkit-scrollbar { display: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}
