/* ============================================================
   Morelyte – "Om": Vi planerar, vårt systerföretag producerar
   Mörk sektion med foto av teamet som bakgrund (mörk toning) som glider över Grunden först som ett
   kort (rundade hörn, skugga, z-index 3) och är själv sticky så att
   Våra kunder kan glida över den (--stick från stack.js). Rubrik och ingress,
   därunder tre vinster i tre kolumner. Allt tonas in staggrat när sektionen
   kommer i bild (about.js sätter .is-in).
   ============================================================ */

:root {
  --a-bg: #1b2120;
  --a-bg-2: #232a29;
  --a-fg: #ffffff;
  --a-mute: rgba(255, 255, 255, 0.62);
  --a-line: rgba(255, 255, 255, 0.14);
  --a-yellow: #ffbe19;
  --a-green: #335151;
}

.about {
  position: sticky;
  top: var(--stick, 0px);
  z-index: 3;
  background: var(--a-bg);
  color: var(--a-fg);
  border-radius: 36px 36px 0 0;
  box-shadow: 0 -40px 80px -40px rgba(27, 33, 32, 0.7);
  padding: clamp(88px, 12vh, 150px) 0 clamp(96px, 14vh, 180px);
  overflow: hidden;
}

/* Foto som bakgrund (teamet i soffan) + mörk toning. Tätast till
   vänster där texten ligger, så fotot får andas till höger. Fotot
   zoomar långsamt in till sin plats när sektionen kommer i bild. */
.about::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../assets/om.webp") center 40% / cover no-repeat;
  transform: scale(1.08);
  transition: transform 2.4s var(--ml-ease-out);
  pointer-events: none;
}
.about.is-in::before { transform: scale(1); }

.about::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(27, 33, 32, 0.92) 0%, rgba(27, 33, 32, 0.78) 45%, rgba(27, 33, 32, 0.5) 100%),
    linear-gradient(180deg, rgba(27, 33, 32, 0.55) 0%, rgba(27, 33, 32, 0) 30%, rgba(27, 33, 32, 0) 70%, rgba(27, 33, 32, 0.7) 100%);
  pointer-events: none;
}

.about__inner {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 72px);
}

/* ------------------------------------------------------------
   Vänster
   ------------------------------------------------------------ */
.about__title {
  margin: 0 0 28px;
  font-family: var(--ml-font-display);
  font-size: clamp(38px, 4.8vw, 68px);
  font-weight: 500;
  line-height: 1.02;
}

.about__text { max-width: 1320px; }

.about__lead {
  margin: 0 0 16px;
  max-width: 60ch;
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.55;
  color: var(--a-mute);
}

.about__points {
  list-style: none;
  margin: clamp(48px, 6vw, 72px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 clamp(28px, 4vw, 56px);
}

.about__points li {
  padding: 26px 0 8px;
  border-top: 1px solid var(--a-line);
}

.about__points h3 {
  margin: 0 0 6px;
  font-family: var(--ml-font-display);
  font-size: clamp(20px, 1.7vw, 24px);
  font-weight: 500;
  line-height: 1.2;
}

.about__points p {
  margin: 0;
  max-width: 48ch;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--a-mute);
}

/* ------------------------------------------------------------
   Inflygning när sektionen kommer i bild
   ------------------------------------------------------------ */
.about__title,
.about__lead,
.about__points li {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.7s ease,
    transform 1s var(--ml-ease-out);
  transition-delay: calc(var(--i, 0) * 90ms);
}

.about.is-in .about__title,
.about.is-in .about__lead,
.about.is-in .about__points li {
  opacity: 1;
  transform: none;
}

/* ------------------------------------------------------------
   Mobil / smal
   ------------------------------------------------------------ */
@media (max-width: 720px) {
  .about { border-radius: 24px 24px 0 0; }
  /* På mobil ligger texten över hela bredden: jämnare mörk toning */
  .about::after {
    background: linear-gradient(180deg, rgba(27, 33, 32, 0.86) 0%, rgba(27, 33, 32, 0.8) 100%);
  }
}

@media (max-width: 960px) {
  .about__points {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .about__points li { padding: 22px 0; }
  .about__points li:last-child { border-bottom: 1px solid var(--a-line); }
}

@media (prefers-reduced-motion: reduce) {
  .about::before { transform: none; transition: none; }
  .about__title,
  .about__lead,
  .about__points li {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
