@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #525252;
  --line: #141414;
  --line-soft: #d9d9d9;
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: 'Poppins', 'Helvetica Neue', sans-serif;
  line-height: 1.45;
}

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

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.seo-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-shell {
  width: min(100% - 2.2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
}

.topbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand img {
  height: clamp(42px, 5.2vw, 64px);
  width: auto;
  max-width: min(72vw, 300px);
  display: block;
}

.menu-toggle {
  display: none;
  position: relative;
  width: 40px;
  height: 36px;
  border: none;
  background: #fff;
  cursor: pointer;
}

.menu-toggle::before,
.menu-toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle::before {
  transform: translate(-50%, -50%);
}

.menu-toggle::after {
  opacity: 0;
  transform: translate(-50%, -50%);
}

.menu-toggle[aria-expanded="true"]::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.menu-toggle[aria-expanded="true"]::after {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(-45deg);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  font-size: 0.74rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.site-nav a {
  padding: 0.28rem 0;
}

.site-nav a.current {
  font-weight: 600;
}

main {
  padding: 2.3rem 0 1rem;
  flex: 1 0 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.project {
  width: 100%;
  max-width: 1060px;
  margin-inline: auto;
  flex: 1 0 auto;
  min-width: 0;
}

.project-head {
  padding-bottom: 1.25rem;
}

.project-kicker,
.project-alt {
  margin: 0;
  font-size: 0.79rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-alt {
  margin-top: 0.65rem;
  font-size: 0.82rem;
  text-transform: none;
  letter-spacing: 0.02em;
}

.project-head h1 {
  margin: 0.38rem 0 0;
  font-family: inherit;
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1.05;
}

.project-gallery {
  margin-top: 1.8rem;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 0.8rem;
}

.gallery-viewport {
  overflow: hidden;
  touch-action: pan-y;
}

.gallery-track {
  display: flex;
  transform: translateX(0);
  transition: transform 0.28s ease;
  will-change: transform;
}

.gallery-slide {
  min-width: 100%;
  margin: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-slide img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(76vh, 860px);
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.gallery-nav {
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1.9rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.section-rule {
  margin-top: 2.35rem;
  padding-top: 1.15rem;
}

.section-title {
  margin: 0 0 0.85rem;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.info-card {
  background: #f8f8f8;
  padding: 0.95rem;
}

.info-card h3 {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.info-card p {
  margin: 0.35rem 0;
  font-size: 0.94rem;
}

.text-panel {
  background: #f8f8f8;
  padding: 1rem;
}

.text-panel h2,
.text-panel h3 {
  margin: 0 0 0.6rem;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.text-panel p {
  margin: 0;
  max-width: 84ch;
}

.text-panel + .text-panel {
  margin-top: 1rem;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  font-size: 0.79rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.logo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.logo-grid a {
  min-height: 72px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem;
}

.logo-grid a:hover {
  background: #111;
  text-decoration: none;
}

.logo-grid img {
  height: 30px;
  max-height: 30px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.logo-grid img[alt="Burgas International Film Festival Logo"] {
  filter: none;
}

.earth-note {
  margin-top: 1.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.button-link {
  display: inline-block;
  border: none;
  background: #ededed;
  padding: 0.56rem 0.92rem;
  font-size: 0.77rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.button-link:hover {
  background: var(--text);
  color: #fff;
  text-decoration: none;
}

.contact-form {
  max-width: 560px;
  background: #fafafa;
  padding: 1rem;
}

.form-row + .form-row {
  margin-top: 0.75rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: none;
  padding: 0.58rem 0.62rem;
  background: #f0f0f0;
  color: var(--text);
  font: inherit;
  font-size: 0.94rem;
}

.contact-form textarea {
  min-height: 126px;
  resize: vertical;
}

.contact-form button {
  margin-top: 0.88rem;
  width: 100%;
  border: none;
  background: var(--text);
  color: #fff;
  padding: 0.65rem 0.8rem;
  font: inherit;
  font-size: 0.77rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  cursor: pointer;
}

.prints-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.25rem;
}

.prints-cta img {
  width: 148px;
  height: auto;
}

.site-footer {
  margin-top: 2.4rem;
  padding-top: 1rem;
  padding-bottom: 0.45rem;
  padding-inline: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.4rem;
  justify-content: space-between;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.page-index main.site-shell {
  width: min(100% - 0.35rem, 1900px);
  padding-top: 0.45rem;
  padding-bottom: 0.3rem;
}

.page-index .project {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: none;
}

.page-index .project-gallery {
  margin-top: 0;
  width: 100%;
}

.page-index .gallery-viewport {
  height: min(90svh, calc(100svh - clamp(84px, 9vw, 128px) - 3.6rem));
  max-height: 1120px;
}

.page-index .gallery-track,
.page-index .gallery-slide {
  height: 100%;
}

.page-index .gallery-slide img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
}

.page-index .site-footer {
  margin-top: 0.65rem;
  padding-top: 0.35rem;
}

.page-contact .project {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-contact .project-head {
  text-align: center;
}

.page-contact .section-rule {
  margin-top: 0.9rem;
  padding-top: 0;
}

.page-contact .link-row {
  justify-content: center;
}

.page-about .project {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 920px;
}

.page-about .section-rule {
  margin-top: 2.15rem;
  padding-top: 0;
}

.page-about .section-rule:first-of-type {
  margin-top: 0;
}

.page-about .text-panel,
.page-about .info-card,
.page-about .section-title,
.page-about .earth-note {
  text-align: left;
}

.page-about .link-row {
  justify-content: center;
  gap: 1rem 1.5rem;
}

.page-about .text-panel {
  padding: 1.3rem 1.35rem;
}

.page-about .info-columns {
  gap: 1.25rem;
}

.page-about .info-card {
  padding: 1.2rem;
}

.page-about .section-rule[aria-label="Publications"] {
  margin-top: 3rem;
  padding-top: 0.55rem;
  padding-bottom: 0.75rem;
  padding-inline: clamp(0.7rem, 3vw, 1.8rem);
}

.page-about .logo-grid {
  max-width: 520px;
  margin-inline: auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.page-about .logo-grid a {
  min-height: 0;
  width: clamp(98px, 9vw, 116px);
  max-width: 100%;
  aspect-ratio: 1 / 1;
  justify-self: center;
  padding: 0.6rem;
}

.page-about .logo-grid img {
  width: auto;
  height: auto;
  max-width: 82%;
  max-height: 20px;
}

.page-about .logo-grid img.logo-vij {
  max-height: 16px;
}

.page-about .logo-grid img.logo-boyscout {
  max-height: 18px;
}

.page-about .logo-grid img.logo-biff {
  max-width: 74%;
  max-height: 30px;
}

.page-about .earth-note {
  margin-top: 2.6rem;
  text-align: center;
}

.page-free-goods .project {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 780px;
}

.page-free-goods .project-head,
.page-free-goods .section-rule,
.page-free-goods .text-panel {
  text-align: center;
}

.page-free-goods .section-rule {
  margin-top: 1rem;
  padding-top: 0;
}

@media (min-width: 1025px) {
  .page-index .project-gallery {
    width: 80vw;
    margin-inline: auto;
  }

  .page-index .gallery-viewport {
    height: 80svh;
    max-height: none;
  }
}

@media (max-width: 980px) {
  .site-shell {
    width: min(100% - 1.4rem, var(--max));
  }

  .site-nav {
    gap: 0.8rem;
    font-size: 0.69rem;
    letter-spacing: 0.07em;
  }

  .page-index main.site-shell {
    width: min(100% - 0.45rem, 1900px);
  }

  .page-index .gallery-viewport {
    height: min(78svh, calc(100svh - 170px));
    max-height: 820px;
  }

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

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

@media (max-width: 860px) {
  main {
    padding: 1.3rem 0 0.8rem;
  }

  .topbar {
    min-height: 64px;
  }

  .brand img {
    height: 48px;
    max-width: 68vw;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    padding: 0.7rem 0.9rem;
    gap: 0.55rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    width: 100%;
  }

  .gallery-nav {
    width: 26px;
    height: 26px;
    font-size: 1.45rem;
  }

  .project-gallery {
    grid-template-columns: 26px minmax(0, 1fr) 26px;
    gap: 0.35rem;
  }

  .page-index .gallery-nav {
    display: none;
  }

  .page-index .project-gallery {
    display: block;
    width: 100dvw;
    margin-left: calc(50% - 50dvw);
    margin-right: calc(50% - 50dvw);
  }

  .page-index .gallery-viewport {
    height: min(68svh, calc(100svh - 150px));
    max-height: 620px;
  }

  .gallery-slide img {
    max-height: min(62vh, 460px);
  }

  .page-index .gallery-slide img {
    max-height: none;
  }
}

@media (max-width: 620px) {
  .site-shell {
    width: min(100% - 1rem, var(--max));
  }

  .brand img {
    height: 42px;
    max-width: 74vw;
  }

  .info-columns,
  .logo-grid {
    grid-template-columns: 1fr;
  }

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

  .project-head h1 {
    font-size: clamp(1.72rem, 10vw, 2.2rem);
  }

  .page-about .section-rule {
    margin-top: 1.5rem;
  }

  .page-about .text-panel,
  .page-about .info-card {
    padding: 1rem;
  }
}
