/* --- Стиль albertelena.wedding: светлый, смелая типографика, карточки --- */
:root {
  --color-bg: #faf7f2;
  --color-surface: #fffdfb;
  --color-text: #4a3c34;
  --color-text-muted: #7d6e62;
  --color-accent: #8a5f63;
  --color-accent-hover: #76504f;
  --color-accent-soft: rgba(138, 95, 99, 0.14);
  --color-on-accent: #faf7f2;
  --color-border: rgba(138, 95, 99, 0.12);

  --font-display: "Viaoda Libre", Georgia, serif;
  --font-body: "Viaoda Libre", Georgia, serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 5.5rem;

  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 4px 24px rgba(138, 95, 99, 0.1);
  --transition: 0.25s ease;

  --container: min(100% - 2rem, 40rem);
  --container-wide: min(100% - 2rem, 52rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img,
iframe {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Hero: скетч + приветствие --- */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(1.5rem, 5vw, 2.5rem) 0 0;
  overflow: hidden;
  background: var(--color-bg);
  color: var(--color-text);
}

.hero__pattern {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.45;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Cpath fill='none' stroke='%238a5f63' stroke-width='0.6' opacity='0.18' d='M0 50 Q50 30 100 50 T200 50 M0 100 Q50 80 100 100 T200 100 M0 150 Q50 130 100 150 T200 150'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none;
}

.hero__layout {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.5rem, 5vw, 2.5rem);
  width: 100%;
  max-width: min(100% - 2rem, 58rem);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
  flex: 1;
  justify-content: center;
}

@media (min-width: 720px) {
  .hero__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
    justify-items: stretch;
    gap: clamp(1.5rem, 5vw, 3rem);
    padding-bottom: 2rem;
  }
}

.hero__illustration {
  margin: 0;
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  justify-content: center;
}

.hero__illustration img {
  width: min(100%, 26rem);
  height: auto;
  margin-inline: auto;
  object-fit: contain;
}

@media (min-width: 720px) {
  .hero__illustration {
    justify-content: flex-start;
  }

  .hero__illustration img {
    width: 100%;
    max-width: min(36vw, 32rem);
  }
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 26rem;
  margin-inline: auto;
  text-align: center;
  padding-top: clamp(0.25rem, 2vw, 0.5rem);
  padding-bottom: 0.5rem;
}

@media (min-width: 720px) {
  .hero__content {
    align-items: flex-start;
    text-align: left;
    max-width: none;
    margin-inline: 0;
    padding-top: 1.5rem;
  }
}

.hero__title {
  margin: 0 0 var(--space-md);
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 2.75rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--color-text);
}

.hero__lead {
  margin: 0 0 var(--space-md);
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  line-height: 1.75;
  color: var(--color-text-muted);
}

.hero__names {
  margin: 0 0 var(--space-xs);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: var(--color-text);
}

.hero__place {
  margin: 0 0 var(--space-sm);
  font-size: 0.9375rem;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.hero__date {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 3.5vw, 1.375rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: var(--color-text);
  opacity: 0.85;
}

/* --- Секции --- */
.section {
  padding: var(--space-xl) var(--space-md);
}

.section--welcome {
  padding-top: var(--space-2xl);
}

.welcome-text p {
  margin: 0;
}

.welcome-text p + p {
  margin-top: 1em;
}

.container {
  width: var(--container-wide);
  margin: 0 auto;
}

.container--narrow {
  width: var(--container);
}

.container--center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.container--center .section__text {
  margin-inline: auto;
}

.section__label {
  display: inline-block;
  margin: 0 0 var(--space-sm);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.section__title {
  margin: 0 0 var(--space-md);
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 3rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: var(--color-text);
}

.section__text {
  margin: 0 0 var(--space-lg);
  max-width: 32rem;
  color: var(--color-text-muted);
}

.section__text--large {
  font-size: 1.125rem;
  line-height: 1.75;
}

/* --- Карточка события --- */
.event-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-lg);
  border: 1px solid var(--color-border);
}

.event-card--centered {
  width: 100%;
  max-width: 22rem;
  margin-inline: auto;
  text-align: center;
}

.event-card--centered .event-card__body {
  align-items: center;
}

.event-card--centered .btn {
  margin-inline: auto;
}

.event-card__body {
  margin: 0 0 var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.event-card__date {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--color-text);
}

.event-card__venue {
  margin: 0;
}

.event-card__venue-name {
  margin: 0 0 0.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--color-text);
}

.event-card__venue-address {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--color-text-muted);
}

.event-card__poem {
  margin: var(--space-md) 0 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-text-muted);
}

/* --- Счётчик + календарь недели --- */
.date-block {
  width: 100%;
  max-width: 21rem;
  margin: 0 auto var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-lg);
}

.countdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  width: 100%;
}

.countdown__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 5.5rem;
  padding: var(--space-md) 0.5rem;
  text-align: center;
  background: var(--color-accent-soft);
  border-radius: var(--radius-md);
}

.countdown__value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 10vw, 2.75rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: var(--color-accent);
}

.countdown__label {
  margin-top: 0.35rem;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.week-cal {
  width: 100%;
}

.week-cal__month {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 4vw, 1.5rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--color-text);
}

.week-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.25rem;
  width: 100%;
}

.week-cal__col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
  min-width: 0;
}

.week-cal__wd {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  line-height: 1;
}

.week-cal__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.125rem;
  height: 2.125rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1;
  border-radius: 50%;
  color: var(--color-text);
}

.week-cal__num--wedding {
  font-weight: 700;
  color: var(--color-surface);
  background: var(--color-accent);
}

/* --- Timeline --- */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-sm);
}

@media (min-width: 640px) {
  .timeline {
    grid-template-columns: repeat(2, 1fr);
  }
}

.timeline__item {
  padding: var(--space-md);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
}

.timeline__time {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.timeline__name {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-text);
}

.timeline__content p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.section__note {
  margin: var(--space-lg) 0 0;
  font-size: 0.875rem;
  font-style: italic;
  color: var(--color-text-muted);
  text-align: center;
}

/* --- FAQ --- */
.faq {
  display: grid;
  gap: var(--space-sm);
  width: min(100%, 36rem);
  max-width: 36rem;
  margin-inline: auto;
}

.container--center .faq {
  align-self: stretch;
  justify-self: center;
}

.faq__item {
  width: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.faq__item summary {
  padding: var(--space-md) var(--space-md);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary::after {
  content: "+";
  flex-shrink: 0;
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--color-accent);
  transition: transform var(--transition);
}

.faq__item[open] summary::after {
  transform: rotate(45deg);
}

.faq__item p {
  margin: 0;
  padding: 0 var(--space-md);
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.faq__item p:last-child {
  padding-bottom: var(--space-md);
}

.faq__item p + p {
  padding-top: 0.75em;
}

.faq__contact a {
  color: var(--color-accent);
  text-decoration: none;
}

.faq__contact a:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

/* --- Карта --- */
.link-map {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: var(--space-md);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  text-decoration: none;
}

.link-map:hover {
  color: var(--color-accent-hover);
}

.map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
}

.map {
  width: 100%;
  height: 280px;
  border: 0;
}

@media (min-width: 768px) {
  .map {
    height: 360px;
  }
}

/* --- Кнопки --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.85rem 2rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.btn--primary {
  color: var(--color-on-accent);
  background: var(--color-accent);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--color-accent-hover);
}

.btn--ghost {
  color: var(--color-text);
  background: transparent;
  border: 2px solid var(--color-border);
}

.btn--ghost:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn--large {
  width: 100%;
}

@media (min-width: 480px) {
  .btn--large {
    width: auto;
  }
}

.rsvp-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: stretch;
}

@media (min-width: 480px) {
  .rsvp-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
  }
}

/* --- RSVP --- */
.rsvp-panel {
  margin-top: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.rsvp-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}

.rsvp-panel__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.rsvp-panel__close {
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.5rem;
  line-height: 1;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: var(--radius-md);
}

.rsvp-panel__close:hover {
  color: var(--color-text);
}

.rsvp-iframe {
  width: 100%;
  height: min(70vh, 520px);
  border: 0;
}

/* --- Telegram --- */
.section__text--telegram {
  margin-bottom: var(--space-lg);
}

.telegram-note {
  margin: var(--space-md) 0 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.btn--disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

/* --- Цветы --- */
.section--flowers {
  padding-bottom: var(--space-2xl);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}

.flowers-link {
  display: inline-block;
  margin-bottom: var(--space-lg);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 2px solid var(--color-accent);
}

.flowers-link:hover {
  color: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

.flowers-link[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
  border-bottom: none;
}

.section__text--deadline {
  font-size: 1.125rem;
}

.flowers-qr {
  margin: 0 auto;
  padding: var(--space-md);
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.flowers-qr__img {
  width: 12.5rem;
  height: 12.5rem;
  margin-inline: auto;
  border-radius: var(--radius-md);
}

.flowers-qr__caption {
  margin: var(--space-sm) 0 0;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.flowers-note {
  margin: var(--space-md) 0 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* --- Подвал --- */
.site-footer {
  padding: var(--space-sm) var(--space-md);
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
  text-align: center;
}

.site-footer__text {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--color-text-muted);
}
