/* ==========================================================
   sebastiansolberg.com
   Matches the original Wix site: measurements were taken from the
   live pages at 1280px wide. Colours, fonts and the main widths are
   tokens below, so a change here changes everywhere.
   ========================================================== */

:root {
  --bg: #ffffff;
  --text: #181717;       /* body text, menu */
  --grey: #666666;       /* film titles and credits */
  --icon: #8a8a8a;       /* footer icons */
  --field: rgba(238, 238, 238, 0.63);
  --focus: #116dff;

  --raleway: "Raleway", "Helvetica Neue", Arial, sans-serif;
  --helvetica-light: "Helvetica Neue", Helvetica, Arial, sans-serif;

  --page: 980px;         /* the old Wix page width */
  --edge: 3.6%;          /* homepage grid margin either side */
  --gap: 3px;            /* gap between homepage films */

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--raleway);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  padding: 0.6rem 1rem; background: var(--text); color: var(--bg); text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* Centred 980px column, as on Wix. On smaller screens it fills the
   width with a small margin, clear of the notch on phones. */
.wrap, .page, .film, .about, .contact, .epk {
  width: 100%;
  max-width: calc(var(--page) + 32px);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---------- Header ---------- */

.site-header { padding-block: 28px 30px; }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 32px;
}
.wordmark { display: block; line-height: 0; }
.wordmark img { width: 362px; height: auto; }

.site-nav ul { display: flex; gap: 36px; }
.site-nav a {
  font-family: var(--helvetica-light);
  font-weight: 300;
  font-size: 16px;
  line-height: 22px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
}
.site-nav a:hover { color: var(--grey); }

/* ---------- Homepage grid ---------- */

.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}
.tiles--home { margin-inline: var(--edge); }

.tile a {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f2f2f2;
  color: #fff;
  text-decoration: none;
}
.tile img { width: 100%; height: 100%; object-fit: cover; }

/* The title fades in on hover or keyboard focus */
.tile__caption {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 0.3rem; padding: 1rem; text-align: center;
  background: rgba(0, 0, 0, 0.42);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.tile__title { font-weight: 700; font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem); letter-spacing: 0.06em; }
.tile__role {
  font-family: var(--helvetica-light); font-weight: 300;
  font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase;
}
.tile a:hover .tile__caption, .tile a:focus-visible .tile__caption { opacity: 1; }

/* Touch screens can't hover, so the title sits small in the corner */
@media (hover: none) {
  .tile__caption {
    opacity: 1; justify-content: flex-end; align-items: flex-start; text-align: left;
    padding: 0.7rem 0.85rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0) 45%);
  }
  .tile__title { font-size: 0.9375rem; }
  .tile__role { display: none; }
}

/* ---------- Film pages ---------- */

.player {
  position: relative;
  width: min(var(--player-w, 980px), calc(100vw - 32px));
  max-width: none;
  aspect-ratio: var(--ratio, 1.7778);
  margin-left: 50%;
  translate: -50% 0;
  background: #000;
  overflow: hidden;
}
@media (max-width: 1012px) {
  .player { width: 100%; margin-left: 0; translate: none; }
}
.player iframe, .player img, .player button {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.player img { object-fit: cover; }
.player button { background: none; cursor: pointer; padding: 0; color: #fff; }
.player button::before {
  content: ""; position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.15); transition: background 0.2s ease;
}
.player button:hover::before { background: rgba(0, 0, 0, 0.03); }
.player__play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  display: grid; place-items: center;
  width: clamp(3.25rem, 7vw, 4.5rem); aspect-ratio: 1; border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
}
.player__play svg { width: 38%; margin-left: 8%; }

/* Laurels and logos in a row under the video */
.laurels {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 4px;
  margin-top: 26px;
}
.laurels img { max-width: none; }
/* On phones the laurels sit in two even rows */
@media (max-width: 700px) {
  .laurels {
    display: grid;
    grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
    gap: 8px 6px;
    justify-items: center;
  }
  .laurels li { width: 100%; display: flex; justify-content: center; }
  .laurels img { width: 100%; max-width: 132px; height: auto; }
}

.film-title {
  margin: 17px 0 0;
  font-family: var(--raleway);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.72px;
  color: var(--grey);
  text-align: center;
  text-wrap: balance;
}
.laurels + .film-title { margin-top: 40px; }

.film-credits {
  margin-top: 22px;
  text-align: center;
  color: var(--grey);
  font-size: 15px;
  letter-spacing: 0.6px;
  line-height: 20.5px;
}
.film-credits--top { margin-top: 17px; }
.film-credits p { margin: 0; }
.film-credits .gap { height: 20.5px; }
.film-credits strong { font-weight: 700; }

/* ---------- About ---------- */

.about {
  display: grid;
  grid-template-columns: 321px 1fr;
  gap: 43px;
  align-items: center;
  padding-top: 38px;
  padding-left: max(51px, env(safe-area-inset-left, 0px));
}
.about .portrait { width: 321px; height: 447px; object-fit: cover; }
.about__text {
  font-family: var(--raleway);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  max-width: 533px;
}
.about__text p { margin: 0 0 1.8em; }
.about__text p:last-child { margin-bottom: 0; }
@media (max-width: 720px) {
  .about { grid-template-columns: 1fr; padding-left: max(16px, env(safe-area-inset-left, 0px)); gap: 28px; padding-top: 8px; }
  .about .portrait { width: 100%; max-width: 321px; height: auto; aspect-ratio: 321 / 447; margin-inline: auto; }
}

/* ---------- Contact ---------- */

.contact { padding-top: 19px; }
.contact h1, .contact-form, .contact-fallback { max-width: 456px; margin-left: 200px; }
.contact h1 { font-family: var(--raleway); font-weight: 400; font-size: 30px; line-height: 35px; margin-top: 0; margin-bottom: 43px; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 30px; }
.field { display: grid; gap: 2px; }
.field--wide { grid-column: 1 / -1; }
.field label { font-size: 14px; line-height: 14px; color: #000; }
.field input, .field textarea {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: var(--field);
  font: inherit;
  font-size: 15px;
  padding: 10px 12px;
  color: #000;
}
.field input { height: 44px; }
.field textarea { height: 88px; resize: vertical; }
.submit-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 5px; flex-wrap: wrap; }
.submit-row button {
  width: 147px; height: 42px; border: 0; border-radius: 0;
  background: var(--text); color: #fff; font: inherit; font-size: 16px; cursor: pointer;
}
.submit-row button:hover { background: #3a3939; }
.form-status { margin: 0; font-size: 13px; max-width: 260px; }
.contact-fallback { font-size: 14px; color: var(--grey); margin-top: 28px; }
@media (max-width: 720px) {
  .contact h1, .contact-form, .contact-fallback { margin-left: 0; }
  .contact-form { grid-template-columns: 1fr; }
}

/* ---------- One Breath press kit ---------- */

.epk { text-align: center; padding-top: 22px; }
.epk__poster { width: 854px; margin-inline: auto; }
.epk__h { font-family: var(--raleway); font-size: 19px; font-weight: 700; margin: 34px 0 0; }
.epk__synopsis { max-width: 537px; margin: 26px auto 0; }
.epk__statement { max-width: 640px; margin: 28px auto 0; text-align: left; }
.epk__statement p { margin: 0 0 1.25em; }
.epk__big { font-family: var(--raleway); font-size: 30px; font-weight: 400; text-align: left; margin: 44px 0 30px 24px; }
.epk__festivals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.epk__festivals img, .epk__stills img { width: 100%; }
.epk__downloads { text-align: left; margin: -8px 0 28px 13px; line-height: 22px; }
.epk__stills { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.epk__stills img { aspect-ratio: 1; object-fit: cover; background: #999; }
.epk__credits { margin: 40px auto 0; max-width: 520px; }
.epk__credits div { margin-bottom: 22px; }
.epk__credits dt { font-weight: 700; }
.epk__credits dd { margin: 0; }
@media (max-width: 700px) {
  .epk__festivals { grid-template-columns: 1fr 1fr; }
  .epk__big { margin-left: 0; font-size: 24px; }
  .epk__downloads { margin-left: 0; }
}

/* ---------- All films and Stills (pages not in the menu) ---------- */

.film-group { padding-bottom: 40px; scroll-margin-top: 1rem; }
.film-group__title {
  font-family: var(--helvetica-light); font-weight: 300;
  font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--grey); margin: 0 0 10px;
}
.further { display: grid; gap: 12px; color: var(--grey); font-size: 15px; }
.further dt { font-weight: 700; }
.further dd { margin: 0; }

.stills { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
@media (min-width: 900px) { .stills { grid-template-columns: repeat(3, 1fr); } }
.stills img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: #f2f2f2; }
.still { display: block; cursor: zoom-in; }
.still img { transition: opacity 0.2s ease; }
.still:hover img { opacity: 0.88; }

/* Full-screen photo viewer */
.viewer {
  width: 100vw; height: 100vh; height: 100dvh;
  max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: #000; color: #fff;
}
.viewer::backdrop { background: #000; }
.viewer[open] { display: grid; place-items: center; }
.viewer__img {
  max-width: 100vw; max-height: 100vh; max-height: 100dvh;
  width: auto; height: auto; object-fit: contain;
  user-select: none;
}
.viewer__btn {
  position: absolute;
  display: grid; place-items: center;
  width: 52px; height: 52px;
  border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, 0.35); color: #fff;
  font-size: 34px; line-height: 1; cursor: pointer;
}
.viewer__btn:hover { background: rgba(255, 255, 255, 0.15); }
.viewer__btn svg { width: 26px; height: 26px; }
.viewer__close { top: max(14px, env(safe-area-inset-top, 0px)); right: max(14px, env(safe-area-inset-right, 0px)); }
.viewer__prev { left: max(14px, env(safe-area-inset-left, 0px)); top: 50%; translate: 0 -50%; }
.viewer__next { right: max(14px, env(safe-area-inset-right, 0px)); top: 50%; translate: 0 -50%; }
.viewer__count {
  position: absolute; left: 50%; translate: -50% 0;
  bottom: max(14px, env(safe-area-inset-bottom, 0px));
  margin: 0; font-size: 13px; letter-spacing: 0.1em; opacity: 0.75;
}
@media (hover: none) {
  .viewer__prev, .viewer__next { display: none; } /* swipe instead */
}

/* Under each film: link to the press kit (One Breath) and the next film */
.film-more { text-align: center; margin: 18px 0 0; font-size: 14px; letter-spacing: 0.6px; }
.film-more a { color: var(--grey); }
.next-film { text-align: center; margin: 56px 0 0; }
.next-film a { color: var(--grey); text-decoration: none; font-size: 15px; letter-spacing: 0.6px; }
.next-film span {
  display: block; margin-bottom: 2px;
  font-family: var(--helvetica-light); font-weight: 300;
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--icon);
}
.next-film a:hover { color: var(--text); }

/* ---------- Footer ---------- */

.site-footer { padding-block: 72px 36px; }
.site-footer ul { display: flex; justify-content: center; }
.site-footer__icons { gap: 10px; }
.site-footer__icons a { display: block; width: 28px; height: 28px; color: var(--icon); }
.site-footer__icons a:hover { color: var(--text); }
.site-footer svg { width: 28px; height: 28px; }
.site-footer__links { gap: 22px; margin-top: 18px; }
.site-footer__links a {
  font-family: var(--helvetica-light); font-weight: 300;
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--icon); text-decoration: none;
}
.site-footer__links a:hover { color: var(--text); }

/* Pictures fade in as they load, as on the old site */
.js main img { opacity: 0; transition: opacity 0.6s ease; }
.js main img.in { opacity: 1; }

/* ---------- 404 ---------- */

.not-found { text-align: center; padding-block: 60px; color: var(--grey); }
.not-found h1 { font-size: 18px; letter-spacing: 0.72px; }

/* ==========================================================
   Screen sizes
   ========================================================== */

/* Phones: logo and menu stacked and centred, one film per row */
@media (max-width: 600px) {
  .site-header { padding-block: 20px 22px; }
  .site-header .wrap { justify-content: center; }
  .wordmark img { width: min(300px, 78vw); }
  .site-nav ul { gap: 28px; }
  .site-nav a { display: inline-block; padding-block: 10px; }
  .tiles { grid-template-columns: 1fr; }
  .tiles--home { margin-inline: max(16px, env(safe-area-inset-left, 0px)); }
}

/* Big monitors: the same layout, scaled up so it doesn't look tiny */
@media (min-width: 1900px) { body { zoom: 1.3; } }
@media (min-width: 2400px) { body { zoom: 1.6; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .js main img { opacity: 1; }
}

/* Phones held sideways: keep the whole video on screen */
@media (max-height: 500px) and (orientation: landscape) {
  .site-header { padding-block: 10px; }
  .player {
    width: min(100%, calc((100svh - 70px) * var(--ratio, 1.7778)));
    margin-inline: auto;
    translate: none;
  }
}

/* ---------- link in bio (/links) ---------- */
.site-header--bare .wrap { justify-content: center; }
.links {
  max-width: 440px;
  margin: 8px auto 0;
  padding-inline: 16px;
  text-align: center;
}
.links__photo {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px;
}
.links__name {
  font-family: Raleway, sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #666;
  margin: 0;
}
.links__intro {
  font-family: Raleway, sans-serif;
  font-weight: 300;
  font-size: 15px;
  color: #666;
  margin: 4px 0 28px;
}
.links__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.links__list a {
  display: block;
  padding: 15px 18px;
  border: 1px solid #181717;
  color: #181717;
  font-family: Raleway, sans-serif;
  font-size: 15px;
  text-decoration: none;
  transition: background-color .2s, color .2s;
}
.links__list a:hover,
.links__list a:focus-visible { background: #181717; color: #fff; }
