:root {
  color-scheme: light dark;
  --header-top-padding: 14px;
  --header-line-height: 1.5;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; width: 100%;
  font-family: 'Geist', Helvetica, Arial, sans-serif;
  font-weight: 400;
  letter-spacing: normal;
  background: #fff; color: #111;
}

/* ===== HEADER ===== */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  column-gap: 16px;
  align-items: start;
  padding: var(--header-top-padding) 12px;
  font-size: 13px; line-height: var(--header-line-height);
  font-weight: 400; text-transform: uppercase;
  color: #111; background: #fff;
}
body.panel-open header { pointer-events: none; }

.hdr-name { justify-self: start; white-space: nowrap; }
.hdr-role {
  position: fixed; top: var(--header-top-padding); left: 50%;
  transform: translateX(-50%);
  text-align: center; line-height: inherit; opacity: .9;
  white-space: nowrap;
  transition: opacity .3s ease;
}
body.panel-open .hdr-role { opacity: 0; pointer-events: none; }

/* blinkeffekt på namn/titel vid hover */
@keyframes hdr-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
@media (hover: hover) and (pointer: fine) {
  .hdr-name:hover,
  .hdr-role:hover {
    animation: hdr-blink .4s steps(1) infinite;
    cursor: default;
  }
}
.hdr-toggle {
  grid-column: 3;
  justify-self: end; cursor: pointer;
  background: none; border: none; font: inherit; color: inherit; padding: 0;
  transition: opacity .25s ease;
}
body.panel-open .hdr-toggle { opacity: 0; pointer-events: none; }
.info-label-mobile { display: none; }

/* ===== HERO ===== */
.hero {
  width: 100%; height: 88vh; min-height: 460px;
  position: relative; overflow: hidden;
}
.hero-video {
  position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center;
  background: #fff; /* tills posterbilden/videon hunnit ladda */
  width: 100%; height: 100%; overflow: hidden;
  padding: 0; border: 0; cursor: pointer;
}
.hero-media {
  width: 100%; height: 100%; object-fit: cover; display: block;
  pointer-events: none;
}
@media (max-width: 700px) {
  .info-label-desktop { display: none; }
  .info-label-mobile { display: inline; }
  .hdr-role { display: none; } /* titeln skulle överlappa namnet på smala skärmar */
}

/* ===== HEADLINE ===== */
.headline-section {
  padding: 90px 12px 40px;
}
.headline {
  font-family: 'Geist', Helvetica, Arial, sans-serif;
  font-size: max(22px, 2vw); font-weight: 300; line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  max-width: 640px; margin: 0 0 1em; color: #111;
}
.headline-right {
  display: block;
}
@media (min-width: 701px) {
  .headline {
    max-width: none;
  }
}
/* iPad: statementet hålls smalare (50%). Måste stå EFTER min-width:701-regeln ovan för att
   vinna vid lika specificitet inom det överlappande intervallet 701–1024px. */
@media (min-width: 701px) and (max-width: 1024px) {
  .headline { max-width: 50%; }
}
@media (max-width: 700px) {
  .headline { margin-bottom: 0; }
}

/* ===== AVSLUTANDE SEKTION (karusell + footer) =====
   min-height: 100vh låser karusell + footer till exakt en skärmhöjd, så footern
   alltid syns utan extra scroll förbi karusellen. */
.closing-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== KARUSELL ===== */
.carousel-wrap {
  position: relative; width: 100%; margin: 56px 0 clamp(96px, 13vw, 264px);
  user-select: none; touch-action: pan-y pinch-zoom;
  /* faderar in + glider upp till sin plats när den rullas in i vy, se IntersectionObserver i JS */
  opacity: 0; transform: translateY(28px);
  transition: opacity .45s ease, transform .45s ease;
}
.carousel-wrap.in-view {
  opacity: 1; transform: translateY(0);
}
.carousel-nav {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 0 12px 12px;
}
.carousel-arrow {
  display: grid; place-items: center;
  width: 46px; height: 44px; padding: 0;
  border: 0; border-radius: 999px;
  background: #eeebe7; color: #111; opacity: .88; cursor: pointer;
}
.carousel-arrow svg {
  display: block; width: 21px; height: 21px;
  fill: none; stroke: currentColor; stroke-width: 1.25;
  stroke-linecap: round; stroke-linejoin: round;
}
.carousel-arrow-prev svg { transform: scaleX(-1); }

@media (hover: hover) and (pointer: fine) {
  .carousel-arrow:hover { opacity: 1; }
}
@media (prefers-reduced-motion: no-preference) {
  .carousel-arrow { transition: opacity .2s ease; }
}

.carousel-track { position: relative; }
.carousel {
  display: flex; align-items: flex-start; gap: 12px;
  overflow-x: hidden; padding: 0 12px;
}

.zone {
  position: absolute; top: 0; bottom: 0; width: 50%; z-index: 6;
}
.zone-left {
  left: 0;
  cursor: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2258%22%20height%3D%2240%22%20viewBox%3D%220%200%2058%2040%22%3E%3Cpath%20d%3D%22M57%2020H2%20M20%202L2%2020L20%2038%22%20fill%3D%22none%22%20stroke%3D%22%23111%22%20stroke-width%3D%222.25%22%2F%3E%3C%2Fsvg%3E") 29 20, pointer;
}
.zone-right {
  right: 0;
  cursor: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2258%22%20height%3D%2240%22%20viewBox%3D%220%200%2058%2040%22%3E%3Cpath%20d%3D%22M1%2020H56%20M38%202L56%2020L38%2038%22%20fill%3D%22none%22%20stroke%3D%22%23111%22%20stroke-width%3D%222.25%22%2F%3E%3C%2Fsvg%3E") 29 20, pointer;
}

/* kortbredd: 2 på desktop och surfplatta, 1 på mobil */
.card-item {
  flex: 0 0 auto; display: flex; flex-direction: column;
  width: calc((100% - 12px) / 2);
}
@media (max-width: 700px) {
  .card-item { width: 100%; }
}
.card-media { position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: 0; overflow: hidden; }
.card-media img, .card-media video { width: 100%; height: 100%; object-fit: cover; display: block; }

.card-play {
  position: absolute; z-index: 7; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border: 0; padding: 10px 14px; border-radius: 2px;
  background: #fff; color: #111; font: inherit; cursor: pointer;
  white-space: nowrap;
}

.card-caption {
  margin-top: 4px;
}
.card-caption, .example-caption { font-size: 13px; line-height: 1.5; color: #1a1a1a; }
.cap-name { text-transform: uppercase; display: block; }
.cap-desc { display: block; }

/* ===== FOOTER =====
   Ligger i samma flex-kolumn som karusellen (.closing-section), med margin-top:
   auto så den alltid hamnar längst ner. Copyright till vänster, länkar till höger. */
.page-footer {
  margin-top: auto;
  padding: 0 12px 14px;
  font-size: 13px; line-height: 1.5; color: #1a1a1a;
}
.footer-details {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px; flex-wrap: wrap;
}
.footer-logo {
  display: block;
  width: 100%;
  height: auto;
  margin-top: clamp(16px, 2vw, 36px);
}
.footer-copy-short { display: none; }
@media (max-width: 700px) {
  /* kort copyright på mobil så den inte blir för lång och krockar med länkarna */
  .footer-copy-full { display: none; }
  .footer-copy-short { display: inline; }
}
.footer-links { display: flex; flex-direction: row; gap: 20px; }
.footer-links a { color: #1a1a1a; text-decoration: underline; }

/* ===== INFO PANEL ===== */
.info-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: 66%;
  background: #fdfcfa; color: #111;
  transform: translateX(100%);
  z-index: 32; overflow-y: auto;
  padding: 0 12px 14px;
  display: flex; flex-direction: column;
  --panel-example-width: 640px;
}
.info-panel.open { transform: translateX(0); }

.panel-topbar {
  position: sticky; top: 0; z-index: 1;
  flex: none; display: flex; justify-content: space-between; align-items: flex-start;
  gap: 4px; margin-inline: -12px; padding: var(--header-top-padding) 12px 12px;
  background: inherit;
  font-size: 13px; line-height: var(--header-line-height); font-weight: 400;
  text-transform: uppercase;
}
.panel-close {
  padding: 0; border: 0; background: none;
  font: inherit; color: inherit; text-transform: inherit;
  cursor: pointer;
}

@media (max-width: 700px) {
  .info-panel { width: 100%; } /* täcker hela skärmen när den fälls ut på mobil */
}

.info-panel p {
  font-size: 13px; line-height: 1.35; margin: 0 0 18px;
  overflow-wrap: anywhere;
  color: #1a1a1a;
}
.examples {
  display: flex; gap: 12px; margin-bottom: 22px;
  max-width: var(--panel-example-width);
}
.example { flex: 0 0 auto; }
.example-inspo, .example-muse { width: calc((100% - 12px) / 2); }
.example-thumb {
  width: 100%; aspect-ratio: 4 / 5; border-radius: 0;
  background: repeating-linear-gradient(45deg, #e4e0d8, #e4e0d8 8px, #d8d3c8 8px, #d8d3c8 16px);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: #9a938a;
  margin-bottom: 6px; overflow: hidden;
}
.example-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; background: #eeeae1; }
@media (max-width: 700px) {
  .examples { flex-direction: column; }
  .example-inspo, .example-muse { width: 100%; }
}
.panel-links {
  display: flex; flex-direction: row; justify-content: flex-end; gap: 20px;
  margin-top: auto;
  padding-top: 28px;
  position: relative; top: -1px;
}
.panel-links a { font-size: 13px; color: #1a1a1a; text-decoration: underline; }

@media (min-width: 701px) {
  header,
  .card-caption .cap-name,
  .page-footer,
  .panel-topbar,
  .info-panel p,
  .example-caption .cap-name,
  .panel-links a {
    font-size: 15px;
  }
  .info-panel { --panel-example-width: 820px; }
}
