/* =========================================================
   Ljungviken RP – stilmall
   Tips: sök efter "PLATSHÅLLARE" för att hitta det du ska byta ut.
   ========================================================= */

/* ---------- 1. Variabler (ändra temat här) ---------- */
:root {
  /* Accentfärg – ljuslila. Hela sidan följer dessa.
     Byter du till en mörk accentfärg, sätt --on-accent till #fff. */
  --accent: #b59cff;
  --accent-2: #8f6bff;          /* mörkare nyans, används i gradienter */
  --on-accent: #150f26;         /* textfärg på lila knappar */

  --accent-light: color-mix(in srgb, var(--accent) 55%, #fff);
  --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
  --accent-border: color-mix(in srgb, var(--accent) 30%, transparent);
  --accent-glow: color-mix(in srgb, var(--accent) 38%, transparent);
  --accent-gradient: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 50%, var(--accent-2) 100%);

  --bg: #0b0a10;
  --bg-alt: #100f16;
  --surface: #16141e;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);

  --text: #f1eff7;
  --text-muted: #a19cb2;
  --online: #3fb950;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-heading: "Outfit", "Inter", system-ui, sans-serif;

  --radius: 18px;
  --radius-sm: 12px;
  --header-h: 72px;
  --container: 1160px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul {
  list-style: none;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

/* Text med lila gradient */
.gradient-text,
.hero-title span,
.section-head h2 span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- 3. Knappar ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s, border-color 0.2s, filter 0.2s;
}

.btn i {
  font-size: 1.1em;
}

.btn-primary {
  background: var(--accent-gradient);
  color: var(--on-accent);
  box-shadow:
    0 10px 30px -10px var(--accent-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow:
    0 16px 36px -10px var(--accent-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-strong);
  color: var(--text);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  transform: translateY(-2px);
}

.btn-ghost i {
  font-size: 0.9em;
  transition: transform 0.2s;
}

.btn-ghost:hover i {
  transform: translateX(3px);
}

.btn-small {
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
}

.btn-block {
  width: 100%;
}

/* ---------- 4. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
}

/* Logga – meny – knapp, med menyn exakt i mitten */
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  min-height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  justify-self: start;
}

.logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.logo-text span {
  color: var(--accent);
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.93rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s, background-color 0.2s;
}

.main-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.main-nav a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.09);
}

.nav-badge {
  padding: 2px 7px;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.header-cta {
  justify-self: end;
}

/* ---------- 5. Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  padding: 110px 0 140px;
  text-align: center;
  overflow: hidden;

  /* PLATSHÅLLARE: bakgrundsbild.
     Lägg din bild som bilder/hero.jpg (rekommenderat 1920×1080 eller större).
     Lager uppifrån och ned:
       1. mörk toning så att texten syns
       2. din bild
       3. reservbakgrund (lila sken + rutnät) som visas om bilden saknas */
  background:
    linear-gradient(180deg, rgba(11, 10, 16, 0.5) 0%, rgba(11, 10, 16, 0.72) 60%, var(--bg) 100%),
    url("bilder/hero.jpg") center / cover no-repeat,
    radial-gradient(ellipse 65% 55% at 50% 0%, color-mix(in srgb, var(--accent) 42%, transparent), transparent 70%),
    radial-gradient(ellipse 35% 40% at 88% 75%, color-mix(in srgb, var(--accent-2) 20%, transparent), transparent 70%),
    radial-gradient(ellipse 35% 40% at 8% 85%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    radial-gradient(ellipse 70% 65% at 50% 40%, transparent 0%, var(--bg) 100%),
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 56px 56px,
    var(--bg);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 880px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px 7px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-title {
  margin-top: 28px;
  font-family: var(--font-heading);
  font-size: clamp(2.9rem, 10vw, 6.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
  text-wrap: balance;
  background: linear-gradient(180deg, #fff 40%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 10px 40px rgba(0, 0, 0, 0.5));
}

.hero-tagline {
  margin-top: 20px;
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2.8vw, 1.6rem);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.hero-text {
  max-width: 580px;
  margin: 14px auto 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 38px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  margin-top: 60px;
}

.hero-stats li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 34px;
}

.hero-stats li + li {
  border-left: 1px solid var(--border-strong);
}

.hero-stats strong {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.15;
}

.hero-stats span {
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Scroll-indikator (mus) */
.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.7;
  transition: opacity 0.2s;
}

.scroll-hint:hover {
  opacity: 1;
}

.mouse {
  position: relative;
  display: block;
  width: 24px;
  height: 38px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 14px;
}

.mouse::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--accent);
  animation: scroll-wheel 1.8s ease-in-out infinite;
}

@keyframes scroll-wheel {
  0%   { opacity: 0; transform: translateY(0); }
  30%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(12px); }
}

/* Pulserande "online"-prick */
.live-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--online);
  flex-shrink: 0;
}

.live-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--online);
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  0%   { transform: scale(1);   opacity: 0.7; }
  100% { transform: scale(2.6); opacity: 0; }
}

/* ---------- 6. Informationssektion (cards) ---------- */
.features {
  padding: 120px 0;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 64px;
  text-align: center;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-head h2 {
  margin: 12px 0 16px;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.section-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 560px;
  margin-inline: auto;
}

.card {
  position: relative;
  padding: 34px 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    var(--bg-alt);
  overflow: hidden;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

/* Lila sken som tänds vid hover */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at 50% 0%, var(--accent-soft), transparent 65%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

/* Tunn ljuslinje i överkanten */
.card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.35;
  transition: opacity 0.3s;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-border);
  box-shadow: 0 30px 60px -25px rgba(0, 0, 0, 0.8);
}

.card:hover::before,
.card:hover::after {
  opacity: 1;
}

.card > * {
  position: relative;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 26px;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--accent-border);
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.3rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.card-num {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  opacity: 0.55;
}

.card h3 {
  margin-bottom: 10px;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.card p {
  color: var(--text-muted);
  font-size: 0.97rem;
}

/* ---------- 7. Footer ---------- */
.site-footer {
  position: relative;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}

/* Lila ljuslinje i överkanten */
.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  width: min(640px, 80%);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.6;
  transform: translateX(-50%);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  padding-block: 72px 56px;
}

.footer-brand p {
  max-width: 340px;
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-label {
  margin-bottom: 18px;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.socials-label {
  margin-top: 30px;
  margin-bottom: 14px;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.socials a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}

.socials a:hover {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
  transform: translateY(-2px);
}

.footer-links li + li {
  margin-top: 12px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent);
}

.discord-card {
  max-width: 360px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
}

.discord-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.discord-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: #5865f2;
  color: #fff;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.discord-name {
  font-weight: 600;
  line-height: 1.3;
}

.discord-sub {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.3;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--online) 12%, transparent);
  color: var(--online);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-chip .live-dot {
  width: 7px;
  height: 7px;
}

.discord-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0;
}

.discord-stats div {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
}

.discord-stats strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
}

.discord-stats span {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 22px 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 24px;
}

/* ---------- 8. Responsivitet ---------- */

/* Surfplatta: varumärke överst, länkar + Discord bredvid varandra */
@media (min-width: 700px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* Dator: tre kort i rad */
@media (min-width: 900px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
    max-width: none;
  }
}

/* Stor skärm: tre kolumner i sidfoten */
@media (min-width: 1000px) {
  .footer-grid {
    grid-template-columns: 1.4fr 0.8fr 1.1fr;
  }

  .footer-brand {
    grid-column: auto;
  }
}

/* Under datorbredd: Discord-knappen i headern göms */
@media (max-width: 899px) {
  .header-inner {
    display: flex;
    justify-content: space-between;
  }

  .header-cta {
    display: none;
  }
}

/* Mobil: menyn ligger kvar synlig men blir kompaktare */
@media (max-width: 720px) {
  :root {
    --header-h: 64px;
  }

  .container {
    padding-inline: 16px;
  }

  .header-inner {
    gap: 12px;
  }

  .site-header .logo-text,
  .nav-badge {
    display: none;
  }

  .site-header .logo img {
    width: 36px;
    height: 36px;
  }

  .main-nav ul {
    padding: 3px;
  }

  .main-nav a {
    padding: 7px 10px;
    font-size: 0.9rem;
  }

  .hero {
    padding: 80px 0 88px;
  }

  .hero-stats {
    margin-top: 48px;
  }

  .hero-stats li {
    padding: 0 18px;
  }

  .hero-stats strong {
    font-size: 1.35rem;
  }

  .scroll-hint {
    display: none;
  }

  .features {
    padding: 88px 0;
  }

  .section-head {
    margin-bottom: 48px;
  }

  .card {
    padding: 28px 24px;
  }

  .footer-grid {
    padding-block: 56px 44px;
  }

  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* Små mobiler: knapparna på hela bredden */
@media (max-width: 480px) {
  .pill {
    padding: 6px 12px;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .hero-stats li {
    padding: 0 14px;
  }
}

/* Väldigt smala skärmar: logga ovanför menyn */
@media (max-width: 359px) {
  :root {
    --header-h: 100px;
  }

  .header-inner {
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding-block: 8px;
  }

  .main-nav a {
    padding: 6px 9px;
    font-size: 0.86rem;
  }
}

/* ---------- 9. Undersidor (Regler, Ansök, Tack, 404) ---------- */
.page-hero {
  padding: 96px 0 64px;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 75% at 50% 0%, color-mix(in srgb, var(--accent) 34%, transparent), transparent 70%),
    radial-gradient(ellipse 70% 80% at 50% 30%, transparent 0%, var(--bg) 100%),
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 56px 56px,
    var(--bg);
}

.page-hero h1 {
  margin-top: 22px;
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.page-hero .lead {
  max-width: 600px;
  margin: 16px auto 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.page-section {
  padding: 16px 0 120px;
}

/* Gemensam ruta för undersidor */
.panel {
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    var(--bg-alt);
}

.notice {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  font-size: 0.93rem;
}

.notice i {
  margin-top: 4px;
  color: var(--accent);
}

/* --- Ansökningsformulär --- */
.apply-layout {
  display: grid;
  gap: 24px;
}

.form-section + .form-section {
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
}

.step-num {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--accent-border);
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  flex-shrink: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 500;
}

.field .req {
  color: var(--accent);
}

.field .hint {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.field textarea {
  min-height: 130px;
  line-height: 1.6;
  resize: vertical;
}

.field ::placeholder {
  color: color-mix(in srgb, var(--text-muted) 65%, transparent);
}

.field :is(input, select, textarea):hover {
  border-color: rgba(255, 255, 255, 0.25);
}

.field :is(input, select, textarea):focus {
  outline: none;
  border-color: var(--accent);
  background-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.field select {
  padding-right: 42px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23a19cb2' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}

.field select option {
  background: var(--surface);
  color: var(--text);
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.92rem;
  cursor: pointer;
}

.checkbox + .checkbox {
  margin-top: 14px;
}

.checkbox input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.checkbox a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.form-note {
  max-width: 380px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* Dolt fält som stoppar spam-botar */
.bot-field {
  position: absolute;
  left: -9999px;
}

.info-card + .info-card {
  margin-top: 16px;
}

.info-card h2 {
  margin-bottom: 18px;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
}

.check-list li {
  display: flex;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.check-list li + li {
  margin-top: 12px;
}

.check-list i {
  margin-top: 5px;
  color: var(--accent);
  font-size: 0.85rem;
}

.steps li {
  display: flex;
  gap: 14px;
}

.steps li + li {
  margin-top: 18px;
}

.steps .step-num {
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 0.8rem;
}

.steps strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
}

.steps span {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* --- Regler --- */
.rules-layout {
  display: grid;
  gap: 28px;
}

.toc-title {
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.rules-toc ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rules-toc a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}

.rules-toc a:hover {
  color: var(--text);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.rules-toc a span {
  color: var(--accent);
  font-family: var(--font-heading);
  font-weight: 600;
}

.rules-content .notice {
  margin-bottom: 20px;
}

.rule-group {
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.rule-group + .rule-group {
  margin-top: 20px;
}

.rule-group-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.rule-group-head .card-icon {
  width: 48px;
  height: 48px;
  font-size: 1.15rem;
}

.rule-group-head h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
}

.rule-list li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}

.rule-list li:last-child {
  padding-bottom: 0;
}

.rule-id {
  padding-top: 1px;
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
}

.rule-list strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
}

.rule-list p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.rules-cta {
  margin-top: 20px;
  text-align: center;
}

.rules-cta h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
}

.rules-cta p {
  margin-top: 6px;
  color: var(--text-muted);
}

.rules-cta .hero-buttons {
  margin-top: 24px;
}

/* --- Tack- och 404-sida --- */
.status-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-h) - 70px);
  min-height: calc(100svh - var(--header-h) - 70px);
  padding: 80px 0;
  text-align: center;
  background:
    radial-gradient(ellipse 55% 60% at 50% 20%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 70%),
    radial-gradient(ellipse 70% 70% at 50% 40%, transparent 0%, var(--bg) 100%),
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 56px 56px,
    var(--bg);
}

.status-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 0 auto 26px;
  border: 1px solid var(--accent-border);
  border-radius: 22px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 2rem;
  box-shadow: 0 20px 50px -20px var(--accent-glow);
}

.status-code {
  font-family: var(--font-heading);
  font-size: clamp(5rem, 18vw, 9rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

.status-page h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.status-page p {
  max-width: 520px;
  margin: 14px auto 0;
  color: var(--text-muted);
}

.status-page .hero-buttons {
  margin-top: 34px;
}

/* Undersidor – responsivitet */
@media (min-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }

  .field-full {
    grid-column: 1 / -1;
  }
}

@media (min-width: 960px) {
  .apply-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
  }

  .apply-layout .form-card {
    grid-column: 1;
    grid-row: 1;
  }

  .apply-aside {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    grid-column: 2;
    grid-row: 1;
  }

  .rules-layout {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 40px;
    align-items: start;
  }

  .rules-toc {
    position: sticky;
    top: calc(var(--header-h) + 24px);
  }

  .rules-toc ul {
    flex-direction: column;
    gap: 2px;
  }

  .rules-toc a {
    border-color: transparent;
    border-radius: 10px;
  }
}

@media (max-width: 720px) {
  .page-hero {
    padding: 72px 0 48px;
  }

  .page-section {
    padding-bottom: 88px;
  }

  .panel {
    padding: 24px 20px;
  }

  .form-actions .btn {
    width: 100%;
  }
}

/* ---------- 10. Felmeddelanden & staff-panel ---------- */
[hidden] {
  display: none !important;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.form-status:empty {
  display: none;
}

.form-status.error {
  margin-top: 24px;
  padding: 14px 16px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: var(--radius-sm);
  background: rgba(248, 113, 113, 0.08);
  color: #fca5a5;
  font-size: 0.9rem;
}

.btn-deny {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.3);
  color: #fca5a5;
}

.btn-deny:hover {
  background: rgba(248, 113, 113, 0.16);
  border-color: rgba(248, 113, 113, 0.55);
  transform: translateY(-2px);
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: center;
  padding: 6px 14px;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-self: end;
}

.admin-user-name {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.admin-user-name i {
  color: var(--accent);
}

.admin-main {
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  background:
    radial-gradient(ellipse 60% 420px at 50% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    var(--bg);
}

.admin-center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: inherit;
  padding: 64px 16px;
}

.admin-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 36px 32px;
}

.login-card .status-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  border-radius: 18px;
  font-size: 1.6rem;
}

.login-card h1 {
  font-family: var(--font-heading);
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
}

.login-sub {
  margin: 6px 0 28px;
  color: var(--text-muted);
  font-size: 0.95rem;
  text-align: center;
}

.login-card .field + .field {
  margin-top: 16px;
}

.login-card .form-status.error {
  margin-top: 18px;
}

.login-card .btn {
  margin-top: 24px;
}

.admin-dashboard {
  padding: 56px 0 96px;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.admin-toolbar h1 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  font-family: var(--font-heading);
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.count-badge {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent-gradient);
  color: var(--on-accent);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
}

.app-list {
  display: grid;
  gap: 16px;
}

.app-card {
  padding: 24px;
  transition: opacity 0.25s, transform 0.25s;
}

.app-card.is-removing {
  opacity: 0;
  transform: translateX(16px);
}

.app-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.app-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--accent-border);
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
}

.app-title {
  flex: 1 1 220px;
  min-width: 0;
}

.app-title h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.app-meta {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.app-actions {
  display: flex;
  gap: 10px;
}

.app-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 0.82rem;
}

.chip i {
  color: var(--accent);
}

.chip strong {
  color: var(--text);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.app-details {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.app-details summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}

.app-details summary::-webkit-details-marker {
  display: none;
}

.app-details summary i {
  font-size: 0.75rem;
  transition: transform 0.2s;
}

.app-details[open] summary i {
  transform: rotate(180deg);
}

.app-answers {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.app-answers dt {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.app-answers dd {
  margin-top: 6px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.95rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.empty-state {
  padding: 56px 24px;
  text-align: center;
}

.empty-state h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 600;
}

.empty-state p {
  margin-top: 6px;
  color: var(--text-muted);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 14px 18px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.7);
  font-size: 0.92rem;
  animation: toast-in 0.25s ease-out;
}

.toast.success i { color: var(--online); }
.toast.error i   { color: #f87171; }
.toast.info i    { color: var(--accent); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 720px) {
  .admin-badge,
  .admin-user-name {
    display: none;
  }

  .login-card {
    padding: 28px 22px;
  }

  .admin-dashboard {
    padding: 40px 0 72px;
  }

  .app-card {
    padding: 20px;
  }

  .app-actions {
    width: 100%;
  }

  .app-actions .btn {
    flex: 1;
  }

  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }
}

/* Respektera användare som valt minskad rörelse */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
