/* ============================================================
   SMORT HERO — Smort 4.0 "Dune"
   Ljus grå scen, stor rubrik i en färg, en produktvy i
   skärmram som reser sig ur mörka, blanka 3D-dyner när man
   scrollar (native scroll + GSAP ScrollTrigger, se JS).
   Dynerna är renderade bilder med alfakanal (två lager för
   djup/parallax) i child-temat: assets/img/smort40/hero-dunes-*.
   ============================================================ */

@keyframes smort-hero-rise {
  from {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}

@keyframes smort-hero-ticker {
  to {
    transform: translateX(-50%);
  }
}

@keyframes smort-hero-emerge {
  from {
    opacity: 0;
    transform: translate3d(0, 12%, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ── Section shell ───────────────────────────────────────── */
.smort-hero {
  /* Endast varumärkesfärger: #0A0A0A, #F5F5F0, #E2FAB3 och vitt */
  --smort-hero-paper: #f5f5f0;
  --smort-hero-fg: #0a0a0a;
  --smort-hero-muted: rgba(10, 10, 10, 0.62);
  --smort-hero-night: #0a0a0a;
  /* Dynbildens storlek: alltid minst 960px bred så vågorna har tyngd på mobil */
  --smort-dunes-w: max(100vw, 960px);
  --smort-dunes-h: calc(var(--smort-dunes-w) / 2.4);
  /* Hur långt dynerna når under enheten (andel av dynhöjden) */
  --smort-dunes-below: 0.40;
  position: relative;
  width: 100%;
  overflow: hidden;
  display: block;
  isolation: isolate;
  color: var(--smort-hero-fg);
  background: var(--smort-hero-paper);
  padding-bottom: 0;
  margin-bottom: 0;
}

.wp-block-acf-smort-hero {
  margin-bottom: 0 !important;
}

.wp-block-acf-smort-hero + .wp-block-acf-smort-video-hero {
  margin-top: 0 !important;
}

/* ── Backdrop: mjukt ljus uppifrån ───────────────────────── */
.smort-hero__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.smort-hero__glow {
  position: absolute;
  left: 50%;
  top: -18%;
  width: min(1400px, 130vw);
  aspect-ratio: 1.6;
  transform: translateX(-50%);
  background:
    radial-gradient(50% 50% at 50% 50%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.3) 45%, transparent 72%);
  filter: blur(10px);
}

/* ── Inner / content ─────────────────────────────────────── */
.smort-hero__inner {
  position: relative;
  z-index: 3;
  width: min(100% - 3rem, 1280px);
  margin-inline: auto;
  padding-block: clamp(5.5rem, 6.4vw, 6rem) 0;
}

.smort-hero__content {
  max-width: 62rem;
  margin-inline: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Badge ───────────────────────────────────────────────── */
.smort-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(10, 10, 10, 0.08);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 8px 24px -16px rgba(10, 10, 10, 0.25);
  padding: 0.3rem 1rem 0.3rem 0.3rem;
  margin-bottom: 1rem;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  animation: smort-hero-rise 1s var(--smort-ease) 0.05s both;
}

.smort-hero__badge-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 9999px;
  background: var(--primary);
  color: #0a0a0a;
  font-family: var(--body-font);
  font-size: 0.6875rem;
  font-weight: var(--font-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.7rem;
  line-height: 1;
}

.smort-hero__badge-text {
  font-family: var(--body-font);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--smort-hero-muted);
  white-space: nowrap;
}

/* ── Heading (en färg) ───────────────────────────────────── */
.smort-hero__heading {
  font-family: var(--heading-font);
  font-size: clamp(2.5rem, 4.4vw, 4.1rem);
  font-weight: var(--font-normal);
  line-height: 0.98;
  letter-spacing: -0.045em;
  color: var(--smort-hero-fg);
  -webkit-text-fill-color: currentColor;
  margin: 0 0 0.9rem;
  text-wrap: balance;
}

.smort-hero__heading-line {
  display: block;
}

.smort-hero__heading-line--accent {
  color: inherit;
  font-style: normal;
}

html:not(.smort-gsap) .smort-hero__heading-line {
  animation: smort-hero-rise 1.1s var(--smort-ease) both;
}

html:not(.smort-gsap) .smort-hero__heading-line + .smort-hero__heading-line {
  animation-delay: 0.12s;
}

/* ── Body text ───────────────────────────────────────────── */
.smort-hero__body {
  font-family: var(--body-font);
  font-size: clamp(1rem, 1.3vw, 1.125rem);
  line-height: 1.6;
  color: var(--smort-hero-muted);
  max-width: 56ch;
  margin: 0 0 1.4rem;
  animation: smort-hero-rise 1s var(--smort-ease) 0.3s both;
}

/* ── CTA row ─────────────────────────────────────────────── */
.smort-hero__cta-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  animation: smort-hero-rise 1s var(--smort-ease) 0.42s both;
}

.smort-hero__cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  border-radius: 9999px;
  padding: 0.4rem 1.25rem 0.4rem 0.4rem;
  font-family: var(--body-font);
  font-size: 0.9375rem;
  font-weight: var(--font-semibold);
  color: var(--smort-hero-fg);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(10, 10, 10, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
  white-space: nowrap;
}

.smort-hero__cta-secondary:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(10, 10, 10, 0.2);
}

.smort-hero__cta-secondary-icon {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: #0a0a0a;
  color: #f5f5f0;
  transition: transform 0.4s var(--smort-ease);
}

.smort-hero__cta-secondary:hover .smort-hero__cta-secondary-icon {
  transform: scale(1.08);
}

/* ── Scen: enhet + dyner ─────────────────────────────────── */
.smort-hero__scene {
  position: relative;
  z-index: 2;
  margin-top: clamp(1.25rem, 2vw, 1.75rem);
  /* plats för dynerna under enheten */
  padding-bottom: calc(var(--smort-dunes-h) * var(--smort-dunes-below));
}

.smort-hero:not(.smort-hero--has-device) .smort-hero__scene {
  margin-top: clamp(1rem, 3vw, 2rem);
  height: calc(var(--smort-dunes-h) * 0.62);
  padding-bottom: 0;
}

.smort-hero__stage {
  position: relative;
  z-index: 1;
  width: min(100% - 3rem, 1160px);
  margin-inline: auto;
  perspective: 1800px;
  perspective-origin: 50% 100%;
  animation: smort-hero-emerge 1.4s var(--smort-ease) 0.35s both;
}

.smort-hero__stage::before {
  /* svagt lime-skimmer bakom skärmen — accent, inte färgfält */
  content: "";
  position: absolute;
  left: 50%;
  top: -12%;
  width: 70%;
  height: 60%;
  transform: translateX(-50%);
  background: radial-gradient(50% 50% at 50% 50%, rgba(226, 250, 179, 0.75), transparent 70%);
  filter: blur(60px);
  z-index: -1;
}

.smort-hero__device {
  position: relative;
  margin: 0;
  padding: clamp(0.5rem, 1.2vw, 1rem);
  border-radius: clamp(1rem, 2vw, 1.75rem);
  background: #0a0a0a;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 0 0 1px rgba(10, 10, 10, 0.55),
    0 2px 0 1px rgba(255, 255, 255, 0.35),
    0 60px 120px -40px rgba(10, 10, 10, 0.55),
    0 30px 60px -30px rgba(10, 10, 10, 0.45);
  transform-origin: 50% 100%;
  will-change: transform;
}

.smort-hero__device-cam {
  position: absolute;
  top: clamp(0.18rem, 0.45vw, 0.4rem);
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: rgba(245, 245, 240, 0.14);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.smort-hero__device-screen {
  position: relative;
  overflow: hidden;
  border-radius: clamp(0.5rem, 1vw, 0.9rem);
  background: #0a0a0a;
}

.smort-hero__device-img {
  display: block;
  width: 100%;
  height: auto;
}

.smort-hero__device-gloss {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 32%);
  mix-blend-mode: screen;
}

/* Dynerna: två lager (bak/fram) som täcker enhetens nederdel */
.smort-hero__dunes {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: -3px;
  width: var(--smort-dunes-w);
  height: var(--smort-dunes-h);
  transform: translateX(-50%);
  pointer-events: none;
  /* mjuk övre kant så bildens överkant aldrig syns som en linje */
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 14%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 14%);
}

.smort-hero__dunes-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  will-change: transform;
}

.smort-hero__dunes-layer--back {
  filter: none;
}

/* ── Mörk fot med integrationer ──────────────────────────── */
.smort-hero__foot {
  position: relative;
  z-index: 3;
  background: var(--smort-hero-night);
  color: #f5f5f0;
  margin-top: -3px;
  padding: clamp(0.5rem, 2vw, 1.5rem) 0 clamp(3rem, 6vw, 5rem);
}

.smort-hero__logos {
  width: min(100% - 3rem, 1280px);
  margin-inline: auto;
  animation: smort-hero-rise 1s var(--smort-ease) 0.7s both;
}

.smort-hero__logos-heading {
  font-family: var(--body-font);
  font-size: 0.6875rem;
  font-weight: var(--font-semibold);
  color: rgba(245, 245, 240, 0.62);
  text-align: center;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 1.75rem;
}

.smort-hero__logos-slider {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.smort-hero__logos-track {
  display: flex;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  width: max-content;
  animation: smort-hero-ticker 40s linear infinite;
}

.smort-hero__logos-track:hover {
  animation-play-state: paused;
}

.smort-hero__logo-item {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.smort-hero__logo-img {
  height: auto;
  width: auto;
  max-width: 140px;
  max-height: 40px;
  object-fit: contain;
  filter: grayscale(1) brightness(0) invert(1);
  opacity: 0.55;
  transition: opacity 0.3s ease;
}

.smort-hero__logo-img:hover {
  opacity: 1;
}

.smort-hero__logo-text {
  font-family: var(--heading-font);
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  font-weight: var(--font-normal);
  letter-spacing: -0.03em;
  color: rgba(245, 245, 240, 0.42);
  white-space: nowrap;
  transition: color 0.3s ease;
}

.smort-hero__logo-item:hover .smort-hero__logo-text {
  color: #f5f5f0;
}

.smort-hero__logos-edge {
  position: absolute;
  inset-block: 0;
  width: clamp(60px, 14vw, 180px);
  pointer-events: none;
  z-index: 2;
}

.smort-hero__logos-edge--left {
  left: 0;
  background: linear-gradient(to right, var(--smort-hero-night) 0%, transparent 100%);
}

.smort-hero__logos-edge--right {
  right: 0;
  background: linear-gradient(to left, var(--smort-hero-night) 0%, transparent 100%);
}

/* Undersidor (utan enhet): lite kompaktare topp */
.smort-hero:not(.smort-hero--has-device) .smort-hero__inner {
  padding-top: clamp(8rem, 12vw, 9.5rem);
}

/* ── Responsivt ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .smort-hero {
    --smort-dunes-below: 0.46;
  }
}

@media (max-width: 768px) {
  .smort-hero {
    --smort-dunes-below: 0.5;
  }

  .smort-hero__badge {
    gap: 0.45rem;
    padding-right: 0.75rem;
  }

  .smort-hero__badge-label {
    font-size: 0.5625rem;
    padding: 0.32rem 0.55rem;
  }

  .smort-hero__badge-text {
    font-size: 0.75rem;
  }

  .smort-hero__cta-wrap {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 22rem;
  }

  .smort-hero__cta-wrap > * {
    justify-content: center;
  }

  .smort-hero__stage {
    width: calc(100% - 2rem);
  }

  .smort-hero__device-cam {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .smort-hero__badge,
  .smort-hero__heading-line,
  .smort-hero__body,
  .smort-hero__cta-wrap,
  .smort-hero__stage,
  .smort-hero__logos,
  .smort-hero__logos-track {
    animation: none !important;
  }

  .smort-hero__device,
  .smort-hero__dunes-layer {
    transform: none !important;
  }
}

/* Utan logotypfot (undersidor): dynerna löses upp nedåt i nästa ljusa sektion */
.smort-hero--no-foot {
  background: var(--smort-hero-paper);
}

.smort-hero--no-foot .smort-hero__dunes {
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 55%, transparent 96%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 55%, transparent 96%);
}

.smort-hero--no-foot:not(.smort-hero--has-device) .smort-hero__scene {
  margin-top: clamp(1.5rem, 4vw, 3rem);
  height: calc(var(--smort-dunes-h) * 0.92);
}

/* ── Runda 2b: kompakt topp som referensen ───────────────────
   Eyebrow som ren liten versal-text (samma ACF-fält, ingen pill),
   tät rytm direkt under headern, enheten börjar ~50 % ned. */
.smort-hero__inner {
  padding-top: clamp(5.25rem, 6vw, 5.75rem);
}

.smort-hero__badge {
  gap: 0.6em;
  padding: 0;
  margin-bottom: 0.9rem;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.smort-hero__badge-label,
.smort-hero__badge-text {
  padding: 0;
  background: none;
  border-radius: 0;
  font-family: var(--body-font);
  font-size: 0.6875rem;
  font-weight: var(--font-medium);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--smort-hero-muted);
  white-space: nowrap;
}

.smort-hero__badge-label + .smort-hero__badge-text::before {
  content: "·";
  margin-right: 0.6em;
}

.smort-hero__heading {
  margin-bottom: 0.85rem;
}

.smort-hero__body {
  max-width: 62ch;
  font-size: clamp(0.975rem, 1.15vw, 1.0625rem);
  margin-bottom: 1.35rem;
}

/* Sekundär CTA som diskret textlänk så en tydlig knapp dominerar */
.smort-hero__cta-secondary {
  background: none;
  border: 0;
  padding: 0.4rem 0.5rem;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  color: var(--smort-hero-muted);
  font-weight: var(--font-medium);
}

.smort-hero__cta-secondary:hover {
  background: none;
  color: var(--smort-hero-fg);
}

.smort-hero__cta-secondary-icon {
  width: 1.75rem;
  height: 1.75rem;
}

@media (max-width: 768px) {
  .smort-hero__inner {
    padding-top: 5.5rem;
  }

  .smort-hero__badge-label,
  .smort-hero__badge-text {
    font-size: 0.625rem;
    letter-spacing: 0.16em;
    white-space: normal;
  }

  .smort-hero__badge {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 0.2rem;
  }

  .smort-hero__cta-wrap {
    flex-direction: row;
    align-items: center;
    width: auto;
    max-width: none;
  }
}

@media (max-width: 768px) {
  .smort-hero__badge {
    flex-direction: column;
  }

  .smort-hero__badge-label + .smort-hero__badge-text::before {
    content: none;
  }
}

/* ============================================================
   Runda 3 — referensproportioner: större rubrik på två långa
   rader, mindre skärm som tittar upp BAKOM vågorna (vågorna
   ligger framför och täcker skärmens nedre del) och reser sig
   vid scroll. Vågbilden är nu lägre (2880×800, 3.6:1).
   ============================================================ */
.smort-hero {
  --smort-dunes-w: max(100vw, 960px);
  --smort-dunes-h: calc(var(--smort-dunes-w) / 3.6);
  --smort-dunes-below: 0.03;
}

.smort-hero__content {
  max-width: 76rem;
}

.smort-hero__heading {
  font-size: clamp(2.6rem, 6vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  margin-bottom: 0.85rem;
}

.smort-hero__stage {
  width: min(100% - 3rem, 960px);
}

.smort-hero__scene {
  margin-top: clamp(1.5rem, 2.6vw, 2.25rem);
}

.smort-hero__dunes {
  z-index: 3;
}

@media (max-width: 1024px) {
  .smort-hero {
    --smort-dunes-below: 0.05;
  }
}

@media (max-width: 768px) {
  .smort-hero {
    --smort-dunes-w: max(100vw, 640px);
    --smort-dunes-below: 0.12;
  }

  .smort-hero__heading {
    font-size: clamp(2.4rem, 10.5vw, 3.4rem);
  }
}

.smort-hero {
  --smort-dunes-below: 0;
}

.smort-hero__inner {
  padding-top: clamp(5.25rem, 6vw, 5.75rem);
}

.smort-hero__scene {
  margin-top: clamp(0.75rem, 1.4vw, 1.25rem);
}

.smort-hero--has-device .smort-hero__stage {
  width: min(100% - 3rem, 900px);
  /* skärmens nederdel går ner bakom vågorna/foten */
  margin-bottom: calc(var(--smort-dunes-h) * -0.06);
}

.smort-hero__glow::after,
.smort-hero__stage::before {
  opacity: 0.6;
}

@media (max-width: 768px) {
  .smort-hero {
    --smort-dunes-below: 0.06;
  }

  .smort-hero--has-device .smort-hero__stage {
    width: calc(100% - 2rem);
    margin-bottom: 0;
  }
}

/* ============================================================
   Runda 5 – bredare enhet + ljust dashboardläge (Johans feedback)
   Vågorna ligger kvar framför nederdelen; scroll-effekten orörd.
   ============================================================ */
.smort-hero--has-device .smort-hero__stage {
  width: min(100% - 3rem, 90vw, 1160px);
  /* bredare enhet = högre; vågorna lyfts så att de syns redan i första vyn */
  margin-bottom: calc(var(--smort-dunes-h) * -0.5);
}

.smort-hero__device-screen {
  background: #F5F5F0;
}

.smort-hero__device-gloss {
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 30%);
  mix-blend-mode: normal;
}

@media (max-width: 768px) {
  .smort-hero--has-device .smort-hero__stage {
    width: 90vw;
    margin-bottom: 0;
  }
}
.smort-hero--has-device .smort-hero__scene {
  display: flow-root; /* så att scenens negativa marginal lyfter vågorna över enheten */
}

/* ============================================================
   Runda 6 – startsidans hero som Orynthiq: platt enhet, inga
   överlägg på skärmen, asymmetriska dyner framför nederdelen.
   ============================================================ */
.smort-hero--has-device .smort-hero__inner {
  padding-top: clamp(5rem, 5.8vw, 5.25rem);
}
.smort-hero--has-device .smort-hero__heading {
  font-size: clamp(2.4rem, 5.2vw, 4.75rem);
}
.smort-hero--has-device .smort-hero__scene {
  margin-top: clamp(1rem, 2vw, 1.5rem);
  padding-bottom: 0;
}
.smort-hero--has-device .smort-hero__stage {
  width: min(100% - 2rem, 90vw, 1000px);
  margin-bottom: 0;
  perspective: none;
  animation-name: smort-hero-rise-flat;
}
.smort-hero--has-device .smort-hero__stage::before,
.smort-hero--has-device .smort-hero__glow {
  display: none;
}
.smort-hero--has-device .smort-hero__device {
  transform: none;
  padding: clamp(0.4rem, 0.85vw, 0.7rem);
  border-radius: clamp(0.9rem, 1.6vw, 1.5rem);
  background: #0A0A0A;
  box-shadow: 0 0 0 1px rgba(10, 10, 10, 0.9), 0 40px 80px -50px rgba(10, 10, 10, 0.45);
}
.smort-hero--has-device .smort-hero__device-screen {
  border-radius: clamp(0.5rem, 1vw, 0.95rem);
  background: #FFFFFF;
}
.smort-hero--has-device .smort-hero__device-img {
  image-rendering: auto;
}
.smort-hero--has-device .smort-hero__device-gloss {
  display: none;
}
.smort-hero--has-device .smort-hero__device-cam {
  display: block;
  top: clamp(0.12rem, 0.3vw, 0.25rem);
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  background: #1c1c1c;
  box-shadow: none;
}
/* Dynerna: fullbredd, förankrade i enhetens underkant, täcker ~45 % av skärmens högra del */
.smort-hero--has-device .smort-hero__dunes {
  left: 0;
  right: 0;
  bottom: -2px;
  width: 100%;
  height: calc(100vw * 1380 / 2880);
  transform: none;
  -webkit-mask-image: none;
  mask-image: none;
}
.smort-hero--has-device .smort-hero__dunes-layer {
  object-fit: cover;
  object-position: 50% 100%;
}
@keyframes smort-hero-rise-flat {
  from { opacity: 0; transform: translate3d(0, 40px, 0); }
  to   { opacity: 1; transform: none; }
}
@media (max-width: 768px) {
  .smort-hero--has-device .smort-hero__stage {
    width: 90vw;
  }
  .smort-hero--has-device .smort-hero__dunes {
    height: max(calc(100vw * 1380 / 2880), 180px);
  }
  .smort-hero--has-device .smort-hero__device-cam {
    display: none;
  }
}

/* ============================================================
   Runda 6 – exakt som referensen: plan skärm, inga overlays,
   asymmetriska dyner framför skärmens nederdel.
   ============================================================ */
.smort-hero--has-device .smort-hero__stage {
  width: min(100% - 2rem, 70vw, 1000px);
  /* skärmens underkant går ner bakom dynerna (döljs även till vänster) */
  margin-bottom: -5vw;
  perspective: none;
}
.smort-hero--has-device .smort-hero__stage::before { display: none; }
.smort-hero--has-device .smort-hero__scene {
  margin-top: clamp(1.75rem, 3.2vw, 2.75rem);
  padding-bottom: 0;
}
.smort-hero__device {
  padding: clamp(0.35rem, 0.75vw, 0.6rem);
  border-radius: clamp(0.9rem, 1.6vw, 1.4rem);
  background: #0A0A0A;
  box-shadow: 0 0 0 1px rgba(10, 10, 10, 0.9), 0 40px 80px -50px rgba(10, 10, 10, 0.5);
  transform: none;
}
.smort-hero__device-cam {
  top: clamp(0.1rem, 0.25vw, 0.2rem);
  width: 5px; height: 5px; margin-left: -2.5px;
  background: rgba(245, 245, 240, 0.22);
  box-shadow: none;
}
.smort-hero__device-screen {
  border-radius: clamp(0.5rem, 1vw, 0.85rem);
  background: #F5F5F0;
}
.smort-hero__device-img { image-rendering: auto; }
.smort-hero__device-gloss { display: none; }

/* Dynerna: full bredd, förankrade i scenens botten = skärmens underkant */
.smort-hero--has-device .smort-hero__dunes {
  left: 0;
  width: 100%;
  height: calc(100vw * 1040 / 2880);
  bottom: -2px;
  transform: none;
  -webkit-mask-image: none;
  mask-image: none;
}
.smort-hero--has-device .smort-hero__dunes-layer {
  object-fit: cover;
  object-position: 50% 100%;
}

@media (max-width: 768px) {
  .smort-hero--has-device .smort-hero__stage {
    width: calc(100% - 2rem);
    margin-bottom: -6vw;
  }
  .smort-hero--has-device .smort-hero__dunes {
    height: max(calc(100vw * 1040 / 2880), 170px);
  }
}

/* Runda 6b – flackare dyner: höjden följer skärmens bredd (inte viewporten),
   så täckningen blir ~25–30 % till höger och ~10 % till vänster på alla bredder. */
.smort-hero--has-device .smort-hero__stage {
  margin-bottom: -30px;
}
.smort-hero--has-device .smort-hero__dunes {
  height: calc(min(100vw - 2rem, 70vw, 1000px) * 0.32);
}
.smort-hero--has-device .smort-hero__dunes-layer {
  object-fit: fill;
}
@media (max-width: 768px) {
  .smort-hero--has-device .smort-hero__stage {
    margin-bottom: -14px;
  }
  .smort-hero--has-device .smort-hero__dunes {
    height: calc((100vw - 2rem) * 0.32);
  }
}

/* Runda 6c: dynerna syns i första vyn – höjs relativt enheten */
.smort-hero--has-device .smort-hero__stage { margin-bottom: calc(min(100vw - 2rem, 70vw, 1000px) * -0.255); }
.smort-hero--has-device .smort-hero__dunes { height: calc(min(100vw - 2rem, 70vw, 1000px) * 0.36); }
@media (max-width: 768px) {
  .smort-hero--has-device .smort-hero__stage { margin-bottom: calc((100vw - 2rem) * -0.255); }
  .smort-hero--has-device .smort-hero__dunes { height: calc((100vw - 2rem) * 0.36); }
}

/* Runda 7: subtila konturvågor i bakgrunden (bara tunna linjer, ingen fyllning) */
.smort-hero__lines {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: min(100%, 56rem);
  opacity: 0.11;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 92%);
  mask-image: linear-gradient(to bottom, #000 55%, transparent 92%);
}
.smort-hero__lines path { vector-effect: non-scaling-stroke; }
@media (max-width: 768px) {
  .smort-hero__lines { height: 42rem; opacity: 0.08; }
}

/* Runda 12c/27 (Johan): rubriken "Din e-handel är / redan utvecklad." – exakt två rader, inga radbrytningar inom raden. */
.smort-hero__heading-line { white-space: nowrap; }
@media (max-width: 768px) {
  .smort-hero .smort-hero__heading,
  .smort-hero--has-device .smort-hero__heading { font-size: clamp(2.25rem, 11.5vw, 3.4rem); } /* r27: kortare rubrik, större på mobil */
}

/* Runda 13 (Johan): bredare skärm som tar mer plats före scroll.
   --hw = enhetens bredd: ~1210px @1440, ~1400px @1920, full bredd − 2rem på mobil. */
.smort-hero--has-device {
  --hw: min(100vw - 2rem, 39.6vw + 640px, 1480px);
}
.smort-hero--has-device .smort-hero__scene {
  margin-top: clamp(1.25rem, 2.2vw, 2rem);
}
.smort-hero--has-device .smort-hero__stage {
  width: var(--hw);
  margin-bottom: calc(var(--hw) * -0.255);
}
.smort-hero--has-device .smort-hero__dunes {
  height: calc(var(--hw) * 0.31); /* flackare relativt den bredare skärmen: KPI-korten fria */
}
@media (max-width: 768px) {
  .smort-hero--has-device { --hw: calc(100vw - 2rem); }
}

/* ── Runda 15: kundloggor i den mörka bandet under dynerna ─────────────
   Loggorna är redan off-white (#F5F5F0) i temat, så inget filter behövs.
   Avstånd per objekt (inte gap) så att -50 % blir en exakt, sömlös loop. */
.smort-hero__logos-slider {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 clamp(48px, 10vw, 160px), #000 calc(100% - clamp(48px, 10vw, 160px)), transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 clamp(48px, 10vw, 160px), #000 calc(100% - clamp(48px, 10vw, 160px)), transparent 100%);
}
.smort-hero__logos-slider .smort-hero__logos-edge { display: none; }

.smort-hero__logos-track {
  gap: 0;
  animation-duration: 75s;
}
.smort-hero__logo-item {
  padding-inline-end: clamp(2.5rem, 4.6vw, 4.5rem);
  min-height: 2.75rem;
}
.smort-hero__logo-img--mono {
  height: var(--logo-h, 1.75rem);
  width: auto;
  max-width: none;
  max-height: none;
  filter: none;
  opacity: 0.75;
}
.smort-hero__logo-item:hover .smort-hero__logo-img--mono { opacity: 1; }

@media (max-width: 768px) {
  .smort-hero__logo-img--mono { height: calc(var(--logo-h, 1.75rem) * 0.78); }
  .smort-hero__logo-item { padding-inline-end: 2.25rem; min-height: 2.25rem; }
  .smort-hero__logos-track { animation-duration: 60s; }
}

@media (prefers-reduced-motion: reduce) {
  .smort-hero__logos-slider { -webkit-mask-image: none; mask-image: none; }
  .smort-hero__logos-track {
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 1.25rem;
    transform: none !important;
  }
  .smort-hero__logos-track > [aria-hidden="true"] { display: none; }
  .smort-hero__logo-item { padding-inline: 1.25rem; }
}

/* Runda 27/29 (Johan): ingress i två korta meningar – en mening per rad på alla bredder
   (balanserad om en mening ändå måste brytas på smal mobil). */
.smort-hero__body-s { display: inline; }
.smort-hero__body--split .smort-hero__body-s { display: block; text-wrap: balance; }

/* ============================================================
   Runda 34 – variant "Bakgrund: bild" (Startsida B)
   Fullbredd foto med platt mörkläggning i #0A0A0A, vänsterställd
   vit text i sajtens container. Standardvarianten påverkas inte.
   ============================================================ */
.smort-hero--photo {
  --smort-hero-fg: #FFFFFF;
  --smort-hero-muted: #F5F5F0;
  background: #0A0A0A;
  color: #FFFFFF;
}
.smort-hero--photo .smort-hero__lines,
.smort-hero--photo .smort-hero__glow { display: none; }
.smort-hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--hero-photo-pos, 50% 50%);
  user-select: none;
}
.smort-hero__photo-shade {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, var(--hero-photo-shade, 0.5));
}
/* r36: samma luft ovanför texten som startsidan (dashboard-skärmen hamnar exakt som på /) */
.smort-hero--photo .smort-hero__content {
  max-width: 48rem;
  margin-inline: 0;
  text-align: left;
  align-items: flex-start;
}
.smort-hero--photo .smort-hero__badge { justify-content: flex-start; }
.smort-hero--photo .smort-hero__badge-label,
.smort-hero--photo .smort-hero__badge-text { color: #F5F5F0; }
.smort-hero--photo .smort-hero__heading,
.smort-hero--photo .smort-hero__heading-line,
.smort-hero--photo .smort-hero__heading-line--accent { color: #FFFFFF; }
.smort-hero--photo .smort-hero__body { color: #F5F5F0; margin-inline: 0; }
.smort-hero--photo .smort-hero__body--split .smort-hero__body-s { text-wrap: pretty; }
.smort-hero--photo .smort-hero__cta-wrap { justify-content: flex-start; }
.smort-hero--photo .smort-hero__cta-secondary { color: #FFFFFF; }
.smort-hero--photo .smort-hero__cta-secondary:hover { color: #FFFFFF; }
.smort-hero--photo .smort-hero__cta-secondary-icon { background: #F5F5F0; color: #0A0A0A; }
.smort-hero--photo .smort-hero__device {
  box-shadow: 0 0 0 1px rgba(245, 245, 240, 0.14), 0 40px 80px -40px rgba(10, 10, 10, 0.8);
}
@media (max-width: 768px) {
  .smort-hero__photo { object-position: var(--hero-photo-pos-m, 50% 50%); }
  .smort-hero--photo .smort-hero__badge { align-items: flex-start; }
}

/* ============================================================
   Runda 35 – fullbredd foto/film (Startsida B)
   Vardagsbild med en av våra sajter i mobilen, eller en ljudlös
   filmloop. Ingen dashboard-skärm; texten vänsterställd nertill
   (desktop) / upptill (mobil) på den lugna ytan. Platt #0A0A0A.
   ============================================================ */
.smort-hero__picture { display: contents; }
.smort-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--hero-photo-pos, 50% 50%);
  opacity: 0;
  transition: opacity 0.6s ease;
}
.smort-hero.is-video-playing .smort-hero__video { opacity: 1; }
.smort-hero.smort-hero--fullbleed {
  --hero-h: clamp(38rem, 100svh, 64rem);
  padding-top: 0;
}
/* Fotot/filmen täcker bara heroytan (inte loggofoten) så beskärningen blir rätt */
.smort-hero--fullbleed .smort-hero__backdrop { bottom: auto; height: var(--hero-h); }
.smort-hero--fullbleed .smort-hero__inner {
  min-height: var(--hero-h);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: clamp(7rem, 10vw, 9rem);
  padding-bottom: clamp(4rem, 9vh, 7.5rem);
}
.smort-hero--fullbleed .smort-hero__content { max-width: 44rem; }
.smort-hero--fullbleed .smort-hero__foot { position: relative; z-index: 3; }
.smort-hero__video-toggle {
  position: absolute;
  right: 0;
  bottom: clamp(1.5rem, 4vh, 2.5rem);
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #F5F5F0;
  background: #0A0A0A;
  color: #FFFFFF;
  cursor: pointer;
  z-index: 4;
}
.smort-hero__video-toggle[hidden] { display: none; }
.smort-hero__video-toggle:hover { background: #F5F5F0; color: #0A0A0A; }
.smort-hero__video-toggle:focus-visible { outline: 2px solid #E2FAB3; outline-offset: 3px; }
.smort-hero__video-ico--play { display: none; }
.smort-hero.is-video-paused .smort-hero__video-ico--play { display: block; }
.smort-hero.is-video-paused .smort-hero__video-ico--pause { display: none; }
@media (max-width: 768px) {
  .smort-hero__video { object-position: var(--hero-photo-pos-m, 50% 50%); }
  .smort-hero.smort-hero--fullbleed { --hero-h: max(40rem, 100svh); }
  .smort-hero--fullbleed .smort-hero__inner {
    justify-content: flex-start;
    padding-top: 7.5rem;
    padding-bottom: 5rem;
  }
  .smort-hero__video-toggle { bottom: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .smort-hero__video { display: none; }
  .smort-hero__video-toggle { display: none; }
}

/* ============================================================
   Runda 37 – Startsida B (foto + dashboard): dashboard-ramen exakt
   lika bred som innehållscontainern (samma som rubrik/knappar/header),
   och standardavståndet (--smort-head-gap) mellan knappar och skärm.
   Gäller bara fotovarianten; startsidan påverkas inte.
   ============================================================ */
.smort-hero.smort-hero--photo.smort-hero--has-device .smort-hero__scene {
  margin-top: var(--smort-head-gap, clamp(2.25rem, 1.25rem + 2.4vw, 3.5rem));
}
.smort-hero.smort-hero--photo.smort-hero--has-device .smort-hero__stage {
  width: min(100% - 3rem, 1280px);
  max-width: none;
  margin-inline: auto;
}
.smort-hero.smort-hero--photo.smort-hero--has-device .smort-hero__device {
  width: 100%;
  margin-inline: 0;
}
/* Mobil: "Se demo" bryts till egen rad – ikonen i linje med knappar och skärm */
@media (max-width: 480px) {
  .smort-hero.smort-hero--photo .smort-hero__cta-secondary { padding-left: 0; }
}

/* ── r40: undersidor utan enhet (Våra case, Kontakta oss) ────
   Samma toppbehandling som case-sidorna: kompakt luft under
   texten i stället för en tom dynscen på ~400 px. */
.smort-hero--no-foot:not(.smort-hero--has-device) .smort-hero__scene {
  height: clamp(2.5rem, 6vw, 6rem);
  margin-top: clamp(1rem, 2vw, 1.5rem);
}
.smort-hero:not(.smort-hero--has-device):not(.smort-hero--photo) .smort-hero__body { color: #0A0A0A; }

/* r70: längre rubrik ("En bekymmersfri e-handel") – får radbrytas på smala skärmar i stället för att gå utanför. */
@media (max-width: 900px) {
  .smort-hero__heading-line { white-space: normal; text-wrap: balance; }
}

/* ── r96 (Johan t288u): delad rubrik på framsidan, Friday-stil ───────────────
   Vänster statisk del, höger del skiftar (blur + kort glid, ~2,8 s per fras).
   Alla fraser ligger i samma grid-cell → bredd/höjd reserveras, ingen layoutförskjutning.
   Storlek = startsidans H1 (ärvs från .smort-hero__heading). */
.smort-hero .smort-hero__split {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35em 1em;
  width: min(100vw - 3rem, 1280px);
  max-width: none;
  text-align: left;
  text-wrap: nowrap;
}
.smort-hero__split-l,
.smort-hero__split-r { white-space: nowrap; animation: smort-hero-rise 1.1s var(--smort-ease) both; }
.smort-hero__split-r { display: inline-grid; justify-items: end; text-align: right; animation-delay: 0.12s; }
.smort-hero__flip {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(0.3em);
  filter: blur(10px);
  transition: opacity 0.9s cubic-bezier(0.65, 0, 0.35, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.9s cubic-bezier(0.65, 0, 0.35, 1);
}
.smort-hero__flip.is-on { opacity: 1; transform: none; filter: none; }
.smort-hero__flip.is-out { opacity: 0; transform: translateY(-0.3em); filter: blur(10px); }
.smort-hero__sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (max-width: 768px) {
  .smort-hero .smort-hero__split { flex-direction: column; align-items: stretch; gap: 0.04em; width: 100%; }
  .smort-hero__split-l { align-self: flex-start; }
  .smort-hero__split-r { align-self: flex-end; justify-items: end; }
  .smort-hero__flip { white-space: normal; text-wrap: balance; }
}
@media (prefers-reduced-motion: reduce) {
  .smort-hero__split-l, .smort-hero__split-r { animation: none; }
  .smort-hero__flip { transition: none; }
}

/* ── r98 (Johan t290u follow-up): ingen överrubrik på startsidan.
   Delad rubrik kvar högst upp. Brödtext + knappar i en rad precis
   ovanför dashboarden (text vänster, knappar höger, gemensam baslinje).
   Mitten mellan rubrik och den raden lämnas öppen för senare telefonvideo. */
.smort-hero--split {
  --hero-mid: clamp(7.5rem, 4.75rem + 9vw, 13rem);
  --hero-dash: clamp(1.25rem, 1.4vw, 1.5rem);
}
.smort-hero--split.smort-hero--has-device .smort-hero__inner {
  padding-top: clamp(6.5rem, 7.2vw, 7.15rem);
}
.smort-hero--split.smort-hero--photo .smort-hero__content {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  text-align: left;
  align-items: stretch;
}
.smort-hero--split .smort-hero__heading,
.smort-hero--split .smort-hero__heading.smort-hero__split,
.smort-hero--split .smort-hero__split {
  width: 100%;
  max-width: none;
  margin-bottom: 0;
}
.smort-hero--split .smort-hero__support {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 2rem 3rem;
  width: 100%;
  max-width: none;
  margin-top: var(--hero-mid);
}
.smort-hero--split .smort-hero__body {
  margin: 0;
  max-width: 28rem;
  flex: 0 1 28rem;
}
.smort-hero--split .smort-hero__cta-wrap {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
  width: auto;
  max-width: none;
  margin: 0;
  flex-shrink: 0;
}
.smort-hero--split .smort-hero__cta-wrap > * {
  flex-shrink: 0;
}
.smort-hero--split .smort-hero__cta-secondary {
  display: inline-flex;
  align-items: center;
  min-height: 60px;
}
.smort-hero.smort-hero--split.smort-hero--photo.smort-hero--has-device .smort-hero__scene {
  margin-top: var(--hero-dash);
}
@media (max-width: 768px) {
  .smort-hero--split {
    --hero-mid: 2.25rem;
    --hero-dash: 1.25rem;
  }
  .smort-hero--split.smort-hero--has-device .smort-hero__inner {
    padding-top: 6.25rem;
  }
  .smort-hero--split .smort-hero__support {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 1.5rem;
    width: 100%;
  }
  .smort-hero--split .smort-hero__body {
    max-width: none;
    flex: none;
  }
  .smort-hero--split .smort-hero__cta-wrap {
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
  }
  .smort-hero--split .smort-hero__cta-secondary {
    min-height: 0;
  }
}

/* ── r104: något mörkare overlay (Johan). r103: tillbaka till rotting/telefon-videon. Full herotäckning bakom
   dashboard (som r99). Videon visas i 16:9 över hela bredden (zoom ut vs
   cover på den höga heron) så hela telefonen syns mer i öppningen, flyttad
   upp lite, centrerad, utan att skära i navbar eller höger rubrik. */
.smort-hero--split.smort-hero--video:not(.smort-hero--fullbleed) .smort-hero__backdrop {
  overflow: hidden;
}
.smort-hero--split.smort-hero--video:not(.smort-hero--fullbleed) .smort-hero__video,
.smort-hero--split.smort-hero--video:not(.smort-hero--fullbleed) .smort-hero__photo {
  inset: auto;
  max-width: none;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  min-height: 64%;
  object-fit: cover;
  object-position: var(--hero-photo-pos, 50% 50%);
  transform: translateY(-4.5%);
  opacity: 1;
}
.smort-hero--split.smort-hero--video:not(.smort-hero--fullbleed) .smort-hero__photo-shade {
  inset: 0;
  height: 100%;
  background:
    linear-gradient(
      to bottom,
      rgba(10, 10, 10, 0.42) 0%,
      rgba(10, 10, 10, 0.34) 12%,
      rgba(10, 10, 10, 0.16) 20%,
      rgba(10, 10, 10, 0.08) 26%,
      rgba(10, 10, 10, 0.08) 34%,
      rgba(10, 10, 10, 0.26) 41%,
      rgba(10, 10, 10, 0.36) 47%,
      rgba(10, 10, 10, 0.24) 58%,
      rgba(10, 10, 10, 0.42) 76%,
      rgba(10, 10, 10, 0.76) 90%,
      rgba(10, 10, 10, 0.94) 100%
    ),
    linear-gradient(
      to right,
      rgba(10, 10, 10, 0.28) 0%,
      transparent 22%,
      transparent 78%,
      rgba(10, 10, 10, 0.22) 100%
    ),
    rgba(10, 10, 10, 0.50);
}
@media (max-width: 768px) {
  .smort-hero--split.smort-hero--video:not(.smort-hero--fullbleed) .smort-hero__video,
  .smort-hero--split.smort-hero--video:not(.smort-hero--fullbleed) .smort-hero__photo {
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    min-height: 0;
    object-fit: cover;
    object-position: var(--hero-photo-pos-m, 50% 28%);
    transform: translateY(-6%);
  }
  .smort-hero--split.smort-hero--video:not(.smort-hero--fullbleed) .smort-hero__photo-shade {
    background:
      linear-gradient(
        to bottom,
        rgba(10, 10, 10, 0.40) 0%,
        rgba(10, 10, 10, 0.28) 10%,
        rgba(10, 10, 10, 0.14) 18%,
        rgba(10, 10, 10, 0.08) 24%,
        rgba(10, 10, 10, 0.16) 38%,
        rgba(10, 10, 10, 0.28) 48%,
        rgba(10, 10, 10, 0.22) 58%,
        rgba(10, 10, 10, 0.42) 76%,
        rgba(10, 10, 10, 0.78) 90%,
        rgba(10, 10, 10, 0.94) 100%
      ),
      rgba(10, 10, 10, 0.50);
  }
}

/* ── r104: hero-innehåll låst till samma kanter som navbaren
   (.smort-pn-header: min(calc(100vw - 2rem), 1280px)). Rubrik, brödtext
   och knappar får inte sticka utanför vid 1280/1440/1920. */
.smort-hero--split .smort-hero__inner {
  width: min(calc(100vw - 2rem), 1280px);
  max-width: none;
  margin-inline: auto;
  box-sizing: border-box;
}
.smort-hero--split .smort-hero__content,
.smort-hero--split .smort-hero__heading,
.smort-hero--split .smort-hero__heading.smort-hero__split,
.smort-hero--split .smort-hero__split,
.smort-hero--split .smort-hero__support {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.smort-hero--split .smort-hero__split-l,
.smort-hero--split .smort-hero__split-r {
  min-width: 0;
  max-width: 100%;
}
