/* ==========================================================================
   SpotJar shared base: fonts, tokens, reset, typography, shared components
   ========================================================================== */

/* Fonts are self-hosted (Latin subset, variable weight axis). No request ever
   goes to Google Fonts. The privacy policy says so, so keep it true. */
@font-face {
  font-family: "Fredoka";
  src: url("../fonts/fredoka-latin.woff2") format("woff2");
  font-weight: 500 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #211c19;
  --surface: #2e2823;
  --cream: #f5ede1;
  --orange: #e2703a;
  --teal: #3fb39d;
  --teal-deep: #1f7a6c;

  --text: rgba(245, 237, 225, 0.8);
  --text-strong: var(--cream);
  --text-muted: rgba(245, 237, 225, 0.5);
  --line: rgba(245, 237, 225, 0.08);

  --radius-card: 26px;
  --radius-pill: 999px;
  --shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.6);

  --font-head: "Fredoka", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --header-h: 64px;
  --max-w: 1160px;
  --gutter: max(6vw, 16px);

  color-scheme: dark;
}

/* --- Reset --------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

img {
  height: auto;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text-strong);
}

p {
  margin: 0;
}

a {
  color: var(--orange);
  text-underline-offset: 0.18em;
}

a:hover {
  color: #ee8a58;
}

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: rgba(226, 112, 58, 0.45);
  color: var(--cream);
}

/* --- Utilities ----------------------------------------------------------- */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--orange);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
  color: var(--bg);
}

.container {
  width: 100%;
  max-width: calc(var(--max-w) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* --- Header -------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(33, 28, 25, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 100%;
}

.site-header__logo {
  display: block;
  flex-shrink: 0;
}

.site-header__logo img {
  width: auto;
  height: 38px;
}

.site-header__nav {
  display: flex;
  gap: 8px;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.language-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid rgba(245, 237, 225, 0.16);
  border-radius: var(--radius-pill);
}

.language-switch a {
  min-width: 34px;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
}

.language-switch a:hover {
  color: var(--cream);
}

.language-switch a[aria-current="page"] {
  background: var(--cream);
  color: var(--bg);
}

/* --- Buttons & pills ----------------------------------------------------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 18px;
  border: 1px solid rgba(245, 237, 225, 0.16);
  border-radius: var(--radius-pill);
  color: var(--cream);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s, border-color 0.2s;
}

.pill:hover {
  color: var(--cream);
  background: rgba(245, 237, 225, 0.06);
  border-color: rgba(245, 237, 225, 0.28);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  background: var(--orange);
  /* Charcoal on orange: 5.2:1. Cream on this orange would fail AA. */
  color: var(--bg);
  font-weight: 600;
  font-size: 1.0625rem;
  text-decoration: none;
  box-shadow: 0 16px 32px -16px rgba(226, 112, 58, 0.7);
  transition: transform 0.2s, background-color 0.2s;
}

.btn:hover {
  color: var(--bg);
  background: #ec7f4a;
  transform: translateY(-1px);
}

/* --- Footer -------------------------------------------------------------- */

.site-footer {
  padding: 72px 0 56px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.site-footer img {
  width: auto;
  height: 52px;
  margin: 0 auto 18px;
  opacity: 0.75;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--text);
}

.site-footer a:hover {
  color: var(--cream);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0s !important;
    transition-delay: 0s !important;
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 560px) {
  .site-header .container {
    gap: 8px;
  }

  .site-header__actions {
    gap: 6px;
  }

  .site-header__nav .pill {
    display: none;
  }

  .site-header__actions > .pill {
    display: none;
  }

  .site-header .pill {
    padding-inline: 12px;
  }
}
