/* ==========================================================================
   Ungdomskanon – stilmall
   Ljus, modern och tillgänglig design (WCAG 2.1 AA).
   ========================================================================== */

:root {
  /* Neutraler */
  --bg: #ffffff;
  --bg-soft: #f7f7f9;
  --bg-tint: #fbfbfd;
  --surface: #ffffff;
  --text: #16161a;
  --text-muted: #5c5c66;
  --border: #e9e9ef;
  --border-strong: #d7d7e0;

  /* Accent (varm korall, Airbnb-inspirerad) */
  --accent: #ff3f6c;
  --accent-ink: #e11d54;
  --accent-soft: #fff0f4;
  --accent-contrast: #ffffff;

  /* Fokus */
  --focus: #1a56ff;

  /* Kategorifärger (mjuka, tydliga) */
  --c-fysiskt-bg: #eafaf1;   --c-fysiskt-fg: #12694a;
  --c-mentalt-bg: #eef1ff;   --c-mentalt-fg: #33429e;
  --c-socialt-bg: #fff2e8;   --c-socialt-fg: #9a4a12;
  --c-existentiellt-bg: #f3edff; --c-existentiellt-fg: #5b3aa6;
  --c-planetart-bg: #e9f7fb; --c-planetart-fg: #0d6070;
  --c-ekonomiskt-bg: #fef6e0; --c-ekonomiskt-fg: #8a5a06;
  --c-livskunskap-bg: #fdeef4; --c-livskunskap-fg: #9c2b58;

  /* Form */
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(20,20,30,.06), 0 1px 3px rgba(20,20,30,.04);
  --shadow: 0 6px 24px rgba(20,20,30,.08);
  --shadow-lg: 0 18px 48px rgba(20,20,30,.14);

  --container: 1160px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Reset / bas ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--text); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 22px; }

/* ---------- Tillgänglighet ---------- */
.skip-link {
  position: absolute; left: 12px; top: -60px;
  background: var(--text); color: #fff; padding: 12px 18px;
  border-radius: 10px; z-index: 200; transition: top .18s ease;
  font-weight: 600;
}
.skip-link:focus { top: 12px; color: #fff; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.8);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand__mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, #ff5a7a, #ff3f6c 55%, #ff8a5b);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
}
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: .98rem;
  padding: 9px 14px; border-radius: 999px; transition: background .15s ease, color .15s ease;
}
.nav a:hover { background: var(--bg-soft); color: var(--text); }
.nav a[aria-current="page"] { color: var(--accent-ink); background: var(--accent-soft); }

.nav-toggle { display: none; background: none; border: 1px solid var(--border-strong); border-radius: 12px; padding: 8px 12px; font: inherit; font-weight: 600; cursor: pointer; align-items: center; gap: 8px; }
.nav-toggle:hover { background: var(--bg-soft); }

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 10px 16px 16px; box-shadow: var(--shadow);
  }
  .nav[hidden] { display: none; }
  .nav a { padding: 12px 14px; }
}

/* ---------- Knappar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; cursor: pointer;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  text-decoration: none; transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent-ink); color: var(--accent-contrast); box-shadow: 0 6px 18px rgba(225,29,84,.26); }
.btn--primary:hover { background: #b91548; color: #fff; }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--bg-soft); color: var(--text); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 9vw, 116px) 0 clamp(40px, 6vw, 72px); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 55% at 82% 8%, rgba(255,138,91,.16), transparent 60%),
    radial-gradient(55% 55% at 12% 12%, rgba(255,63,108,.14), transparent 60%),
    radial-gradient(60% 60% at 60% 100%, rgba(26,86,255,.08), transparent 60%),
    var(--bg-tint);
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); font-weight: 600; font-size: .9rem;
  padding: 7px 14px; border-radius: 999px; margin-bottom: 22px; box-shadow: var(--shadow-sm);
}
.hero__eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero h1 { max-width: 16ch; }
.hero__lead { font-size: clamp(1.05rem, 2vw, 1.28rem); color: var(--text-muted); max-width: 62ch; margin-bottom: 28px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Undanträning (highlight) ---------- */
.crowd {
  margin: clamp(36px,6vw,64px) 0;
}
.crowd__card {
  background: linear-gradient(135deg, #16161a, #22222b);
  color: #fff; border-radius: var(--radius-lg); padding: clamp(28px, 5vw, 56px);
  position: relative; overflow: hidden; box-shadow: var(--shadow-lg);
}
.crowd__card::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px;
  background: radial-gradient(circle at center, rgba(255,63,108,.5), transparent 62%); filter: blur(6px);
}
.crowd__card h2 { color: #fff; max-width: 20ch; }
.crowd__card p { color: rgba(255,255,255,.82); max-width: 62ch; margin-bottom: 0; font-size: 1.08rem; }
.crowd__tag { display:inline-block; font-weight:700; letter-spacing:.04em; text-transform:uppercase; font-size:.78rem; color:#ff9db3; margin-bottom:14px; }

/* ---------- Sektioner ---------- */
.section { padding: clamp(40px, 6vw, 76px) 0; }
.section--tight { padding: clamp(28px, 4vw, 44px) 0; }
.section__head { max-width: 60ch; margin-bottom: 28px; }
.section__head p { color: var(--text-muted); font-size: 1.08rem; }

/* ---------- Filter / verktygsrad ---------- */
.toolbar { display: grid; gap: 18px; margin-bottom: 30px; }
.search {
  position: relative; max-width: 520px;
}
.search input {
  width: 100%; font: inherit; padding: 14px 16px 14px 46px;
  border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); outline: none; }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }

.filter-group { display: flex; flex-direction: column; gap: 10px; }
.filter-group__label { font-weight: 700; font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer;
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.chip:hover { background: var(--bg-soft); }
.chip[aria-pressed="true"] { background: var(--text); color: #fff; border-color: var(--text); }

.results-meta { color: var(--text-muted); font-weight: 600; font-size: .95rem; margin-bottom: 18px; }

/* ---------- Kortgrid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.card {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.card__badges { display: flex; flex-wrap: wrap; gap: 7px; }
.badge {
  font-size: .78rem; font-weight: 700; padding: 4px 11px; border-radius: 999px;
  background: var(--bg-soft); color: var(--text-muted); letter-spacing: .01em;
}
.badge--media { background: #1616160d; color: var(--text); }
.badge--cat[data-cat="fysiskt"] { background: var(--c-fysiskt-bg); color: var(--c-fysiskt-fg); }
.badge--cat[data-cat="mentalt"] { background: var(--c-mentalt-bg); color: var(--c-mentalt-fg); }
.badge--cat[data-cat="socialt"] { background: var(--c-socialt-bg); color: var(--c-socialt-fg); }
.badge--cat[data-cat="existentiellt"] { background: var(--c-existentiellt-bg); color: var(--c-existentiellt-fg); }
.badge--cat[data-cat="planetart"] { background: var(--c-planetart-bg); color: var(--c-planetart-fg); }
.badge--cat[data-cat="ekonomiskt"] { background: var(--c-ekonomiskt-bg); color: var(--c-ekonomiskt-fg); }
.badge--cat[data-cat="livskunskap"] { background: var(--c-livskunskap-bg); color: var(--c-livskunskap-fg); }

.card__title { font-size: 1.18rem; font-weight: 800; letter-spacing: -0.01em; margin: 2px 0 0; }
.card__motiv { color: var(--text-muted); margin: 0; font-size: .98rem; }
.card__foot { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.card__lang { font-size: .82rem; color: var(--text-muted); font-weight: 600; margin-right: auto; display: inline-flex; align-items: center; gap: 6px; }
.card__lang::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #b9b9c4; }

.link-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; font-size: .9rem; text-decoration: none;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border-strong);
  color: var(--text); background: var(--surface); transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.link-btn:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.link-btn svg { flex: none; }

.empty { text-align: center; padding: 60px 20px; color: var(--text-muted); border: 1px dashed var(--border-strong); border-radius: var(--radius); }

/* ---------- Bild-platshållare ---------- */
.ph {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(135deg, #f0f0f5, #e7e7ef);
  border: 1px solid var(--border); color: var(--text-muted);
  display: grid; place-items: center; aspect-ratio: 16 / 9; font-weight: 600; font-size: .9rem;
}
.ph[data-shape="portrait"] { aspect-ratio: 3 / 4; }
.ph[data-shape="square"] { aspect-ratio: 1 / 1; }
.ph span { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.7); padding: 6px 12px; border-radius: 999px; }

/* ---------- Prosa (Om oss / Metodik) ---------- */
.prose { max-width: 72ch; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; font-size: 1.2rem; }
.prose p, .prose li { font-size: 1.06rem; color: #2b2b32; }
.prose strong { color: var(--text); }
.lead { font-size: 1.2rem; color: var(--text-muted); }

.criteria { list-style: none; padding: 0; margin: 1.4rem 0; display: grid; gap: 14px; }
.criteria li {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 18px 20px; box-shadow: var(--shadow-sm);
}
.criteria li strong { display: block; margin-bottom: 3px; }

/* ---------- Formulär ---------- */
.form { max-width: 640px; display: grid; gap: 20px; }
.field { display: grid; gap: 7px; }
.field label { font-weight: 700; }
.field .hint { color: var(--text-muted); font-size: .9rem; }
.field input, .field select, .field textarea {
  font: inherit; padding: 13px 15px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--text); width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); outline: none;
}
.field textarea { min-height: 150px; resize: vertical; }
.field--required label::after { content: " *"; color: var(--accent-ink); }
.form__status { border-radius: var(--radius-sm); padding: 14px 16px; font-weight: 600; }
.form__status[data-state="ok"] { background: var(--c-fysiskt-bg); color: var(--c-fysiskt-fg); }
.form__status[data-state="err"] { background: var(--accent-soft); color: var(--accent-ink); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-tint); margin-top: 40px; }
.site-footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; padding: 52px 0 30px; }
.site-footer h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin: 0 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a { color: var(--text); text-decoration: none; font-weight: 600; }
.site-footer a:hover { color: var(--accent-ink); }
.site-footer__brandcol p { color: var(--text-muted); max-width: 40ch; }
.site-footer__bottom { border-top: 1px solid var(--border); padding: 20px 0; color: var(--text-muted); font-size: .9rem; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; }
@media (max-width: 720px) { .site-footer__inner { grid-template-columns: 1fr 1fr; } .site-footer__brandcol { grid-column: 1 / -1; } }

/* ---------- Diverse ---------- */
.page-head { padding: clamp(44px, 7vw, 84px) 0 clamp(12px, 3vw, 24px); background: var(--bg-tint); border-bottom: 1px solid var(--border); }
.page-head__eyebrow { color: var(--accent-ink); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: .82rem; margin-bottom: 12px; }
.stat-row { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 20px; }
.stat { }
.stat b { display: block; font-size: 1.8rem; letter-spacing: -0.02em; }
.stat span { color: var(--text-muted); font-size: .92rem; }
