:root {
  --bg: #F5F1EA;
  --ink: #2A1E1C;
  --muted: #6B5B57;
  --accent: #8F1414;
  --accent-dark: #5E0C0C;
  --dark: #1F1715;
  --panel: #E8E0D3;
  --line: rgba(42, 30, 28, 0.14);

  --font-display: 'Anton', sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-script: 'Yellowtail', cursive;

  --radius-lg: 40px;
  --radius-md: 28px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

img, video {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-dark);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 48px);
}

/* Typografia */

.script {
  font-family: var(--font-script);
  font-size: clamp(38px, 4.5vw, 58px);
  line-height: 1;
  color: var(--accent);
}

.script--light {
  color: var(--bg);
}

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow--spaced {
  margin: 48px 0 14px;
}

.section__title {
  margin-top: 14px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(44px, 6vw, 72px);
  line-height: 1;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--accent);
}

.section__title--spaced {
  margin-bottom: 48px;
}

.section__subtitle {
  margin: 14px 0 48px;
  font-size: 19px;
  color: var(--muted);
}

.lead {
  max-width: 580px;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.6;
}

/* Przyciski */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.btn--filled {
  min-height: 44px;
  padding: 0 22px;
  background: var(--accent);
  color: var(--bg);
  font-size: 15px;
}

.btn--filled:hover {
  background: var(--accent-dark);
  color: var(--bg);
}

.btn--outline {
  min-height: 52px;
  padding: 0 30px;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-size: 15px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.btn--outline:hover {
  background: var(--accent);
  color: var(--bg);
}

/* Nawigacja */

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  padding: 20px 0;
}

.nav__logo {
  padding: 6px 0;
  font-family: var(--font-display);
  font-size: 30px;
  letter-spacing: 1px;
  text-decoration: none;
}

.nav__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 28px;
}

.nav__link {
  padding: 12px 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.nav__link:hover {
  color: var(--accent);
}

/* Hero */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: clamp(56px, 9vw, 120px) 0 clamp(72px, 10vw, 136px);
  text-align: center;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(68px, 13vw, 184px);
  line-height: 0.92;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
}

.hero__title span {
  display: block;
}

.hero__subtitle {
  font-size: clamp(17px, 1.6vw, 21px);
}

.hero__buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  padding-top: 12px;
}

/* Sekcje */

.section {
  padding: clamp(64px, 9vw, 112px) 0;
  border-top: 1px solid var(--line);
}

/* O mnie */

.about {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(40px, 6vw, 88px);
}

.about__content {
  flex: 999 1 440px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.about__photo {
  flex: 1 1 320px;
  max-width: 440px;
  min-width: 0;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-lg);
  background: var(--dark);
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 40px;
  padding-top: 8px;
}

.fact {
  flex: 1 1 150px;
  min-width: 0;
}

.fact__title {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--accent);
}

.fact__text {
  margin-top: 8px;
  font-size: 15px;
  color: var(--muted);
}

/* Karty */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 36px 32px 24px;
  border: 2px solid var(--accent);
  border-radius: 32px;
}

.card__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--accent);
}

.card__text {
  font-size: 17px;
  line-height: 1.55;
}

.card__link {
  margin-top: auto;
  padding: 12px 0;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

/* Filmy */

.tiles {
  display: grid;
  gap: 24px;
}

.tiles--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tiles--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tile__media {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: var(--dark);
}

.tile__caption {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tile__caption strong {
  font-size: 17px;
}

.tile__caption span {
  font-size: 14px;
  color: var(--muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 18px;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.note {
  max-width: 620px;
  margin-top: 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

/* Projekty */

.projects {
  display: flex;
  flex-direction: column;
  gap: clamp(56px, 7vw, 88px);
}

.project {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}

.project__content {
  flex: 1 1 360px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.project__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 3.6vw, 44px);
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--accent);
}

.project__client {
  font-size: 16px;
  font-weight: 700;
}

.project__label {
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
}

.project__block p:last-child {
  font-size: 16px;
  line-height: 1.55;
}

.project__stack {
  font-size: 14px;
  color: var(--muted);
}

.project__media {
  flex: 1 1 460px;
  min-width: 0;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: var(--panel);
}
.project__media--video {
  aspect-ratio: 16 / 9;
  background: #000;
}

.tile__media:fullscreen,
.project__media:fullscreen {
  object-fit: contain;
  border-radius: 0;
  background: #000;
}

.tile__media:-webkit-full-screen,
.project__media:-webkit-full-screen {
  object-fit: contain;
  border-radius: 0;
  background: #000;
}
.project__button { align-self: flex-start; }

/* Kontakt */

.contact {
  background: var(--accent);
  color: var(--bg);
}

.contact .container {
  padding-top: clamp(72px, 10vw, 128px);
  padding-bottom: 40px;
}

.contact__title {
  margin-top: 12px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(52px, 8vw, 104px);
  line-height: 0.95;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.contact__lead {
  max-width: 560px;
  margin: 24px 0 56px;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.6;
}

.contact__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 56px;
}

.contact__label {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #EBDCD6;
}

.contact__value {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--bg);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contact__value:hover {
  color: #EBDCD6;
}

.contact__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: clamp(72px, 9vw, 112px);
  padding-top: 24px;
  border-top: 1px solid rgba(245, 241, 234, 0.25);
  font-size: 14px;
  color: #EBDCD6;
}

.contact__bottom a {
  padding: 12px 0;
  font-weight: 600;
  color: var(--bg);
  text-decoration: none;
}

/* Responsywność */

@media (max-width: 960px) {
  .cards,
  .contact__grid {
    grid-template-columns: 1fr;
  }

  .tiles--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tiles--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .nav__link {
    display: none;
  }

  .tiles--3 {
    grid-template-columns: 1fr;
  }
}
/* Odtwarzacz 9:16 z rozmytym tłem */

.player {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--dark);
}

.player__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: blur(24px) brightness(0.75);
  transform: scale(1.3);
}

.player__video {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.player__fullscreen {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: background 0.2s;
}

.player__fullscreen:hover,
.player__fullscreen:focus-visible {
  background: rgba(0, 0, 0, 0.7);
}

.player__fullscreen svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.player:fullscreen {
  aspect-ratio: auto;
  width: 100%;
  height: 100%;
  border-radius: 0;
}

.player:-webkit-full-screen {
  aspect-ratio: auto;
  width: 100%;
  height: 100%;
  border-radius: 0;
}

/* Siatka na 2 filmy (kafelki tej samej wielkości co przy 3) */

.tiles--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: calc((100% - 48px) / 3 * 2 + 24px);
}

@media (max-width: 960px) {
  .tiles--2 {
    max-width: none;
  }
}

/* Walkthrough 16:9 i pełny ekran bez przycinania */

.project__media--video {
  aspect-ratio: 16 / 9;
  background: #000;
}

.project__media:fullscreen {
  object-fit: contain;
  border-radius: 0;
  background: #000;
}

.project__media:-webkit-full-screen {
  object-fit: contain;
  border-radius: 0;
  background: #000;
}

.project__button {
  align-self: flex-start;
}

/* Kontakt */

.contact__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 72px;
}

.contact__hint {
  margin-top: 40px;
  font-size: 15px;
  color: #EBDCD6;
}
/* Płynne przewijanie i animacje */

html {
  scroll-padding-top: 24px;
}

.nav {
  animation: fade 0.8s ease both;
}

.hero {
  min-height: calc(100vh - 84px);
  min-height: calc(100svh - 84px);
  justify-content: center;
}

.hero > :not(.hero__title),
.hero__title span {
  animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero > .script { animation-delay: 0.05s; }
.hero__title span:nth-child(1) { animation-delay: 0.15s; }
.hero__title span:nth-child(2) { animation-delay: 0.27s; }
.hero__subtitle { animation-delay: 0.42s; }
.hero__buttons { animation-delay: 0.54s; }

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--delay, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Hover */

.card {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 40px -28px rgba(42, 30, 28, 0.45);
}

.player {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.tile:hover .player {
  transform: translateY(-4px);
  box-shadow: 0 22px 40px -28px rgba(42, 30, 28, 0.5);
}

.tile:hover .player:fullscreen {
  transform: none;
  box-shadow: none;
}

.tile:hover .player:-webkit-full-screen {
  transform: none;
  box-shadow: none;
}

.project__media {
  transition: transform 0.5s ease;
}

.project:hover .project__media {
  transform: scale(1.015);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}

/* Hero czeka na fonty */

.js .nav,
.js .hero > :not(.hero__title),
.js .hero__title span {
  animation-play-state: paused;
}

.js.fonts-ready .nav,
.js.fonts-ready .hero > :not(.hero__title),
.js.fonts-ready .hero__title span {
  animation-play-state: running;
}
