/* ============================================================
   main.css — design tokens, reset, base, utilities
   ------------------------------------------------------------
   GameJam Føroya landing page. Vanilla, BEM, CSS custom
   properties for every design decision (Orlando Studio
   conventions). No @import, no framework.

   BRAND (v2 — balanced, not wall-to-wall teal):
     · teal  #039685  → the "frame": nav, hero, footer + accents
     · light-blue #90bae6 → soft surfaces, tints, hovers
     · white #f4f4f4  → the airy body background + card text
     · red   #ca4e3a  → the action/spark colour (buttons, badges)
   The body is light and airy so the teal reads as punctuation,
   not a flood. Typography is Alata (single weight); headings
   get presence from scale + uppercase + tracking, not boldness.
   ============================================================ */

/* --- Self-hosted Alata (no external requests) --------------- */
@font-face {
  font-family: "Alata";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  /* Relative to this file (styles/main.css) → works at any base path */
  src: url("../fonts/alata-latin.woff2") format("woff2");
  /* Latin-1 covers all Faroese letters (Ø Æ Ð í ó á ý …) */
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC,
    U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Alata";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/alata-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* --- Brand palette (from the banner reference) --------- */
  --brand-teal: #039685;
  --brand-teal-deep: #026b5f;      /* darker teal, readable with white text */
  --brand-teal-darker: #024f46;    /* footer / gradient floor */
  --brand-blue: #90bae6;
  --brand-blue-soft: #e9f1fb;      /* pale blue surface tint */
  --brand-white: #f4f4f4;
  --brand-red: #ca4e3a;            /* reference red: dots, borders, accents */
  --brand-red-strong: #b0402e;     /* white-text-on-red surfaces (AA) */
  --brand-red-dark: #97362a;

  /* --- Semantic colour (light, airy body) ---------------- */
  --color-bg: var(--brand-white);
  --color-surface: #ffffff;              /* cards / panels */
  --color-surface-alt: var(--brand-blue-soft);
  --color-text: #223f39;                 /* body ink */
  --color-heading: #0a544a;              /* deep teal headings */
  --color-muted: #5b726c;                /* muted body text */
  --color-border: #dde5e2;               /* hairline on light */

  --color-cta: var(--brand-red-strong);  /* buttons */
  --color-cta-dark: var(--brand-red-dark);
  --color-accent: var(--brand-teal);

  /* --- On teal (nav / hero / footer) --------------------- */
  --on-teal: #f4f4f4;
  --on-teal-muted: rgba(244, 244, 244, 0.82);
  --on-teal-border: rgba(244, 244, 244, 0.30);

  /* --- Typography ---------------------------------------- */
  --font-sans: "Alata", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-heading: var(--font-sans);
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: clamp(1.9rem, 4vw, 2.6rem);
  --text-4xl: clamp(2.6rem, 7vw, 4.5rem);
  --tracking-wide: 0.04em;

  /* --- 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: 4.5rem;

  /* --- Radius, shadow, motion ---------------------------- */
  --radius-md: 0.625rem;
  --radius-lg: 1.25rem;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(2, 79, 70, 0.08);
  --shadow-md: 0 10px 24px -12px rgba(2, 79, 70, 0.28);
  --shadow-lg: 0 24px 48px -18px rgba(2, 79, 70, 0.35);
  --transition: 200ms ease;

  /* --- Layout -------------------------------------------- */
  --content-max-width: 1120px;
}

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

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

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--color-text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  /* Airy light body with the faintest blue lift toward the bottom */
  background:
    linear-gradient(180deg, var(--brand-white) 0%, var(--brand-white) 55%, var(--brand-blue-soft) 100%);
  background-attachment: fixed;
  background-color: var(--brand-white);
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.1;
  font-weight: 400;                /* Alata is single-weight */
  color: var(--color-heading);
  letter-spacing: var(--tracking-wide);
}

a { color: var(--brand-teal-deep); text-decoration: none; transition: color var(--transition), opacity var(--transition); }
a:hover { color: var(--color-heading); }

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

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

.section { padding-block: var(--space-3xl); }
.section__title {
  font-size: var(--text-3xl);
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}
.section__lead {
  font-size: var(--text-lg);
  color: var(--color-muted);
  max-width: 62ch;
}

/* Page heading block on subpages (no hero there) */
.page-head { padding-bottom: var(--space-lg); }
.page-head__title {
  font-size: var(--text-4xl);
  text-transform: uppercase;
  line-height: 1.05;
  margin-bottom: var(--space-md);
}

/* --- Accessibility helpers --------------------------------- */
.skip-link {
  position: absolute;
  left: var(--space-md);
  top: -100%;
  background: var(--color-cta);
  color: #fff;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  z-index: 100;
}
.skip-link:focus { top: var(--space-md); }

:focus-visible { outline: 3px solid var(--brand-red); outline-offset: 3px; }

.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;
}

/* --- Buttons (shared) -------------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-full);
  font-size: var(--text-lg);
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition),
    background var(--transition), border-color var(--transition), color var(--transition);
}
/* Primary = the red spark */
.button--primary { background: var(--color-cta); color: #fff; box-shadow: var(--shadow-md); }
.button--primary:hover { background: var(--color-cta-dark); transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* Secondary = teal outline on light backgrounds */
.button--secondary { background: transparent; color: var(--brand-teal-deep); border-color: var(--brand-teal); }
.button--secondary:hover { background: var(--brand-teal); color: #fff; border-color: var(--brand-teal); }
