/* ==========================================================================
   PatinAI — Marketing Site Design Tokens
   Extends the product's design tokens (PatinAI_server/static/styles/tokens.css)
   so the site and the product feel like one brand.
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap");

:root {
  color-scheme: dark;

  /* --- Core surfaces (from product tokens) --- */
  --bg-0: #000000;
  --bg-1: #0d0d0d;
  --bg-2: #141414;
  --bg-3: #1a1a1a;
  --bg-4: #222222;

  --line: #262626;
  --line-2: #2e2e2e;
  --line-3: #3a3a3a;

  /* --- Text (from product tokens) --- */
  --text-0: #ffffff;
  --text-1: #cfcfcf;
  --text-2: #9a9a9a;
  --text-3: #828282;

  /* --- Brand accents (from product tokens) --- */
  --magenta: #c81f87;
  --magenta-2: #a81772;
  --magenta-bright: #e23d9d;
  --magenta-soft: rgba(200, 31, 135, 0.18);
  --magenta-glow: rgba(200, 31, 135, 0.45);

  --green: #15c47a;
  --green-soft: rgba(21, 196, 122, 0.14);
  --orange: #d87c12;
  --blue: #3aa3ff;

  /* --- Radii --- */
  --radius-s: 6px;
  --radius-m: 8px;
  --radius-l: 12px;
  --radius-xl: 18px;
  --radius-2xl: 28px;

  /* --- Type --- */
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", "Consolas", monospace;

  /* --- Fluid type scale (clamp: min, preferred, max) --- */
  --step--1: clamp(0.8rem, 0.76rem + 0.2vw, 0.9rem);
  --step-0: clamp(1rem, 0.94rem + 0.3vw, 1.125rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.6rem, 1.4rem + 1vw, 2.2rem);
  --step-3: clamp(2rem, 1.6rem + 2vw, 3.2rem);
  --step-4: clamp(2.6rem, 1.9rem + 3.5vw, 4.8rem);
  --step-5: clamp(3.2rem, 2.2rem + 5.5vw, 6.5rem);

  /* --- Spacing rhythm --- */
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-s: 1rem;
  --space-m: 1.5rem;
  --space-l: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 9rem;

  /* --- Layout --- */
  --container: 1200px;
  --nav-h: 68px;

  /* --- Motion --- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 160ms;
  --dur-med: 320ms;
  --dur-slow: 620ms;

  /* --- Shadows / glows --- */
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 24px 60px -20px rgba(0, 0, 0, 0.8);
  --shadow-float: 0 30px 80px -20px rgba(0, 0, 0, 0.9);
  --glow-magenta: 0 0 0 1px var(--magenta-soft), 0 0 40px -8px var(--magenta-glow);

  /* --- Glass / window (Reallusion-style framed units) --- */
  --glass-bg: rgba(20, 20, 20, 0.55);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: blur(16px) saturate(140%);
  --glass-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ---------------------------------------------------------------- reset */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  min-height: 100vh;
  background: var(--bg-0);
  color: var(--text-0);
  font-family: var(--font-ui);
  font-size: var(--step-0);
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
svg { flex-shrink: 0; }
/* Default size for icons without explicit dimensions — prevents layout blow-up */
svg:not([width]):not([height]) { width: 1em; height: 1em; }
.btn svg { width: 16px; height: 16px; }
.btn--lg svg { width: 18px; height: 18px; }

button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}

input, select, textarea {
  font-family: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol { list-style: none; }

/* ---------------------------------------------------------------- scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 5px; border: 2px solid var(--bg-0); }
::-webkit-scrollbar-thumb:hover { background: var(--line-3); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------------------------------------------- selection */
::selection {
  background: var(--magenta);
  color: #fff;
}

/* ---------------------------------------------------------------- a11y */
:focus-visible {
  outline: 2px solid var(--magenta);
  outline-offset: 3px;
  border-radius: var(--radius-s);
}

.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;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: -60px;
  transform: translateX(-50%);
  z-index: 200;
  background: var(--magenta);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-m);
  font-weight: 600;
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: 12px; }

/* ---------------------------------------------------------------- motion prefs */
@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;
  }
}
