/* Handoff: image cards, 20-degree coverflow and asymmetric service grid. */
.card-carousel { position: relative; max-width: 1120px; }
.card-carousel__stage, .card-carousel__track { position: relative; width: 100%; }
.carousel-card { overflow: hidden; }
.carousel-card__visual { overflow: hidden; }
.carousel-card__visual img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.carousel-card__body { display: flex; flex-direction: column; }
.carousel-card__badge { position: absolute; top: 14px; left: 14px; z-index: 2; padding: 4px 10px; border: 1px solid #38bdf84d; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.card-carousel__nav, .card-carousel__dots { display: flex; justify-content: center; align-items: center; }
.card-carousel__arrow { border: 1px solid; border-radius: 50%; cursor: pointer; }
.card-carousel__arrow:hover { border-color: #38bdf8; color: #38bdf8; }
.card-carousel__dot { padding: 0; border: 0; cursor: pointer; }
.hero__water-video { filter: none; transform: none; }
.hero__water-bg { background: #061523 url('Ressurser/hero-water-poster.jpg') center / cover no-repeat; }
.hero__video-toggle { position: absolute; right: 1.5rem; bottom: 1.5rem; z-index: 2; padding: .55rem .85rem; border: 1px solid #ffffff40; border-radius: 999px; background: #0f172ab3; color: #e2e8f0; font: 500 12px var(--font-sans); cursor: pointer; }

.services__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.service-card, .service-card:hover { background: linear-gradient(180deg, #0f172a26, #0f172ab3 50%, #0f172af5), var(--service-image) center / cover, #141f38; }
.service-card { grid-column: span 3; min-height: 240px; display: flex; flex-direction: column; justify-content: flex-end; padding: 26px; border-radius: 16px; border: 1px solid #94a3b826; backdrop-filter: none; }
.service-card--hero { grid-column: span 3; grid-row: span 2; padding: 36px; }
.service-card:nth-child(n+4) { grid-column: span 2; }
.service-card:nth-child(1) { --service-image: url('Ressurser/konekta-bim-modell.jpg'); }
.service-card:nth-child(2) { --service-image: url('Ressurser/vatech-revit-preview.svg'); }
.service-card:nth-child(3) { --service-image: url('Ressurser/atlas-model-wide-v37.webp'); }
.service-card:nth-child(4) { --service-image: url('Ressurser/konekta-kokleheia-montasje.jpg'); }
.service-card:nth-child(5) { --service-image: url('Ressurser/va-viewer-modell.jpg'); }
.service-card:nth-child(6) { --service-image: url('Ressurser/aamodt-vvs-prefab-1.jpg'); }
.service-card::before, .service-card::after { display: none; }
.service-card:hover { transform: translateY(-4px); border-color: #38bdf8; box-shadow: 0 16px 32px -14px #38bdf84d; }
.service-card__title { font-size: 20px; line-height: 1.3; }
.service-card--hero .service-card__title { font-size: 28px; }
.service-card__desc { margin: 10px 0 16px; font-size: 13.5px; line-height: 1.6; color: #e2e8f0; }
.service-card--hero .service-card__desc { font-size: 15px; }
.service-card__icon { flex-shrink: 0; background: #38bdf833; }
.service-card__link { margin-top: 0; color: #38bdf8; font-size: 13px; }

.card-carousel { --card-width: 320px; width: 100%; margin: 0 auto; font-family: var(--font-sans); }
.card-carousel__stage { height: 560px; min-height: 0; overflow: hidden; perspective: 1400px; }
.card-carousel__track { height: 100%; min-height: 0; touch-action: pan-y; user-select: none; }
.carousel-card, .blog-carousel .carousel-card { position: absolute; top: 40px; left: 50%; width: var(--card-width); height: 480px; min-height: 0; border-radius: 22px; background: #141f38; border: 1px solid #94a3b826; box-shadow: 0 30px 60px -20px #0009; backdrop-filter: none; cursor: pointer; transition: transform .55s cubic-bezier(.22,1,.36,1), opacity .55s ease; }
.carousel-card[data-active="true"] { border-color: #38bdf84d; box-shadow: 0 30px 60px -20px #0009; }
.carousel-card__visual, .blog-carousel .carousel-card__visual { position: absolute; inset: 0; height: 100%; min-height: 0; border: 0; }
.carousel-card__visual::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, #0f172a00 12%, #0f172a6b 45%, #0f172ad1 68%, #0f172afa 100%); }
.carousel-card__visual--contain img { object-fit: contain; object-position: center 15%; padding: 12px; background: #141f38; }
.carousel-card__body { position: absolute; inset: auto 0 0; padding: 28px 26px 30px; gap: 10px; text-shadow: 0 2px 10px #0009; }
.carousel-card__badge { background: #0f172ab3; font-family: var(--font-sans); color: #38bdf8; }
.carousel-card__eyebrow, .carousel-card__date { font: 700 12px var(--font-sans); letter-spacing: .1em; color: #38bdf8; }
.carousel-card__title { color: #f8fafc; font-size: 22px; line-height: 1.25; letter-spacing: -.01em; }
.carousel-card__text, .blog-carousel .carousel-card__text { display: block; color: #e2e8f0; font-size: 14.5px; line-height: 1.6; opacity: 0; max-height: 0; overflow: hidden; transition: opacity .3s, max-height .3s; }
.carousel-card[data-active="true"]:is(:hover, :focus-within) .carousel-card__text { opacity: 1; max-height: 220px; }
.carousel-card__features, .carousel-card__tags { display: none; }
.carousel-card__cta { margin-top: 4px; color: #38bdf8; font-size: 14.5px; font-weight: 600; }
.carousel-card__cta:hover { color: #7dd3fc; }
.card-carousel__nav { margin-top: 12px; gap: 10px; }
.card-carousel__arrow { position: absolute; top: 254px; z-index: 50; width: 52px; height: 52px; display: grid; place-items: center; color: #e2e8f0; border-color: #94a3b840; background: #0f172ab3; }
.card-carousel__arrow[data-carousel-prev] { left: 8px; }
.card-carousel__arrow[data-carousel-next] { right: 8px; }
.card-carousel__arrow svg { width: 21px; height: 21px; }
.card-carousel__dots { gap: 0; }
.card-carousel__dot, .card-carousel__dot.active { display: grid; place-items: center; width: 36px; height: 44px; background: transparent; }
.card-carousel__dot::after { content: ''; width: 8px; height: 8px; border-radius: 4px; background: #94a3b859; transition: width .3s, background .3s; }
.card-carousel__dot.active::after { width: 28px; background: #38bdf8; }
.card-carousel[data-dragging="true"] .carousel-card { transition: none; cursor: grabbing; }
.card-carousel:focus-visible, .card-carousel button:focus-visible, .carousel-card__cta:focus-visible, .service-card:focus-visible, .hero__video-toggle:focus-visible { outline: 2px solid #38bdf8; outline-offset: 5px; }
.carousel-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 760px) {
  .contact__grid { grid-template-columns: minmax(0, 1fr); }
  .contact__grid > *, .contact-info__card > * { min-width: 0; }
  .contact-info__value { overflow-wrap: anywhere; }
  .services__grid { grid-template-columns: 1fr; }
  .service-card, .service-card--hero, .service-card:nth-child(n+4) { grid-column: auto; grid-row: auto; min-height: 260px; padding: 26px; }
  .service-card--hero { min-height: 360px; }
  .card-carousel { width: calc(100% + 2.5rem); margin-left: -1.25rem; margin-right: -1.25rem; }
  .card-carousel__stage { height: 520px; overflow: hidden; }
  .card-carousel__track { display: block; padding: 0; overflow: visible; scroll-snap-type: none; }
  .carousel-card, .blog-carousel .carousel-card { position: absolute; top: 20px; left: 50%; width: var(--card-width); height: 480px; min-height: 0; transform: var(--card-transform); opacity: var(--card-opacity); }
  .card-carousel__nav { margin-top: 0; }
  .card-carousel__arrow { position: static; width: 44px; height: 44px; }
  .card-carousel__arrow { flex-shrink: 0; }
  .blog-carousel .card-carousel__dot { width: 24px; }
  .blog-carousel .card-carousel__dot.active { width: 32px; }
  .carousel-card[data-active="true"] .carousel-card__text { opacity: 1; max-height: 220px; }
  .hero__water-video { object-position: 88% center; }
  .hero__water-bg { background-position: 88% center; }
}
@media (hover: none) {
  .carousel-card[data-active="true"] .carousel-card__text { opacity: 1; max-height: 220px; }
}
@media (prefers-reduced-motion: reduce) {
  .carousel-card, .carousel-card__text, .card-carousel__dot::after, .service-card { transition: none; }
  html { scroll-behavior: auto; }
}
