/* ═══════════════════════════════════════════════════
   Řekni jo — www.reknijo.cz
   Vanilla CSS3, žádný preprocessor, žádný framework
   ═══════════════════════════════════════════════════ */

/* ---------- Tokeny ---------- */
:root {
  --ink:        #4A3A34;   /* čokoládová — text */
  --ink-soft:   #7A655B;   /* zesvětlená čokoláda — meta text */
  --paper:      #F9F7F2;   /* krémová — pozadí */
  --paper-alt:  #F2EDE3;   /* o odstín teplejší — střídání sekcí */
  --rose:       #D4A5A5;   /* růžová — akcent, linka příběhu */
  --terra:      #C67C6C;   /* terakotová — tlačítka, zvýraznění */
  --terra-deep: #A75F50;   /* tmavší terakota — hover */
  --line:       rgba(74, 58, 52, 0.14);

  --font-display: "Playfair Display", Georgia, serif;
  --font-body:    "Inter", -apple-system, "Segoe UI", sans-serif;
  --font-quote:   "Crimson Text", Georgia, serif;

  --measure: 38rem;         /* šířka textového sloupce */
  --pad-x: clamp(1.25rem, 5vw, 4rem);
}

.theme-dark {
  --ink:        #F1E9E2;
  --ink-soft:   #C4B2A8;
  --paper:      #241D1A;
  --paper-alt:  #2C2420;
  --rose:       #C89191;
  --terra:      #C67C6C;
  --terra-deep: #D99181;
  --line:       rgba(241, 233, 226, 0.16);
}

/* ---------- Reset a základ ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--paper);
  transition: background-color 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
}

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

a { color: var(--terra); }
a:hover { color: var(--terra-deep); }

:focus-visible {
  outline: 2px solid var(--terra);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Reveal animace (vanilla JS + IntersectionObserver) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Přepínač tmavého režimu ---------- */
.theme-toggle {
  position: fixed;
  top: 1.1rem;
  right: 1.1rem;
  z-index: 50;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  cursor: pointer;
  transition: background-color 0.4s ease, transform 0.2s ease;
}
.theme-toggle:hover { transform: scale(1.08); }
.theme-toggle__icon {
  display: block;
  width: 1rem;
  height: 1rem;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--terra);
  box-shadow: inset -3px -2px 0 0 var(--paper);
  transition: box-shadow 0.4s ease;
}
.theme-dark .theme-toggle__icon { box-shadow: inset 0 0 0 0 var(--paper); }

/* ---------- 1. Hero ---------- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 4rem var(--pad-x);
  background:
    radial-gradient(ellipse 60% 50% at 85% 20%, rgba(212, 165, 165, 0.28), transparent 70%),
    radial-gradient(ellipse 50% 40% at 10% 90%, rgba(198, 124, 108, 0.16), transparent 70%),
    var(--paper);
}

.hero__eyebrow {
  font-family: var(--font-quote);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.5rem, 7.5vw, 5.5rem);
  line-height: 1.12;
  max-width: 16ch;
  letter-spacing: -0.01em;
}
.hero__title em {
  font-style: italic;
  font-weight: 400;
  color: var(--terra);
}

.hero__dedication {
  margin-top: 2rem;
  font-size: 1rem;
  color: var(--ink-soft);
}

.hero__scroll {
  margin-top: 4rem;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
}
.hero__scroll-line {
  width: 1px;
  height: 3.5rem;
  background: var(--rose);
  animation: scroll-hint 2.2s ease-in-out infinite;
  transform-origin: top;
}
@keyframes scroll-hint {
  0%, 100% { transform: scaleY(0.4); opacity: 0.5; }
  50%       { transform: scaleY(1);   opacity: 1; }
}

/* ---------- Kapitoly ---------- */
.chapter {
  padding: clamp(4rem, 10vw, 8rem) var(--pad-x);
}
.chapter--alt { background: var(--paper-alt); }

.chapter__head { margin-bottom: 3rem; }

.chapter__number {
  font-family: var(--font-quote);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--terra);
  margin-bottom: 0.5rem;
}

.chapter__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 4.5vw, 3.2rem);
  line-height: 1.15;
}

.chapter__intro {
  max-width: var(--measure);
  font-size: 1.15rem;
  margin-bottom: 4rem;
}

/* ---------- Timeline s linkou příběhu (signature prvek) ---------- */
.timeline {
  list-style: none;
  position: relative;
  max-width: 46rem;
  padding-left: 2.25rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 0.4rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 1px;
  background: linear-gradient(to bottom, var(--rose), var(--terra));
}

.timeline__item {
  position: relative;
  padding-bottom: 3.5rem;
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: "";
  position: absolute;
  left: -2.25rem;
  top: 0.55rem;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--terra);
  transform: translateX(0.05rem);
}
.chapter--alt .timeline__item::before { background: var(--paper-alt); }

.timeline__date {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.4rem;
}

.timeline__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.45rem;
  margin-bottom: 0.6rem;
}

.timeline__item p:not(.timeline__date) { max-width: var(--measure); }

.timeline__item--photo::before { display: none; }

/* ---------- Fotografie (parallax) ---------- */
.photo {
  max-width: 30rem;
  will-change: transform;
}

.photo__frame {
  aspect-ratio: 4 / 3;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 18px 40px -18px rgba(74, 58, 52, 0.35);
}

/* Zástupné gradienty — nahradí se skutečnými fotkami klienta */
.photo__frame--a { background: linear-gradient(135deg, #D4A5A5 0%, #C67C6C 100%); }
.photo__frame--b { background: linear-gradient(135deg, #4A3A34 0%, #8A6A5C 100%); }
.photo__frame--c { background: linear-gradient(135deg, #C67C6C 0%, #E3C1B4 100%); }
.photo__frame--d { background: linear-gradient(135deg, #A75F50 0%, #D4A5A5 100%); }

.photo__placeholder {
  font-family: var(--font-quote);
  font-style: italic;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
  padding: 1rem;
}

.photo figcaption {
  margin-top: 0.7rem;
  font-family: var(--font-quote);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* Fotky v timeline uhýbají doprava — asymetrie dle briefu */
.timeline__item--photo .photo { margin-left: auto; }

/* ---------- Kapitola 2: sny a citáty ---------- */
.dreams {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem 4rem;
  align-items: start;
  max-width: 64rem;
}

.dreams__quotes { display: flex; flex-direction: column; gap: 2.5rem; }

.dreams__photo--second { margin-top: 2rem; }

.quote {
  border-left: 2px solid var(--rose);
  padding-left: 1.4rem;
}
.quote p {
  font-family: var(--font-quote);
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.5;
}
.quote cite {
  display: block;
  margin-top: 0.6rem;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* ---------- Kapitola 3: co se změní ---------- */
.change {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 64rem;
  margin-bottom: 4rem;
}

.change__heading {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
  color: var(--terra);
}

.vow {
  max-width: var(--measure);
  border-top: 1px solid var(--line);
  padding-top: 3rem;
}
.vow__lead {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.vow__text {
  font-family: var(--font-quote);
  font-size: 1.25rem;
  line-height: 1.65;
}

/* ---------- 5. Otázka ---------- */
.question {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6rem var(--pad-x);
  background:
    radial-gradient(ellipse 70% 55% at 50% 45%, rgba(212, 165, 165, 0.22), transparent 75%),
    var(--paper);
}

.question__number { margin-bottom: 1.5rem; }

/* Čistá CSS animace textu — bez JS, dle briefu */
.question__text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.8rem, 9vw, 6.5rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  opacity: 0;
  animation: question-in 1.6s ease 0.3s forwards;
}
@keyframes question-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.question__buttons {
  margin-top: 3.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* ---------- Tlačítka ---------- */
.btn {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  padding: 0.9rem 2rem;
  border-radius: 999px;
  border: 1.5px solid var(--terra);
  background: transparent;
  color: var(--terra);
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.15s ease;
}
.btn:hover { background: rgba(198, 124, 108, 0.12); transform: translateY(-2px); }

.btn--primary {
  background: var(--terra);
  color: #FFF;
}
.btn--primary:hover { background: var(--terra-deep); color: #FFF; }

/* ---------- Uhýbající tlačítko Ne ---------- */
.btn--ne {
  border-color: var(--ink-soft);
  color: var(--ink-soft);
  position: relative;
  transition: transform 0.16s ease-out, border-color 0.25s ease;
  touch-action: none;          /* mobil: žádný tap, žádný scroll přes tlačítko */
  user-select: none;
  -webkit-user-select: none;
}
.btn--ne:hover { background: transparent; }

/* ---------- 6. Potvrzení + formulář ---------- */
.confirm {
  padding: clamp(4rem, 8vw, 6rem) var(--pad-x);
  max-width: 34rem;
  margin: 0 auto;
  text-align: center;
}

.confirm__title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.confirm__note { color: var(--ink-soft); margin-bottom: 2.2rem; }
.confirm__note strong { color: var(--terra); }

.form { display: flex; flex-direction: column; gap: 0.9rem; text-align: left; }

.form__label { font-weight: 600; font-size: 0.95rem; }

.form__input {
  font-family: var(--font-body);
  font-size: 1.05rem;
  padding: 0.85rem 1.1rem;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.25s ease;
}
.form__input:focus { border-color: var(--terra); outline: none; }

/* Honeypot — schovaný lidem, viditelný botům */
.form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__submit { margin-top: 0.6rem; }

.form__status { min-height: 1.4rem; font-size: 0.95rem; color: var(--terra-deep); }

/* ---------- 7. Oslava ---------- */
.celebrate {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem var(--pad-x);
  background: var(--paper-alt);
}

.celebrate__inner { animation: celebrate-in 0.9s ease forwards; }
@keyframes celebrate-in {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}

.celebrate__mark {
  font-size: 2.4rem;
  color: var(--terra);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1);    opacity: 0.85; }
  50%       { transform: scale(1.15); opacity: 1; }
}

.celebrate__title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  margin: 0.8rem 0 1rem;
}

.celebrate__text {
  font-family: var(--font-quote);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink-soft);
}

/* ---------- Patička ---------- */
.footer {
  padding: 2.5rem var(--pad-x);
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-align: center;
}

/* ---------- Responzivita ---------- */
@media (max-width: 720px) {
  .dreams,
  .change { grid-template-columns: 1fr; }

  .dreams__photo--second { margin-top: 0; }

  .timeline { padding-left: 1.8rem; }
  .timeline__item::before { left: -1.8rem; }

  .timeline__item--photo .photo { margin-left: 0; }
}

/* ---------- Omezený pohyb ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero__scroll-line,
  .celebrate__mark { animation: none; }

  .question__text { animation-duration: 0.01s; animation-delay: 0s; }

  [data-parallax] { transform: none !important; }
}

/* ---------- Referenční lišta (zveřejněné příběhy) ---------- */
.refbar {
  background: var(--terra);
  color: #FFF;
  font-size: 0.88rem;
  line-height: 1.5;
  text-align: center;
  padding: 0.55rem var(--pad-x);
}
.refbar a { color: #FFF; text-decoration: underline; white-space: nowrap; }
.refbar strong { font-weight: 600; }

/* ---------- Svatební sekce (reference) ---------- */
.wedding {
  padding: clamp(4rem, 8vw, 6rem) var(--pad-x);
  text-align: center;
  border-top: 1px solid var(--line);
}
.wedding__number {
  font-family: var(--font-quote);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--terra);
  margin-bottom: 0.5rem;
}
.wedding__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
}
.wedding__meta {
  margin-top: 0.6rem;
  color: var(--ink-soft);
  font-family: var(--font-quote);
  font-style: italic;
  font-size: 1.1rem;
}
.wedding .btn { margin-top: 1.8rem; }

/* ---------- Lightbox / carousel ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(30, 22, 19, 0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }

.lightbox__stage {
  position: relative;
  width: min(52rem, 92vw);
}
.lightbox__slide {
  aspect-ratio: 3 / 2;
  border-radius: 6px;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6);
}
.lightbox__slide.is-active { display: flex; }
.lightbox__slide img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.lightbox__slide-label {
  font-family: var(--font-quote);
  font-style: italic;
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.9);
}

.lightbox__caption {
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-quote);
  font-style: italic;
  font-size: 1.05rem;
  text-align: center;
}
.lightbox__count { color: rgba(255,255,255,0.55); font-family: var(--font-body); font-size: 0.85rem; margin-left: 0.6rem; }

.lightbox__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  background: rgba(0, 0, 0, 0.25);
  color: #FFF;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.lightbox__btn:hover { background: rgba(0, 0, 0, 0.5); }
.lightbox__btn--prev { left: -1.2rem; }
.lightbox__btn--next { right: -1.2rem; }

.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  border: none;
  background: none;
  color: #FFF;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
}
.lightbox__close:hover { opacity: 1; }

/* Zástupné svatební gradienty */
.wg--1 { background: linear-gradient(150deg, #D4A5A5, #A75F50); }
.wg--2 { background: linear-gradient(150deg, #E3C1B4, #C67C6C); }
.wg--3 { background: linear-gradient(150deg, #8A6A5C, #D4A5A5); }
.wg--4 { background: linear-gradient(150deg, #C67C6C, #4A3A34); }
.wg--5 { background: linear-gradient(150deg, #DCA99C, #96635A); }
.wg--6 { background: linear-gradient(150deg, #B57F72, #E6C6BB); }

@media (max-width: 640px) {
  .lightbox__btn--prev { left: 0.4rem; }
  .lightbox__btn--next { right: 0.4rem; }
}

/* ---------- UX: dotyk, fokus ---------- */
.btn:focus-visible {
  outline: 2px solid var(--terra);
  outline-offset: 2px;
}
.btn[disabled] { opacity: 0.65; cursor: wait; }
@media (max-width: 640px) {
  .form input {
    font-size: 16px;          /* iOS: brání auto-zoomu */
    padding: 0.9rem 0.85rem;
  }
  .question__buttons .btn {
    min-height: 48px;         /* pohodlná dotyková plocha */
  }
}
