/* =========================================================
   CANAL 93 — BASE
   Reset, typography, grain, layout primitives
   ========================================================= */

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

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-body);
  font-size: var(--t-base);
  line-height: var(--lh-normal);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
  transition: background-color 400ms cubic-bezier(0.22, 1, 0.36, 1),
              color 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* GRAIN OVERLAY (subtle film grain) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-overlay);
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

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

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
input, textarea, select { font: inherit; color: inherit; }

::selection { background: var(--accent); color: var(--c-black); }

/* === TYPOGRAPHY HELPERS === */

.display {
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: var(--tr-display);
  line-height: var(--lh-tight);
}

.eyebrow {
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  color: var(--fg-mute);
  font-variant-numeric: tabular-nums;
}

.eyebrow .dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: 1px;
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.mono {
  font-family: var(--f-mono);
  letter-spacing: var(--tr-mono);
}

/* === LAYOUT === */

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

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

section {
  position: relative;
  padding: var(--s-10) 0;
}

@media (max-width: 640px) {
  section { padding: var(--s-8) 0; }
}

@media (min-width: 1024px) {
  section { padding: var(--s-16) 0; }
}

/* === UTILS === */
.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;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
  margin: var(--s-12) 0;
}

.text-acid { color: var(--accent); }
.text-flare { color: var(--accent-warm); }
.text-mute { color: var(--fg-mute); }
.text-soft { color: var(--fg-soft); }

.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--s-2); }
.gap-3 { gap: var(--s-3); }
.gap-4 { gap: var(--s-4); }
.gap-6 { gap: var(--s-6); }
.gap-8 { gap: var(--s-8); }

.hide-mobile { display: none; }
@media (min-width: 768px) {
  .hide-mobile { display: initial; }
  .hide-desktop { display: none; }
}
