/* Skjáskot — hand-written rebuild of the original skjaskot.is design. */

@font-face { font-family: "Mona Sans Wide"; src: url("assets/fonts/MonaSansWide-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Mona Sans Wide"; src: url("assets/fonts/MonaSansWide-SemiBold.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Mona Sans Wide"; src: url("assets/fonts/MonaSansWide-ExtraBold.woff") format("woff"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Icons Rounded"; src: url("assets/fonts/icons-rounded.woff") format("woff"); font-display: block; }
@font-face { font-family: "Icons Social"; src: url("assets/fonts/icons-social.woff") format("woff"); font-display: block; }

:root {
  --black: #040404;
  --white: #fff;
  --text: #e9e9e9;
  --text-muted: #c2c2c2;
  --hover: #949494;
  --line: #383838;

  --radius: 12px;
  --gutter: 24px;
  --section-pad: 160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font-family: "Mona Sans Wide", sans-serif;
  font-size: 18px;
  line-height: 1.5;
  font-weight: 400;
}
h1, h2, h3 { margin: 0; color: var(--white); font-weight: 600; }
p { margin: 0; }
a { color: var(--white); text-decoration: none; transition: color .3s; }
img { max-width: 100%; display: inline-block; vertical-align: middle; border: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

.container { max-width: 1298px; margin: 0 auto; padding: 0 var(--gutter); }
.cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.icon { font-family: "Icons Rounded"; font-style: normal; line-height: 1; }
.icon--social { font-family: "Icons Social"; }

.display-11 { font-size: 72px; line-height: 1.115em; font-weight: 800; }
.display-12 { font-size: 120px; line-height: 1.115em; font-weight: 800; }

.section { padding: var(--section-pad) 0; background: var(--black); }
.section--pull { margin-top: -151px; overflow: hidden; }

/* ---------- Header ---------- */
.header { background: var(--black); padding: 16px 0; }
.header__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.header__logo { display: inline-block; max-width: 44px; position: relative; z-index: 6; }
.header__logo:hover { transform: scale(.9); }
.header__logo img { display: block; height: auto; }
.header__nav { display: flex; align-items: center; gap: 24px; }
.header__nav a { font-size: 18px; line-height: 1.25em; }
.header__nav a:hover { color: var(--hover); }
.header__right { display: flex; }

/* ---------- Buttons ---------- */
.buttons { display: flex; align-items: center; gap: 24px; margin-top: 32px; }
.btn {
  display: flex; align-items: center; justify-content: center;
  padding: 16px 18px;
  border: 1px solid var(--white); border-radius: 300px;
  font-size: 18px; line-height: 1em; text-align: center;
  transition: transform .3s;
}
.btn:hover { transform: scale(.94); }
.btn--primary { background: var(--white); color: var(--black); font-weight: 600; }
.btn--primary:hover { color: var(--black); }
.btn--secondary { border-color: var(--line); color: var(--white); box-shadow: 0 1px 4px rgba(25, 33, 61, .08); }

/* ---------- Hero ---------- */
.hero { padding: 76px 0 184px; overflow: hidden; }
.hero__title { position: relative; z-index: 2; max-width: 880px; margin: 0 auto; text-align: center; }
.hero__title img { height: auto; }
.hero__tagline { font-size: 24px; line-height: 1.115em; font-weight: 400; margin: -9px 0 72px; }
.hero__media {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  margin-top: -43px;
  aspect-ratio: 2500 / 1152; max-height: 576px;
}
.hero__bottom { display: flex; align-items: center; justify-content: space-between; gap: 40px; margin-top: 64px; }
.hero__text { max-width: 536px; }

/* ---------- Section divider ---------- */
.divider { overflow: hidden; }
/* Just the line: same 83px footprint as the original number + label, line 30px down. */
.divider__row { position: relative; height: 83px; }
.divider__track { position: absolute; top: 30px; left: var(--gutter); right: 0; }
.divider__line { position: absolute; left: 0; top: 0; width: 100vw; height: 1px; background: var(--line); }

/* ---------- Services slider ---------- */
.services__head { max-width: 700px; margin: 0 auto; text-align: center; }
.slider { position: relative; margin-top: 48px; padding-bottom: 128px; touch-action: pan-y; }
.slider__mask { position: relative; z-index: 1; max-width: 438px; display: flex; align-items: flex-start; }
.slide {
  flex: none; width: 100%; margin-right: 32px;
  transition: transform .5s ease;
}
.slide.no-anim { transition: none; }
.card { display: flex; flex-direction: column; color: var(--white); }
.card__media {
  position: relative; overflow: hidden;
  margin-top: 16px; border-radius: var(--radius);
  aspect-ratio: 1308 / 1044; max-height: 349px;
}
.card__title { margin-top: 24px; max-width: 309px; font-size: 36px; line-height: 1.25em; font-weight: 600; transition: opacity .3s ease; }
.card:hover .card__title { opacity: .75; }
.card__text { margin-top: 16px; color: var(--text-muted); }
.slider__arrow {
  position: absolute; bottom: 0; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  width: 64px; height: 64px;
  border: 1px solid var(--line); border-radius: 300px;
  box-shadow: 0 1px 3px rgba(25, 33, 61, .08);
  color: var(--white); font-size: 22px;
  transition: color .3s, border-color .3s, background-color .3s, transform .3s;
}
.slider__arrow:hover { border-color: var(--white); background: var(--white); color: var(--black); transform: scale(.94); }
.slider__arrow--prev { left: 0; }
.slider__arrow--next { right: 0; z-index: 4; }

/* ---------- Story ---------- */
.story {
  display: grid; grid-template-columns: 1fr .75fr;
  column-gap: 48px; row-gap: 16px;
  align-items: start;
}
.story__media { position: relative; overflow: hidden; border-radius: var(--radius); grid-row: span 2; align-self: stretch; }
.story__text { align-self: end; }
.story__text p + p { margin-top: 24px; }

/* ---------- Contact CTA ---------- */
.cta {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr; gap: 64px;
  margin-top: var(--section-pad);
  padding: 94px 75px;
  border-radius: var(--radius);
}
.cta__title, .cta__body { position: relative; z-index: 3; }
.cta__title .display-12 { margin: 1px 0 12px; }
.cta__body { justify-self: end; max-width: 516px; }
.cta__details { display: flex; align-items: center; gap: 24px; margin-top: 24px; }
.cta__social { display: flex; align-items: center; gap: 16px; }
.cta__social a { display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; font-size: 20px; transition: opacity .3s; }
.cta__social a:hover { opacity: .7; color: var(--text-muted); }
.cta__rule { width: 1px; height: 30px; background: var(--white); }
.cta__mail { font-size: 18px; line-height: 1.25em; font-weight: 600; word-break: break-all; }
.cta__mail:hover { color: var(--hover); }
.cta__video { z-index: 1; }
.cta__overlay {
  position: absolute; inset: 0; z-index: 2;
  background-image: linear-gradient(0deg, var(--black) 10%, transparent), linear-gradient(#00000080, #00000080);
}

/* ---------- Scroll animations (mirror the original's Webflow interactions) ---------- */
.js [data-anim] { transition: opacity .5s ease, transform .5s ease; }
.js [data-anim="up"]:not(.is-in) { opacity: 0; transform: translateY(10%); }
.js [data-anim="fade"]:not(.is-in) { opacity: 0; }
.js [data-anim="line"] { transition: width .6s ease; }
.js [data-anim="line"]:not(.is-in) { width: 0; }

/* ---------- Breakpoints (same as the original) ---------- */
@media (min-width: 1440px) {
  .hero { border-top: 1px solid var(--white); }
  .hero__tagline { margin-bottom: 106px; }
  .hero__media { margin-top: 0; }
  .card__title { max-width: 306px; }
}
@media (min-width: 1920px) {
  .hero { padding-top: 72px; }
}

@media (max-width: 991px) {
  :root { --section-pad: 100px; }
  .display-11 { font-size: 56px; }
  .display-12 { font-size: 72px; }
  .hero { padding: 64px 0 148px; }
  .hero__media { margin-top: -20px; max-height: 500px; }
  .hero__bottom { flex-direction: column-reverse; text-align: center; }
  .hero__text { max-width: 700px; }
  .buttons { justify-content: center; }
  .slider { padding-bottom: 110px; }
  .card__title { font-size: 32px; }
  .story { grid-template-columns: 1fr; }
  .story__media { grid-row: auto; order: 9999; margin-top: 40px; padding-top: 50%; }
  .story__title, .story__text { max-width: 750px; }
  .cta { gap: 48px; padding: 75px 50px; }
  .cta__title { max-width: 500px; }
}

@media (max-width: 767px) {
  :root { --section-pad: 80px; --gutter: 16px; }
  body { font-size: 16px; }
  .btn { padding: 12px 16px; }
  .header__row { gap: 12px; }
  .header__logo { max-width: 36px; }
  .display-11 { font-size: 40px; }
  .display-12 { font-size: 52px; }
  .hero { padding: 48px 0 100px; }
  .hero__tagline { font-size: 14px; }
  .hero__media { border-radius: 8px; max-height: 400px; }
  .hero__bottom { margin-top: 48px; }
  .buttons { gap: 16px; margin-top: 24px; }
  .btn--primary { font-size: 16px; }
  .divider__row { height: 68px; }
  .divider__track { top: 24px; }
  .services__head { max-width: 600px; }
  .slider { margin-top: 32px; padding-bottom: 88px; }
  .slide { margin-right: 24px; }
  .card__media { border-radius: 8px; max-height: 300px; }
  .card__title { margin-top: 16px; max-width: calc(100% + 9px); margin-right: -9px; font-size: 28px; }
  .slider__arrow { width: 48px; height: 48px; font-size: 18px; }
  .story__title { order: -9999; }
  .story__media { margin-top: 32px; border-radius: 8px; }
  .story__text p + p { margin-top: 16px; }
  .cta { gap: 16px; padding: 60px 32px; text-align: center; border-radius: 8px; }
  .cta__details { display: grid; grid-template-columns: 1fr; justify-items: center; gap: 16px; }
  .cta__rule { width: 100%; height: 1px; background: var(--text-muted); }
}

@media (max-width: 479px) {
  :root { --section-pad: 64px; }
  .header__row { gap: 8px; }
  .header__nav { gap: 14px; }
  .header__nav a { font-size: 16px; }
  .display-11 { font-size: 32px; }
  .display-12 { font-size: 36px; }
  .hero { padding: 32px 0 80px; }
  .hero__media { max-height: 300px; }
  .buttons { flex-direction: column; align-items: stretch; width: 100%; gap: 16px; }
  .btn--primary { width: 100%; }
  .slider { padding-bottom: 80px; }
  .card__title { margin-top: 30px; font-size: 24px; }
  .card__media { max-height: 250px; }
  .cta { margin-top: 80px; padding: 50px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .js [data-anim], .slide { transition: none !important; }
}

/* ---------- Portfolio ---------- */
.work { padding-top: 140px; }
.work__head { text-align: center; }
.work__grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 48px 24px; margin-top: 64px;
  /* Five cards at the same size as the old four-up grid (≈295px each), so the grid is
     wider than the page container; it shrinks with the window on smaller screens. */
  width: min(1571px, 100vw - 64px);
  margin-left: 50%; translate: -50% 0;
}
.work-card { display: block; color: var(--white); }
.work-card__media {
  position: relative; overflow: hidden;
  aspect-ratio: 9 / 16; border-radius: var(--radius); background: #111;
}
.work-card__media img, .work-card__media video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.work-card__media video { opacity: 0; transition: opacity .3s ease, transform .5s ease; }
.work-card.is-playing .work-card__media video { opacity: 1; }
.work-card:hover .work-card__media img, .work-card:hover .work-card__media video { transform: scale(1.04); }
.work-card__title { margin-top: 16px; font-size: 24px; line-height: 1.25em; font-weight: 600; transition: opacity .3s ease; }
.work-card:hover .work-card__title { opacity: .75; }
/* Titles hidden on the grid for now (still shown in the lightbox). Delete these two lines to bring them back. */
.work-card__title { display: none; }
.work__grid { row-gap: 24px; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  overflow-y: auto; overscroll-behavior: contain;
  background: rgba(4, 4, 4, .96);
  opacity: 0; transition: opacity .3s ease;
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
/* The reel is centred at ~85% of the largest size that fits. Credits sit to the right on
   desktop, underneath on tablets and phones. */
.lightbox__body { display: flex; flex-direction: column; align-items: center; padding: 16px 0 80px; }
.lightbox__player {
  flex: none; aspect-ratio: 9 / 16;
  height: calc(min(100svh - 32px, (100vw - 32px) * 16 / 9) * .85);
  border-radius: var(--radius); overflow: hidden; background: #000;
}
.lightbox__player video { width: 100%; height: 100%; object-fit: contain; display: block; }
.lightbox__info { width: min(720px, 100% - 32px); margin-top: 48px; }
.lightbox__title { margin: 0 0 20px; font-size: 36px; line-height: 1.25em; }
.lightbox__info > p { margin-bottom: 20px; color: var(--text); }
.lightbox__info a { text-decoration: none; }
.lightbox__info a:hover { color: var(--hover); }
.credits { margin: 0 0 28px; display: grid; gap: 10px; font-size: 16px; line-height: 1.4; }
.credits div { display: grid; grid-template-columns: 170px 1fr; gap: 16px; }
.credits dt { color: var(--hover); }
.credits dd { margin: 0; color: var(--text); }
.lightbox__ig { font-size: 16px; font-weight: 600; }
.lightbox__close {
  position: fixed; top: 16px; right: 16px; z-index: 2;
  background: rgba(4, 4, 4, .6);
  width: 48px; height: 48px; border-radius: 300px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); color: var(--white); font-size: 28px; line-height: 1;
  transition: background-color .3s, color .3s, border-color .3s;
}
.lightbox__close:hover { background: var(--white); color: var(--black); border-color: var(--white); }

/* Sideways-posted landscape films, turned 90° left (desktop only; JS adds the classes) */
.lightbox__player.is-rotated {
  position: relative; height: auto;
  width: min((100svh - 32px) * .85 * 16 / 9, 100vw - 450px); aspect-ratio: 16 / 9;
  container-type: size;
}
.lightbox__player.is-rotated video {
  position: absolute; top: 50%; left: 50%;
  width: 100cqh; height: 100cqw;
  transform: translate(-50%, -50%) rotate(-90deg);
  cursor: pointer;
}
.player-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; align-items: center; gap: 16px;
  padding: 28px 20px 16px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .6));
  opacity: 0; transition: opacity .3s ease;
}
.lightbox__player:hover .player-bar, .player-bar:focus-within { opacity: 1; }
.player-bar button { color: var(--white); font-size: 14px; font-weight: 600; white-space: nowrap; }
.player-bar__play { width: 24px; }
.player-bar__seek { flex: 1; accent-color: var(--white); cursor: pointer; }

@media (min-width: 992px) {
  /* Video dead centre on screen; credits in the space to its right. */
  .lightbox__body {
    display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center; column-gap: 48px; min-height: 100svh; padding: 16px 32px;
  }
  .lightbox__player { grid-column: 2; }
  .lightbox__info { grid-column: 3; justify-self: start; width: min(420px, 100%); margin-top: 0; }
  /* Credits tighten a little on short screens so even the longest list fits without scrolling. */
  .lightbox__title { font-size: clamp(26px, 4vh, 36px); margin-bottom: clamp(12px, 2vh, 20px); }
  .lightbox__info > p { font-size: clamp(14px, 2vh, 18px); margin-bottom: clamp(12px, 2vh, 20px); }
  .credits { font-size: clamp(13px, 1.8vh, 16px); gap: clamp(4px, 1vh, 10px); margin-bottom: clamp(16px, 2.5vh, 28px); }
  .credits div { grid-template-columns: 140px 1fr; }
  /* Leave at least 240px for the credits on both sides so the video stays centred. */
  .lightbox__player.is-rotated { width: calc(min((100svh - 32px) * .85 * 16 / 9, 100vw - 656px) * .85); }
}

@media (max-width: 991px) {
  .work { padding-top: 100px; }
  .work__grid { grid-template-columns: repeat(3, 1fr); width: auto; margin-left: 0; translate: none; }
}
@media (max-width: 767px) {
  .work { padding-top: 64px; }
  .work__grid { grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 48px; }
  .work-card__title { font-size: 20px; }
  .work-card__media { border-radius: 8px; }
  .credits div { grid-template-columns: 130px 1fr; }
  .lightbox__title { font-size: 28px; }
}
@media (max-width: 479px) {
  .work { padding-top: 48px; }
  .work-card__title { font-size: 17px; }
}

/* ---------- 404 ---------- */
.not-found { min-height: calc(100svh - 76px); display: flex; align-items: center; text-align: center; }
.not-found .container { width: 100%; }
.not-found p { max-width: 520px; margin: 16px auto 0; }
.not-found .buttons { justify-content: center; }
