:root {
  --bg: #0a090c;
  --bg-2: #141217;
  --fg: #f2eff5;
  --fg-2: rgba(242, 239, 245, .56);
  --fg-3: rgba(242, 239, 245, .32);
  --line: rgba(242, 239, 245, .12);
  --accent: #a27bff;          /* mörklila, används sparsamt */
  --font: "Host Grotesk", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.22, .8, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 500 16px/1.4 var(--font); letter-spacing: -.02em;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
p { margin: 0; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.dim { color: var(--fg-2); }
.label { font-size: 13px; color: var(--fg-2); letter-spacing: -.01em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Korn över hela sidan, som i tryck */
.grain { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; opacity: .07; mix-blend-mode: overlay; }

/* ---------- Toppfält ---------- */
.bar {
  position: fixed; left: 0; right: 0; top: 0; z-index: 30;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: 64px; font-size: 15px;
}
.bar::before {   /* tonar in bakom fältet när man scrollat */
  content: ""; position: absolute; inset: 0 -50vw; z-index: -1;
  background: linear-gradient(var(--bg) 40%, transparent); opacity: 0; transition: opacity .4s;
}
.bar.solid::before { opacity: 1; }
.name { font-size: 20px; font-weight: 500; letter-spacing: -.05em; }
.status { display: inline-flex; align-items: center; gap: 10px; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(162, 123, 255, .6); animation: ping 2.4s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(162, 123, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(162, 123, 255, 0); } }
.burger { justify-self: end; width: 36px; height: 24px; position: relative; border: 0; background: none; padding: 0; cursor: pointer; color: var(--fg); }
.burger::after { content: ""; position: absolute; inset: -12px -8px; }   /* större yta att trycka på */
.burger span { position: absolute; right: 0; height: 2px; background: currentColor; transition: transform .45s var(--ease), width .45s var(--ease), top .45s var(--ease); }
.burger span:first-child { top: 7px; width: 36px; }
.burger span:last-child { top: 14px; width: 22px; }
.burger[aria-expanded="true"] span:first-child { top: 11px; transform: rotate(45deg); width: 28px; }
.burger[aria-expanded="true"] span:last-child { top: 11px; transform: rotate(-45deg); width: 28px; }

.menu { position: fixed; inset: 0; z-index: 25; background: var(--bg); display: grid; align-items: end; padding-bottom: 8vh; }
.menu[hidden] { display: none; }
.menu nav { display: grid; }
.menu a { font-size: clamp(48px, 9vw, 120px); line-height: 1; letter-spacing: -.06em; padding: 6px 0; opacity: 0; transform: translateY(24px); animation: up .7s var(--ease) forwards; }
.menu a:nth-child(2) { animation-delay: .05s; } .menu a:nth-child(3) { animation-delay: .1s; } .menu a:nth-child(4) { animation-delay: .15s; }
.menu a:hover { color: var(--accent); }
@keyframes up { to { opacity: 1; transform: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: grid; grid-template-rows: 1fr auto; overflow: hidden; }
/* Namnet stort och stilla, centrerat i himlen. */
.title {
  position: absolute; left: 0; right: 0; top: 46%; translate: 0 -50%; z-index: 1; margin: 0 auto;
  text-align: center; text-shadow: 0 10px 60px rgba(0, 0, 0, .35);
  opacity: 0; transform: translateY(18px); transition: opacity 1.2s var(--ease) .2s, transform 1.4s var(--ease) .2s;
}
.card.in .title { opacity: 1; transform: none; }
.title h1 { margin: 0; font-size: min(11.5vw, 200px); font-weight: 500; letter-spacing: -.065em; line-height: .92; }
.title span { white-space: nowrap; }
.slogan { margin-top: .6em; font-size: min(2.6vw, 40px); letter-spacing: -.045em; line-height: 1.1; }
/* Natthimlen fyller heron från toppen och slutar en bit ovanför raden längst ner. */
.card {
  position: relative; grid-row: 1; margin: 0; min-height: 520px; overflow: hidden;
  background: #050308; opacity: 0; transition: opacity 1.4s var(--ease);
}
.card.in { opacity: 1; }
.card canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.hero-foot { position: relative; z-index: 3; grid-row: 2; display: flex; justify-content: space-between; align-items: end; gap: 40px; padding: 36px 0 40px; }
.tags { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 17px; }
.tags li { display: flex; align-items: center; gap: 10px; }
.tags b { display: inline-flex; gap: 2px; }
.tags b i { width: 3px; height: 12px; background: var(--fg); }
.tags li:nth-child(1) b i:nth-child(n+2) { opacity: .35; }
.tags li:nth-child(2) b i:nth-child(3) { opacity: .35; }
.intro { text-wrap: pretty; max-width: 600px; font-size: clamp(22px, 2vw, 28px); line-height: 1.25; letter-spacing: -.04em; text-align: right; color: #fff; }
[data-count] { display: inline-block; font-variant-numeric: tabular-nums; }

/* ---------- Resultat ---------- */
.results { padding: 120px 0 40px; }
.head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 64px; }
h2 { margin: 0; font-size: clamp(48px, 6vw, 72px); font-weight: 500; letter-spacing: -.065em; line-height: 1; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; background: var(--fg); color: var(--bg); font-size: 16px; transition: transform .4s var(--ease), background .3s; }
.pill:hover { transform: scale(1.04); background: #fff; }
.works { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.work { position: relative; aspect-ratio: 19 / 16; overflow: hidden; background: var(--bg-2); }
.work .img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.work:hover .img { transform: scale(1.04); }
.cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); }
.cap h3 { margin: 0; font-size: clamp(28px, 2.8vw, 38px); font-weight: 500; letter-spacing: -.06em; line-height: 1.05; }
.cap p { margin-top: 6px; font-size: 14px; color: var(--fg-2); }
.fine { margin-top: 20px; font-size: 13px; color: var(--fg-3); }

/* ---------- Ordband ---------- */
.ticker { overflow: hidden; border-block: 1px solid var(--line); padding: 34px 0; }
.track { display: flex; width: max-content; animation: slide 46s linear infinite; }
.track ul { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; }
.track li { display: flex; align-items: center; white-space: nowrap; font-size: clamp(40px, 5.6vw, 84px); line-height: 1; letter-spacing: -.05em; }
.track li::after { content: ""; width: 10px; height: 10px; margin: 0 .55em; border-radius: 50%; background: #fff; box-shadow: 0 0 14px 3px rgba(162, 123, 255, .7); }
/* Fyra typsnitt som turas om. */
.track li:nth-child(4n+2) { font-family: "Instrument Serif", serif; font-style: italic; letter-spacing: -.02em; font-size: clamp(46px, 6.4vw, 96px); }
.track li:nth-child(4n+3) { font-family: "DM Mono", monospace; text-transform: uppercase; letter-spacing: -.06em; font-size: clamp(32px, 4.4vw, 66px); }
.track li:nth-child(4n) { font-family: "Syne", sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: -.03em; font-size: clamp(34px, 4.8vw, 72px); }
.track li:nth-child(4n+5) { font-family: "Instrument Serif", serif; }
@keyframes slide { from { transform: translateX(-50%); } to { transform: none; } }

/* ---------- Om ---------- */
.about {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); grid-template-areas: "photo text" "photo stats";
  gap: 40px 64px; padding: 120px 0 140px; align-items: start;
}
.about.no-photo { grid-template-columns: 1.55fr 1fr; grid-template-areas: "text stats"; gap: 64px; padding-top: 40px; }
.photo { grid-area: photo; position: relative; margin: 0; aspect-ratio: 4 / 5; overflow: hidden; background: var(--bg-2); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.about-text { grid-area: text; }
.stats { grid-area: stats; align-self: end; }
/* Tom ruta där en bild ska in. */
.ph {
  position: absolute; inset: 0; display: grid; place-content: center; gap: 6px; text-align: center;
  border: 1px dashed rgba(242, 239, 245, .22);
  background:
    radial-gradient(70% 60% at 75% 100%, rgba(162, 123, 255, .22), transparent 70%),
    radial-gradient(60% 50% at 10% 0%, rgba(90, 50, 160, .2), transparent 70%),
    linear-gradient(160deg, #1b1622, #0c0a0f);
}
.ph p { font-size: 22px; letter-spacing: -.04em; }
.ph span { font-size: 13px; color: var(--fg-2); }
.about .label { margin-bottom: 22px; }
.big { font-size: clamp(20px, 1.75vw, 24px); line-height: 1.3; letter-spacing: -.035em; max-width: 680px; }
.big + .big { margin-top: 14px; }
.stats { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 40px 24px; padding-top: 34px; }
.stats dt { font-size: 22px; letter-spacing: -.04em; }
.stats dd { margin: 8px 0 0; font-size: 15px; color: var(--fg-2); }
.stats .pill { height: 40px; font-size: 15px; }

/* ---------- Boka ---------- */
.book { padding-bottom: 120px; }
.talk { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 56px; border-bottom: 1px solid var(--line); }
.talk span { font-size: clamp(64px, 12.5vw, 172px); letter-spacing: -.055em; line-height: .9; transition: color .4s; }
.talk svg { width: clamp(56px, 9vw, 124px); flex: none; fill: none; stroke: var(--fg); stroke-width: 9; transition: transform .6s var(--ease); }
.talk:hover svg { transform: translateX(10px); }
.talk:hover span { color: var(--accent); }
.book-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 64px; padding-top: 56px; }
.book-info ol { list-style: none; margin: 22px 0 0; padding: 0; }
.book-info li { display: flex; gap: 18px; padding: 18px 0; border-top: 1px solid var(--line); font-size: 19px; letter-spacing: -.035em; }
.book-info li span { font-size: 13px; color: var(--fg-2); padding-top: 4px; }
.embed { background: #fff; }
.embed iframe { display: block; width: 100%; height: 720px; border: 0; }
.empty { min-height: 420px; padding: 24px; display: grid; place-content: center; text-align: center; gap: 6px; background: var(--bg-2); border: 1px solid var(--line); }
.empty p { font-size: 28px; letter-spacing: -.05em; }
.empty span { font-size: 14px; color: var(--fg-2); }

/* ---------- Sidfot ---------- */
.foot { border-top: 1px solid var(--line); padding-top: 48px; }
.foot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding-bottom: 72px; }
.foot .name { display: block; margin-bottom: 14px; }
.foot-grid > nav { display: grid; justify-items: start; }
.socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.socials a { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); transition: background .3s, border-color .3s, transform .4s var(--ease); }
.socials a:hover { background: var(--fg); border-color: var(--fg); transform: translateY(-3px); }
.socials svg { width: 20px; height: 20px; fill: none; stroke: var(--fg); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: stroke .3s; }
.socials .f { fill: var(--fg); stroke: none; transition: fill .3s; }
.socials a:hover svg { stroke: var(--bg); }
.socials a:hover .f { fill: var(--bg); }
.foot-grid > nav .label { margin-bottom: 14px; }
.foot-grid > nav a { font-size: clamp(32px, 3.2vw, 44px); letter-spacing: -.06em; line-height: 1.15; transition: color .3s; }
.foot-grid > nav a:hover { color: var(--accent); }
.foot-base { display: flex; justify-content: space-between; gap: 20px; padding: 22px 0 28px; border-top: 1px solid var(--line); font-size: 14px; }

/* ---------- Intoning ---------- */
.rise { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.rise.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .title { opacity: 1; transform: none; transition: none; }
  .rise, .card { opacity: 1; transform: none; transition: none; }
  .status i { animation: none; }
  .track { animation: none; }
}

/* ---------- Mobil ---------- */
@media (max-width: 820px) {
  .bar { grid-template-columns: 1fr auto; }
  .status { display: none; }
  .hero { min-height: 0; display: block; }
  .card { min-height: 0; height: 74svh; }
  .title { top: 40%; }
  .title h1 { font-size: 14vw; }
  .slogan { font-size: 4vw; margin-top: .6em; }
  .hero-foot { flex-direction: column-reverse; align-items: start; gap: 28px; padding: 32px 0 8px; }
  .intro { text-align: left; font-size: 24px; max-width: none; }
  .tags { font-size: 16px; gap: 6px; }
  .results { padding-top: 80px; }
  .head { margin-bottom: 36px; }
  /* Resultaten sveps i sidled på mobil i stället för att staplas. */
  .works {
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
    margin-inline: -16px; padding: 0 16px; scroll-padding-inline: 16px; scrollbar-width: none;
  }
  .works::-webkit-scrollbar { display: none; }
  .work { flex: 0 0 84%; aspect-ratio: 4 / 5; scroll-snap-align: start; }
  .ticker { padding: 24px 0; }
  .about, .about.no-photo { grid-template-columns: 1fr; grid-template-areas: "photo" "text" "stats"; gap: 24px; padding: 80px 0 96px; }
  .about.no-photo { grid-template-areas: "text" "stats"; padding-top: 40px; }
  .photo { aspect-ratio: 1; }
  .book-grid { grid-template-columns: 1fr; gap: 40px; }
  .talk { padding-bottom: 36px; }
  .talk span { font-size: 16.5vw; white-space: nowrap; }
  .talk svg { width: 11vw; stroke-width: 11; }
  .book-info li { font-size: 18px; }
  .stats { padding-top: 8px; gap: 28px 24px; }
  .head h2 { font-size: 52px; }
  .empty { min-height: 300px; }
  .foot-grid { grid-template-columns: 1fr; }
  .socials { gap: 8px; }
  .socials a { width: 42px; height: 42px; }
  .foot-base { flex-direction: column; }
}

/* Smal mobil: rubriken på två rader. */
@media (max-width: 560px) {
  .title h1 { font-size: 21vw; line-height: .88; }
  .title span { display: block; }
  .slogan { font-size: 7vw; margin-top: .7em; }
}
