/* ==========================================================================
   Quillon — Base Styles
   Reset, typography, layout primitives, global utilities, animations.
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.6;
  background: var(--bg-deep);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

html {
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

ul, ol {
  list-style: none;
}

/* ── Typography ────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.15;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  font-weight: 700;
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 700;
}

p {
  line-height: 1.7;
}

/* ── Layout Primitives ─────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

section {
  padding-top: var(--section-pad);
  padding-bottom: var(--section-pad);
}

/* ── Section Utilities ─────────────────────────────────────────────────── */

/* Mono uppercase label above section title */
.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-xs, 8px);
  opacity: 0.75;
}

/* Subtitle below section heading */
.section-sub {
  color: var(--text-secondary);
  max-width: 880px;
  line-height: 1.7;
  margin-top: var(--space-sm, 12px);
  margin-bottom: var(--space-xl, 48px);
  text-wrap: pretty;
}

/* Gradient text utility — kept for cases that explicitly opt in.
   Anti-AI guideline: use at most once per page. */
.text-gradient {
  color: var(--accent);
}

/* ── Scrollbar ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* Firefox */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--text-muted) var(--bg-deep);
}

/* ── Selection ─────────────────────────────────────────────────────────── */
::selection {
  background: var(--accent);
  color: var(--text-primary);
}

/* ── Scroll-triggered animation base ───────────────────────────────────── */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Keyframes ─────────────────────────────────────────────────────────── */

/* Fade up — general entrance */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Glow pulse removed (anti-AI). Kept as no-op to avoid breaking
   references — any `animation: glow ...` now resolves to nothing. */
@keyframes glow {
  0%, 100% { box-shadow: none; }
}

/* Blink — live dot opacity */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

/* Pulse ring — live dot expanding ring */
@keyframes pulse {
  from {
    transform: scale(1);
    opacity: 0.6;
  }
  to {
    transform: scale(2.5);
    opacity: 0;
  }
}
