/* ════════════════════════════════════════════════
   ESTEPICURSOR.CL — Global Styles & Design Tokens
   ════════════════════════════════════════════════ */

/* ── CSS Custom Properties (Design Tokens) ── */
:root {
  /* Palette — Ocre, Dorado & Oscuros */
  --color-bg:              #0f0e0b;
  --color-bg-alt:          #1a1814;
  --color-bg-card:         #211f1a;
  --color-surface:         #2a2620;

  --color-ocre:            #c4973a;
  --color-ocre-light:      #d4a94d;
  --color-dorado:          #e8c55a;
  --color-dorado-glow:     #f0d97080;
  --color-arena:           #c9b896;
  --color-crema:           #f5edd6;

  --color-text:            #e8e0d0;
  --color-text-muted:      #9a8e78;
  --color-text-heading:    #f5edd6;

  --color-accent:          #d4a94d;
  --color-accent-hover:    #e8c55a;

  /* Purple from logo text */
  --color-logo-purple:     #2a1f5e;

  /* Typography */
  --font-display:          'Special Elite', 'Courier New', monospace;
  --font-body:             'Inter', system-ui, -apple-system, sans-serif;

  --fs-xs:                 clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --fs-sm:                 clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --fs-base:               clamp(1rem, 0.92rem + 0.4vw, 1.125rem);
  --fs-lg:                 clamp(1.125rem, 1rem + 0.6vw, 1.35rem);
  --fs-xl:                 clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
  --fs-2xl:                clamp(2rem, 1.5rem + 2.5vw, 3.5rem);
  --fs-3xl:                clamp(2.5rem, 1.8rem + 3.5vw, 5rem);

  --fw-light:              300;
  --fw-regular:            400;
  --fw-medium:             500;
  --fw-semibold:           600;

  --lh-tight:              1.1;
  --lh-snug:               1.3;
  --lh-normal:             1.6;
  --lh-relaxed:            1.8;

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

  /* Layout */
  --max-width:             1200px;
  --max-width-narrow:      720px;
  --border-radius:         8px;
  --border-radius-lg:      16px;

  /* Transitions */
  --ease-out:              cubic-bezier(0.33, 1, 0.68, 1);
  --ease-in-out:           cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast:         150ms;
  --duration-base:         300ms;
  --duration-slow:         600ms;

  /* Z-index layers */
  --z-canvas:              0;
  --z-content:             1;
  --z-header:              100;
  --z-overlay:             200;
}

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

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

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

/* ── Canvas Background ── */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: var(--z-canvas);
  pointer-events: none;
  width: 100%;
  height: 100%;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-text-heading);
  line-height: var(--lh-tight);
  text-wrap: balance;
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl);  }

p {
  text-wrap: pretty;
  max-width: 65ch;
}

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

a:hover,
a:focus-visible {
  color: var(--color-accent-hover);
}

em {
  font-style: normal;
  color: var(--color-dorado);
}

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

/* ── Focus Styles ── */
:focus-visible {
  outline: 2px solid var(--color-dorado);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── Layout Containers ── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

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

/* ── Scrollbar (Webkit) ── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-surface);
  border-radius: 4px;
}

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

/* Firefox scrollbar */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--color-surface) var(--color-bg);
}

/* ── Utility ── */
.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;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  #bg-canvas,
  .mini-canvas {
    display: none;
  }
}

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