/* base.css - Reset and foundational styles for Spotlight Projector V1 */

/* Self-hosted fonts - no CDN runtime dependency */
@font-face {
  font-family: Cinzel;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('./fonts/Cinzel-Bold.ttf') format('truetype');
}

@font-face {
  font-family: Lora;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./fonts/Lora-Regular.ttf') format('truetype');
}

@font-face {
  font-family: 'Source Sans Pro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./fonts/SourceSansPro-Regular.ttf') format('truetype');
}

@font-face {
  font-family: 'Source Sans Pro';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('./fonts/SourceSansPro-SemiBold.ttf') format('truetype');
}

@font-face {
  font-family: 'Fira Code';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./fonts/FiraCode-Regular.ttf') format('truetype');
}

:root {
  /* Colors from brand kit */
  --gold-spotlight: #f5c542;
  --deep-black: #000;
  --warm-white: #fff7e6;
  --burgundy: #7a1f1f;
  --soft-shadow-gray: #3a3a3a;
  --amber-glow: #ffb84d;

  /* Typography scale */
  --font-headline: 'Cinzel Bold', 'Georgia', serif;
  --font-body: 'Lora Regular', 'Georgia', serif;
  --font-ui: 'Source Sans Pro', 'Arial', sans-serif;
  --font-code: 'Fira Code', 'Courier New', monospace;

  /* Spacing scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Container widths */
  --container-max: 1200px;
  --container-narrow: 800px;

  /* Touch targets */
  --touch-target: 44px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--warm-white);
  background-color: var(--deep-black);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-headline);
  font-weight: 700;
  line-height: 1.2;
  color: var(--gold-spotlight);
}

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

h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
}

h3 {
  font-size: clamp(1.375rem, 3vw, 2rem);
}

h4 {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
}

h5 {
  font-size: 1.125rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: var(--space-md);
}

a {
  color: var(--gold-spotlight);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--amber-glow);
}

a:focus-visible {
  outline: 2px solid var(--gold-spotlight);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Lists */
ul,
ol {
  padding-left: var(--space-xl);
  margin-bottom: var(--space-md);
}

li {
  margin-bottom: var(--space-sm);
}

/* Code */
code,
pre {
  font-family: var(--font-code);
  font-size: 0.9em;
  background-color: var(--soft-shadow-gray);
  border-radius: 4px;
}

code {
  padding: 0.125em 0.375em;
}

pre {
  padding: var(--space-md);
  overflow-x: auto;
  margin-bottom: var(--space-md);
}

pre code {
  background: none;
  padding: 0;
}

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

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  z-index: 9999;
  padding: var(--space-sm) var(--space-md);
  background-color: var(--gold-spotlight);
  color: var(--deep-black);
  font-family: var(--font-ui);
  font-weight: 600;
  border-radius: 0 0 4px 4px;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
  outline: none;
}

/* Screen reader only */
.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;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container--narrow {
  max-width: var(--container-narrow);
}

/* Main layout */
main {
  min-height: 60vh;
}

/* Selection */
::selection {
  background-color: var(--gold-spotlight);
  color: var(--deep-black);
}

/* Scrollbar styling for webkit */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--soft-shadow-gray);
  border-radius: 4px;
}

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

/* Responsive breakpoints reference:
   - Mobile: 320px - 479px
   - Tablet: 480px - 767px
   - Desktop: 768px - 1023px
   - Large: 1024px - 1279px
   - Extra large: 1280px - 1919px
   - Maximum: 1920px+
*/
