@font-face {
  font-family: Golos;
  src: url("assets/library/golos-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: Golos;
  src: url("assets/library/golos-cyrillic.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Literata;
  src: url("assets/library/literata-latin.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: Literata;
  src: url("assets/library/literata-cyrillic.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  --forest: #102420;
  --forest-black: #0a1e1b;
  --paper: #f0ead9;
  --orange: #ff9a4a;
  --ink: #1d3129;
  --gutter: clamp(24px, 5vw, 106px);
  color: var(--paper);
  background: var(--forest);
  font: 400 17px/1.53 Golos, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, p, figure { margin: 0; }
h1, h2 { font: 600 clamp(2.6rem, 5.8vw, 6.7rem)/.99 Literata, Georgia, serif; letter-spacing: -.046em; }
img { display: block; width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .23em; }
a:hover { text-decoration-thickness: 2px; }
:where(a, button):focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
.skip { position: absolute; z-index: 20; left: 18px; top: 10px; padding: 10px; background: var(--paper); color: var(--ink); transform: translateY(-180%); }
.skip:focus { transform: none; }

.masthead {
  max-width: 1536px;
  margin-inline: auto;
  min-height: 82px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 10px var(--gutter);
}
.brand { justify-self: start; font: 600 28px/.82 Literata, Georgia, serif; letter-spacing: -.09em; text-decoration: none; }
.brand::first-line { color: var(--orange); }
.masthead nav { display: flex; gap: clamp(24px, 3.6vw, 64px); }
.masthead nav a, .top-contact { display: inline-flex; min-height: 44px; align-items: center; }
.masthead nav a { text-decoration: none; }
.masthead nav a:hover { color: var(--orange); }
.top-contact { justify-self: end; }

.opening { background: var(--forest-black); }
.opening-frame { position: relative; max-width: 1536px; margin-inline: auto; isolation: isolate; display: grid; align-items: center; }
.hero-image { position: relative; grid-area: 1 / 1; width: 100%; z-index: -1; }
.hero-image img { height: clamp(510px, calc(100svh - 82px), 886px); object-fit: cover; object-position: 55% 52%; }
.hero-image::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #0b211e 0%, #0b211ed9 13%, #0b211e81 27%, transparent 52%),
    linear-gradient(0deg, #091a17ce, transparent 19%);
}
.hero-image figcaption { position: absolute; right: var(--gutter); bottom: 30px; z-index: 1; color: #ece5d7; font-size: .75rem; }
.opening-copy { grid-area: 1 / 1; justify-self: start; padding-inline: var(--gutter); padding-bottom: 4%; }
.opening h1 { font-size: clamp(3.55rem, 6.75vw, 6.7rem); }
.opening-copy p { margin: 22px 0 26px; max-width: 24ch; font-size: clamp(1.05rem, 1.8vw, 1.5rem); }
.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 52px;
  padding: 9px 23px;
  border-radius: 50% / 50%;
  font-weight: 650;
  text-decoration: none;
  transition: background-color .22s, color .22s;
}
.action-bright { background: var(--orange); color: #1e271e; }
.action-bright:hover { background: #ffd1a5; }
.opening-scroll { position: absolute; left: var(--gutter); bottom: 19px; min-height: 44px; display: inline-flex; align-items: center; gap: 12px; }
.opening-scroll span { display: inline-grid; place-items: center; line-height: 1; width: 1em; }

.counter {
  background: #dcaa73;
  color: #23322a;
  transition: background-color .36s ease;
}
.counter[data-index="1"] { background: #d3adc1; }
.counter[data-index="2"] { background: #cbceb1; }
.counter-stage {
  max-width: 1680px;
  margin-inline: auto;
  min-height: min(94svh, 790px);
  display: grid;
  grid-template-columns: minmax(285px, 1.17fr) minmax(0, 3fr);
  grid-template-rows: 1fr auto;
  align-content: center;
  align-items: center;
  gap: 18px 24px;
  padding: clamp(30px, 5vw, 65px) 0;
}
.counter[data-ready] { min-height: 162svh; }
.counter[data-ready] .counter-stage { position: sticky; top: 0; }
.counter-copy { min-width: 0; padding-left: var(--gutter); }
.counter-copy h2 { max-width: 7ch; font-size: clamp(2rem, 3.65vw, 4.75rem); }
.counter-copy p { margin-top: 17px; }
.counter-window { --slide: min(32vw, 448px, 49svh); overflow-x: auto; scrollbar-color: #684035 #dcaa73; scroll-snap-type: x mandatory; }
.counter[data-ready] .counter-window { overflow: clip; }
.counter-rail {
  display: flex;
  align-items: center;
  gap: clamp(20px, 6vw, 100px);
  padding: 4px max(16px, calc((var(--window-width, 0px) - var(--slide)) / 2));
  width: max-content;
  transform: translate3d(var(--travel, 0px), 0, 0);
}
.counter-rail img {
  width: var(--slide);
  flex: none;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  scroll-snap-align: center;
  box-shadow: 0 24px 36px -29px #47302e91;
}
.counter-caption { grid-column: 2; text-align: center; display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.35rem; justify-content: center; font-size: .86rem; }
.counter-status { display: flex; align-items: baseline; gap: .85rem; }
.counter-caption a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 660; }
[data-counter-caption] { font-weight: 720; }

.album {
  color: var(--ink);
  background: var(--paper);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: clamp(26px, 6vw, 130px);
  align-items: center;
  padding: clamp(70px, 9vw, 160px) clamp(24px, 9vw, 180px);
}
.album-figure { margin: 0; justify-self: center; max-width: 500px; width: 100%; overflow: hidden; background: #c4b8a7; }
.album-figure img { aspect-ratio: 3/4; object-fit: cover; }
.album h2 { font-size: clamp(2.1rem, 3.45vw, 4.8rem); max-width: 13ch; }
.album-nav { display: grid; gap: 5px; margin: 27px 0 19px; justify-items: start; }
.album-nav[hidden] { display: none; }
.album-nav button {
  min-height: 45px;
  display: inline-flex;
  gap: 14px;
  align-items: center;
  padding: 4px 12px;
  cursor: pointer;
  color: var(--ink);
  background: transparent;
  border: 0;
  text-align: start;
  font: 530 1rem/1.2 Golos, Arial, sans-serif;
}
.album-nav button::before { content: ""; width: .65em; height: .65em; border: 1px solid currentColor; border-radius: 50%; }
.album-nav button[aria-pressed="true"] { background: #dadcbd; font-weight: 730; }
.album-nav button[aria-pressed="true"]::before { background: var(--ink); }
.album-content p { max-width: 27ch; margin-bottom: 19px; }
.action-ink { color: var(--paper); background: var(--ink); }
.action-ink:hover { background: #421a1b; }
.source { display: block; width: max-content; max-width: 100%; padding-block: 13px; font-size: .88rem; }

.wedding {
  color: var(--paper);
  background: #202a20;
  overflow: clip;
  padding: clamp(54px, 6vw, 105px) var(--gutter);
}
.wedding-panel {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 2fr);
  gap: clamp(32px, 5vw, 86px);
  align-items: center;
  max-width: 1500px;
  margin-inline: auto;
}
.wedding-photo { position: relative; }
.wedding-photo img { aspect-ratio: 3 / 2; object-fit: cover; }
.wedding-photo figcaption { position: absolute; bottom: .7rem; left: .7rem; font-size: .75rem; background: #15241d; padding: .25rem .55rem; }
.wedding h2 { font-size: clamp(36px, 4.65vw, 74px); }
.wedding p { max-width: 32ch; margin: 20px 0; }
.wedding .action-outline:hover { background: var(--paper); color: var(--forest); }
.action-outline { border: 1px solid currentColor; }
.action-outline:hover { background: #2a1e18; color: var(--paper); }

.visit {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  max-width: 1680px;
  margin-inline: auto;
  gap: clamp(40px, 7vw, 130px);
  align-items: end;
  color: var(--paper);
  padding: clamp(65px, 9vw, 140px) var(--gutter);
}
.visit h2 { font-size: clamp(2rem, 4.65vw, 5.5rem); }
.visit p { max-width: 35ch; margin: 23px 0; }
.visit-address { display: grid; gap: 4px; justify-items: start; }
.visit-address address { font-size: 1.2rem; font-style: normal; line-height: 1.3; margin-bottom: 8px; }
.visit-address a { display: inline-flex; align-items: center; min-height: 44px; }

@media (min-width: 701px) and (prefers-reduced-motion: no-preference) {
  .hero-image img { animation: studio-light .92s cubic-bezier(.22,.62,.3,1) both; }
  @keyframes studio-light { from { filter: brightness(.7); clip-path: inset(0 11% 0 0); } to { filter: brightness(1); clip-path: inset(0); } }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .wedding-photo { animation: table-in linear both; animation-timeline: view(); animation-range: entry 5% cover 35%; }
    @keyframes table-in { from { clip-path: inset(0 19% 0 0); translate: -5% 0; } to { clip-path: inset(0); translate: 0 0; } }
  }
}

@media (max-width: 900px) {
  .counter-stage { grid-template-columns: minmax(210px, 1fr) minmax(0, 2fr); gap: 10px; }
}

@media (max-width: 700px) {
  :root { --gutter: 19px; font-size: 16px; }
  .masthead { grid-template-columns: 1fr auto; gap: 0 10px; min-height: 0; padding-block: 9px 0; }
  .brand { font-size: 23px; }
  .masthead nav { grid-row: 2; grid-column: 1/-1; justify-content: space-between; gap: 16px; font-size: .9rem; }
  .top-contact { font-size: .86rem; }
  .opening-frame { display: flex; flex-direction: column; align-items: stretch; }
  .opening-copy { order: -1; padding: 27px var(--gutter) 7px; }
  .opening-copy h1 { font-size: clamp(2.95rem, 12.5vw, 5.5rem); }
  .opening-copy p { margin: 13px 0 14px; font-size: 1.05rem; }
  .action { min-height: 48px; }
  .hero-image { z-index: 0; overflow: hidden; }
  .hero-image img { height: auto; aspect-ratio: 960 / 878; }
  .hero-image::after { background: linear-gradient(#0a1e1b 0%, transparent 22%), linear-gradient(0deg,#0a1e1b 0%,transparent 15%); }
  .hero-image figcaption { bottom: 16px; }
  .opening-scroll { position: static; align-self: flex-start; margin: 0 var(--gutter) 12px; }
  .counter[data-ready] { min-height: 0; }
  .counter[data-ready] .counter-stage { position: static; }
  .counter-stage { grid-template: auto auto auto / minmax(0, 1fr); min-height: 0; padding-block: 29px 35px; gap: 9px; }
  .counter-copy { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 19px; padding-inline: var(--gutter); }
  .counter-copy h2 { flex-basis: 100%; max-width: none; font-size: clamp(1.95rem, 8.7vw, 4rem); }
  .counter-copy p { font-size: .85rem; margin-top: 2px; }
  .counter-window { --slide: min(65vw, 365px, 41svh); }
  .counter-caption { grid-column: 1; }
  .album { grid-template-columns: 1fr; padding: 44px var(--gutter) 52px; gap: 25px; }
  .album-figure { max-width: 360px; width: 85%; }
  .album h2 { max-width: none; }
  .album-nav { margin-block: 19px 12px; }
  .wedding { padding-block: 47px; }
  .wedding-panel, .visit { grid-template-columns: 1fr; gap: 22px; }
  .visit { padding-block: 48px; }
}

@media (max-width: 700px) and (prefers-reduced-motion: no-preference) {
  .hero-image img { animation: mobile-light .65s ease-out both; }
  @keyframes mobile-light { from { filter: brightness(.71); } to { filter: brightness(1); } }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; }
}
