/* Kolor we wnętrzu
   Sizes are in rem (1rem = 16px) so the whole layout scales up in one step on
   very wide screens, see the end of the file. Colours, type and proportions
   carry over from the previous site. */

/* Open Sans, self-hosted. One variable file per subset covers weights 300-800;
   Polish letters such as ę and ł are in latin-ext. */

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url(../fonts/open-sans-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url(../fonts/open-sans-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --text: #333;
  --page: #ebebeb;
  --graphite: #3f3f3f;
  --nav: #222;
  --nav-link: #9d9d9d;
  --nav-active: #090909;
  --ink: #121212;

  /* Below 992px, then overridden at each breakpoint. */
  --header-h: 5.3125rem;
  --brand-size: 1.25rem;
  --brand-line: 1.875rem;
  --hero-title: 1.875rem;
  --banner-h: 9.375rem;
  --banner-title: 1.25rem;

  --gutter: 0.9375rem;
  --gap: 1.5rem;
  --content: 82.5rem; /* Two 640px photos side by side at their native size. */
}

@media (min-width: 992px) {
  :root {
    --header-h: 6.875rem;
    --brand-size: 1.875rem;
    --brand-line: 2.5rem;
    --hero-title: 2.1875rem;
    --banner-h: 12.5rem;
    --banner-title: 1.875rem;
  }
}

@media (min-width: 1200px) {
  :root {
    --header-h: 8.4375rem;
    --brand-size: 2.0625rem;
    --brand-line: 2.8125rem;
    --hero-title: 3.75rem;
    --banner-h: 15.625rem;
    --banner-title: 2.8125rem;
    --gutter: 1.875rem;
  }
}

/* Base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding-top: var(--header-h);
  background: var(--page);
  color: var(--text);
  font-family: "Open Sans", OpenSans, sans-serif;
  font-size: 0.875rem;
  line-height: 1.42857;
  overflow-x: clip;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p,
ul,
figure {
  margin: 0;
}

ul {
  padding: 0;
}

.thin {
  font-weight: 300;
}

.container {
  width: 100%;
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: fixed;
  top: -4rem;
  left: 1rem;
  z-index: 1100;
  padding: 0.5rem 1rem;
  background: #fff;
  color: var(--text);
}

.skip-link:focus {
  top: 1rem;
}

/* Header */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  background: var(--nav);
  view-transition-name: site-header;
}

.site-header__inner {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  color: #fff;
  font-size: var(--brand-size);
  font-weight: 600;
  line-height: var(--brand-line);
}

.nav ul {
  display: flex;
  height: 100%;
  list-style: none;
}

.nav a {
  display: flex;
  align-items: center;
  height: 100%;
  padding-inline: 0.9375rem;
  color: var(--nav-link);
  font-size: 0.625rem;
  text-transform: uppercase;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: #fff;
}

.nav .active a {
  background: var(--nav-active);
  color: #fff;
}

@media (min-width: 1200px) {
  .nav a {
    font-size: 0.75rem;
  }
}

/* The menu toggle is a checkbox, so it works without JavaScript. */
.nav-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  appearance: none;
}

.nav-burger {
  display: none;
}

@media (max-width: 767.98px) {
  .nav-burger {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-self: center;
    padding: 0.5625rem 0.625rem;
    border: 1px solid #333;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
  }

  .nav-burger span {
    display: block;
    width: 1.375rem;
    height: 2px;
    border-radius: 1px;
    background: #fff;
  }

  .nav-toggle:checked + .nav-burger {
    background: #333;
  }

  .nav-toggle:focus-visible + .nav-burger {
    outline: 2px solid #fff;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    visibility: hidden;
    opacity: 0;
    background: var(--nav);
    border-top: 1px solid #101010;
    transform: translateY(-0.5rem);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  }

  .nav-toggle:checked ~ .nav {
    visibility: visible;
    opacity: 1;
    transform: none;
  }

  .nav ul {
    flex-direction: column;
    height: auto;
    padding-block: 0.5rem;
  }

  .nav a {
    height: 3.25rem;
    padding-inline: var(--gutter);
    font-size: 0.75rem;
  }
}

/* A fixed header would take up too much of a phone held sideways. */
@media (max-height: 480px) and (orientation: landscape) {
  .site-header {
    position: absolute;
  }

  html {
    scroll-padding-top: 0;
  }
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: min(20rem, 70svh);
  max-height: 78svh;
  aspect-ratio: var(--ar, 1920 / 700);
  background: var(--nav);
}

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__text {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: var(--gutter);
  color: #fff;
  text-shadow: 1px 1px rgba(0, 0, 0, 0.89);
}

.hero h1 {
  font: inherit;
}

.hero__title {
  display: block;
  margin-block: 1.25rem 0.625rem;
  font-size: var(--hero-title);
  font-weight: 300;
  line-height: 1.1;
}

.lead {
  display: block;
  margin-bottom: 1.25rem;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.4;
}

@media (min-width: 768px) {
  .lead {
    font-size: 1.3125rem;
  }
}

/* Slides pass from right to left on a 20s loop, 5s each. No JavaScript:
   the negative delays start every slide at its own point of the same cycle. */
.slides .hero__img {
  transform: translateX(100%);
}

.slides .hero__img:first-child {
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .slides .hero__img {
    animation: slide 20s ease-in-out infinite;
  }

  .slides .hero__img:nth-child(2) { animation-delay: -15s; }
  .slides .hero__img:nth-child(3) { animation-delay: -10s; }
  .slides .hero__img:nth-child(4) { animation-delay: -5s; }

  .hero--slides:hover .hero__img {
    animation-play-state: paused;
  }
}

@keyframes slide {
  0%, 22% { transform: translateX(0); }
  25% { transform: translateX(-100%); }
  25.01%, 97% { transform: translateX(100%); }
  100% { transform: translateX(0); }
}

/* Graphite introduction */

.graphite {
  padding: 5rem var(--gutter) 8.75rem;
  background: var(--graphite);
  color: #fff;
  text-align: center;
}

.graphite__inner {
  max-width: 60rem;
  margin-inline: auto;
}

.motto {
  margin-block: 0.625rem;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.8;
  text-transform: uppercase;
}

.graphite p {
  margin-bottom: 0.625rem;
  font-weight: 300;
  line-height: 1.8;
}

.br-md {
  display: none;
}

@media (min-width: 992px) {
  .br-md {
    display: inline;
  }
}

/* Section banners. The texture is cropped as before up to 1920px wide and
   stretched beyond that, where the old site ran out of image. */

.banner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--banner-h);
  margin-bottom: 1.25rem;
  padding-inline: var(--gutter);
  background: url(../images/tlo1.jpg) left top / max(100%, 1920px) auto no-repeat var(--graphite);
  text-align: center;
}

.banner h1,
.banner h2 {
  color: #fff;
  font-size: var(--banner-title);
  font-weight: 300;
  line-height: 1.1;
  text-shadow: 1px 1px rgba(0, 0, 0, 0.89);
}

.section-body {
  padding-block: 1.25rem 3.125rem;
}

/* Rows of photos. Each item takes up width in proportion to its aspect ratio,
   so a row of mixed portraits and landscapes lines up at one height and
   always fills the content width. */

.row {
  display: flex;
  gap: var(--gap);
}

.row .item {
  flex: var(--ar) 1 0;
  min-width: 0;
}

.row--single {
  margin-inline: auto;
}

.row--single .item {
  flex-basis: 100%;
}

.item img {
  width: 100%;
}

@media (max-width: 575.98px) {
  .row {
    flex-direction: column;
  }

  .row .item {
    flex: none;
  }
}

/* Portfolio tiles on the home page */

.section-body .row {
  gap: 1.875rem;
}

.tile {
  display: block;
}

.tile img {
  transition: opacity 0.3s ease;
}

.tile:hover img {
  opacity: 0.88;
}

.tile__caption {
  display: block;
  padding-block: 0.875rem 1.3125rem;
  text-align: center;
}

@media (min-width: 576px) and (max-width: 767.98px) {
  .tile__caption {
    font-size: 0.75rem;
  }
}

/* Contact */

.contact {
  min-height: 30vh;
  text-align: center;
}

.contact h3 {
  margin-block: 0.625rem 2rem;
  font-size: 2.25rem;
  font-weight: 500;
  line-height: 1.1;
  text-transform: uppercase;
}

.contact p {
  margin-bottom: 0.625rem;
  font-weight: 300;
}

.inline-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: inherit;
  gap: 0.625rem;
  margin-bottom: 0.625rem;
  list-style: none;
}

.contact .inline-list {
  justify-content: center;
}

/* Project pages */

.project {
  margin-block: 5vh 10vh;
}

.project__intro {
  margin-bottom: 5vh;
  font-weight: 300;
}

.project__intro h2 {
  margin-block: 0.625rem;
  font-size: 1.125rem;
  font-weight: 300;
  line-height: 1.1;
}

.project__intro h3 {
  margin-bottom: 0.625rem;
  font-size: 0.875rem;
  font-weight: 300;
}

.project__intro ul {
  padding-left: 2.5rem;
}

.gallery {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.gallery-cols {
  display: flex;
  gap: var(--gap);
}

.gallery-col {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--gap);
  min-width: 0;
}

@media (max-width: 575.98px) {
  .gallery-cols {
    flex-direction: column;
  }
}

figcaption {
  padding-top: 0.75rem;
  font-weight: 300;
  text-align: center;
}

.zoom {
  display: block;
  cursor: zoom-in;
}

.zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(255, 255, 255, 0.85);
  opacity: 0;
  cursor: zoom-out;
  transition: opacity 0.3s ease;
}

.zoom-overlay.is-open {
  opacity: 1;
}

.zoom-image {
  position: fixed;
  z-index: 2001;
  max-width: none;
  cursor: zoom-out;
  transition: transform 0.3s ease;
}

/* Footer */

.footer {
  padding-block: 3.125rem;
  background: var(--graphite);
  color: #fff;
}

.footer p {
  margin-bottom: 0.625rem;
}

.footer .footer__title {
  margin-bottom: 2.5rem;
  font-size: var(--brand-size);
  font-weight: 600;
  line-height: var(--brand-line);
}

.bottom-line {
  padding-block: 1.25rem 0.625rem;
  background: var(--ink);
  color: #fff;
  font-size: 85%;
}

.bottom-line p {
  margin-bottom: 0.625rem;
}

/* Wide screens. Text and spacing follow the photos, which get larger here
   than their native size, within what they can take. */

@media (min-width: 1800px) {
  :root {
    --content: 97.5rem;
  }
}

@media (min-width: 2200px) {
  html {
    font-size: 112.5%;
  }
}

@media (min-width: 3000px) {
  html {
    font-size: 125%;
  }
}

/* Motion */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  /* Cross-fade between pages, where the browser supports it. */
  @view-transition {
    navigation: auto;
  }

  ::view-transition-group(root) {
    animation-duration: 0.35s;
  }
}
