/* ================================================================
   07. PORTFOLIO CAROUSEL
   Prosjekter carousel. Also holds a few mobile tweaks for the
   handwritten note and call island at the end.

   Files load in number order (01 → 12). Later files override
   earlier ones, so keep the order when moving rules around.
   ================================================================ */

/* portfolio carousel */
#prosjekter .sec-head {
  align-items: center;
}

.projects {
  display: flex!important;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 8px 6px 34px;
  margin: -8px -6px -34px;
  scroll-padding-inline: 6px;
  outline: none;
}

.projects::-webkit-scrollbar {
  display: none;
}

.projects>.proj {
  flex: 0 0 calc((100% - 16px) / 2);
  scroll-snap-align: start;
  min-width: 0;
}

.projects:focus-visible {
  outline: 3px solid var(--royal);
  outline-offset: 4px;
  border-radius: 24px;
}

.shot.g3 {
  background: radial-gradient(closest-side at 50% 60%,rgba(11,26,92,.45),rgba(190,200,245,.6) 60%,rgba(255,255,255,.5));
}

.shot.g4 {
  background: radial-gradient(closest-side at 50% 60%,rgba(47,91,255,.4),rgba(212,245,60,.35) 60%,rgba(255,255,255,.5));
}

.car-nav {
  display: flex;
  gap: 10px;
}

.car-btn {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: rgba(255,255,255,.75);
  color: var(--ink);
  box-shadow: inset 0 1px 0 #fff,0 10px 22px -14px rgba(11,26,92,.45);
  transition: transform .2s,background .2s,color .2s,opacity .25s;
}

.car-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.car-btn:hover:not(:disabled) {
  background: var(--royal);
  color: #fff;
  transform: translateY(-1px);
}

.car-btn:focus-visible {
  outline: 3px solid var(--royal);
  outline-offset: 3px;
}

.car-btn:disabled {
  opacity: .35;
  cursor: default;
}

#car-next:not(:disabled) {
  animation: car-nudge 1.8s ease-in-out infinite;
}

@keyframes car-nudge {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 3px 0;
  }
}

@media (max-width:1199px) {
  .projects>.proj {
    flex-basis: 86%;
  }
  .car-btn {
    width: 42px;
    height: 42px;
  }
}

@media (prefers-reduced-motion:reduce) {
  .projects {
    scroll-behavior: auto;
  }
  #car-next {
    animation: none!important;
  }
}

/* medium screens (mobile layout, more room) */
@media (min-width:700px) and (max-width:1199px) {
  .projects>.proj {
    flex-basis: calc((100% - 16px) / 2 - 24px);
  }
  .hero-side {
    max-width: 560px;
    width: 100%;
    margin: 0 auto;
  }
  .cta .btn {
    width: auto!important;
  }
}

@media (max-width:1199px) {
  .hand-note {
    justify-content: center;
    margin-left: 0;
    margin-right: 0;
  }
  .hand-note span {
    text-align: center;
    transform-origin: center bottom;
  }
}

@media (max-width:1199px) {
  .island-wrap {
    justify-content: center;
  }
}

@media (max-width:1199px) {
  .call .call-ok {
    width: 52px;
    height: 52px;
    min-width: 52px;
    aspect-ratio: 1/1;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    flex: 0 0 52px;
  }
  .call .call-ok span {
    display: none;
  }
}
