/* Startsidan. Bygger på variablerna i shared.css (vuxenpaletten). */
.site-body.home-body {
  font-size: 17px;
}

.btn-amber {
  background: var(--accent2);
  color: #1f2421;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  padding-block: clamp(28px, 6vw, 72px) clamp(24px, 5vw, 56px);
}

.hero h1 {
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
  text-wrap: balance;
}

.hero p {
  font-size: 19px;
  color: var(--dim);
  margin: 0 0 26px;
  max-width: 46ch;
}

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

.trust {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
  max-width: 46ch;
}

.trust li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 12px;
  border-left: 3px solid var(--accent2);
}

.trust b {
  font-size: 15px;
}

.trust span {
  font-size: 14px;
  color: var(--dim);
  line-height: 1.4;
}

/* Spelbart exempel i rymdvärlden */
.demo {
  --space-line: rgba(90, 190, 255, 0.34);
  --space-accent: #54d8ff;
  --space-accent2: #ffd166;
  background: radial-gradient(110% 80% at 75% 0%, #16294f, #070c1a 68%);
  border-radius: 18px;
  padding: clamp(18px, 3vw, 28px);
  color: #eaf2ff;
  box-shadow: 0 24px 50px rgba(7, 12, 26, 0.35);
  position: relative;
  overflow: hidden;
}

.demo::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.55) 0 1px, transparent 1.5px);
  background-size: 46px 46px;
  opacity: 0.35;
  pointer-events: none;
}

.demo > * {
  position: relative;
}

.demo-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #9fb3d8;
  margin-bottom: 18px;
}

.demo-head b {
  color: var(--space-accent2);
  font-weight: 700;
}

.demo-word {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(22px, 4vw, 34px);
  line-height: 1.2;
  margin: 0 0 6px;
  color: #fff;
}

.demo-lbl {
  font-size: 14px;
  color: #9fb3d8;
  margin: 0 0 14px;
}

.demo-boxes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.demo-box {
  width: 52px;
  height: 62px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid var(--space-line);
  color: #fff;
  font-family: 'Press Start 2P', monospace;
  font-size: 22px;
  text-align: center;
  outline: none;
  text-transform: lowercase;
  padding: 0;
}

.demo-box:focus {
  border-color: var(--space-accent);
}

.demo-box:disabled {
  opacity: 1;
  -webkit-text-fill-color: currentColor;
}

.demo-box.hint {
  background: var(--space-accent2);
  color: #1a1f33;
  border-color: var(--space-accent2);
}

.demo-box.ok {
  border-color: #5fd68e;
  background: rgba(95, 214, 142, 0.18);
}

.demo-box.bad {
  border-color: #ff6b6b;
  background: rgba(255, 107, 107, 0.18);
}

.demo-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.demo .btn {
  min-height: 44px;
}

.demo-send {
  background: var(--space-accent);
  color: #0a1226;
}

.demo-hint {
  background: transparent;
  border: 1.5px solid var(--space-line);
  color: #eaf2ff;
}

.demo-pts {
  margin-left: auto;
  font-weight: 700;
  color: var(--space-accent2);
  font-variant-numeric: tabular-nums;
}

.demo-msg {
  min-height: 24px;
  margin: 12px 0 0;
  font-size: 15px;
  color: #cfe3ff;
}

.demo-msg.win {
  color: #7ff0a9;
  font-weight: 700;
}

/* Sektioner */
.home-wrap section {
  padding-block: clamp(28px, 5vw, 56px);
  border-top: 1px solid var(--panel-border);
}

.home-wrap section.hero {
  border-top: none;
}

.home-wrap h2 {
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  text-wrap: balance;
}

.h2-gap {
  margin-top: 34px !important;
}

.h2-tight {
  margin-bottom: 6px !important;
}

.home-wrap .lead {
  color: var(--dim);
  margin: 0 0 26px;
  max-width: 60ch;
  font-size: 17px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.step {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step .num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
  display: grid;
  place-items: center;
}

.step h3 {
  margin: 0;
  font-size: 20px;
}

.step p {
  margin: 0;
  color: var(--dim);
  font-size: 16px;
}

.pic {
  margin-top: auto;
  border-radius: 10px;
  background: var(--tile);
  border: 1px solid var(--panel-border);
  padding: 12px;
  font-size: 14px;
  color: var(--dim);
}

.pic-row {
  display: grid;
  grid-template-columns: 1fr 14px 1fr;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px dashed var(--panel-border);
  color: var(--ink);
  font-weight: 600;
}

.pic-row:last-child {
  border-bottom: none;
}

.pic-center {
  text-align: center;
}

.qr {
  display: grid;
  grid-template-columns: repeat(7, 10px);
  gap: 2px;
  width: max-content;
  margin: 4px auto 0;
}

.qr i {
  width: 10px;
  height: 10px;
  background: var(--ink);
  border-radius: 1px;
  display: block;
}

.qr i.o {
  background: transparent;
}

.mini-map {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  padding: 6px 0;
}

.mini-map .node {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--panel-border);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--dim);
  background: var(--panel);
  animation: none;
}

.mini-map .node.done {
  background: var(--accent2);
  border-color: var(--accent2);
  color: #1f2421;
}

.mini-map .node.cur {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  width: 32px;
  height: 32px;
}

.mini-map .node.boss {
  width: 34px;
  height: 34px;
  border-color: var(--bad);
  color: var(--bad);
}

.mini-map .dash {
  width: 10px;
  height: 2px;
  background: var(--panel-border);
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 4vw, 48px);
  align-items: start;
}

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

.list li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 12px;
  align-items: start;
}

.list .ic {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #f6e7d2;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: var(--accent2);
  font-size: 15px;
}

.list b {
  display: block;
}

.list span:not(.ic) {
  color: var(--dim);
  font-size: 16px;
}

.worlds {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 18px;
}

.world {
  height: 54px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: flex-end;
  padding: 6px;
  font-size: 11px;
  font-weight: 700;
}

.try {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: clamp(20px, 3vw, 32px);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
}

.try p {
  margin: 0;
  color: var(--dim);
}

.faq {
  display: grid;
  gap: 8px;
  max-width: 70ch;
}

.faq details {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 0 18px;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 14px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

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

.faq summary::after {
  content: "+";
  color: var(--dim);
  font-weight: 600;
}

.faq details[open] summary::after {
  content: "–";
}

.faq details p {
  margin: 0 0 16px;
  color: var(--dim);
}

/* Miniatyr av granskningssidan */
.review-pic {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 14px;
  margin: 0 0 18px;
  font-size: 13px;
  box-shadow: var(--shadow);
}

.review-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.review-kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.review-title {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.review-meta {
  color: var(--dim);
  font-size: 12px;
}

.review-btn {
  flex: 0 0 auto;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 12px;
  padding: 7px 11px;
  border-radius: 8px;
}

.review-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.review-tiles div {
  background: var(--tile);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.review-tiles span {
  color: var(--dim);
  font-size: 11px;
}

.review-tiles b {
  font-size: 20px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.review-tiles i {
  font-style: normal;
  color: var(--dim);
  font-size: 11px;
}

.review-table {
  width: 100%;
  border-collapse: collapse;
}

.review-table th,
.review-table td {
  text-align: left;
  padding: 5px 4px;
  border-bottom: 1px solid var(--panel-border);
}

.review-table th {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  font-weight: 700;
}

.review-table th:not(:first-child),
.review-table td:not(:first-child) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.review-table tbody tr:last-child td {
  border-bottom: none;
}

/* Mina uppdrag */
.mine-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mine-row,
.last-run {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  text-decoration: none;
}

.last-run {
  margin-top: 12px;
}

.mine-text,
.last-run-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.mine-go {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  flex: 0 0 auto;
}

.home-foot {
  padding-top: 36px;
  color: var(--dim);
  font-size: 14px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: space-between;
}

@media (max-width: 860px) {
  .hero,
  .grid2,
  .mine-grid {
    grid-template-columns: 1fr;
  }

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

  .worlds {
    grid-template-columns: repeat(4, 1fr);
  }

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

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

  .review-tiles {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .demo-box.ok {
    animation: demo-pop 0.25s ease;
  }

  @keyframes demo-pop {
    from { transform: scale(0.9); }
    to { transform: scale(1); }
  }
}
