/* ============================================
   CHAAT.CA — Base / Global
   ============================================ */

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

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

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  color: var(--text-secondary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Film Grain Overlay ---- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.028;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ---- Typography ---- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-regular);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-tight);
  color: var(--text-primary);
  font-optical-sizing: auto;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--saffron);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover { color: var(--text-primary); }

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

button {
  cursor: pointer;
  font-family: var(--font-body);
  border: none;
  background: none;
  font-size: inherit;
  color: inherit;
}

ul, ol { list-style: none; }

::selection {
  background: var(--saffron);
  color: var(--bg-primary);
}

/* ---- Utilities ---- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.section {
  padding: var(--section-pad) 0;
  position: relative;
}

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

/* ---- Section Headers ---- */

.section-label {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--saffron);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: 0.75em;
}

.section-label::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--saffron);
  flex-shrink: 0;
}

.section-title {
  font-size: var(--fs-h2);
  font-weight: var(--fw-light);
  margin-bottom: var(--space-sm);
  max-width: 20ch;
}

.section-subtitle {
  font-size: var(--fs-body);
  color: var(--text-muted);
  max-width: 48ch;
  line-height: var(--lh-loose);
}

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  transition: all var(--duration-med) var(--ease-out);
  position: relative;
  white-space: nowrap;
}

.btn-arrow {
  transition: transform var(--duration-med) var(--ease-out);
  font-size: 1.1em;
}

.btn:hover .btn-arrow {
  transform: translateX(4px);
}

.btn-primary {
  padding: 1.1em 2.4em;
  background: var(--saffron);
  color: var(--bg-primary);
  border-radius: var(--radius-sm);
}

.btn-primary:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.btn-ghost {
  padding: 1.1em 0;
  color: var(--text-muted);
  border-bottom: 1px solid var(--text-faint);
}

.btn-ghost:hover {
  color: var(--saffron);
  border-color: var(--saffron);
}

.btn-dark {
  padding: 1.1em 2.4em;
  background: var(--bg-primary);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
}

.btn-dark:hover {
  background: var(--bg-elevated);
  transform: translateY(-2px);
}

.btn-outline {
  padding: 1.1em 2.4em;
  border: 1px solid var(--text-faint);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
}

.btn-outline:hover {
  border-color: var(--saffron);
  color: var(--saffron);
  transform: translateY(-2px);
}

/* ---- Scrollbar ---- */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--saffron-dim); }

/* ---- Divider ---- */

.divider {
  width: 40px;
  height: 1px;
  background: var(--saffron);
  margin: var(--space-lg) 0;
}
