/* =============================================================================
   Anna & Piotr — modern minimal wedding site
   ============================================================================= */
:root {
  --bg:        #faf8f5;   /* warm white            */
  --bg-soft:   #f1ede7;   /* soft sand             */
  --ink:       #20201d;   /* near-black text       */
  --muted:     #6f6a62;   /* secondary text        */
  --line:      #e4ded5;   /* hairline borders      */
  --accent:    #a98b6f;   /* warm taupe accent     */
  --accent-ink:#8a6f54;
  --white:     #ffffff;

  --serif: "Cormorant Garamond", "Georgia", "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --maxw: 1140px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 4px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

.kicker {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent-ink);
  margin: 0 0 1.1rem;
}

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(64px, 11vw, 130px) var(--gutter);
  text-align: center;
}

.section__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.1;
  margin: 0 0 2.4rem;
  letter-spacing: 0.01em;
}

/* ------------------------------- Buttons -------------------------------- */
.btn {
  font-family: var(--sans);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 0.95em 1.9em;
  border-radius: var(--radius);
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: background .25s ease, color .25s ease, border-color .25s ease, opacity .2s ease;
  background: transparent;
  color: var(--ink);
}
.btn--solid { background: var(--ink); color: var(--bg); }
.btn--solid:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn--ghost:hover { background: var(--ink); color: var(--bg); }
.btn--wide { width: 100%; max-width: 320px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

/* ------------------------------- Header --------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--gutter);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }

.brand {
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--ink);
}
.nav { display: flex; gap: clamp(1rem, 3vw, 2.4rem); }
.nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color .2s ease;
}
.nav a:hover { color: var(--ink); }

.lang-switch { display: flex; align-items: center; gap: .4rem; color: var(--line); }
.lang-switch button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: .2rem .1rem;
  transition: color .2s ease;
}
.lang-switch button:hover { color: var(--ink); }
.lang-switch button.active { color: var(--ink); font-weight: 500; border-bottom: 1px solid var(--accent); }

/* -------------------------------- Hero ---------------------------------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(40px, 8vw, 90px) var(--gutter) clamp(30px, 6vw, 70px);
  min-height: calc(100vh - 64px);
}
.hero__inner { text-align: left; }
.hero__names {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3rem, 9vw, 6.2rem);
  line-height: 0.98;
  margin: 0 0 1.6rem;
  letter-spacing: 0.01em;
}
.hero__names .amp { display: block; color: var(--accent); font-style: italic; font-size: 0.62em; margin: .1em 0; }
.hero__join { color: var(--muted); max-width: 34ch; margin: 0 0 1.4rem; }
.hero__meta {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  color: var(--ink);
  margin: 0 0 2.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: center;
}
.hero__meta .dot { color: var(--accent); }
.hero__cta { display: flex; flex-wrap: wrap; gap: .9rem; }

.hero__photo {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }

/* ------------------------------ Countdown ------------------------------- */
.countdown {
  background: var(--bg-soft);
  text-align: center;
  padding: clamp(48px, 8vw, 80px) var(--gutter);
}
.countdown__title {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--muted);
  margin: 0 0 2rem;
  letter-spacing: .02em;
}
.countdown__grid {
  display: flex;
  justify-content: center;
  gap: clamp(1.4rem, 6vw, 4.5rem);
  flex-wrap: wrap;
}
.cd { display: flex; flex-direction: column; gap: .4rem; min-width: 64px; }
.cd__num { font-family: var(--serif); font-size: clamp(2.9rem, 7vw, 4.4rem); line-height: 1; }
.cd__label {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--muted);
}
.countdown.is-today .countdown__grid { display: none; }

/* -------------------------------- Story --------------------------------- */
.story__body {
  max-width: 56ch;
  margin: 0 auto;
  font-size: 1.12rem;
  color: var(--muted);
}

/* ------------------------------- Gallery -------------------------------- */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(10px, 1.6vw, 18px);
}
.gallery__item {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-soft);
  aspect-ratio: 1 / 1;
  cursor: pointer;
  /* reset native <button> chrome that left uneven gaps around the photo */
  padding: 0;
  margin: 0;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  color: inherit;
}
.gallery__item img {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;       /* scale & crop to fill the cell, keeping proportion */
  object-position: center;
  transition: transform .6s cubic-bezier(.2,.7,.2,1), filter .4s ease;
  filter: saturate(.96);
}
.gallery__item:hover img { transform: scale(1.05); filter: saturate(1.05); }
.gallery__item:nth-child(1) { grid-row: span 2; aspect-ratio: 1 / 2; }
.gallery__item:nth-child(6) { grid-column: span 2; aspect-ratio: 2 / 1; }

/* -------------------------------- Details ------------------------------- */
.details__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(24px, 4vw, 56px);
  text-align: left;
  align-items: stretch;
}
.details__info { display: flex; flex-direction: column; gap: 1.8rem; }
.info-block h3 {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent-ink);
  margin: 0 0 .5rem;
}
.info-block p { margin: 0; font-family: var(--serif); font-size: clamp(1.45rem, 2.3vw, 1.8rem); line-height: 1.45; }
.info-block .info-time { color: var(--muted); }
.details__actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: auto; }
.details__map {
  min-height: 340px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-soft);
}
.details__map iframe { width: 100%; height: 100%; min-height: 340px; border: 0; display: block; }

/* -------------------------------- Share --------------------------------- */
.share { background: var(--bg-soft); max-width: none; }
.share > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.share__subtitle { color: var(--muted); max-width: 52ch; margin: -1rem auto 2.6rem; }

.uploader { max-width: 620px; margin: 0 auto; }
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .7rem;
  padding: clamp(32px, 6vw, 56px);
  border: 1.5px dashed var(--accent);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
  text-align: center;
}
.dropzone:hover, .dropzone:focus-visible, .dropzone.dragover {
  background: #fffdfa;
  border-color: var(--accent-ink);
  outline: none;
}
.dropzone__icon { width: 38px; height: 38px; color: var(--accent); }
.dropzone__text { font-size: 1rem; color: var(--ink); }
.dropzone__formats { font-size: 0.78rem; color: var(--muted); letter-spacing: .03em; }

.uploader__preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
  margin: 1.4rem 0 .6rem;
}
.uploader__preview .thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
}
.uploader__preview .thumb img,
.uploader__preview .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.uploader__preview .thumb__play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.05rem;
  background: rgba(20, 18, 16, .18);
  text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
  pointer-events: none;
}
.uploader__count { text-align: center; color: var(--muted); font-size: .85rem; margin: .3rem 0 1.2rem; }

.uploader form, .uploader { text-align: center; }
#uploadBtn { display: block; margin: 0 auto; }
.uploader__msg {
  margin: 1.3rem auto 0;
  max-width: 46ch;
  padding: .9rem 1.2rem;
  border-radius: var(--radius);
  font-size: .92rem;
}
.uploader__msg.is-success { background: #eef3ec; color: #43603f; border: 1px solid #cddcc8; }
.uploader__msg.is-error   { background: #f8ecec; color: #8a4040; border: 1px solid #e6cccc; }
.uploader__msg.is-info    { background: var(--white); color: var(--muted); border: 1px solid var(--line); }

/* ------------------------------- Contact -------------------------------- */
.contact__subtitle { color: var(--muted); max-width: 52ch; margin: -1rem auto 2.8rem; }
.contact__grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(28px, 5vw, 64px);
  text-align: left;
  align-items: start;
  max-width: 960px;
  margin: 0 auto;
}
.contact__phones h3 {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent-ink);
  margin: 0 0 1.1rem;
}
.phone-list { display: flex; flex-direction: column; gap: .8rem; margin-bottom: 1.3rem; }
.phone {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: .95rem;
  text-decoration: none;
  padding: .85rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  transition: border-color .2s ease, transform .2s ease;
}
.phone:hover { border-color: var(--accent); transform: translateY(-1px); }
.phone__icon {
  width: 34px; height: 34px;
  flex: none;
  padding: 6px;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--accent-ink);
  box-sizing: border-box;
}
.phone__text { display: flex; flex-direction: column; gap: .1rem; }
.phone__name { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.phone__num { font-family: var(--serif); font-size: 1.5rem; color: var(--ink); }

.contact__form { display: flex; flex-direction: column; gap: .9rem; }
.contact__form input,
.contact__form textarea {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 300;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  width: 100%;
  resize: vertical;
  transition: border-color .2s ease;
}
.contact__form input:focus,
.contact__form textarea:focus { outline: none; border-color: var(--accent); }
.contact__form ::placeholder { color: #a7a199; }
.contact__form .btn { margin-top: .3rem; align-self: flex-start; }

/* -------------------------------- Footer -------------------------------- */
.site-footer {
  text-align: center;
  padding: clamp(48px, 8vw, 80px) var(--gutter);
  border-top: 1px solid var(--line);
}
.footer__monogram { font-family: var(--serif); font-size: 1.8rem; margin: 0 0 .6rem; letter-spacing: .06em; }
.footer__thanks { color: var(--muted); margin: 0 0 .3rem; }
.footer__date { font-family: var(--serif); color: var(--ink); margin: 0; }
.footer__copy {
  margin: 1.8rem auto 0;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  max-width: 540px;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.footer__copy a { color: var(--accent-ink); text-decoration: none; }
.footer__copy a:hover { text-decoration: underline; }

/* ------------------------------- Lightbox ------------------------------- */
.lightbox {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(20,18,16,.92);
  display: flex; align-items: center; justify-content: center;
  padding: 4vw;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: var(--radius); }
.lightbox__close {
  position: absolute; top: 18px; right: 26px;
  background: none; border: none; color: #fff;
  font-size: 2.6rem; line-height: 1; cursor: pointer; opacity: .8;
}
.lightbox__close:hover { opacity: 1; }

/* ------------------------------ Reveal anim ----------------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ------------------------------ Responsive ------------------------------ */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: auto; text-align: center; padding-top: 30px; }
  .hero__inner { text-align: center; }
  .hero__join, .hero__meta { margin-left: auto; margin-right: auto; }
  .hero__meta, .hero__cta { justify-content: center; }
  .hero__photo { aspect-ratio: 4 / 4; max-width: 460px; margin: 0 auto; order: -1; }
  .details__grid { grid-template-columns: 1fr; }
  .details__map { min-height: 300px; }
  .contact__grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .nav { display: none; }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); }
  .gallery__item:nth-child(1) { grid-row: span 1; aspect-ratio: 1; }
  .gallery__item:nth-child(6) { grid-column: span 2; aspect-ratio: 2 / 1; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
