/* ============================================================
   Syntico — base.css
   Design tokens, reset, typography, fonts, global atmosphere
   ============================================================ */

/* ---------- Fonts (self-hosted) ---------- */
@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/space-grotesk-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/space-grotesk-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/space-grotesk-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  /* Brand palette (derived from the syntico logo gradient) */
  --accent-deep: #E8231B;   /* deep red ember */
  --accent-1:    #FF5E1A;   /* orange */
  --accent-2:    #FFB02E;   /* gold */
  --accent-grad: linear-gradient(105deg, var(--accent-deep) 0%, var(--accent-1) 45%, var(--accent-2) 100%);
  --accent-soft: rgba(255, 94, 26, 0.14);

  /* Surfaces */
  --bg:        #08080A;
  --bg-elev:   #0E0E12;
  --bg-elev-2: #15151B;
  --bg-glass:  rgba(20, 20, 26, 0.55);

  /* Text */
  --fg:        #F4F4F6;
  --muted:     #9A9AA6;
  --muted-2:   #6E6E78;

  /* Lines / borders */
  --line:      rgba(255, 255, 255, 0.08);
  --line-2:    rgba(255, 255, 255, 0.14);

  /* Typography */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Layout */
  --container: 1280px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --radius: 18px;
  --radius-lg: 28px;
  --radius-sm: 10px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* Z layers */
  --z-bg: 0;
  --z-content: 1;
  --z-header: 50;
  --z-cursor: 90;
  --z-overlay: 100;
  --z-loader: 120;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
/* Lenis controls scroll; disable native smooth when JS active */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  font-size: 1rem;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  cursor: none; /* replaced by custom cursor on capable devices */
}
@media (pointer: coarse) { body { cursor: auto; } }

img, picture, svg, canvas { display: block; max-width: 100%; }
picture { display: contents; } /* transparent wrapper so <img> keeps its parent's layout */
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
ul, ol { list-style: none; }
:focus-visible { outline: 2px solid var(--accent-1); outline-offset: 3px; border-radius: 4px; }

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

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--accent-deep), var(--accent-2));
  border-radius: 10px;
  border: 2px solid var(--bg);
}

/* ---------- Typography scale ---------- */
.display, h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.h-hero {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.3rem, 7vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
}
h1, .h1 { font-size: clamp(2.4rem, 6vw, 5rem); }
h2, .h2 { font-size: clamp(2rem, 4.6vw, 3.8rem); }
h3, .h3 { font-size: clamp(1.4rem, 2.6vw, 2.1rem); letter-spacing: -0.015em; }
p { color: var(--muted); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.35rem); color: #c9c9d2; line-height: 1.55; }

/* Gradient text utility */
.grad-text {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Eyebrow label */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: '';
  width: 26px; height: 1px;
  background: var(--accent-grad);
}
.eyebrow.center::before { display: none; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section {
  position: relative;
  padding-block: clamp(5rem, 12vh, 11rem);
}
.section-head { max-width: 760px; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head .eyebrow { margin-bottom: 1.4rem; }
.section-head p { margin-top: 1.4rem; max-width: 56ch; }
.section-head.center p { margin-inline: auto; }

.stack-sm > * + * { margin-top: 0.75rem; }
.stack > * + * { margin-top: 1.5rem; }

/* ---------- Atmosphere: grain + glow ---------- */
.grain {
  position: fixed; inset: 0;
  z-index: var(--z-overlay);
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  pointer-events: none;
  z-index: var(--z-bg);
}
.glow--orange { background: radial-gradient(circle, rgba(255,94,26,0.55), transparent 70%); }
.glow--gold   { background: radial-gradient(circle, rgba(255,176,46,0.45), transparent 70%); }
.glow--red    { background: radial-gradient(circle, rgba(232,35,27,0.45), transparent 70%); }

/* Hairline divider */
.hr {
  height: 1px; border: 0;
  background: linear-gradient(90deg, transparent, var(--line-2), transparent);
}

/* Visually hidden (a11y) */
.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;
}

/* Accessibility / reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  body { cursor: auto !important; }
}
