/* ============================================
   ІГОР — 50
   Editorial birthday invitation
   ============================================ */

:root{
  --ivory:     #F1ECE0;
  --stone:     #C9C2B2;
  --olive:     #3F4632;
  --olive-lt:  #4E5740;
  --deep:      #1E241A;
  --chocolate: #3B2A20;
  --graphite:  #2B2B28;
  --gold:      #B08D4F;

  --font-serif: 'PT Serif', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --ease: cubic-bezier(.22,.68,.28,1);
  --pad: clamp(24px, 5vw, 80px);
}

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

body{
  margin: 0;
  background: var(--ivory);
  color: var(--graphite);
  font-family: var(--font-sans);
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

img{ max-width: 100%; display: block; }
::selection{ background: var(--gold); color: var(--deep); }

.grain{
  position: fixed; inset: 0; z-index: 500; pointer-events: none;
  opacity: .03; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Typography ---------- */
.eyebrow{
  font-family: var(--font-sans);
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold); font-weight: 500; margin: 0 0 18px;
}
h1, h2{ font-family: var(--font-serif); font-weight: 400; line-height: 1.05; margin: 0; }
.big-title{ font-size: clamp(40px, 6vw, 84px); }
.body-text{
  font-family: var(--font-sans); font-weight: 300; font-size: 17px; line-height: 1.75;
  color: rgba(43,43,40,.78); max-width: 46ch; margin: 0 0 20px;
}
.italic-line{
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: clamp(19px, 2vw, 23px); line-height: 1.5; max-width: 34ch; margin: 20px 0 0;
}
.italic-line.small{ font-size: 18px; }
.fine-print{
  font-family: var(--font-sans); font-size: 13px; color: rgba(43,43,40,.55);
  margin-top: 20px;
}

/* ---------- Buttons ---------- */
.btn-outline, .btn-solid{
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
  font-family: var(--font-sans); font-size: 12px;
  letter-spacing: .16em; text-transform: uppercase; text-decoration: none;
  padding: 16px 38px; margin-top: 28px; cursor: pointer; transition: all .5s var(--ease);
}
.btn-outline{ border: 1px solid var(--olive); color: var(--olive); }
.btn-outline:hover{ background: var(--olive); color: var(--ivory); }
.btn-solid{ background: var(--gold); color: var(--deep); border: 1px solid var(--gold); }
.btn-solid:hover{ background: transparent; color: var(--ivory); }

/* ---------- Nav ---------- */
.nav{
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 26px var(--pad); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ivory); mix-blend-mode: difference; pointer-events: none;
}

/* ---------- Scroll indicator ---------- */
.scroll-indicator{
  position: fixed; right: clamp(16px, 3vw, 40px); top: 50%; transform: translateY(-50%);
  z-index: 100; display: flex; flex-direction: column; align-items: center; gap: 12px;
  pointer-events: none;
}
.si-track{
  width: 1px; height: 90px; background: rgba(43,43,40,.18); position: relative;
}
body.on-dark .si-track{ background: rgba(241,236,224,.25); }
.si-diamond{
  position: absolute; top: 0; left: 50%; width: 7px; height: 7px;
  background: var(--gold); transform: translate(-50%, 0) rotate(45deg);
  transition: top .1s linear;
}
.si-label{
  font-size: 10px; letter-spacing: .2em; color: var(--graphite);
  writing-mode: vertical-rl; text-transform: uppercase;
}
body.on-dark .si-label{ color: var(--ivory); }

/* ---------- Reveal / fade ---------- */
.reveal{ opacity: 0; transform: translateY(26px); animation: revealUp 1.1s var(--ease) forwards; }
.r1{ animation-delay: .1s; } .r2{ animation-delay: .28s; } .r3{ animation-delay: .48s; }
@keyframes revealUp{ to{ opacity: 1; transform: translateY(0); } }

.fade-up{ opacity: 0; transform: translateY(34px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.fade-up.in-view{ opacity: 1; transform: translateY(0); }

/* ============ HERO ============ */
.hero{
  display: grid; grid-template-columns: 1fr 1fr; align-items: stretch;
  min-height: 100vh; background: var(--ivory);
}
.hero-text{
  display: flex; flex-direction: column; justify-content: center;
  padding: 120px var(--pad) 60px;
}
.hero-title{
  font-size: clamp(64px, 9vw, 128px); color: var(--graphite); display: flex;
  align-items: baseline; gap: 20px; flex-wrap: wrap;
}
.hero-num{ color: var(--gold); font-style: italic; }
.hero-image-wrap{ position: relative; overflow: hidden; background: var(--olive); }
.hero-image-mask{
  position: absolute; inset: 0; overflow: hidden;
  clip-path: inset(0 0 0 0);
  animation: heroReveal 1.4s var(--ease) .3s both;
}
@keyframes heroReveal{
  from{ clip-path: inset(0 0 100% 0); }
  to{ clip-path: inset(0 0 0 0); }
}
.hero-image{
  width: 100%; height: 100%; object-fit: cover; object-position: center 12%;
  transform: scale(1.05); transition: transform 1.2s var(--ease);
}
.hero-image-wrap:hover .hero-image{ transform: scale(1.1); }

/* ============ INTRO + DATE ============ */
.intro{
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 0;
  background: var(--deep); color: var(--ivory);
  padding: clamp(70px, 9vw, 130px) var(--pad);
}
.intro .eyebrow{ color: var(--gold); }
.intro .body-text{ color: rgba(241,236,224,.8); }
.intro .italic-line{ color: var(--stone); }
.intro-text{ padding-right: 60px; }
.intro-calendar{ display: flex; flex-direction: column; align-items: flex-start; }
.cal-title{
  font-family: var(--font-serif); font-size: clamp(28px, 3vw, 38px); margin: 0 0 30px; color: var(--ivory);
}
.calendar{
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px 14px; width: 100%; max-width: 380px;
}
.cal-dow{
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold);
  text-align: center; padding-bottom: 8px; border-bottom: 1px solid rgba(241,236,224,.15);
}
.cal-day, .cal-blank{
  font-family: var(--font-sans); font-size: 14px; text-align: center; padding: 8px 0;
  color: rgba(241,236,224,.7);
}
.cal-day.highlight{
  position: relative; color: var(--deep); font-weight: 600;
}
.cal-day.highlight::before{
  content: ""; position: absolute; inset: -2px; background: var(--gold); border-radius: 50%; z-index: -1;
}

/* ============ LOCATION ============ */
.location{
  display: grid; grid-template-columns: 1fr 1fr;
  height: 100vh; overflow: hidden; background: var(--ivory);
}
.location-image{ overflow: hidden; height: 100%; }
.location-image img{
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1s var(--ease);
}
.location-image:hover img{ transform: scale(1.04); }
.location-text{
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(50px, 7vw, 100px);
}
.location-text .big-title{ color: var(--olive); margin-bottom: 22px; }
.location-text .italic-line{ color: var(--chocolate); }

/* ============ TIMING ============ */
.timing{
  position: relative;
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--graphite) url("images/timing.jpg") center center / cover no-repeat;
  color: var(--ivory);
}
.timing::before{
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(59, 42, 32, .91);
}
.timing-text{
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(50px, 7vw, 100px) 0;
  width: 68vw;
  margin: 0 auto;
}
.timing-text .eyebrow{ text-align: center; }
.timing-list{ list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid rgba(241,236,224,.15); width: 100%; }
.timing-row{
  display: flex; align-items: baseline; gap: 36px; padding: 32px 0;
  border-bottom: 1px solid rgba(241,236,224,.15); position: relative; transition: padding-left .4s var(--ease);
}
.timing-row:hover{ padding-left: 16px; }
.t-time{ font-family: var(--font-serif); font-size: 26px; color: var(--gold); flex: 0 0 90px; }
.t-line{
  flex: 1; height: 1px; background: rgba(241,236,224,.2); position: relative; overflow: hidden;
}
.t-line::after{
  content: ""; position: absolute; inset: 0; background: var(--gold); transform: scaleX(0);
  transform-origin: left; transition: transform .5s var(--ease);
}
.timing-row:hover .t-line::after{ transform: scaleX(1); }
.t-label{ font-family: var(--font-sans); font-size: 18px; font-weight: 300; color: var(--ivory); }

/* ============ DRESS CODE ============ */
.dresscode{
  display: grid; grid-template-columns: 1fr 1fr;
  height: 100vh; overflow: hidden; background: var(--ivory);
}
.dresscode-text{ display: flex; flex-direction: column; justify-content: center; padding: clamp(50px, 7vw, 100px); }
.dresscode-text .big-title{ color: var(--graphite); margin-bottom: 6px; }
.dresscode-text .eyebrow{ margin-bottom: 22px; }
.palette{ display: flex; gap: 12px; margin-top: 10px; }
.swatch{
  width: 44px; height: 44px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
  transition: transform .35s var(--ease);
}
.swatch:hover{ transform: translateY(-6px); }
.swatch-light{ box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.palette-caption{
  font-size: 13px; color: rgba(43,43,40,.55); margin-top: 18px; letter-spacing: .02em;
}
.dresscode-image{ overflow: hidden; height: 100%; }
.dresscode-image img{ width: 100%; height: 100%; object-fit: cover; }

/* ============ GALLERY ============ */
.gallery-section{ position: relative; height: 320vh; background: var(--deep); }
.gallery-sticky{
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  justify-content: center; overflow: hidden; padding-top: 40px;
}
.gallery-title{
  padding-left: var(--pad); font-size: clamp(28px, 5vw, 68px); color: var(--ivory);
  margin-bottom: clamp(26px, 4.5vw, 50px); max-width: 92vw;
}
.gallery-viewport{ width: 100%; overflow: hidden; }
.gallery-track{ display: flex; gap: clamp(14px, 1.8vw, 28px); padding: 0 var(--pad); will-change: transform; }
.g-item{
  position: relative; flex: 0 0 auto; height: 62vh; margin: 0; overflow: hidden; border-radius: 2px;
  will-change: transform;
}
.g-item img{
  height: 100%; width: auto; object-fit: cover; display: block; transition: transform .8s var(--ease);
}
.g-item:hover img{ transform: scale(1.035); }

/* ============ COUNTDOWN + REQUEST ============ */
.countdown-section{
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; background: var(--olive); color: var(--ivory);
  padding: clamp(70px, 9vw, 130px) var(--pad);
}
.countdown-section .eyebrow{ color: var(--gold); }
.countdown{ display: flex; gap: clamp(18px, 3vw, 40px); margin-top: 10px; flex-wrap: wrap; }
.cd-unit{ display: flex; flex-direction: column; align-items: flex-start; }
.cd-num{
  font-family: var(--font-serif); font-size: clamp(44px, 6vw, 76px); line-height: 1; color: var(--ivory);
}
.cd-label{ font-size: 11px; letter-spacing: .16em; color: var(--gold); margin-top: 8px; }
.cd-date{ font-family: var(--font-serif); font-style: italic; font-size: 19px; color: var(--stone); margin-top: 30px; }
.request-col .italic-line{ color: var(--ivory); }
.request-col .body-text{ color: rgba(241,236,224,.78); }
.request-col .fine-print{ color: rgba(241,236,224,.5); }

/* ============ RSVP ============ */
.rsvp{
  text-align: center; background: var(--ivory); padding: clamp(90px, 12vw, 160px) var(--pad);
  display: flex; flex-direction: column; align-items: center;
}
.rsvp-copy{ max-width: 52ch; text-align: center; margin: 0 auto; }

/* ============ FINAL ============ */
.final{
  position: relative; min-height: 100vh; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--deep);
}
.final-images{ position: absolute; inset: 0; }
.final-img{
  position: absolute; object-fit: cover; border-radius: 2px; will-change: transform;
  filter: saturate(.92) brightness(.85);
}
.fi-1{ width: 22vw; max-width: 300px; height: 55vh; top: 8%; left: 6%; }
.fi-2{ width: 20vw; max-width: 270px; height: 44vh; bottom: 6%; left: 32%; }
.fi-3{ width: 24vw; max-width: 320px; height: 50vh; top: 14%; right: 6%; }
.final-scrim{ position: absolute; inset: 0; background: rgba(20,22,16,.62); }
.final-content{ position: relative; z-index: 2; text-align: center; color: var(--ivory); }
.final-title{ font-size: clamp(42px, 6vw, 84px); margin-bottom: 24px; }
.final .italic-line{ margin: 0 auto; color: var(--stone); }

/* ============ Footer ============ */
.footer{
  text-align: center; padding: 36px var(--pad); background: var(--deep); color: rgba(241,236,224,.5);
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
}

/* ============ Responsive ============ */
@media (max-width: 900px){
  .hero{ grid-template-columns: 1fr; }
  .hero-image-wrap{ height: 60vh; order: -1; }
  .hero-text{ padding-top: 80px; }
  .intro, .countdown-section{ grid-template-columns: 1fr; gap: 50px; }
  .intro-text{ padding-right: 0; }
  .location, .dresscode{ grid-template-columns: 1fr; }
  .location{ height: auto; overflow: visible; }
  .location-image{ order: -1; height: auto; }
  .location-image img{ min-height: 320px; }
  .dresscode{ height: auto; overflow: visible; }
  .dresscode-image{ height: auto; }
  .dresscode-image img{ height: auto; min-height: 320px; }
  .timing-text{ width: 100%; padding: 60px 24px; }
  .g-item{ height: 48vh; }
  .gallery-section{ height: 260vh; }
  .scroll-indicator{ display: none; }
  .fi-1, .fi-2, .fi-3{ width: 40vw; height: 30vh; }
}
@media (max-width: 560px){
  .hero-title{ gap: 10px; }
  .calendar{ max-width: 100%; }
  .countdown{ gap: 18px; }
}

a:focus-visible, button:focus-visible{ outline: 2px solid var(--gold); outline-offset: 3px; }
