/* ══════════════════════════════════════════════════════════════════
   cust 007 — „Tereza & Adam" · ALL media queries live here.
   Container paddings use LONGHANDS only (never the shorthand).
   ══════════════════════════════════════════════════════════════════ */

/* ── ≥1920px — large screens ────────────────────────────────────── */
@media (min-width: 1920px) {
  .wrap { max-width: 1320px; }
  body { font-size: 17.5px; }
}

/* ── ≤1279px ────────────────────────────────────────────────────── */
@media (max-width: 1279px) {
  .wrap { padding-left: 32px; padding-right: 32px; }
  .nav__links { gap: 20px; }
  .nav__links a { font-size: 0.88rem; }
  .hero__stamp { width: 122px; height: 122px; right: 20px; }
}

/* ── ≤1100px — nav collapses to burger ──────────────────────────── */
@media (max-width: 1100px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: flex; }
}

/* ── ≤1023px — tablets ──────────────────────────────────────────── */
@media (max-width: 1023px) {
  /* Nebeská trasa je zatím jen pro desktop — mobilní verze přijde později */
  .sky { display: none; }

  .hero { grid-template-columns: 1fr; }
  .hero__media { position: relative; height: clamp(340px, 52vw, 520px); }
  .hero__card { padding-top: calc(var(--nav-h) + 34px); padding-bottom: 52px; }
  .hero__media img { object-position: 50% 40%; } /* keep the kneeling moment in frame */
  .hero__stamp { top: calc(var(--nav-h) + 12px); right: 16px; width: 104px; height: 104px; }

  .pass__grid { grid-template-columns: repeat(2, 1fr); gap: 28px 24px; }
  .pass__item:nth-child(3) { border-left: 0; }
  .pass__mrz { font-size: 0.82rem; }

  .where__grid { grid-template-columns: 1fr; }
  .goodto__grid { grid-template-columns: repeat(2, 1fr); }

  /* Fixed backgrounds are unreliable on tablets — drop the pin below desktop */
  .band { background-attachment: scroll; min-height: 56vh; }

  .gallery__grid { grid-auto-rows: 215px; gap: 16px; }

  .bpass { grid-template-columns: 1fr 260px; --nx: calc(100% - 260px); }
  .bpass__main { padding: 36px 36px 32px; }
  .bpass__stub { padding: 34px 26px 28px; }

  .footer .footer__inner { grid-template-columns: 1fr 1fr; gap: 40px; padding-top: 64px; }

  .story__ghost { width: 420px; height: 420px; }

  .band__postmark { top: 24px; right: 16px; width: 96px; height: 96px; }
}

/* ── ≤767px — phones ────────────────────────────────────────────── */
@media (max-width: 767px) {
  :root { --nav-h: 64px; }
  .wrap { padding-left: 22px; padding-right: 22px; }

  .hero__media { height: clamp(300px, 78vw, 460px); }
  .hero__media img { object-position: 50% 42%; }
  .hero__card { padding-left: 26px; padding-right: 26px; }
  .hero__names { font-size: clamp(3rem, 13vw, 3.9rem); }
  .hero__subline { font-size: 0.94rem; }
  .hero__lead { font-size: 1.06rem; }
  .hero__stamp { display: none; } /* na úzkých displejích koliduje s kartou hero */
  .hero__chip { left: 12px; bottom: 12px; padding: 8px 14px; font-size: 0.64rem; letter-spacing: 0.1em; }
  .countdown { gap: 7px; width: 100%; }
  .countdown__cell { min-width: 0; flex: 1; padding: 10px 6px 7px; }
  .countdown__num { font-size: 1.5rem; }
  .countdown__lab { font-size: 0.56rem; letter-spacing: 0.12em; }
  .hero__ctas { flex-direction: column; width: 100%; }
  .hero__ctas .btn { width: 100%; }

  .story { padding: 72px 0; }
  .story__item::before { left: 6px; }
  .story__item:first-child::before { top: 31px; }
  .story__item:last-child::before { height: 32px; }
  .story__item:nth-child(odd),
  .story__item:nth-child(even) { padding-left: 34px; padding-right: 0; text-align: left; }
  .story__item { padding-top: 18px; padding-bottom: 18px; }
  .story__node { left: 6px; top: 26px; }
  .story__ghost { width: 300px; height: 300px; top: 34%; }

  .pass { padding: 60px 0 52px; }
  .pass__grid { grid-template-columns: 1fr 1fr; gap: 26px 14px; }
  .pass__val { font-size: 1.5rem; }
  .pass__label { font-size: 0.64rem; }
  .pass__mrz { font-size: 0.66rem; margin-top: 32px; letter-spacing: 0.08em; }

  .where { padding: 72px 0; }
  .where__card { padding: 28px 24px 24px; }
  .where__map { min-height: 220px; }
  .where__map iframe { min-height: 220px; }

  .schedule { padding: 72px 0; }
  .schedule__row { gap: 10px; padding-top: 14px; padding-bottom: 14px; }
  .schedule__row time { min-width: 52px; font-size: 1rem; }
  .schedule__event { font-size: 0.94rem; }
  .schedule__row--key::before { left: -14px; }

  .goodto { padding: 72px 0; }
  .goodto__grid { grid-template-columns: 1fr; gap: 16px; }
  .goodto__card { padding: 24px 24px 22px; }

  .gift { padding-bottom: 72px; }
  .gift__card--solo { padding: 34px 26px 28px; }
  .gift__text { font-size: 1.18rem; }

  .band { min-height: 60vh; }
  .band__inner { padding-top: 88px; padding-bottom: 88px; }
  .band__sub { letter-spacing: 0.2em; font-size: 0.7rem; }
  .band__wave { height: 30px; }
  .band__postmark { display: none; } /* stejně jako .hero__stamp — na úzkém displeji koliduje s textem */

  .gallery { padding: 72px 0; }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 168px; gap: 12px; }
  .gallery__cap { padding-top: 6px; height: 24px; font-size: 0.62rem; }
  .gallery__ctas { gap: 24px; margin-top: 36px; }
  .gallery__cta-block .btn { width: 100%; }
  .gallery__cta-block { width: 100%; max-width: 420px; }

  .thanks__inner { padding-top: 64px; padding-bottom: 64px; }

  .palubni { padding: 72px 0; }
  /* Útržek se překlápí pod hlavní část → dělicí linka je vodorovná a
     projmutí sedí na bocích karty. Její y je dané výškou obsahu, takže
     --ny doměřuje app.js (initPassNotch). */
  .bpass {
    grid-template-columns: 1fr;
    -webkit-mask-image:
      radial-gradient(circle var(--notch) at 0 var(--ny, 50%), transparent 99%, #000 100%),
      radial-gradient(circle var(--notch) at 100% var(--ny, 50%), transparent 99%, #000 100%);
    mask-image:
      radial-gradient(circle var(--notch) at 0 var(--ny, 50%), transparent 99%, #000 100%),
      radial-gradient(circle var(--notch) at 100% var(--ny, 50%), transparent 99%, #000 100%);
  }
  .bpass__main { padding: 30px 24px 26px; }
  .bpass__route { letter-spacing: 0.18em; }
  .bpass__stub {
    border-left: 0; border-top: 2px dashed rgba(176, 141, 79, 0.55);
    padding: 30px 24px 26px;
  }
  @supports not ((mask-composite: intersect) or (-webkit-mask-composite: source-in)) {
    .bpass__stub::before { top: -13px; left: -13px; }
    .bpass__stub::after { top: -13px; bottom: auto; left: auto; right: -13px; }
  }

  .sec-head { margin-bottom: 36px; }

  .footer .footer__inner { grid-template-columns: 1fr; gap: 36px; padding-top: 52px; padding-bottom: 36px; }
  .footer .footer__bottom {
    flex-direction: column; align-items: center; gap: 10px;
    text-align: center; padding-top: 22px; padding-bottom: 26px;
  }
  .footer__gdpr { margin-right: 0; }

  /* Floating controls at 375: demo chip bottom-left, FAB bottom-right,
     scroll-top stacked ABOVE the FAB with a gap. */
  .fab { display: inline-flex; }
  .scroll-top { bottom: 78px; right: 16px; width: 44px; height: 44px; }
  .demo-chip { left: 12px; bottom: 12px; }
  .demo-chip__label { padding-left: 4px; }

  section[id] { scroll-margin-top: calc(var(--nav-h) + 10px); }
}

/* ── ≤400px — small phones ──────────────────────────────────────── */
@media (max-width: 400px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .hero__card { padding-left: 18px; padding-right: 18px; }
  .hero__names { font-size: clamp(2.7rem, 14vw, 3.2rem); }
  .fab { padding: 13px 18px; font-size: 0.88rem; }
  .demo-chip__pill { padding: 5px 11px; font-size: 0.74rem; }
  .nav__logo-names { font-size: 0.98rem; }
  .pass__mrz { font-size: 0.56rem; }
}

/* ── iOS: background-attachment fixed is ignored → scroll.
   @supports (-webkit-touch-callout: none) ALSO matches macOS Safari,
   so gate on a coarse pointer — a mouse is always pointer: fine. ──── */
@supports (-webkit-touch-callout: none) {
  @media (pointer: coarse) {
    .band { background-attachment: scroll; }
  }
}

/* ── Touch devices — no hover lift ──────────────────────────────── */
@media (hover: none) {
  .goodto__card:hover { transform: none; box-shadow: var(--shadow-card); }
  .gallery__btn:hover img { transform: none; }
}

/* ── Reduced motion ─────────────────────────────────────────────────
   Kills decorative motion only. Deliberate-navigation motion (anchor
   tween) lives in a JS-driven rAF loop, which this blanket reset cannot
   reach — that is intentional: clicking a link must still glide.
   The journey plane is decorative and is disabled in app.js via
   matchMedia. NO background-attachment rule here — a pinned photo is
   not motion. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  /* .sky se NESCHOVÁVÁ — trasa se vykreslí celá a letadélko zaparkuje
     u srdce nad hero (app.js → initSkyPlane). Schovaná dekorace vypadá
     jako rozbitá stránka; zastavená vypadá jako záměr. */
}
