:root {
  --bg: #0b0d12;
  --panel: #151820;
  --panel-2: #1c202a;
  --text: #f7f8fb;
  --muted: #9da4b3;
  --line: #2b303d;
  --accent: #8b7cf6;
  --accent-2: #635bda;
  --danger: #ff7373;
  --success: #58d68d;
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(
      circle at 15% 15%,
      rgba(99, 91, 218, 0.18),
      transparent 30%
    ),
    radial-gradient(
      circle at 90% 85%,
      rgba(139, 124, 246, 0.12),
      transparent 28%
    ),
    var(--bg);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

button,
input,
select {
  font: inherit;
}

/* ==================================================
   HUVUDLAYOUT
   ================================================== */

.page-shell {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr minmax(430px, 520px);
  gap: 72px;
  align-items: center;
  padding: 56px 0;
}

.intro {
  max-width: 520px;
}

/* ==================================================
   LOGOTYP
   Ingen bakgrund, ruta, skugga eller rundning
   ================================================== */

.brand-mark {
  display: flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 48px;
  margin-bottom: 42px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.brand-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: min(260px, 100%);
  max-height: 90px;
  object-fit: contain;
}

/* ==================================================
   INTRODUKTION
   ================================================== */

.eyebrow,
.step-label {
  margin: 0 0 12px;
  color: #a99ffd;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

h1 {
  margin: 0 0 24px;
  font-size: clamp(2.7rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.lead {
  max-width: 500px;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.75;
}

/* ==================================================
   STEG
   ================================================== */

.steps {
  display: grid;
  gap: 22px;
  margin: 40px 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.steps li > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border: 1px solid rgba(139, 124, 246, 0.28);
  border-radius: 50%;
  background: rgba(139, 124, 246, 0.14);
  color: #b8afff;
  font-size: 0.8rem;
  font-weight: 800;
}

.steps strong,
.steps small {
  display: block;
}

.steps strong {
  margin-bottom: 4px;
}

.steps small {
  color: var(--muted);
  line-height: 1.5;
}

/* ==================================================
   INTEGRITETSRUTA
   ================================================== */

.privacy-note {
  display: flex;
  gap: 13px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(21, 24, 32, 0.62);
  color: var(--muted);
  font-size: 0.88rem;
}

.privacy-note svg {
  width: 22px;
  flex: 0 0 22px;
  fill: #a99ffd;
}

.privacy-note p {
  margin: 0;
  line-height: 1.45;
}

.privacy-note strong {
  color: var(--text);
}

/* ==================================================
   FORMULÄRKORT
   ================================================== */

.card {
  padding: 38px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(21, 24, 32, 0.92);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(18px);
}

.card-header h2,
.success-view h2 {
  margin: 0 0 8px;
  font-size: 2rem;
  letter-spacing: -0.035em;
}

.card-header > p:last-child {
  margin: 0 0 28px;
  color: var(--muted);
}

form {
  display: grid;
  gap: 19px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

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

.field small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

/* ==================================================
   INMATNINGSFÄLT
   ================================================== */

.input-wrap {
  position: relative;
}

.input-wrap input {
  padding-right: 48px;
}

.input-icon {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  color: #737b8c;
  font-weight: 800;
}

input,
select {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: var(--panel-2);
  color: var(--text);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 124, 246, 0.14);
}

input::placeholder {
  color: #697080;
}

select {
  cursor: pointer;
}

/* ==================================================
   SAMTYCKE
   ================================================== */

.consent {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 11px;
  align-items: start;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.consent input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--accent-2);
}

.consent label {
  margin: 0;
}

.text-button {
  padding: 0;
  border: 0;
  background: none;
  color: #b5adff;
  text-decoration: underline;
  cursor: pointer;
}

/* ==================================================
   SKICKA-KNAPP
   ================================================== */

.submit-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 18px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(
    135deg,
    var(--accent),
    var(--accent-2)
  );
  box-shadow: 0 14px 30px rgba(99, 91, 218, 0.24);
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    opacity 0.18s ease;
}

.submit-button:hover {
  transform: translateY(-1px);
}

.submit-button:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.submit-button svg {
  width: 20px;
  fill: currentColor;
}

.security-line {
  margin: -7px 0 0;
  color: #737b8c;
  font-size: 0.7rem;
  text-align: center;
}

/* ==================================================
   MEDDELANDEN
   ================================================== */

.message {
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.45;
}

.message.error {
  border: 1px solid rgba(255, 115, 115, 0.3);
  background: rgba(255, 115, 115, 0.1);
  color: #ffaaaa;
}

.message.success {
  border: 1px solid rgba(88, 214, 141, 0.32);
  background: rgba(88, 214, 141, 0.1);
  color: #8be8b3;
}

/* ==================================================
   DISCORD
   ================================================== */

.discord-connect-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
}

.discord-connect-box--ok {
  border-color: rgba(88, 214, 141, 0.35);
  background: rgba(88, 214, 141, 0.06);
}

.discord-connect-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.discord-connect-text strong {
  color: var(--text);
}

.discord-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border: 0;
  border-radius: 11px;
  background: #5865f2;
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    background 0.18s ease;
}

.discord-button:hover {
  background: #4752c4;
  transform: translateY(-1px);
}

.discord-button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* ==================================================
   DOLDA ELEMENT
   ================================================== */

.hidden,
[hidden],
.honeypot {
  display: none !important;
}

/* ==================================================
   BEKRÄFTELSEVY
   ================================================== */

.success-view {
  padding: 32px 6px;
  text-align: center;
}

.success-icon {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin: 0 auto 24px;
  border: 1px solid rgba(88, 214, 141, 0.35);
  border-radius: 50%;
  background: rgba(88, 214, 141, 0.12);
  color: var(--success);
  font-size: 2rem;
}

.success-view > p {
  color: var(--muted);
  line-height: 1.65;
}

.status-box {
  display: flex;
  justify-content: space-between;
  margin: 28px 0;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel-2);
}

.status-box span {
  color: var(--muted);
}

.status-box strong {
  color: #d8d4ff;
}

.next-step {
  font-size: 0.88rem;
}

/* ==================================================
   DIALOGRUTA
   ================================================== */

dialog {
  width: min(620px, calc(100% - 30px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.65);
  color: var(--text);
}

dialog::backdrop {
  background: rgba(3, 4, 7, 0.78);
  backdrop-filter: blur(5px);
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  padding: 24px 26px;
  border-bottom: 1px solid var(--line);
}

.dialog-header h2 {
  margin: 0;
}

.dialog-header button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.8rem;
  cursor: pointer;
}

.policy-content {
  padding: 24px 26px 30px;
  color: var(--muted);
  line-height: 1.65;
}

.policy-content h3 {
  margin-bottom: 5px;
  color: var(--text);
}

/* ==================================================
   DOKUMENTSIDOR
   ================================================== */

.doc-shell {
  width: min(820px, calc(100% - 32px));
  margin: auto;
  padding: 56px 0 80px;
}

.doc-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 42px;
}

.doc-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.doc-back:hover {
  color: var(--text);
}

.doc-back svg {
  width: 16px;
  fill: currentColor;
}

.doc-topbar .brand-mark {
  min-height: 40px;
  margin-bottom: 0;
}

.doc-topbar .brand-logo {
  max-width: 180px;
  max-height: 40px;
}

.doc-header {
  margin-bottom: 36px;
}

.doc-header .eyebrow {
  margin-bottom: 14px;
}

.doc-header h1 {
  margin: 0 0 14px;
  font-size: clamp(2.1rem, 4vw, 3rem);
}

.doc-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.doc-card {
  padding: 40px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(21, 24, 32, 0.92);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(18px);
}

.doc-card section + section {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.doc-card h2 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.doc-card p,
.doc-card li {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.doc-card p {
  margin: 0 0 14px;
}

.doc-card ul {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  padding-left: 20px;
}

.doc-card strong {
  color: var(--text);
}

.doc-card a {
  color: #b5adff;
}

.doc-card .fill-me {
  color: var(--danger);
  font-style: normal;
}

.doc-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 36px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(21, 24, 32, 0.62);
}

.doc-toc a {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.doc-toc a:hover {
  color: var(--text);
}

.doc-footer-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 36px;
  color: var(--muted);
  font-size: 0.85rem;
}

.doc-footer-nav a {
  color: #b5adff;
  font-weight: 700;
  text-decoration: none;
}

.doc-footer-nav a:hover {
  text-decoration: underline;
}

/* ==================================================
   SIDFOT
   ================================================== */

.site-footer {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 0 16px 40px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

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

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

/* ==================================================
   RESPONSIV DESIGN
   ================================================== */

@media (max-width: 900px) {
  .page-shell {
    max-width: 620px;
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .intro {
    max-width: none;
  }

  .brand-mark {
    margin-bottom: 28px;
  }
}

@media (max-width: 600px) {
  .doc-card {
    padding: 26px 20px;
    border-radius: 18px;
  }

  .doc-shell {
    padding: 32px 0 60px;
  }
}

@media (max-width: 520px) {
  .page-shell {
    width: min(100% - 20px, 620px);
    padding: 24px 0;
  }

  .brand-logo {
    max-width: min(220px, 100%);
    max-height: 75px;
  }

  .card {
    padding: 24px 18px;
    border-radius: 18px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2.75rem;
  }
}