/* KRMovies — Base Styles & Background Atmosphere
   Grain texture, vignette, typography defaults */

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

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  min-height: 100vh;
  position: relative;
  font-variant-numeric: tabular-nums;
}

/* Background atmosphere: grain + vignette */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: 
    radial-gradient(ellipse at 50% 0%, transparent 0%, transparent 45%, rgba(0,0,0,0.15) 100%),
    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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 100% 100%, 256px 256px;
}

/* Typography defaults */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 500;
}

p {
  margin: 0;
}

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

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

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

/* Focus styles */
*:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 4px;
}

/* Smooth transitions (selective) */
button, a {
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, opacity 150ms ease;
}

/* Utility: tabular numerals */
.tabular {
  font-variant-numeric: tabular-nums;
}

/* Utility: uppercase caption */
.caption {
  font-size: var(--t-caption);
  line-height: var(--lh-caption);
  letter-spacing: var(--ls-caption);
  text-transform: uppercase;
  font-weight: 500;
}

/* Animation keyframes */
@keyframes krmovies-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes krmovies-rise {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes krmovies-set {
  from {
    transform: translateY(4px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes krmovies-draw {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

/* Disable animations for reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
