/* projects/wedding-site/src/styles/main.css
   Секции в порядке скролла:
   00 hero · 01 welcome · 02 story · 03 programme · 04 venue
   05 dress · 06 countdown · 07 rsvp · 08 gallery · 09 contacts · footer
*/

/* === Top nav === */
.nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 24px 40px;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-logo {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--silver-bright);
  font-size: 18px;
  letter-spacing: 1px;
}
.nav-logo .amp { color: var(--silver-highlight); }
.nav-menu {
  display: flex;
  gap: 28px;
  list-style: none;
}
.nav-menu a {
  color: var(--silver-dim);
  font-size: 10px;
  letter-spacing: 3px;
  transition: color 0.2s;
}
.nav-menu a:hover { color: var(--silver-bright); }

/* === Hero === */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
}
.hero-photo {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 55%;
  overflow: hidden;
}
.hero-photo::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 30%;
  background: linear-gradient(90deg, var(--bg) 0%, rgba(10,10,10,0) 100%);
  z-index: 4;
  pointer-events: none;
}
.hero-photo-bg {
  position: absolute;
  inset: 0;
  background: url('../assets/photos/hero-desktop.jpg') center/cover no-repeat;
  filter: saturate(0.78) brightness(0.85) contrast(1.05);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.05) 25%, rgba(0,0,0,0) 55%, rgba(0,0,0,0.85) 100%),
    radial-gradient(ellipse at center, rgba(0,0,0,0) 50%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}

.hero-text {
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  padding-left: 7%;
  padding-right: 5%;
  z-index: 5;
  max-width: 48%;
}
.hero-date {
  color: var(--silver-highlight);
  letter-spacing: 6px;
  font-size: 11px;
  margin-bottom: 20px;
}
.hero-title {
  font-family: var(--font-display);
  color: var(--silver-bright);
  font-weight: 300;
  line-height: 1.0;
  font-size: clamp(40px, 7vw, 72px);
  margin: 0;
}
.hero-amp {
  color: var(--silver-highlight);
  font-style: italic;
  display: block;
  font-size: clamp(30px, 5vw, 54px);
  margin: 8px 0;
}
.hero-meta {
  color: var(--silver);
  letter-spacing: 5px;
  font-size: 11px;
  margin-top: 30px;
}

/* === Hero animations === */
@keyframes kenBurns {
  0% { transform: scale(1.0); }
  100% { transform: scale(1.12); }
}
.hero-photo-bg {
  animation: kenBurns 12s ease-out infinite alternate;
}

@keyframes pFloat {
  0%, 100% { transform: translate(0, 0); opacity: 0.3; }
  50%      { transform: translate(10px, -15px); opacity: 1; }
}
.hero-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--silver-highlight);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--silver-highlight), 0 0 22px rgba(221,224,230,0.5);
  animation: pFloat 5s ease-in-out infinite;
  pointer-events: none;
  z-index: 6;
}
.hero-particle.lg {
  width: 4px;
  height: 4px;
  box-shadow: 0 0 14px var(--silver-highlight), 0 0 30px rgba(221,224,230,0.6);
}

@keyframes fadeUpTitle {
  0%   { opacity: 0; transform: translateY(20px); filter: blur(8px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.hero-text { animation: none; }
.hero-text .hero-date { animation: fadeUpTitle 1.4s 0.2s both; }
.hero-text .hero-title { animation: fadeUpTitle 1.4s 0.4s both; }
.hero-text .hero-meta { animation: fadeUpTitle 1.4s 0.9s both; }

@media (prefers-reduced-motion: reduce) {
  .hero-photo-bg, .hero-particle, .hero-text > * { animation: none !important; }
}

/* === Mobile (< 768px) — hero === */
@media (max-width: 767px) {
  .nav { padding: 18px 20px; }
  .nav-menu { gap: 14px; }
  .nav-menu a { font-size: 9px; letter-spacing: 2px; }

  .hero { height: 100svh; min-height: 600px; }
  .hero-photo {
    position: absolute;
    inset: 0;
    width: 100%;
  }
  .hero-photo::before { display: none; }
  .hero-photo-bg {
    background-position: center 50%;
  }
  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.1) 25%, rgba(0,0,0,0.1) 55%, rgba(0,0,0,0.92) 100%);
  }
  .hero-text {
    position: absolute;
    left: 0; right: 0;
    bottom: 8%;
    top: auto;
    transform: none;
    padding: 0 20px;
    text-align: center;
    max-width: 100%;
  }
  .hero-title { font-size: 36px; }
  .hero-title .hero-amp { display: inline; font-size: 30px; margin: 0 6px; }
  .hero-meta { font-size: 9px; letter-spacing: 4px; }
}

/* === Section primitives === */
section {
  padding: var(--section-pad-y) var(--section-pad-x);
  position: relative;
}
.section-num {
  color: var(--silver-faint);
  letter-spacing: 6px;
  font-size: 10px;
  margin-bottom: 20px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.section-num::before, .section-num::after {
  content: '';
  width: 30px;
  height: 1px;
  background: var(--line);
}
.section-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.1;
  text-align: center;
  color: var(--silver-bright);
  margin-bottom: 12px;
}
.section-title em {
  color: var(--silver-highlight);
  font-style: italic;
  font-weight: 400;
}
.section-divider {
  width: 60px;
  height: 1px;
  background: var(--silver);
  margin: 20px auto 50px;
}
.section-text {
  color: var(--silver);
  max-width: 520px;
  margin: 0 auto;
  font-size: 15px;
  line-height: 1.7;
  text-align: center;
}

@media (max-width: 767px) {
  section { padding: 80px 20px; }
}

/* === 01 Welcome === */
.welcome-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  max-width: var(--container-max);
  margin: 0 auto;
}
.welcome-text h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 300;
  line-height: 1.15;
  margin-bottom: 20px;
}
.welcome-text h2 em { color: var(--silver-highlight); font-style: italic; }
.welcome-text .lead {
  color: var(--silver-highlight);
  font-style: italic;
  font-size: 16px;
  margin-bottom: 18px;
}
.welcome-text p {
  color: var(--silver);
  font-size: 15px;
  margin-bottom: 14px;
}

.calendar {
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 24px;
  border-radius: 6px;
}
.cal-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 18px;
  font-family: var(--font-display);
}
.cal-month { font-style: italic; font-size: 28px; }
.cal-year { font-size: 18px; color: var(--silver-dim); }
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.cal-grid .dow {
  color: var(--silver-faint);
  font-size: 9px;
  letter-spacing: 1px;
  text-align: center;
  padding: 6px 0;
}
.cal-grid .day {
  color: var(--silver);
  text-align: center;
  padding: 8px 0;
  font-size: 13px;
}
.cal-grid .day.empty { color: transparent; }
.cal-grid .day.target {
  position: relative;
  color: var(--silver-bright);
  font-weight: 600;
}
.cal-grid .day.target::after {
  content: '';
  position: absolute;
  inset: -4px;
  border: 1.5px solid var(--silver-highlight);
  border-radius: 50%;
}

@media (max-width: 767px) {
  .welcome-wrap {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* === 02 Story === */
.story {
  max-width: 920px;
  margin: 0 auto;
}
.story-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 50px;
  margin-bottom: 80px;
  align-items: center;
}
.story-item:nth-child(even) {
  grid-template-columns: 1fr 200px;
}
.story-item:nth-child(even) .story-photo { order: 2; }

.story-photo {
  width: 200px;
  height: 240px;
  background:
    linear-gradient(135deg, var(--bg-3) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line);
  position: relative;
}
.story-photo[data-placeholder]::after {
  content: 'PHOTO · ' attr(data-placeholder);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--silver-faint);
  font-size: 10px;
  letter-spacing: 2px;
}
.story-photo.has-image { background-size: cover; background-position: center; }
.story-photo.has-image::after { content: none; }

.story-text .year {
  color: var(--silver-highlight);
  letter-spacing: 5px;
  font-size: 11px;
  margin-bottom: 10px;
}
.story-text h3 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 300;
  font-style: italic;
  margin-bottom: 12px;
}
.story-text p {
  color: var(--silver);
  font-size: 14px;
  line-height: 1.7;
}

@media (max-width: 767px) {
  .story-item, .story-item:nth-child(even) {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 50px;
  }
  .story-item:nth-child(even) .story-photo { order: 0; }
  .story-photo { width: 100%; height: 220px; }
}

/* === 03 Programme === */
.timeline {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  padding-left: 60px;
  list-style: none;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 23px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--line);
}
.tl-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  margin-bottom: 50px;
  align-items: flex-start;
  position: relative;
}
.tl-time {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--silver-bright);
  font-size: 24px;
  min-width: 80px;
  margin-left: -60px;
  padding-top: 6px;
}
.tl-dot {
  position: absolute;
  left: -40px;
  top: 14px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--silver);
}
.tl-content h3 {
  font-size: 18px;
  margin-bottom: 6px;
  color: var(--silver-bright);
  font-weight: 500;
}
.tl-content .meta {
  color: var(--silver-dim);
  font-size: 11px;
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.tl-content p {
  color: var(--silver);
  font-size: 14px;
}

@media (max-width: 767px) {
  .timeline { padding-left: 50px; }
  .timeline::before { left: 18px; }
  .tl-time { font-size: 20px; min-width: 60px; margin-left: -50px; }
  .tl-dot { left: -34px; width: 12px; height: 12px; }
}

/* === 04 Venue === */
.venue {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: var(--container-max);
  margin: 0 auto;
}
.venue-photo {
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.3) 0%, transparent 50%, rgba(0,0,0,0.6) 100%),
    linear-gradient(135deg, var(--bg-3) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line);
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 24px;
}
.venue-photo.has-image {
  background: url('../assets/photos/venue.jpg') center/cover no-repeat;
}
.venue-photo .placeholder-text {
  color: rgba(255,255,255,0.4);
  font-size: 10px;
  letter-spacing: 2px;
}
.venue-photo.has-image .placeholder-text { display: none; }

.venue-info h3 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 300;
  margin-bottom: 6px;
}
.venue-info .addr {
  color: var(--silver-dim);
  font-size: 13px;
  margin-bottom: 18px;
}
.venue-info p {
  color: var(--silver);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 30px;
}
.venue-btns { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 14px 28px;
  font-size: 11px;
  letter-spacing: 3px;
  border: 1px solid var(--silver);
  background: transparent;
  color: var(--silver-bright);
  cursor: pointer;
  transition: all 0.3s var(--ease-cinematic);
}
.btn-primary {
  background: var(--silver-bright);
  color: var(--bg);
  border-color: var(--silver-bright);
}
.btn:hover { background: var(--silver-bright); color: var(--bg); }
.btn-primary:hover { background: var(--silver); border-color: var(--silver); }

@media (max-width: 767px) {
  .venue { grid-template-columns: 1fr; gap: 30px; }
  .venue-btns .btn { padding: 12px 20px; }
}

/* === 05 Dress code === */
.dress { text-align: center; max-width: 600px; margin: 0 auto; }
.dress-palette {
  display: flex;
  gap: 30px;
  justify-content: center;
  margin: 40px 0 30px;
  flex-wrap: wrap;
}
.dress-swatch { text-align: center; }
.dress-swatch .circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  margin-bottom: 12px;
  border: 1px solid var(--line);
}
.dress-swatch.black .circle  { background: var(--bg); border-color: var(--silver-faint); }
.dress-swatch.silver .circle { background: linear-gradient(135deg, var(--silver-bright) 0%, #9aa0aa 100%); }
.dress-swatch.white .circle  { background: #f5f5f5; }
.dress-swatch .name {
  color: var(--silver-dim);
  font-size: 10px;
  letter-spacing: 3px;
}

/* === 06 Countdown === */
.countdown {
  display: flex;
  justify-content: center;
  gap: 20px;
  max-width: 700px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.cd-cell {
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 30px 24px;
  text-align: center;
  min-width: 120px;
  flex: 1 1 120px;
  max-width: 160px;
}
.cd-num {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 54px);
  font-weight: 300;
  color: var(--silver-bright);
  line-height: 1;
  margin-bottom: 8px;
}
.cd-label {
  color: var(--silver-dim);
  font-size: 10px;
  letter-spacing: 3px;
}

@media (max-width: 767px) {
  .countdown { gap: 10px; }
  .cd-cell { padding: 20px 12px; min-width: 70px; flex: 1 1 70px; }
  .cd-label { font-size: 9px; letter-spacing: 2px; }
}

/* === 07 RSVP === */
.rsvp-block { text-align: center; }
.rsvp-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: var(--silver-bright);
  border: 1px solid var(--silver);
  padding: 16px 44px;
  font-size: 11px;
  letter-spacing: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.3s var(--ease-cinematic);
  position: relative;
  overflow: hidden;
  margin-top: 40px;
}
.rsvp-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--silver-bright);
  transform: translateX(-100%);
  transition: transform 0.3s var(--ease-cinematic);
}
.rsvp-button span {
  position: relative;
  z-index: 2;
  transition: color 0.3s var(--ease-cinematic);
}
.rsvp-button:hover::before { transform: translateX(0); }
.rsvp-button:hover span { color: var(--bg); }

.rsvp-deadline {
  color: var(--silver-dim);
  font-size: 11px;
  letter-spacing: 2px;
  margin-top: 24px;
}

/* === RSVP modal === */
.rsvp-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.rsvp-modal[hidden] { display: none; }
.rsvp-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.rsvp-modal-card {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 34px 32px;
  max-width: 440px;
  width: 100%;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(200, 204, 212, 0.06);
  animation: slideUp 0.3s var(--ease-cinematic);
  max-height: 90vh;
  overflow-y: auto;
}
.rsvp-modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  color: var(--silver-dim);
  font-size: 24px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}
.rsvp-modal-close:hover { color: var(--silver-bright); background: rgba(255,255,255,0.05); }

.rsvp-modal-title {
  font-family: var(--font-display);
  color: var(--silver-bright);
  font-size: 24px;
  font-weight: 300;
  margin-bottom: 6px;
}
.rsvp-modal-subtitle {
  color: var(--silver-dim);
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 24px;
}

.rsvp-guest-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  margin-bottom: 14px;
}
.rsvp-guest-input { flex: 1; }
.rsvp-guest-input label {
  color: var(--silver-dim);
  font-size: 9px;
  letter-spacing: 2px;
  margin-bottom: 6px;
  display: block;
  text-transform: uppercase;
}
.rsvp-guest-input input {
  width: 100%;
  background: transparent;
  color: var(--silver-bright);
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.rsvp-guest-input input:focus { border-bottom-color: var(--silver); }
.rsvp-guest-input input::placeholder { color: var(--silver-faint); }

.rsvp-guest-remove {
  color: var(--silver-dim);
  font-size: 18px;
  padding: 6px 10px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}
.rsvp-guest-remove:hover { color: var(--silver-bright); background: rgba(255,255,255,0.05); }

.rsvp-add-guest {
  background: transparent;
  color: var(--silver);
  border: 1px dashed var(--line);
  padding: 10px 16px;
  font-size: 11px;
  letter-spacing: 2px;
  cursor: pointer;
  margin: 14px 0 24px;
  width: 100%;
  border-radius: 4px;
  transition: border-color 0.2s, color 0.2s;
}
.rsvp-add-guest:hover { border-color: var(--silver); color: var(--silver-bright); }

.rsvp-submit {
  width: 100%;
  background: var(--silver-bright);
  color: var(--bg);
  border: none;
  padding: 14px;
  font-size: 11px;
  letter-spacing: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}
.rsvp-submit:hover { background: var(--silver); }
.rsvp-submit:disabled { opacity: 0.5; cursor: wait; }

.rsvp-error {
  color: #ff8080;
  font-size: 12px;
  margin-bottom: 12px;
  min-height: 16px;
  text-align: center;
}

.rsvp-modal-note {
  color: var(--silver-dim);
  font-size: 10px;
  text-align: center;
  margin-top: 14px;
  line-height: 1.5;
}

.rsvp-success { text-align: center; padding: 20px 0; }
.rsvp-success-mark {
  font-size: 42px;
  color: var(--silver-bright);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1.5px solid var(--silver);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.rsvp-success h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 300;
  color: var(--silver-bright);
  margin-bottom: 8px;
}
.rsvp-success p { color: var(--silver-dim); font-size: 14px; }

/* === 08 Gallery === */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: var(--container-max);
  margin: 0 auto;
}
.gallery-tile {
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--bg-3) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line);
  position: relative;
}
.gallery-tile.tall { grid-row: span 2; aspect-ratio: 1 / 2; }
.gallery-tile[data-placeholder]::after {
  content: 'PHOTO · ' attr(data-placeholder);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--silver-faint);
  font-size: 10px;
  letter-spacing: 2px;
}
.gallery-tile.has-image { background-size: cover; background-position: center; }
.gallery-tile.has-image::after { content: none; }

@media (max-width: 767px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .gallery-tile.tall { grid-row: span 1; aspect-ratio: 1; }
}

/* === 09 Contacts === */
.contacts {
  display: flex;
  gap: 60px;
  justify-content: center;
  max-width: 600px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.contact-card { text-align: center; }
.contact-card .role {
  color: var(--silver-dim);
  font-size: 10px;
  letter-spacing: 3px;
  margin-bottom: 8px;
}
.contact-card .name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 24px;
  color: var(--silver-bright);
  margin-bottom: 16px;
}
.contact-card .phone {
  display: block;
  color: var(--silver);
  font-size: 15px;
  margin-bottom: 14px;
  letter-spacing: 1px;
}
.contact-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.ico-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--silver);
  transition: border-color 0.2s, color 0.2s;
}
.ico-btn:hover { border-color: var(--silver-bright); color: var(--silver-bright); }
.ico-btn img { filter: invert(0.85); }

/* === Footer === */
.site-footer {
  padding: 50px 8% 40px;
  text-align: center;
  border-top: 1px solid var(--line);
  margin-top: 60px;
}
.site-footer .ip {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 24px;
  color: var(--silver);
  margin-bottom: 8px;
}
.site-footer .ip .amp { color: var(--silver-highlight); }
.site-footer .meta {
  color: var(--silver-faint);
  font-size: 11px;
  letter-spacing: 3px;
}
