@font-face {
  font-family: "Switzer";
  src: url("../fonts/Switzer-Regular.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Switzer";
  src: url("../fonts/Switzer-Semibold.otf") format("opentype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Switzer";
  src: url("../fonts/Switzer-Medium.otf") format("opentype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  --ink: #171715;
  --paper: #f2f0ea;
  --gutter: clamp(1rem, 2.25vw, 2.5rem);
  --body: "Switzer", "Helvetica Neue", Arial, sans-serif;
  --text-size: clamp(.82rem, .9vw, .95rem);
  --credits-size: clamp(.75rem, .8vw, .85rem);
  --feature-gap: clamp(1.5rem, 5vw, 7rem);
  --feature-size: clamp(1.25rem, 1.4vw, 1.5rem);
  --label: var(--feature-size);
  --body-size: var(--feature-size);
  --social-hit: 2.75rem;
  --social-icon: 1rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 20rem; background: var(--paper); scroll-behavior: smooth; }
body {
  min-width: 20rem;
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { color: var(--paper); background: var(--ink); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
button { color: inherit; font: inherit; }
button, a { touch-action: manipulation; }
img { display: block; max-width: 100%; }
p, h1 { margin: 0; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.skip-link {
  position: fixed;
  z-index: 1002;
  inset: .75rem auto auto .75rem;
  padding: .7rem 1rem;
  color: var(--paper);
  background: var(--ink);
  transform: translateY(-160%);
  transition: transform 160ms cubic-bezier(.32, .72, 0, 1);
}
.skip-link:focus { transform: translateY(0); }

.landing-page {
  height: 100svh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.intro-grid {
  min-height: clamp(12rem, 28svh, 16rem);
  display: grid;
  grid-template-columns: max-content minmax(20rem, 1fr) max-content;
  gap: var(--feature-gap);
  align-items: start;
  padding: clamp(1.25rem, 2.4vw, 2.5rem) var(--gutter);
}

.festival-mark {
  width: clamp(7.5rem, 13vw, 11rem);
  margin-block-start: .3rem;
  filter: brightness(0);
}
.thank-you-copy h1,
.thank-you-copy p {
  /* the measure stops where "...nasz wspólny zwyczaj." does: 58.2ch at this
     weight, 56.4ch at the lighter mobile one, so 59ch holds both */
  max-width: 59ch;
  font-size: var(--body-size);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -.025em;
}
.thank-you-copy p { margin-top: .15rem; }

.brand-cluster { display: grid; align-content: start; gap: .15rem; min-width: 0; }
.brand-cluster--right { justify-items: start; text-align: left; }
.brand-cluster--inline { display: flex; align-items: center; gap: .75rem; }
.brand-name,
.footer-label {
  font-size: var(--label);
  font-weight: 500;
  line-height: 1.2;
  text-transform: uppercase;
}
.social-links { display: flex; width: max-content; }
.brand-cluster .social-links { margin-inline-start: calc((var(--social-icon) - var(--social-hit)) / 2); }
.brand-cluster--inline .social-links { margin-inline-start: 0; margin-block-start: 0; }
.intro-grid .brand-cluster--inline {
  justify-self: end;
  margin-inline-end: calc((2.5rem - var(--social-icon)) / -2);
}
.intro-grid .brand-cluster--inline .social-links { gap: 0; }
.intro-grid .brand-cluster--inline .social-links a { width: 2.5rem; height: 2.5rem; }
.social-links a {
  display: grid;
  width: var(--social-hit);
  height: var(--social-hit);
  place-items: center;
  transition: opacity 150ms ease;
}
.social-links img { width: var(--social-icon); height: var(--social-icon); }

.gallery-viewport {
  min-width: 0;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}
.gallery-viewport::-webkit-scrollbar { display: none; }
.gallery-track {
  min-width: max-content;
  height: 100%;
  display: flex;
  gap: 0;
  padding: 0;
}
.gallery-column { flex: none; min-width: 0; height: 100%; }
.gallery-column--portrait { aspect-ratio: 2 / 3; }
.gallery-column--portrait-group { display: flex; }
.gallery-column--portrait-group .photo-card { flex: none; height: 100%; aspect-ratio: 2 / 3; }
.gallery-column--wide { height: 75%; aspect-ratio: 3 / 2; align-self: flex-start; }
.photo-card { min-width: 0; min-height: 0; margin: 0; overflow: hidden; background: var(--paper); }
.photo-card img { width: 100%; height: 100%; object-fit: contain; object-position: left top; -webkit-user-drag: none; }

.landing-footer {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: .65rem 3rem;
  align-items: start;
  padding: 1.1rem var(--gutter) 1rem;
}
.archive-nav { display: grid; gap: .2rem; align-content: start; }
.landing-credits {
  display: grid;
  grid-column: 2;
  grid-template-columns: max-content max-content;
  gap: var(--feature-gap);
  justify-content: end;
}
.photo-credits,
.credit-details { font-size: var(--credits-size); line-height: 1.35; }
.photo-credits {
  grid-column: 1;
  max-width: 40ch;
  text-align: left;
}
.credit-details { grid-column: 2; display: grid; gap: .15rem; text-align: left; }
.archive-years { display: flex; flex-wrap: wrap; gap: .65rem; }
.archive-nav a,
.cookie-settings-button,
.landing-credits a { transition: opacity 150ms ease; }
.archive-nav a { font-size: var(--label); font-weight: 500; text-decoration: none; }
.archive-nav a + a::before { content: "/"; margin-inline-end: .65rem; }
.cookie-settings-button {
  width: fit-content;
  margin-inline-start: .65rem;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
  text-transform: uppercase;
}
.mobile-footer-brands { display: none; }

.cookie-banner {
  position: fixed;
  z-index: 1000;
  right: var(--gutter);
  bottom: var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem 2rem;
  align-items: end;
  width: min(52rem, calc(100% - 2 * var(--gutter)));
  padding: clamp(1.25rem, 3vw, 2rem);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid currentColor;
  box-shadow: 0 18px 60px rgba(23, 23, 21, .22);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner-copy { display: grid; gap: .75rem; max-width: 47rem; }
.cookie-banner h2 { margin: 0; font-size: clamp(1.2rem, 2vw, 1.75rem); font-weight: 600; line-height: .95; text-transform: uppercase; }
.cookie-banner p { max-width: 62ch; margin: 0; font-size: .9rem; line-height: 1.4; }
.cookie-banner p a { font-weight: 600; }
.cookie-banner-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: flex-end; }
.cookie-button { min-height: 44px; padding: .75rem 1rem; border: 1px solid currentColor; font-size: .78rem; font-weight: 600; text-transform: uppercase; cursor: pointer; }
.cookie-button-primary { color: var(--paper); background: var(--ink); }
.cookie-button-secondary { color: var(--ink); background: transparent; }
.cookie-button:active { transform: scale(.97); }

@media (hover: hover) and (pointer: fine) {
  .social-links a:hover,
  .archive-nav a:hover,
  .landing-credits a:hover,
  .cookie-settings-button:hover { opacity: .8; }
  .gallery-viewport { cursor: grab; }
  .gallery-viewport.is-dragging { cursor: grabbing; user-select: none; }
}

@media (max-width: 760px) {
  .landing-page {
    position: relative;
    display: block;
    height: auto;
    padding-bottom: 12rem;
    overflow: visible;
  }
  .intro-grid {
    position: sticky;
    z-index: 0;
    top: 0;
    min-height: 0;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 1.25rem;
    padding-block: 1.25rem 1.5rem;
    background: var(--paper);
  }
  .thank-you-copy { order: -2; }
  .festival-mark { order: -1; width: min(92vw, 23rem); margin: .75rem auto .75rem; }
  .brand-cluster { display: none; }
  .thank-you-copy h1,
  .thank-you-copy p {
    font-size: clamp(1.125rem, 4.5vw, 1.4rem);
    font-weight: 400;
  }
  .gallery-viewport { position: relative; z-index: 2; overflow: visible; background: var(--paper); }
  .gallery-viewport:focus-visible { outline: none; }
  .gallery-track { min-width: 0; height: auto; display: grid; gap: .5rem; padding: 0; }
  .gallery-column { display: contents; }
  .gallery-column--desktop-only { display: none; }
  .photo-card { width: 100%; height: auto; aspect-ratio: auto; }
  .photo-card img { display: block; width: 100%; height: auto; object-fit: contain; }
  .landing-footer {
    position: fixed;
    z-index: 20;
    inset: auto 0 0;
    grid-template-columns: 1fr;
    gap: .75rem;
    align-items: start;
    padding: .7rem var(--gutter) .8rem;
    background: var(--paper);
  }
  .archive-nav { display: block; }
  .archive-years { gap: .45rem; }
  .archive-nav a + a::before { margin-inline-end: .45rem; }
  .mobile-footer-brands {
    display: grid;
    grid-template-columns: 2.85rem 1fr;
    gap: .7rem;
    align-items: center;
  }
  .mobile-footer-mark { width: 2.75rem; filter: brightness(0); }
  /* the name goes to the right edge with its icons stacked underneath, the
     last glyph lining up with the end of A<FESTIVAL */
  .mobile-footer-brands .brand-cluster {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-self: end;
    gap: .15rem;
  }
  .mobile-footer-brands .brand-name,
  .archive-nav a { font-size: 1rem; }
  .mobile-footer-brands .brand-cluster--inline .social-links {
    gap: 0;
    margin-block-start: 0;
    margin-inline: 0 calc((var(--social-icon) - var(--social-hit)) / 2);
  }
  .landing-credits { display: none; grid-column: 1; text-align: left; }
  .landing-footer.is-page-end .landing-credits {
    display: grid;
    grid-template-columns: 1fr;
    gap: .45rem;
    justify-content: stretch;
    padding-top: .15rem;
  }
  .photo-credits,
  .credit-details { grid-column: 1; padding-inline-start: 0; text-align: left; }
  .cookie-banner { right: .75rem; bottom: 7.75rem; grid-template-columns: 1fr; width: calc(100% - 1.5rem); }
  .cookie-banner-actions { display: grid; grid-template-columns: 1fr; justify-content: stretch; }
  .cookie-button-primary { order: -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
