*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

:root {
  --bg: oklch(0.09 0.004 260);
  --surface: oklch(0.13 0.005 260);
  --surface-alt: oklch(0.15 0.006 260);

  --text: oklch(0.96 0.006 90);
  --text-muted: oklch(0.78 0.01 90);
  --text-dim: oklch(0.68 0.01 90);
  --text-dimmer: oklch(0.55 0.01 90);
  --text-faint: oklch(0.45 0.01 90);

  --accent: oklch(0.72 0.13 70);
  --accent-ink: oklch(0.13 0.01 70);

  --border: oklch(1 0 0 / 0.08);
  --border-md: oklch(1 0 0 / 0.2);
  --border-strong: oklch(1 0 0 / 0.3);

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --container: 1440px;
  --pad: 64px;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: oklch(0.72 0.13 70 / 0.35); }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
input, textarea { font: inherit; color: inherit; }

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

.page {
  max-width: var(--container);
  margin: 0 auto;
  background: var(--surface);
  position: relative;
  overflow: clip;
}

.wrap { padding-left: var(--pad); padding-right: var(--pad); }

.eyebrow {
  font-size: 12px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 44px;
  line-height: 1.15;
}

.rule {
  width: 36px; height: 1px; background: var(--accent);
}

.link-arrow {
  font-size: 13px;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 4px;
  width: fit-content;
  transition: border-color .25s var(--ease), opacity .25s var(--ease);
}
.link-arrow:hover { border-color: var(--accent); opacity: .85; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  letter-spacing: .06em;
  padding: 14px 30px;
  white-space: nowrap;
  transition: transform .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease), opacity .25s var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover { transform: translateY(-2px); opacity: .92; }

.btn-outline {
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--text); }

.btn-ghost {
  border: 1px solid var(--border-md);
  color: var(--text);
  font-size: 13px;
  padding: 10px 22px;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px var(--pad);
  padding-top: max(28px, env(safe-area-inset-top));
  padding-left: max(var(--pad), env(safe-area-inset-left));
  padding-right: max(var(--pad), env(safe-area-inset-right));
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), padding .3s var(--ease);
}
/* блюр отдельным слоем, не на самом хэдере — иначе backdrop-filter тут
   становится containing block для fixed-меню и зажимает его в высоту хэдера */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: oklch(0.09 0.004 260 / 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background .3s var(--ease);
}
.site-header.is-scrolled {
  padding-top: 18px;
  padding-bottom: 18px;
  border-bottom-color: var(--border);
}
.site-header.is-scrolled::before {
  background: oklch(0.09 0.004 260 / 0.85);
}

.logo {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: .12em;
}

.nav-links {
  display: flex;
  gap: 40px;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  opacity: .65;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: opacity .25s var(--ease), border-color .25s var(--ease);
}
.nav-links a:hover { opacity: .95; }
.nav-links a[aria-current="page"],
.nav-links a.is-current {
  opacity: .95;
  border-bottom-color: var(--accent);
}

.nav-toggle {
  display: none;
  width: 32px; height: 22px;
  position: relative;
  z-index: 60;
}
/* хит-зона больше видимой иконки — иначе на телефоне промахиваешься мимо тонких линий */
.nav-toggle::before {
  content: '';
  position: absolute;
  inset: -12px -8px;
}
.nav-toggle span {
  position: absolute; left: 0; right: 0; height: 1px; background: var(--text);
  transition: transform .3s var(--ease), opacity .3s var(--ease), top .3s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 10px; }
.nav-toggle span:nth-child(3) { top: 20px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 10px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { top: 10px; transform: rotate(-45deg); }

/* футер вынесен из <main class="page">, так что контейнер и фон дублируем тут —
   иначе на широком экране он расползётся во всю ширину и провалится на цвет body */
.site-footer {
  max-width: var(--container);
  margin: 0 auto;
  background: var(--surface);
  padding: 64px var(--pad);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}
.site-footer .logo { margin-bottom: 12px; }
.footer-about {
  font-size: 13px; color: var(--text-dimmer); max-width: 280px; line-height: 1.7;
}
.footer-links, .footer-contacts {
  display: flex; flex-direction: column; gap: 10px; font-size: 13px; color: var(--text-dim);
}
.footer-links a:hover, .footer-contacts a:hover { color: var(--accent); }
.footer-copy { font-size: 12px; color: var(--text-faint); }

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal-delay-1.in-view { transition-delay: .08s; }
.reveal-delay-2.in-view { transition-delay: .16s; }
.reveal-delay-3.in-view { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

.hero {
  position: relative;
  height: 92vh;
  height: 92dvh;
  min-height: 620px;
  overflow: hidden;
}
.hero-media {
  position: absolute; inset: 0;
  will-change: transform;
}
.hero-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%;
}
.hero-media::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.12) 40%, rgba(8,8,8,0.9) 100%);
}
.hero-content {
  /* right тоже обязателен: без него блок на мобильном считает ширину по
     контенту ДО того, как кнопки растянутся на 100%, и вылезает за экран */
  position: absolute; left: var(--pad); right: var(--pad); bottom: 80px; max-width: 760px; z-index: 2;
}
.hero-title {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(40px, 6vw, 88px);
  line-height: 1.03;
  margin: 0;
}
.hero-lead {
  margin-top: 22px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 480px;
}
.hero-actions { margin-top: 36px; display: flex; gap: 16px; flex-wrap: wrap; }
.hero-scroll-hint {
  position: absolute; right: var(--pad); bottom: 36px; z-index: 2;
  writing-mode: vertical-rl;
  font-size: 11px; letter-spacing: .15em; color: var(--text-dimmer);
  text-transform: uppercase;
}

.about-teaser {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.about-teaser-text {
  padding: 120px 90px;
  display: flex; flex-direction: column; justify-content: center; gap: 22px;
}
.about-teaser-text .section-title { font-size: 40px; }
.about-teaser-text p {
  font-size: 15px; line-height: 1.8; color: var(--text-dim); max-width: 420px; margin: 0;
}
.about-teaser-media { position: relative; min-height: 420px; overflow: hidden; }
.about-teaser-media img { width: 100%; height: 100%; object-fit: cover; }

.services {
  padding: 100px var(--pad);
  border-top: 1px solid var(--border);
}
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 56px; gap: 24px; flex-wrap: wrap;
}
.section-head .note { font-size: 13px; color: var(--text-dimmer); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
}
.service-card {
  background: var(--surface);
  padding: 44px 36px;
  display: flex; flex-direction: column; gap: 18px;
  transition: background .3s var(--ease);
}
.service-card:hover { background: var(--surface-alt); }
.service-name { font-family: var(--font-serif); font-size: 26px; }
.service-desc { font-size: 14px; line-height: 1.7; color: var(--text-dim); flex: 1; }
.service-price { font-size: 20px; letter-spacing: .02em; }

.gallery-preview { padding: 0 var(--pad) 110px; }
.gallery-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.shot {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--surface-alt);
}
.shot img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s var(--ease);
}
.shot:hover img { transform: scale(1.05); }
.shot-label {
  position: absolute; bottom: 14px; left: 14px; right: 14px;
  font-size: 11px; line-height: 1.4; color: var(--text-muted);
  background: rgba(0,0,0,0.45);
  padding: 6px 8px;
  border: 1px solid var(--border-md);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.shot:hover .shot-label { opacity: 1; transform: translateY(0); }
.gallery-preview-grid .shot { height: 380px; }

.reviews {
  padding: 100px var(--pad);
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.reviews .section-title { margin-bottom: 56px; }
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.review { display: flex; flex-direction: column; gap: 20px; }
.review-text {
  font-family: var(--font-serif); font-style: italic; font-size: 20px; line-height: 1.6;
  color: oklch(0.9 0.006 90);
  margin: 0;
}
.review-author { font-size: 13px; color: var(--text-dimmer); letter-spacing: .04em; }

.instagram { padding: 100px var(--pad); }
.instagram-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.insta-shot { display: block; aspect-ratio: 1; position: relative; overflow: hidden; background: var(--surface-alt); }
.insta-shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), opacity .3s var(--ease); }
.insta-shot:hover img { transform: scale(1.06); }
.insta-shot::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,.5), transparent 55%);
  opacity: 0; transition: opacity .25s var(--ease);
}
.insta-shot:hover::after { opacity: 1; }
.insta-tag {
  position: absolute; left: 10px; bottom: 10px;
  font-size: 10px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted);
  opacity: 0; transform: translateY(6px);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.insta-shot:hover .insta-tag { opacity: 1; transform: translateY(0); }

.gallery-filters {
  padding: 12px var(--pad) 32px;
  display: flex; gap: 28px; flex-wrap: wrap;
  font-size: 13px; letter-spacing: .05em; text-transform: uppercase;
}
.gallery-filters button {
  position: relative;
  color: var(--text-dimmer);
  padding-bottom: 6px;
  border-bottom: 1px solid transparent;
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.gallery-filters button::before {
  content: '';
  position: absolute;
  inset: -10px;
}
.gallery-filters button:hover { color: var(--text-muted); }
.gallery-filters button.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.slider {
  position: relative;
  height: 78vh;
  height: 78dvh;
  min-height: 460px;
  margin: 0 var(--pad);
  background: var(--surface-alt);
  overflow: hidden;
  touch-action: pan-y;
}
.slider-track { position: absolute; inset: 0; }
.slider-slide {
  position: absolute; inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .55s var(--ease);
}
.slider-slide.is-active { opacity: 1; visibility: visible; }
.slider-slide img { width: 100%; height: 100%; object-fit: cover; }
.slider-slide::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(8,8,8,0.78) 100%);
}

.slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 56px; height: 56px;
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--text);
  z-index: 3;
  background: oklch(0.09 0.004 260 / 0.25);
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.slider-arrow:hover { border-color: var(--accent); color: var(--accent); }
.slider-arrow.prev { left: 24px; }
.slider-arrow.next { right: 24px; }

.slider-caption { position: absolute; left: 40px; bottom: 40px; z-index: 3; max-width: 60%; }
.slider-caption-title { font-family: var(--font-serif); font-size: 30px; margin: 0; }
.slider-caption-sub { font-size: 13px; color: var(--text-dim); margin-top: 6px; }
.slider-counter {
  position: absolute; right: 40px; bottom: 40px; z-index: 3;
  font: 14px/1 ui-monospace, 'SF Mono', Menlo, monospace; color: var(--text-dim);
}

.thumb-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 10px;
  padding: 24px var(--pad) 0;
}
.thumb {
  height: 84px;
  position: relative;
  overflow: hidden;
  outline: 1px solid var(--border);
  cursor: pointer;
  opacity: .55;
  transition: opacity .25s var(--ease), outline-color .25s var(--ease);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover { opacity: .85; }
.thumb.is-active { opacity: 1; outline: 1px solid var(--accent); }

.full-grid { padding: 100px var(--pad); }
.full-grid .section-title { font-size: 36px; margin-bottom: 36px; }
.masonry { columns: 4; column-gap: 16px; }
.masonry .shot {
  break-inside: avoid;
  margin-bottom: 16px;
  width: 100%;
}
.masonry .shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.masonry .shot.is-hidden { display: none; }

.bio {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.bio-media { position: relative; min-height: 480px; overflow: hidden; }
.bio-media img { width: 100%; height: 100%; object-fit: cover; }
.bio-text {
  padding: 100px 90px;
  display: flex; flex-direction: column; justify-content: center; gap: 24px;
}
.bio-text .section-title { font-size: 42px; }
.bio-text p { font-size: 15px; line-height: 1.85; color: var(--text-dim); max-width: 440px; margin: 0; }

.stats { display: flex; gap: 48px; margin-top: 8px; flex-wrap: wrap; }
.stat-num { font-family: var(--font-serif); font-size: 30px; }
.stat-label { font-size: 12px; color: var(--text-dimmer); margin-top: 4px; }

.philosophy {
  padding: 90px var(--pad);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}
.philosophy-item .section-title { display: none; }
.philosophy-title { font-family: var(--font-serif); font-size: 24px; margin: 0 0 12px; }
.philosophy-text { font-size: 14px; line-height: 1.75; color: var(--text-dimmer); margin: 0; }

.contacts {
  padding: 90px var(--pad);
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}
.contacts .section-title { margin-bottom: 36px; }

.form-field { display: flex; flex-direction: column; gap: 22px; }
.field {
  position: relative;
  border-bottom: 1px solid var(--border-md);
  padding-bottom: 12px;
  transition: border-color .25s var(--ease);
}
.field:focus-within { border-color: var(--accent); }
.field label {
  display: block; font-size: 12px; letter-spacing: .04em; color: var(--text-dimmer);
  margin-bottom: 6px; text-transform: uppercase;
}
.field input, .field textarea {
  width: 100%; background: transparent; border: none; outline: none;
  /* 16px минимум — иначе iOS Safari зумит страницу при фокусе на поле */
  font-size: 16px; color: var(--text); padding: 0; resize: none;
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); }
.field textarea { min-height: 44px; }
.field-error {
  display: none;
  font-size: 12px; color: oklch(0.68 0.16 30); margin-top: 6px;
}
.field.has-error { border-color: oklch(0.68 0.16 30); }
.field.has-error .field-error { display: block; }

.form-submit { display: flex; align-items: center; gap: 16px; margin-top: 12px; flex-wrap: wrap; }
.form-status { font-size: 13px; color: var(--text-dimmer); }
.form-status.is-success { color: var(--accent); }

.contact-block + .contact-block { margin-top: 32px; }
.contact-block-label {
  font-size: 12px; letter-spacing: .15em; color: var(--accent); text-transform: uppercase; margin-bottom: 10px;
}
.contact-block-value { font-size: 16px; line-height: 1.6; }
.contact-block-value a:hover { color: var(--accent); }

.map-card {
  margin-top: 32px;
  flex: 1; min-height: 180px;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.map-card svg { width: 100%; height: 100%; }
.map-pin {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.map-pin-dot {
  width: 14px; height: 14px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 6px oklch(0.72 0.13 70 / 0.18);
}
.map-label {
  position: absolute; bottom: 14px; left: 14px;
  font-size: 11px; color: var(--text-dimmer); letter-spacing: .04em;
}

@media (max-width: 1200px) {
  :root { --pad: 40px; }
  .hero-title { font-size: clamp(36px, 7vw, 64px); }
  .about-teaser-text, .bio-text { padding: 80px 56px; }
  .services-grid, .reviews-grid { grid-template-columns: repeat(2, 1fr); }
  .service-card:nth-child(3) { grid-column: 1 / -1; }
  .gallery-preview-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-preview-grid .shot { height: 300px; }
  .instagram-grid { grid-template-columns: repeat(3, 1fr); }
  .masonry { columns: 3; }
}

@media (max-width: 900px) {
  .nav-links {
    position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 55;
    padding: max(24px, env(safe-area-inset-top)) env(safe-area-inset-right) max(24px, env(safe-area-inset-bottom)) env(safe-area-inset-left);
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    font-size: 18px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform .35s var(--ease), opacity .35s var(--ease);
  }
  .nav-links.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 10px 0; }
  .nav-toggle { display: block; }
  .site-header .btn-ghost { display: none; }

  .about-teaser, .bio { grid-template-columns: 1fr; }
  .about-teaser-media { min-height: 320px; order: -1; }
  .about-teaser-text, .bio-text { padding: 64px var(--pad); }
  .bio-media { min-height: 340px; }

  .philosophy, .contacts { grid-template-columns: 1fr; gap: 40px; }
  .philosophy { padding: 64px var(--pad); }
  .contacts { padding: 64px var(--pad); }

  .reviews-grid { grid-template-columns: 1fr; gap: 32px; }
  .section-title { font-size: 34px; }
}

@media (max-width: 640px) {
  :root { --pad: 22px; }
  .hero { height: 86vh; height: 86dvh; }
  .hero-content { bottom: 56px; }
  .hero-lead { max-width: none; }
  .hero-scroll-hint { display: none; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { text-align: center; }

  .services-grid { grid-template-columns: 1fr; }
  .service-card:nth-child(3) { grid-column: auto; }
  .gallery-preview-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .gallery-preview-grid .shot { height: 220px; }
  .instagram-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .masonry { columns: 2; column-gap: 10px; }
  .masonry .shot { margin-bottom: 10px; }

  .section-head { align-items: flex-start; flex-direction: column; gap: 12px; }

  .slider { height: 60vh; height: 60dvh; min-height: 380px; margin: 0 var(--pad); }
  .slider-arrow { width: 44px; height: 44px; font-size: 16px; }
  .slider-arrow.prev { left: 12px; }
  .slider-arrow.next { right: 12px; }
  .slider-caption { left: 20px; bottom: 20px; max-width: 70%; }
  .slider-caption-title { font-size: 22px; }
  .slider-counter { right: 20px; bottom: 20px; }
  .thumb-strip { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
  .thumb { height: 64px; }

  .stats { gap: 28px; }

  .site-footer { flex-direction: column; gap: 24px; }
}
