/* ============================================================
   William L. – gemensam stil för hela sidan
   Vill du byta färg? Ändra värdena under :root så ändras allt.
   ============================================================ */

:root {
  --bg:        #060912;   /* nästan svart bakgrund */
  --bg-soft:   #0b1120;
  --panel:     #0f1830;   /* rutorna */
  --panel-hi:  #16264a;   /* ruta när man pekar på den */
  --line:      rgba(122, 170, 255, 0.18);

  --blue:        #4d9fff; /* huvudblå */
  --blue-bright: #87c6ff; /* ljusblå (rubriker) */
  --blue-deep:   #1d6ae0;
  --ink:         #d8e6fc; /* vanlig text */
  --muted:       #8197bb; /* svag text */

  --radius: 16px;
  --maxw: 980px;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.8);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1100px 600px at 50% -8%, #0d1730 0%, rgba(13,23,48,0) 60%),
    var(--bg);
  line-height: 1.55;
}

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

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(20px, 5vw, 48px) clamp(16px, 5vw, 32px) 56px;
}

/* ---------- Toppen / namnet ---------- */

.brand {
  text-align: center;
  margin: 8px 0 clamp(24px, 5vw, 44px);
}

.wordmark {
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(2.6rem, 11vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: 0.5px;
  margin: 0;
  color: transparent;
  -webkit-text-stroke: 2.5px var(--blue);
  text-shadow:
    0 0 22px rgba(77, 159, 255, 0.45),
    0 6px 30px rgba(77, 159, 255, 0.25);
}
.wordmark .dot { color: var(--blue-bright); -webkit-text-stroke: 0; }

.tagline {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: clamp(0.95rem, 2.6vw, 1.1rem);
  font-weight: 600;
}

/* ---------- Rutorna på startsidan ---------- */

.tiles { display: grid; gap: clamp(14px, 2.5vw, 22px); }

/* Den övre rutan som är delad på diagonalen */
.split {
  position: relative;
  height: clamp(230px, 42vw, 340px);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.split .half {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(18px, 4vw, 34px);
  background: var(--panel);
  transition: background 0.18s ease, transform 0.18s ease;
}

/* Övre vänstra triangeln = Roliga filmer */
.split .filmer {
  clip-path: polygon(0 0, 100% 0, 0 100%);
  align-items: flex-start;
  text-align: left;
}
/* Nedre högra triangeln = Podd */
.split .podd {
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  align-items: flex-end;
  justify-content: flex-end;
  text-align: right;
}
.split .podd .tile-text { align-items: flex-end; }

/* själva diagonala strecket */
.split .diagonal {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.split .half:hover,
.split .half:focus-visible { background: var(--panel-hi); outline: none; }

/* Nedre rutan = Artiklar */
.tile {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: clamp(150px, 26vw, 200px);
  padding: clamp(20px, 4vw, 36px);
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: background 0.18s ease, transform 0.18s ease;
}
.tile:hover, .tile:focus-visible { background: var(--panel-hi); transform: translateY(-3px); outline: none; }

/* gemensamt innehåll i en ruta */
.tile-text { display: flex; flex-direction: column; gap: 4px; }

.tile-label {
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(1.5rem, 5vw, 2.4rem);
  line-height: 1.05;
  color: var(--blue-bright);
}
.tile-sub { color: var(--muted); font-weight: 600; font-size: 0.95rem; }

.tile-icon {
  width: clamp(34px, 7vw, 48px);
  height: clamp(34px, 7vw, 48px);
  flex: none;
  color: var(--blue);
  filter: drop-shadow(0 0 10px rgba(77,159,255,0.4));
}

/* fokus-ram för tangentbord */
a:focus-visible { outline: 3px solid var(--blue-bright); outline-offset: 3px; border-radius: 8px; }

/* ---------- Undersidor ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(22px, 4vw, 36px);
}
.topbar .home {
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: transparent;
  -webkit-text-stroke: 1.6px var(--blue);
}
.topbar .home .dot { color: var(--blue-bright); -webkit-text-stroke: 0; }
.back {
  color: var(--blue);
  font-weight: 700;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: background 0.18s ease;
}
.back:hover { background: var(--bg-soft); }

.page-title {
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 7vw, 3rem);
  color: var(--blue-bright);
  margin: 0 0 6px;
}
.page-intro { color: var(--muted); font-weight: 600; margin: 0 0 clamp(24px, 4vw, 36px); }

/* kort-rutnät för innehåll */
.grid { display: grid; gap: 18px; }
.grid.videos { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.card h3 {
  font-family: "Fredoka", system-ui, sans-serif;
  font-weight: 600;
  color: var(--blue-bright);
  margin: 0 0 6px;
  font-size: 1.2rem;
}
.card .meta { color: var(--muted); font-size: 0.85rem; font-weight: 700; margin: 0 0 10px; }
.card p { margin: 0; color: var(--ink); }
.card a.read { display: inline-block; margin-top: 12px; color: var(--blue); font-weight: 800; }

/* 16:9-ruta för film/poddspelare */
.embed {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px dashed var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
  padding: 12px;
}
.embed iframe, .embed video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

audio { width: 100%; margin-top: 12px; }

/* ---------- Foten ---------- */

.foot {
  margin-top: clamp(40px, 7vw, 70px);
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}
.foot .heart { color: var(--blue); }

/* ---------- Mobil: stapla den delade rutan ---------- */

@media (max-width: 620px) {
  .split { height: auto; display: grid; gap: 12px; background: transparent; box-shadow: none; overflow: visible; }
  .split .half {
    position: static;
    clip-path: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-height: 130px;
    align-items: flex-start;
    text-align: left;
    justify-content: center;
  }
  .split .podd { align-items: flex-start; text-align: left; }
  .split .podd .tile-text { align-items: flex-start; }
  .split .diagonal { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
