/* Портфолио Алины Давлетовой. Тёмная редакционная вёрстка: фото во весь экран, крупный серифный шрифт,
   серии как проекты, галерея выровненными рядами, лайтбокс. Цвета и отступы в :root. */
:root {
  --bg: #0e0c0b;
  --bg-2: #15120f;
  --ink: #f2ebe2;
  --ink-soft: #a89d92;
  --ink-dim: #6f655c;
  --line: rgba(242, 235, 226, 0.12);
  --accent: #d9a066;
  --radius: 4px;
  --max: 1280px;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: .98; margin: 0; letter-spacing: -0.015em; }
h2 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h3 { font-size: 1.75rem; }
p { margin: 0 0 1em; }
::selection { background: var(--accent); color: var(--bg); }

/* Плёночное зерно */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: .06; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Шапка ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px var(--gutter);
  transition: background .4s, padding .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled { padding: 12px var(--gutter); background: rgba(14,12,11,.7); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); border-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.5rem; font-weight: 500; text-decoration: none; letter-spacing: .01em; }
.raven { color: var(--ink); display: block; flex: none; }
.raven-eye { fill: var(--bg); }
.brand .raven { transition: transform .5s var(--ease); }
.brand:hover .raven { transform: translateX(-3px); }
.nav { display: flex; gap: 26px; align-items: center; }
.nav a { position: relative; text-decoration: none; color: var(--ink); opacity: 1; text-shadow: 0 1px 6px rgba(0,0,0,.8), 0 0 18px rgba(0,0,0,.5); font-size: .88rem; letter-spacing: .02em; transition: color .2s; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav a:hover { opacity: 1; }
.site-header.is-scrolled .nav a { opacity: .75; text-shadow: none; }
.site-header:not(.is-scrolled) .brand { text-shadow: 0 1px 6px rgba(0,0,0,.8); }
.site-header.is-scrolled .nav a:hover { opacity: 1; }
.nav a:hover::after { transform: scaleX(1); }
.nav .nav-cta { color: var(--ink); border: 1px solid rgba(242,235,226,.3); padding: 7px 14px; border-radius: 999px; }
.nav .nav-cta::after { display: none; }
.nav .nav-cta:hover { background: var(--ink); color: var(--bg); }

/* ---------- Первый экран ---------- */
.hero { position: relative; min-height: 100svh; display: grid; align-items: end; overflow: hidden; }
.hero-pic { position: absolute; inset: -6% 0 0 0; }
.hero-img { width: 100%; height: 106%; object-fit: cover; object-position: center 42%; will-change: transform; animation: heroIn 2.6s var(--ease) both; }
@keyframes heroIn { from { transform: scale(1.1); filter: brightness(.6); } to { transform: scale(1.02); filter: brightness(1); } }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(14,12,11,.95) 0%, rgba(14,12,11,.45) 40%, rgba(14,12,11,.2) 70%, rgba(14,12,11,.55) 100%); }
.hero::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 260px; background: linear-gradient(to bottom, rgba(14,12,11,.72), rgba(14,12,11,.3) 45%, rgba(14,12,11,0)); }
.hero-meta { position: absolute; top: 84px; right: var(--gutter); z-index: 2; display: flex; gap: 16px; padding: 9px 16px; border-radius: 999px; background: rgba(14,12,11,.5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(242,235,226,.14); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); animation: fadeIn 1.4s .8s both; }
.hero-meta #clock { color: var(--ink); font-variant-numeric: tabular-nums; }
.hero-text { position: relative; text-shadow: 0 2px 24px rgba(0,0,0,.45); padding: 0 var(--gutter) clamp(56px, 9vh, 110px); max-width: 1100px; will-change: opacity; }
.hero-title { font-size: clamp(4.2rem, 13.5vw, 11rem); font-weight: 500; line-height: .9; letter-spacing: -0.02em; }
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line span { display: block; transform: translateY(110%); animation: lineUp 1.3s var(--ease) forwards; }
.hero-title .line:nth-child(2) span { animation-delay: .12s; }
@keyframes lineUp { to { transform: none; } }
.hero .eyebrow { color: var(--ink); opacity: .92; }
.eyebrow { text-transform: uppercase; letter-spacing: .24em; font-size: .74rem; font-weight: 600; color: var(--accent); margin-bottom: 18px; animation: fadeIn 1s .2s both; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--ink-soft); max-width: 560px; margin-top: 26px; animation: fadeIn 1.2s .6s both; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; animation: fadeIn 1.2s .8s both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.scroll-cue { position: absolute; bottom: 28px; right: var(--gutter); width: 1px; height: 64px; overflow: hidden; animation: fadeIn 1s 1.4s both; }
.scroll-cue span { display: block; width: 100%; height: 100%; background: linear-gradient(var(--ink), transparent); animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { from { transform: translateY(-100%); } to { transform: translateY(100%); } }

.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 15px 28px; border-radius: 999px; text-decoration: none;
  font-weight: 600; font-size: .92rem; letter-spacing: .02em; border: 1px solid transparent;
  transition: transform .25s var(--ease), background .25s, border-color .25s, color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: #fff; }
.btn-ghost { border-color: rgba(242,235,226,.35); color: var(--ink); backdrop-filter: blur(6px); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-lg { padding: 20px 34px; font-size: 1.05rem; margin-top: 18px; }

/* ---------- Утверждение ---------- */
.intro { padding: clamp(80px, 14vw, 180px) var(--gutter); max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; }
.statement { font-family: var(--font-display); font-size: clamp(1.9rem, 4.4vw, 3.6rem); line-height: 1.18; font-weight: 400; max-width: 20ch; margin: 0; letter-spacing: -0.01em; }
.statement span { display: inline-block; opacity: .18; transform: translateY(.2em); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i) * 28ms); }
.statement.in span { opacity: 1; transform: none; }

/* ---------- Секции ---------- */
.section { padding: clamp(56px, 8vw, 110px) var(--gutter); max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }
.section-sub { color: var(--ink-soft); margin: 0 0 .5em; max-width: 36ch; }

/* ---------- Серии ---------- */
.series { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.serie a { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius); text-decoration: none; isolation: isolate; }
.serie img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease), filter .6s; filter: brightness(.8) saturate(.95); }
.serie a:hover img { transform: scale(1.06); filter: brightness(1) saturate(1.05); }
.serie a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(14,12,11,.85), rgba(14,12,11,0) 55%); }
.serie-text { position: absolute; left: 20px; right: 20px; bottom: 20px; z-index: 1; display: grid; gap: 4px; }
.serie-index { font-size: .7rem; letter-spacing: .2em; color: var(--accent); }
.serie-title { font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1; }
.serie-blurb { font-size: .82rem; color: var(--ink-soft); }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Галерея выровненными рядами ---------- */
.gallery-controls { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter, .density button {
  background: none; border: 1px solid var(--line); color: var(--ink-soft); font: inherit; font-size: .84rem;
  padding: 8px 15px; border-radius: 999px; cursor: pointer; transition: all .25s var(--ease);
}
.filter:hover, .density button:hover { color: var(--ink); border-color: rgba(242,235,226,.4); }
.filter.is-active, .density button.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.density { display: flex; gap: 4px; }
.density button { padding: 8px 12px; font-size: .78rem; letter-spacing: .05em; }
.justified { display: flex; flex-wrap: wrap; gap: 12px; transition: opacity .2s; }
.justified.is-switching { opacity: 0; }
.shot { margin: 0; flex: 0 0 auto; opacity: 0; transform: translateY(14px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.shot.in { opacity: 1; transform: none; }
.shot[hidden] { display: none; }
.shot button { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: var(--bg-2); cursor: pointer; border-radius: var(--radius); overflow: hidden; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease), filter .5s; filter: saturate(.97); }
.shot button:hover img { transform: scale(1.03); filter: saturate(1.05) brightness(1.04); }
.shot-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 14px 12px; font-size: .78rem; color: var(--ink); text-align: left;
  background: linear-gradient(to top, rgba(14,12,11,.8), transparent); opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .35s var(--ease);
}
.shot button:hover .shot-cap, .shot button:focus-visible .shot-cap { opacity: 1; transform: none; }
.shot button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Курсор-подсказка ---------- */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 45; pointer-events: none; padding: 10px 14px; margin: 18px 0 0 18px;
  background: var(--ink); color: var(--bg); font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; border-radius: 999px;
  opacity: 0; scale: .7; transition: opacity .25s, scale .25s var(--ease);
}
.cursor.is-on { opacity: 1; scale: 1; }
@media (pointer: coarse) { .cursor { display: none; } }

/* ---------- Обо мне ---------- */
.about { border-top: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.about-grid > * { opacity: 0; transform: translateY(20px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.about-grid > *.in { opacity: 1; transform: none; }
.about-photo { aspect-ratio: 3 / 4; border-radius: var(--radius); overflow: hidden; }
.about-photo--empty { display: grid; place-items: center; border: 1px solid var(--line); background: radial-gradient(ellipse at 30% 20%, rgba(217,160,102,.12), transparent 60%), var(--bg-2); }
.raven-big { width: 56%; height: auto; aspect-ratio: 6 / 5; color: rgba(242,235,226,.1); }
.about-text h2 { margin-bottom: 26px; }
.about-text p { font-size: 1.06rem; color: #d6ccc1; max-width: 52ch; }
.facts { margin: 36px 0 0; padding: 24px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; border-top: 1px solid var(--line); }
.facts dt { font-family: var(--font-display); font-size: 2.2rem; line-height: 1; }
.facts dd { margin: 6px 0 0; color: var(--ink-soft); font-size: .88rem; }

/* ---------- Съёмки ---------- */
.services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; counter-reset: s; }
.services li {
  counter-increment: s; padding: 32px 28px 26px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px;
  display: flex; flex-direction: column; gap: 12px; opacity: 0; transform: translateY(20px);
  transition: opacity .8s var(--ease), transform .8s var(--ease), border-color .3s;
}
.services li.in { opacity: 1; transform: none; }
.services li:nth-child(2) { transition-delay: .1s; } .services li:nth-child(3) { transition-delay: .2s; }
.services li:hover { border-color: rgba(217,160,102,.45); }
.services li::before { content: counter(s, decimal-leading-zero); font-family: var(--font-display); color: var(--accent); font-size: 1.1rem; letter-spacing: .1em; }
.services p { color: var(--ink-soft); font-size: .97rem; margin: 0; flex: 1; }
.price { font-size: .85rem; letter-spacing: .02em; border-top: 1px solid var(--line); padding-top: 14px; }
.link-arrow { font-size: .9rem; font-weight: 600; text-decoration: none; color: var(--ink); display: inline-flex; gap: 8px; align-items: center; }
.link-arrow::after { content: "→"; transition: transform .3s var(--ease); }
.link-arrow:hover::after { transform: translateX(5px); }
.link-arrow:hover { color: var(--accent); }

/* ---------- Контакты ---------- */
.contacts { border-top: 1px solid var(--line); }
.contacts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.contacts-grid > * { opacity: 0; transform: translateY(20px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.contacts-grid > *.in { opacity: 1; transform: none; }
.contacts h2 { margin-bottom: 20px; }
.contacts .lead { margin-top: 0; animation: none; }
.contacts .eyebrow { animation: none; }
.contacts-photo { margin: 0; border-radius: var(--radius); overflow: hidden; }

.site-footer {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 28px var(--gutter) 44px; color: var(--ink-dim); font-size: .84rem; border-top: 1px solid var(--line);
}
.footer-handle { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 1.1rem; letter-spacing: .08em; color: var(--ink-soft); }
.footer-handle .raven { color: var(--ink-soft); }
.site-footer a { text-decoration: none; color: var(--ink-soft); }

/* ---------- Лайтбокс ---------- */
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(8,7,6,.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: grid; place-items: center; animation: fade .25s ease; }
.lightbox[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.lb-figure { margin: 0; display: grid; gap: 14px; justify-items: center; max-width: 94vw; }
.lb-figure picture { cursor: e-resize; }
.lightbox img { max-width: 94vw; max-height: 84vh; width: auto; height: auto; object-fit: contain; border-radius: 3px; box-shadow: 0 40px 100px rgba(0,0,0,.7); animation: lbIn .45s var(--ease); }
@keyframes lbIn { from { opacity: 0; transform: scale(.97); } }
.lb-caption { display: flex; gap: 24px; justify-content: space-between; width: 100%; font-size: .82rem; color: var(--ink-soft); letter-spacing: .02em; }
.lb-caption #lb-counter { font-variant-numeric: tabular-nums; }
.lightbox > button { position: absolute; background: none; border: 0; color: var(--ink); font: 300 3rem/1 var(--font-display); cursor: pointer; padding: 12px 22px; opacity: .65; transition: opacity .2s; }
.lightbox > button:hover { opacity: 1; }
.lb-close { top: 10px; right: 14px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }

/* ---------- 404 ---------- */
.notfound { min-height: 100svh; display: grid; align-content: center; padding: 0 var(--gutter); max-width: 760px; }
.notfound h1 { font-size: clamp(3rem, 8vw, 6rem); margin: 10px 0 16px; }
.notfound .btn { justify-self: start; margin-top: 12px; }

/* ---------- Доступность и адаптив ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .shot, .services li, .about-grid > *, .contacts-grid > *, .statement span { opacity: 1; transform: none; }
  .hero-title .line span { transform: none; }
}
@media (max-width: 1000px) {
  .series { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .contacts-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 400px; }
  .about-photo--empty { display: none; }   /* пока нет фото Алины, на телефоне пустую рамку не показываем */
  .services { grid-template-columns: 1fr; }
  .hero-meta { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-header { padding: 14px var(--gutter); }
  .brand { font-size: 1.2rem; }
  .nav { gap: 14px; }
  .nav a { font-size: .8rem; }
  .nav a:not(.nav-cta):nth-child(-n+2) { display: none; }   /* на телефоне оставляем «Обо мне», «Съёмки», «Написать» */
  .hero-title { font-size: clamp(3.4rem, 19vw, 5rem); }
  .justified { gap: 6px; }
  .density { display: none; }
  .facts { grid-template-columns: 1fr 1fr; }
  .serie-text { left: 12px; right: 12px; bottom: 12px; }
  .lightbox > button { font-size: 2.2rem; padding: 10px 14px; }
  .lb-prev, .lb-next { top: auto; bottom: 8px; transform: none; }
  .site-footer { flex-direction: column; gap: 8px; }
}
