/* ==========================================================================
   EUROCONCURSOS — base.css
   Design tokens, reset, typography.  Theme: HashiCorp Dark.
   Methodology: BEM.  No build step (plain CSS for PHP/Hestia).
   ========================================================================== */

/* ---- Design tokens ------------------------------------------------------- */
:root {
  /* Surfaces (dark mode — never pure black) */
  --c-bg-deep:      #0d0e12;   /* deepest surface, hero base, footer */
  --c-bg:           #15181e;   /* page background */
  --c-surface:      #1a1e26;   /* cards, panels */
  --c-surface-2:    #20242e;   /* raised / hover surface */
  --c-surface-3:    #262b36;   /* inputs, wells */

  /* Text */
  --c-text:         #efeff1;   /* primary on dark */
  --c-text-2:       #d5d7db;   /* secondary */
  --c-text-muted:   #8b92a0;   /* helper / captions */
  --c-text-faint:   #656a76;   /* disabled / meta */

  /* Borders */
  --c-border:       rgba(178, 182, 189, 0.12);
  --c-border-2:     rgba(178, 182, 189, 0.20);
  --c-border-strong:rgb(97, 104, 117);

  /* Action / accent */
  --c-accent:       #1060ff;   /* primary action */
  --c-accent-hover: #2b89ff;   /* hover / active */
  --c-accent-soft:  rgba(16, 96, 255, 0.14);
  --c-accent-glow:  rgba(43, 137, 255, 0.35);

  /* Semantic */
  --c-prize:        #f5b942;   /* gold — prize values / winners ONLY */
  --c-prize-soft:   rgba(245, 185, 66, 0.12);
  --c-success:      #2ec27e;   /* open / active */
  --c-success-soft: rgba(46, 194, 126, 0.14);
  --c-danger:       #e5484d;   /* 18+, closing */
  --c-danger-soft:  rgba(229, 72, 77, 0.14);

  /* Typography */
  --f-display: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-body:    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --f-mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", "Menlo", monospace;

  /* Radii */
  --r-xs: 3px;
  --r-sm: 5px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-pill: 999px;

  /* Shadows — "whisper" level (HashiCorp) */
  --sh-1: rgba(97, 104, 117, 0.05) 0 1px 1px, rgba(97, 104, 117, 0.05) 0 2px 2px;
  --sh-2: rgba(0, 0, 0, 0.28) 0 8px 24px -8px, rgba(97, 104, 117, 0.06) 0 1px 1px;
  --sh-glow: 0 0 0 1px rgba(43,137,255,0.20), 0 18px 50px -18px rgba(16,96,255,0.55);

  /* Layout */
  --container: 1180px;
  --gutter: clamp(20px, 4vw, 40px);
  --focus: 3px solid var(--c-accent-hover);
}

/* ---- Modern reset -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: var(--c-border-strong) var(--c-bg-deep);
}

body {
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--c-text-2);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}

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

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

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }

ul, ol { list-style: none; padding: 0; }

:focus-visible { outline: var(--focus); outline-offset: 2px; border-radius: var(--r-xs); }

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

/* ---- Typography scale ---------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--f-display);
  color: var(--c-text);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.02em;
  font-feature-settings: "kern" 1;
  text-wrap: balance;
}

h1 { font-weight: 800; }

p { text-wrap: pretty; }

strong { color: var(--c-text); font-weight: 600; }

/* Fluid display sizes (82 → 52 → 42 → 34 → 26 → 19 collapse) */
.u-display   { font-size: clamp(2.5rem, 1.6rem + 3.9vw, 4.5rem); line-height: 1.06; }
.u-h2        { font-size: clamp(2rem, 1.3rem + 2.8vw, 3.25rem); }
.u-h3        { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); }

/* ---- Reusable helpers ---------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Uppercase wayfinding label (HashiCorp signature) */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-display);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--c-text-muted);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, var(--c-accent), transparent);
}
.eyebrow--center::before { display: none; }
.eyebrow--accent { color: var(--c-accent-hover); }

.mono { font-family: var(--f-mono); font-feature-settings: "zero" 1; }

.u-prize { color: var(--c-prize); }

/* Accessible-only text */
.u-visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Section rhythm */
.section { padding-block: clamp(56px, 8vw, 104px); position: relative; }
.section__head { max-width: 640px; margin-bottom: clamp(32px, 5vw, 56px); }
.section__head--center { margin-inline: auto; text-align: center; }
.section__title { margin-top: 16px; }
.section__lead { margin-top: 16px; font-size: 1.125rem; color: var(--c-text-muted); }

/* Hairline divider */
.hr { height: 1px; border: 0; background: var(--c-border); }

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