:root {
  --paper: #f6efe4;
  --paper-deep: #eee3d3;
  --card: rgba(255, 251, 245, .78);
  --ink: #314354;
  --ink-soft: #5c6265;
  --blue: #72899e;
  --blue-dark: #536c83;
  --gold: #b59567;
  --line: rgba(184, 162, 132, .52);
  --shadow: 0 18px 50px rgba(76, 63, 48, .16);
  --serif: Georgia, 'Times New Roman', Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(196, 212, 224, .22), transparent 22rem),
    radial-gradient(circle at 82% 75%, rgba(218, 197, 166, .22), transparent 28rem),
    #e9e4dd;
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.site-frame {
  width: min(1380px, calc(100% - 36px));
  margin: 18px auto 42px;
  overflow: hidden;
  border: 1px solid rgba(169, 147, 119, .52);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0 45%, rgba(178, 200, 216, .13), transparent 24rem),
    radial-gradient(circle at 100% 75%, rgba(202, 181, 150, .12), transparent 25rem),
    var(--paper);
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  height: clamp(430px, 35vw, 535px);
  overflow: hidden;
  background: #f7f0e6;
}
.hero-picture { position: absolute; inset: 0; display: block; }
.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(247,240,230,.34) 0%, rgba(247,240,230,.08) 46%, transparent 62%);
  pointer-events: none;
}
.hero-copy {
  position: absolute;
  left: 7%;
  top: 13.5%;
  width: 42%;
  text-align: center;
}
.hero h1 {
  margin: 0;
  font-size: clamp(58px, 5.5vw, 86px);
  line-height: .98;
  font-weight: 400;
  letter-spacing: -.03em;
  color: #2e3e4c;
}
.hero h1 span { color: var(--gold); }
.hero-kicker {
  margin: 16px 0 0;
  font-size: 25px;
  letter-spacing: .03em;
}
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(280px, 70%);
  margin: 15px auto 13px;
  color: var(--gold);
}
.ornament i { display: block; flex: 1; height: 1px; background: currentColor; opacity: .7; }
.ornament b { font-size: 20px; font-weight: 400; line-height: 1; }
.hero-date {
  margin: 0;
  font-size: clamp(34px, 3vw, 48px);
  letter-spacing: .015em;
}
.hero-meta {
  margin: 11px 0 0;
  font: 600 13px/1.2 var(--sans);
  letter-spacing: .22em;
  text-transform: uppercase;
}

main { padding: 20px 24px 0; }
.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255,253,249,.88), rgba(249,242,232,.78));
  box-shadow: 0 4px 18px rgba(96, 78, 56, .06);
}

.invite {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 116px;
  padding: 20px 34px;
  overflow: hidden;
}
.invite-copy { max-width: 790px; justify-self: center; text-align: center; padding: 0 20px; }
.invite h2 { margin: 0 0 7px; font-size: 31px; font-weight: 400; }
.invite p { margin: 0; font-size: 17px; line-height: 1.45; }
.date-badge {
  position: relative;
  z-index: 2;
  min-width: 268px;
  padding: 14px 20px;
  text-align: center;
  border-left: 1px solid var(--line);
  font-size: 20px;
  letter-spacing: .04em;
}
.date-badge span { font-size: 54px; line-height: .8; color: var(--blue); }
.floral { position: absolute; width: 190px; height: 135px; opacity: .35; pointer-events: none; }
.floral::before,
.floral::after { content: ''; position: absolute; background: var(--blue); opacity: .35; border-radius: 100% 0 100% 0; transform: rotate(-34deg); }
.floral::before { width: 18px; height: 70px; left: 34px; top: 26px; }
.floral::after { width: 16px; height: 54px; left: 62px; top: 48px; transform: rotate(28deg); }
.floral-left { left: 0; bottom: -18px; }
.floral-right { right: 0; top: -20px; transform: scaleX(-1); }

.venue-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}
.venue {
  display: grid;
  grid-template-columns: 42% 58%;
  min-height: 260px;
  overflow: hidden;
}
.venue-photo-wrap { min-width: 0; overflow: hidden; }
.venue-photo-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.venue:first-child .venue-photo-wrap img { object-position: 48% center; }
.venue:last-child .venue-photo-wrap img { object-position: 57% center; }
.venue-copy { padding: 22px 24px 20px; }
.venue-heading {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: baseline;
  column-gap: 10px;
  margin-bottom: 8px;
}
.clock { font-size: 26px; color: var(--gold); }
.venue-heading strong { font-size: 31px; font-weight: 400; line-height: 1; }
.venue-heading h2 { margin: 0; font-size: 29px; line-height: 1.05; font-weight: 400; }
.venue-name { margin: 0 0 4px; font-size: 17px; line-height: 1.25; }
.venue-name.latin { letter-spacing: .05em; }
.venue-address { margin: 0 0 12px; color: var(--ink-soft); font-size: 14px; line-height: 1.35; font-family: var(--sans); }
.venue-note { margin: 0 0 14px; font-size: 14px; line-height: 1.42; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 39px;
  padding: 9px 18px 8px;
  border: 1px solid #455f77;
  border-radius: 5px;
  background: linear-gradient(#667d92, #50687e);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25), 0 2px 5px rgba(57,67,76,.12);
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .09em;
  font: 600 11px/1 var(--sans);
  cursor: pointer;
}
.btn:hover { filter: brightness(.96); }
.btn:focus-visible { outline: 3px solid rgba(114,137,158,.35); outline-offset: 3px; }

.mid-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr 1.05fr;
  gap: 14px;
  margin-top: 14px;
}
.schedule, .dress, .details { padding: 17px 20px 16px; }
.section-title {
  margin: 0 0 14px;
  text-align: center;
  font-size: 22px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .045em;
}
.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding-top: 26px;
}
.timeline-line {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 8px;
  height: 1px;
  background: var(--blue);
  opacity: .75;
}
.event { position: relative; text-align: center; }
.event i {
  position: absolute;
  left: 50%;
  top: -23px;
  width: 8px;
  height: 8px;
  transform: translateX(-50%);
  border: 1px solid #fff;
  border-radius: 50%;
  background: var(--blue-dark);
  box-shadow: 0 0 0 2px var(--paper);
}
.event strong { display: block; font-size: 18px; font-weight: 400; color: var(--blue-dark); }
.event span { display: block; margin-top: 3px; font-size: 12px; line-height: 1.28; }
.dress > p { margin: 0; text-align: center; font-size: 13px; line-height: 1.4; }
.swatches { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 16px 0 12px; }
.swatches span {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--c);
  border: 1px solid rgba(65,65,65,.15);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.18);
}
.dress .fine { color: var(--ink-soft); font-size: 12px; }
.detail-row { display: grid; grid-template-columns: 30px 1fr; gap: 8px; margin-bottom: 9px; }
.detail-row:last-child { margin-bottom: 0; }
.detail-icon { width: 28px; height: 28px; display: grid; place-items: center; color: var(--gold); font-size: 22px; }
.detail-row h3 { margin: 0 0 1px; color: var(--blue-dark); font-size: 15px; font-weight: 400; }
.detail-row p { margin: 0; font-size: 12px; line-height: 1.35; }
.transfer { margin-top: 3px !important; font-family: var(--sans); font-size: 11px !important; }

.bottom-grid {
  display: grid;
  grid-template-columns: .9fr 1.25fr 1fr;
  gap: 14px;
  margin-top: 14px;
}
.action, .contacts { min-height: 140px; padding: 18px 20px; }
.action { display: grid; grid-template-columns: 54px 1fr; gap: 12px; align-items: center; }
.action-icon { width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: rgba(196,213,226,.25); font-size: 27px; color: var(--blue-dark); }
.action h2, .contacts h2 { margin: 0 0 7px; font-size: 20px; font-weight: 400; text-transform: uppercase; letter-spacing: .035em; }
.action p { margin: 0 0 10px; font-size: 12px; line-height: 1.35; }
.action-form { background: linear-gradient(135deg, rgba(232,240,245,.72), rgba(255,251,245,.84)); }
.contacts h2 { text-align: center; }
.contacts a {
  display: grid;
  grid-template-columns: 62px 1fr;
  grid-template-areas: "name phone" "role phone";
  align-items: center;
  padding: 4px 0;
  text-decoration: none;
  border-bottom: 1px solid rgba(184,162,132,.33);
}
.contacts a:last-child { border-bottom: 0; }
.contacts span { grid-area: name; font-size: 15px; }
.contacts small { grid-area: role; color: var(--ink-soft); font: 10px/1.2 var(--sans); }
.contacts b { grid-area: phone; justify-self: end; font: 600 12px/1.2 var(--sans); color: var(--blue-dark); }

footer { padding: 16px 20px 22px; text-align: center; }
.footer-ornament { margin: 0 auto 2px; width: 240px; }
footer p { margin: 0 0 2px; font-size: 31px; font-style: italic; }
footer span { font-size: 13px; letter-spacing: .06em; }

.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 18px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(29,36,43,.56); backdrop-filter: blur(4px); }
.modal-panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(88vh, 800px);
  overflow: auto;
  padding: 30px 30px 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 25px 70px rgba(0,0,0,.25);
}
.modal-panel-wide { width: min(900px, 100%); }
.modal-close { position: absolute; right: 15px; top: 11px; width: 36px; height: 36px; border: 0; background: transparent; color: var(--ink-soft); font-size: 32px; cursor: pointer; }
.modal-eyebrow { margin: 0 0 5px; color: var(--gold); font: 700 11px/1.2 var(--sans); text-transform: uppercase; letter-spacing: .16em; }
.modal-panel h2 { margin: 0 42px 13px 0; font-size: 29px; font-weight: 400; }
.modal-panel p { font-size: 15px; line-height: 1.5; }
.route-map { display: block; width: 100%; margin: 18px 0; border: 1px solid var(--line); border-radius: 10px; }

@media (max-width: 1080px) {
  .hero-copy { width: 46%; left: 4.5%; }
  .venue { grid-template-columns: 40% 60%; }
  .venue-heading { grid-template-columns: auto auto; }
  .venue-heading h2 { grid-column: 1 / -1; margin-top: 4px; }
  .mid-grid { grid-template-columns: 1fr 1fr; }
  .details { grid-column: 1 / -1; }
  .bottom-grid { grid-template-columns: 1fr 1fr; }
  .contacts { grid-column: 1 / -1; }
  .contacts { display: grid; grid-template-columns: auto repeat(3, 1fr); align-items: center; gap: 14px; }
  .contacts h2 { margin: 0; }
  .contacts a { display: block; text-align: center; border: 0; padding: 0; }
  .contacts span, .contacts small, .contacts b { display: block; }
  .contacts small { margin: 2px 0 4px; }
}

@media (max-width: 760px) {
  body { background: var(--paper); }
  .site-frame { width: 100%; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
  /* На телефоне используем тот же утверждённый широкий рисунок, что и на компьютере.
     Картинка вписывается по ширине без обрезки справа, поэтому лицо Ильи видно целиком. */
  .hero {
    height: clamp(300px, 76vw, 430px);
    background: #f7f0e6;
  }
  .hero-art {
    inset: 0 0 auto 0;
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: top center;
    transform: none;
  }
  .hero-shade { background: linear-gradient(90deg, rgba(247,240,230,.30) 0%, rgba(247,240,230,.06) 50%, transparent 70%); }
  .hero-copy { left: 4.5%; top: 17%; width: 47%; text-align: center; }
  .hero h1 { font-size: clamp(38px, 10.4vw, 48px); line-height: .98; }
  .hero-kicker { margin-top: 10px; font-size: 17px; }
  .ornament { margin: 10px auto 9px; width: 75%; }
  .hero-date { font-size: clamp(24px, 7.1vw, 31px); white-space: nowrap; }
  .hero-meta { margin-top: 8px; font-size: 9px; letter-spacing: .15em; }

  main { padding: 10px 10px 0; }
  .card { border-radius: 12px; }
  .invite { grid-template-columns: 1fr; min-height: 0; padding: 16px 18px 13px; }
  .invite-copy { padding: 0 18px; }
  .invite h2 { font-size: 25px; }
  .invite p { font-size: 14px; line-height: 1.4; }
  .date-badge { min-width: 0; border: 0; border-top: 1px solid var(--line); margin-top: 13px; padding: 10px 6px 0; font-size: 20px; }
  .date-badge span { font-size: 36px; }
  .floral { width: 105px; height: 90px; opacity: .25; }

  .venue-grid { grid-template-columns: 1fr; gap: 8px; margin-top: 8px; }
  .venue { grid-template-columns: 38% 62%; min-height: 190px; }
  .venue-copy { padding: 14px 14px 13px; }
  .venue-heading { grid-template-columns: auto auto 1fr; gap: 6px; margin-bottom: 6px; }
  .clock { font-size: 20px; }
  .venue-heading strong { font-size: 23px; }
  .venue-heading h2 { grid-column: auto; margin: 0; font-size: 21px; }
  .venue-name { font-size: 14px; }
  .venue-address { margin-bottom: 8px; font-size: 11px; }
  .venue-note { margin-bottom: 10px; font-size: 11px; line-height: 1.35; }
  .btn { min-height: 34px; padding: 8px 12px 7px; font-size: 9px; letter-spacing: .07em; }

  .mid-grid { grid-template-columns: 1fr; gap: 8px; margin-top: 8px; }
  .schedule, .dress, .details { padding: 13px 14px 12px; }
  .section-title { margin-bottom: 10px; font-size: 18px; }
  .timeline { gap: 3px; padding-top: 21px; }
  .timeline-line { top: 6px; left: 7%; right: 7%; }
  .event i { top: -18px; width: 7px; height: 7px; }
  .event strong { font-size: 15px; }
  .event span { font-size: 9px; line-height: 1.25; }
  .dress > p { font-size: 12px; }
  .swatches { gap: 7px; margin: 12px 0 9px; }
  .swatches span { width: 27px; height: 27px; }
  .dress .fine { font-size: 10px; }
  .details { grid-column: auto; }
  .detail-row { grid-template-columns: 26px 1fr; gap: 7px; margin-bottom: 7px; }
  .detail-icon { width: 24px; height: 24px; font-size: 19px; }
  .detail-row h3 { font-size: 14px; }
  .detail-row p { font-size: 11px; }
  .transfer { font-size: 10px !important; }

  .bottom-grid { grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
  .action, .contacts { min-height: 0; padding: 13px 12px; }
  .action { grid-template-columns: 1fr; gap: 5px; text-align: center; }
  .action-icon { display: none; }
  .action h2, .contacts h2 { margin-bottom: 6px; font-size: 15px; line-height: 1.1; }
  .action p { margin-bottom: 9px; font-size: 10px; }
  .action .btn { width: 100%; }
  .contacts { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr; gap: 0; }
  .contacts h2 { margin-bottom: 6px; text-align: center; }
  .contacts a { display: grid; grid-template-columns: 54px 1fr; grid-template-areas: "name phone" "role phone"; text-align: left; padding: 5px 0; border-bottom: 1px solid rgba(184,162,132,.25); }
  .contacts span { grid-area: name; font-size: 13px; }
  .contacts small { grid-area: role; margin: 0; font-size: 9px; }
  .contacts b { grid-area: phone; justify-self: end; align-self: center; font-size: 11px; }

  footer { padding: 13px 12px calc(18px + env(safe-area-inset-bottom)); }
  .footer-ornament { width: 165px; margin-bottom: 0; }
  footer p { font-size: 25px; }
  footer span { font-size: 11px; }

  .modal { padding: 10px; }
  .modal-panel { padding: 24px 18px 20px; border-radius: 13px; }
  .modal-panel h2 { font-size: 24px; }
  .modal-panel p { font-size: 14px; }
}

@media (max-width: 430px) {
  .hero { height: clamp(300px, 78vw, 335px); }
  .hero-art { object-position: top center; }
  .hero-copy { top: 16%; width: 48%; }
  .hero h1 { font-size: 39px; }
  .hero-date { font-size: 24px; }
  .venue { grid-template-columns: 36% 64%; }
  .venue-heading { grid-template-columns: auto auto; }
  .venue-heading h2 { grid-column: 1 / -1; margin-top: 2px; font-size: 20px; }
  .venue-photo-wrap img { object-position: center; }
  .swatches span { width: 25px; height: 25px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
