/* ==========================================================================
   main.css — Design Tokens, CSS Reset, Base Typography
   ========================================================================== */

/* --------------------------------------------------------------------------
   Design Tokens (CSS Custom Properties)
   -------------------------------------------------------------------------- */

/* Ensure text remains visible during web font loading */
@font-face {
  font-family: 'Inter';
  font-display: swap;
  src: local('Inter');
}

:root {
  /* Colors */
  --color-bg: hsl(240, 15%, 6%);
  --color-accent: hsl(270, 100%, 60%);
  --color-accent-glow: hsl(270, 100%, 70%);
  --color-text: hsl(0, 0%, 92%);
  --color-text-muted: hsl(240, 10%, 55%);

  /* Typography */
  --font-body: 'Inter', system-ui, sans-serif;
  --font-heading: 'Inter', system-ui, sans-serif;
  --text-base: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 2rem;
  --text-2xl: 3rem;
  --text-hero: clamp(2.5rem, 5vw + 1rem, 5rem);

  /* Spacing */
  --space-section: clamp(4rem, 10vh, 8rem);
  --space-content: clamp(1rem, 3vw, 2rem);

  /* Animation */
  --duration-fast: 200ms;
  --duration-normal: 400ms;
  --duration-slow: 700ms;
  --easing-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);

  /* Layout */
  --max-width: 1200px;
  --border-radius: 12px;
}

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

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

body {
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

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

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

ul,
ol {
  list-style: none;
}

/* --------------------------------------------------------------------------
   Base Body Styles
   -------------------------------------------------------------------------- */
body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  overflow-x: hidden;
}

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

h1 {
  font-size: var(--text-hero);
}

h2 {
  font-size: var(--text-2xl);
}

h3 {
  font-size: var(--text-xl);
}

h4 {
  font-size: var(--text-lg);
}

p {
  margin-bottom: 1em;
  color: var(--color-text-muted);
  line-height: 1.7;
}

a {
  color: var(--color-accent);
  transition: color var(--duration-fast) var(--easing-smooth);
}

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

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

strong,
b {
  font-weight: 700;
}

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

/* --------------------------------------------------------------------------
   Selection Style
   -------------------------------------------------------------------------- */
::selection {
  background-color: var(--color-accent);
  color: var(--color-bg);
}
