/* ===== Цвета, шрифты и сетка: меняйте здесь ===== */
:root {
  --bg: #110d0a;
  --surface: #1a1410;
  --line: #2a2019;
  --text: #eee4d8;
  --muted: #9d8e80;
  --amber: #ff8a1f;
  --amber-light: #ffa54d;

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-text: "Newsreader", Georgia, "Times New Roman", serif;

  /* Сетка галереи */
  --gap: 6px;                 /* расстояние между фото */
  --tile-ratio: 1 / 1;        /* форма плитки: 1 / 1 квадрат, 4 / 5 вертикальная, 3 / 2 горизонтальная */

  --gutter: clamp(20px, 4vw, 48px);
  --maxw: 1360px;
  --pad: max(var(--gutter), calc((100vw - var(--maxw)) / 2));
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.lb-open { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1.1em; }

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

.muted { color: var(--muted); }

/* ===== Шапка ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 18px var(--pad);
  background: rgba(17, 13, 10, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.topbar nav {
  display: flex;
  gap: clamp(16px, 3vw, 32px);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.98rem;
}

.topbar nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.topbar nav a:hover { color: var(--amber); }

/* ===== Вступление ===== */
/* Три колонки, как в галерее: текст занимает две, фото ровно одну */
.intro {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  align-items: start;
  padding: clamp(40px, 7vw, 88px) var(--pad) clamp(28px, 4vw, 48px);
}

.intro-text {
  grid-column: 1 / span 2;
  padding-right: clamp(16px, 6vw, 96px);
}

.intro-photo {
  grid-column: 3;
  margin: 0;
}

.intro-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--surface);
}

.intro h1 {
  margin: 0 0 0.6em;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 4.6vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.intro-text p {
  max-width: 52ch;
  font-size: 1.2rem;
  line-height: 1.6;
  color: #d3c5b6;
}

.intro-text p:last-child { margin-bottom: 0; }

/* ===== Фильтры ===== */
.works {
  padding: 0 var(--pad) clamp(64px, 9vw, 112px);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.6rem;
  margin-bottom: 20px;
}

.chip {
  padding: 0.3rem 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: color 0.2s;
}

.chip:hover { color: var(--text); }

.chip[aria-pressed="true"] {
  color: var(--text);
  border-bottom-color: var(--amber);
}

/* ===== Галерея: ровная сетка, одинаковые плитки ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}

.tile {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  overflow: hidden;
  background: var(--surface);
  aspect-ratio: var(--tile-ratio);
  cursor: zoom-in;
  color: var(--text);
  text-align: left;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s;
}

.tile:hover img { opacity: 0.8; }

.tile:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: -2px;
}

/* ===== Съёмки и контакты ===== */
.band {
  padding: clamp(56px, 9vw, 112px) var(--pad);
  border-top: 1px solid var(--line);
}

.band h2 {
  margin: 0 0 1.2rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.shoots {
  display: grid;
  grid-template-columns: 0.7fr 1fr;
  gap: clamp(32px, 7vw, 112px);
  align-items: start;
}

/* ===== Ссылки на облако ===== */
.cloud-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.cloud-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: color 0.2s;
}

.cloud-link:hover { color: var(--amber); }

.cloud-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.15rem;
  line-height: 1.3;
}

.cloud-meta {
  flex-shrink: 0;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--muted);
}

.lead {
  max-width: 40ch;
  margin: 0 0 1.4rem;
  font-size: 1.2rem;
  font-style: italic;
  line-height: 1.5;
  color: #d3c5b6;
}

.mail {
  display: inline-block;
  margin: 0 0 1.8rem;
  border-bottom: 2px solid var(--amber);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 4.6vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color 0.2s;
}

.mail:hover { color: var(--amber); }

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-display);
  font-weight: 500;
}

.links a {
  color: var(--muted);
  text-underline-offset: 4px;
  transition: color 0.2s;
}

.links a:hover { color: var(--amber); }

/* ===== Подвал ===== */
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding: 28px var(--pad);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

/* ===== Просмотр фото на весь экран ===== */
.lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
}

.lightbox::backdrop { background: rgba(9, 6, 4, 0.96); }

.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  margin: 0;
  padding: 4.5rem 5rem;
  width: 100%;
  height: 100%;
}

.lb-figure img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100dvh - 9rem);
  object-fit: contain;
}

.icon-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s;
}

.icon-btn:hover { color: var(--amber); }

.lb-close { top: 1rem; right: 1rem; }
.lb-nav { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }

/* ===== Планшеты и телефоны ===== */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .shoots { grid-template-columns: 1fr; }

  .intro {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .intro-text {
    grid-column: auto;
    padding-right: 0;
  }

  .intro-photo {
    grid-column: auto;
    max-width: 380px;
  }
}

@media (max-width: 640px) {
  .lb-figure { padding: 4rem 0.75rem 5.5rem; }
  .lb-figure img { max-height: calc(100dvh - 10rem); }
  .lb-nav { top: auto; bottom: 1rem; transform: none; }
  .lb-prev { left: calc(50% - 60px); }
  .lb-next { right: calc(50% - 60px); }
}

/* ===== Без анимации для тех, кто её отключил ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
