/* Mobilní ovládání a čitelnost. Animované sekce zůstávají ve style.css;
   statická alternativa respektuje systémovou volbu omezeného pohybu. */
@media (max-width: 768px), (max-width: 1024px) and (pointer: coarse), (prefers-reduced-motion: reduce) {
  :root {
    --pad-side-desktop: 24px;
    --section-gap: 64px;
  }

  html { scroll-padding-top: 96px; }
  body { font-size: 16px; line-height: 24px; }
  button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
  button, .btn { touch-action: manipulation; }
  .btn { min-height: 48px; max-width: 100%; font-size: 16px; }

  .site-header { padding: max(16px, env(safe-area-inset-top)) var(--pad-side-desktop) 16px; }
  .hamburger-btn, .menu-close { width: 48px; height: 48px; }
  .logo-img { height: 32px; }

  .hero-section {
    min-height: 100svh;
    padding: 128px var(--pad-side-desktop) max(32px, env(safe-area-inset-bottom));
  }
  .hero-left { gap: 32px; }
  .hero-title { max-width: 17ch; font-size: clamp(32px, 8.8vw, 48px); line-height: 1.12; }
  .hero-actions { gap: 16px; }
  .hero-bg-video { filter: none; }
  .hero-bg-video + .hero-overlay-gradient {
    background: linear-gradient(0deg, rgba(5, 7, 13, .9), rgba(5, 7, 13, .3) 80%);
  }

  .menu-content {
    min-height: 0;
    height: 100%;
    height: 100dvh;
    padding: max(16px, env(safe-area-inset-top)) var(--pad-side-desktop) max(24px, env(safe-area-inset-bottom));
    gap: 24px;
    overscroll-behavior: contain;
  }
  .menu-topbar { min-height: 48px; }
  .overlay-nav .nav-list { gap: 8px; }
  .nav-link { min-height: 48px; align-items: center; font-size: 32px; line-height: 40px; }
  .menu-footer { flex-wrap: wrap; gap: 16px; }
  .menu-social { width: 48px; height: 48px; }

  .logos-section { padding: 48px 0 24px; }
  .logo-item img { filter: grayscale(1); }

  /* Vzhled recenzí zůstává upravený pro mobil; jejich příjezd řídí scéna. */
  .reviews-heading-row { width: 100%; padding: 0 var(--pad-side-desktop) 16px; text-align: left; }
  .reviews-title { font-size: 40px; line-height: 48px; }
  .review-slide { width: calc(100% - 64px); max-width: 400px; }
  .review-slide.is-flip { flex-direction: column; }
  .review-bubble, .is-flip .review-bubble { margin: 0 0 32px; padding: 24px; gap: 16px; }
  .is-flip .review-tail { top: calc(100% - 2px); bottom: auto; transform: none; }
  .review-text { font-size: 16px; line-height: 24px; }
  .review-more { min-height: 48px; font-size: 16px; }
  .review-person { padding-left: 24px; }
  .reviews-nav { margin-top: 16px; }
  .reviews-arrow { width: 48px; height: 48px; }
  .footer-soul-layer { display: none; }

  .team-section { padding: 48px var(--pad-side-desktop) 64px; }
  .team-person { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .team-person-text, .team-photo,
  .team-person--dan .team-person-text, .team-person--dan .team-photo,
  .team-person--david .team-person-text, .team-person--david .team-photo {
    grid-column: 1; grid-row: auto; padding-left: 0;
  }
  .team-person--david { margin-top: 64px; }
  .team-name-first { font-size: clamp(64px, 20vw, 120px); }
  .team-photo { width: 80%; max-width: 320px; }
  .team-card-rise { opacity: 1 !important; transform: none !important; }
  .team-card-rise .team-photo-wrap img { transform: none !important; }

  .inquiry-section { padding: 0 8px; }
  .inquiry-container { grid-template-columns: minmax(0, 1fr); padding: 40px 16px 24px; gap: 32px; }
  .inquiry-title { padding: 0; font-size: 32px; line-height: 40px; }
  .inquiry-row { grid-template-columns: minmax(0, 1fr); }
  .inquiry-left { position: static; }
  .inquiry-field { min-width: 0; scroll-margin-top: 96px; }
  .inquiry-field-area label { white-space: normal; font-size: 16px; line-height: 24px; }
  .inquiry-field textarea { min-height: 192px; padding-top: 64px; }
  .inquiry-field-area textarea:focus + label,
  .inquiry-field-area textarea:not(:placeholder-shown) + label { transform: translateY(-16px) scale(.75); }
  .inquiry-consent { min-height: 48px; font-size: 16px; line-height: 24px; }
  .inquiry-actions { align-items: stretch; flex-direction: column; }
  .inquiry-submit { width: 100%; justify-content: center; }
  .inquiry-reveal-ready :is(.inquiry-left, .inquiry-card) { opacity: 1; transform: none; }

  .faq-section { padding: 64px var(--pad-side-desktop); }
  .faq-container { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .faq-intro { position: static; }
  .faq-title { font-size: 32px; line-height: 40px; }
  .faq-question { min-height: 64px; gap: 16px; padding: 16px; font-size: 16px; line-height: 24px; }
  .faq-icon { flex: 0 0 32px; width: 32px; height: 32px; }
  .faq-answer-inner { padding: 0 16px; }
  .faq-item.is-open .faq-answer-inner { padding-bottom: 24px; }
  .faq-answer-inner p { padding: 0; font-size: 16px; line-height: 24px; }
  .faq-reveal-ready .faq-item { opacity: 1; transform: none; }

  .footer-section { padding: 48px var(--pad-side-desktop) 0; }
  .footer-top-grid { flex-direction: column; gap: 32px; }
  .footer-title { font-size: 32px; line-height: 40px; }
  .footer-desc { font-size: 16px; line-height: 24px; }
  .footer-contacts { gap: 8px; }
  .footer-contact-item { min-height: 48px; font-size: 16px; overflow-wrap: anywhere; }
  .footer-social-btn { width: 48px; height: 48px; }
  .footer-right { width: 100%; border-left: 0; padding-left: 0; }
  .footer-nav-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
  .footer-nav-link { display: flex; align-items: center; min-height: 48px; padding: 0; }
  .footer-operator { overflow-wrap: anywhere; }
  .footer-legal { gap: 8px 16px; }
  .footer-legal a, .footer-legal button { display: inline-flex; align-items: center; min-height: 48px; }
  .footer-bottom-info { margin-top: 32px; }

  .all-projects-inner { padding-top: max(16px, env(safe-area-inset-top)); }
  .all-projects { transition: opacity 200ms ease, visibility 0s linear 200ms; }
  .all-projects.is-open { transition: opacity 240ms ease, visibility 0s; }
  .all-projects-bar {
    position: sticky;
    top: 0;
    z-index: 4;
    gap: 16px;
    padding: 8px 0;
    background: var(--color-blue-electric);
    box-shadow: 0 -24px var(--color-blue-electric);
  }
  .all-projects-title { font-size: 32px; line-height: 40px; }
  .all-projects-close, .story-bar-close { min-height: 48px; padding: 8px 16px; font-size: 16px; }
  .project-tile { width: 100%; }
  .story-bar { padding-top: max(16px, env(safe-area-inset-top)); }
  .story-float-close { top: max(16px, env(safe-area-inset-top)); }
  .story-title { overflow-wrap: anywhere; }
  .story-facts > div, .story-facts dd { min-width: 0; }
  .story-fact-link { display: inline; overflow-wrap: anywhere; }
  .story-fact-link .project-tile-out { vertical-align: middle; }
  .story-site-bar { flex-wrap: wrap; }
  .story-site-cta { min-height: 48px; }
  .story-scroll, .all-projects { overscroll-behavior: contain; }
  .story.is-revealed .story-in { transition: opacity 240ms ease, transform 280ms var(--ease-standard); }
  .consent { max-height: calc(100dvh - 32px); overflow-y: auto; bottom: max(16px, env(safe-area-inset-bottom)); }
  .consent-actions { flex-direction: column; align-items: stretch; }
  .consent-actions .btn { white-space: normal; }

  .legal-header { gap: 16px; padding: 24px var(--pad-side-desktop); }
  .legal-logo, .legal-back { display: inline-flex; align-items: center; min-height: 48px; }
  .legal { padding: 32px var(--pad-side-desktop) 64px; overflow-wrap: anywhere; }
  .legal h1 { font-size: clamp(32px, 8vw, 48px); line-height: 1.16; }
  .legal-lead { font-size: 16px; line-height: 24px; }
  .legal-box { padding: 16px; }
  .legal-table-wrap { max-width: 100%; overscroll-behavior-x: contain; }
  .legal th, .legal td { padding: 16px 8px; }
  .legal-footer { padding-bottom: max(32px, env(safe-area-inset-bottom)); }
  .error-links a { display: inline-flex; align-items: center; min-height: 48px; }
}

/* Kompaktní tlačítka v úvodu: vedle sebe podle místa, bez natahování do šířky. */
@media (max-width: 768px), (max-width: 1024px) and (pointer: coarse) {
  .hero-actions {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
  }

  .hero-actions .btn {
    flex: 0 0 auto;
    width: auto;
    min-height: 48px;
    padding: 8px 24px;
  }

  .hero-actions .btn-secondary {
    padding-inline: 16px;
    --swap-in: 8px;
    --swap-shift: 12px;
  }
}

@media (max-width: 359px) {
  :root { --pad-side-desktop: 16px; }
  .all-projects-logo { max-width: 72px; height: auto; }
  .all-projects-bar { gap: 8px; }
  .all-projects-close { font-size: 16px; padding: 8px; gap: 8px; }
}

@media (max-height: 560px) and (max-width: 1024px) {
  .hero-section { min-height: 100svh; padding-top: 128px; }
  .menu-content { grid-template-rows: auto auto auto; gap: 24px; }
  .menu-main { align-self: start; }
  .nav-link { font-size: 24px; line-height: 32px; }
}

/* Původní odsazení a velikosti ovládání uvnitř obnovených scén. */
@media (max-width: 768px) {
  .wave-section, .projects-section { --pad-side-desktop: 20px; --section-gap: 96px; }
  .projects-track .btn { font-size: 15px; }
}
@media (max-width: 420px) {
  .wave-section, .projects-section { --pad-side-desktop: 16px; }
}

/* Pás projektů se na telefonu posouvá běžným svislým scrollováním. */
@media (max-width: 768px), (max-width: 1024px) and (pointer: coarse) {
  .projects-track .project-card-shell {
    display: flex;
    flex-direction: column;
    min-height: var(--project-card-height, 0px);
  }
  .projects-track .project-card-shell .project-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
  }
  .projects-track .project-card-foot { margin-top: auto; padding-top: 24px; }
  .projects-track .project-card-media { flex: none; }
  .projects-track .project-card-foot .btn { flex: none; }
  .projects-quote-slide { padding: 24px; }
  .projects-quote-inner { min-width: 0; align-items: center; text-align: center; }
  .projects-quote-text {
    font-size: clamp(24px, 6.8vw, 32px);
    line-height: 1.25;
    text-wrap: pretty;
  }
  .projects-quote-text .projects-quote-line,
  .projects-quote-phrase { display: block; }
  .projects-quote-line + .projects-quote-line { margin-top: 16px; }
}
.projects-track.is-offstage { visibility: hidden; }

/* Přístupná statická alternativa jen podle systémové volby omezeného pohybu. */
@media (prefers-reduced-motion: reduce) {
  /* The same about text and photos, with time to read at the visitor's pace. */
  .wave-section { height: auto !important; margin: 0; }
  .wave-stage {
    position: relative;
    top: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    height: auto;
    min-height: 0;
    max-width: 768px;
    margin: 0 auto;
    padding: 48px var(--pad-side-desktop) 64px;
    overflow: visible;
  }
  .wave-stage > .visually-hidden {
    position: static;
    grid-column: 1 / -1;
    grid-row: 1;
    width: auto;
    height: auto;
    margin: 0 0 16px;
    overflow: visible;
    clip: auto;
    white-space: normal;
    color: var(--color-bg-dark);
    font: 400 clamp(32px, 8vw, 48px)/1.16 var(--font-heading);
    letter-spacing: -.035em;
    text-wrap: balance;
  }
  .wave-photo {
    position: relative;
    inset: auto !important;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    opacity: 1 !important;
    transform: none !important;
    visibility: visible;
    will-change: auto;
    overflow: hidden;
    border-radius: 16px;
  }
  .wave-photo-lift, .wave-photo-pic { width: 100%; height: 100%; transform: none !important; }
  .wave-photo img { width: 100%; height: 100%; object-fit: cover; }
  .wave-svg, .wave-drop-layer, .wave-tag, .wave-cue, .projects-dots,
  .services-wheel, .services-soul-layer { display: none; }

  /* Projects, services and reviews follow one another vertically. */
  .projects-section { height: auto !important; min-height: 0; margin: 0; }
  .projects-pin {
    position: relative;
    top: auto;
    height: auto;
    display: flex;
    flex-direction: column;
    overflow: visible;
    touch-action: auto;
  }
  .projects-pin > .projects-track {
    visibility: visible;
    order: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    width: 100%;
    min-width: 0;
    height: auto;
    padding: 48px var(--pad-side-desktop);
    border-radius: 24px;
    clip-path: none;
    transform: none !important;
    will-change: auto;
    background: var(--color-blue-electric);
    color: white;
  }
  .projects-intro-panel, .projects-quote-slide { width: 100%; height: auto; padding: 0; }
  .projects-intro-text { padding: 0 0 8px; gap: 24px; }
  .projects-heading { color: white; font-size: clamp(32px, 8vw, 48px); line-height: 1.16; }
  .projects-heading .reveal-line { display: inline; }
  .projects-track > .project-card {
    width: 100%;
    height: auto;
    padding: 0;
    transform: none !important;
    opacity: 1 !important;
    will-change: auto;
  }
  .projects-track .project-card-shell { width: 100%; padding: 0; }
  .projects-track .project-card-shell .project-card-body { padding: 24px 0 0; }
  .project-card-title { font-size: 24px; line-height: 32px; overflow-wrap: anywhere; }
  .project-card-result { font-size: 16px; line-height: 24px; }
  .projects-track .project-card-shell .project-card-result { min-height: 0; margin-top: 8px; }
  .project-card-foot { margin-top: 24px; }
  .project-card-foot .btn { width: 100%; justify-content: center; }
  .project-card-img { will-change: auto; }
  .project-card-shell:hover .project-card-img img { transform: none; }
  .projects-quote-slide { padding: 24px 0 8px; }
  .projects-quote-inner { margin: 0 auto; }
  .projects-quote-text { color: white; font-size: 32px; line-height: 40px; }
  .projects-track .btn--pool {
    --btn-fg: #fff;
    --btn-border: rgba(255, 255, 255, .64);
    --btn-fill: #fff;
    --btn-fg-hover: #155aff;
  }
  .projects-quote-line { display: inline; }
  .projects-quote-text .projects-quote-line + .projects-quote-line::before { content: ' '; }
  /* Na modrém pásu (bez animací) zůstává tlačítko bílé — dušička ho tu nebarví */
  .projects-all-btn { --btn-fg: #05070d; --btn-fg-hover: #05070d; background: #fff; }
  .btn-peek { display: none; }
  .projects-track :is(.reveal-line, .rv-word-in, .projects-all-wrap, .projects-quote-inner, .projects-quote-actions, .projects-quote-line) {
    opacity: 1 !important;
    transform: none !important;
    will-change: auto;
  }

  .services-stage, .reviews-section {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
    will-change: auto;
    box-shadow: none;
  }
  .services-stage { order: 1; padding: 64px var(--pad-side-desktop); border-radius: 0; }
  .services-stage::after { display: none; }
  .services-stage-inner { height: auto; max-width: 768px; margin: 0 auto; }
  .services-title {
    position: static;
    width: auto;
    margin: 0 0 32px;
    color: white;
    font-size: 40px;
    line-height: 48px;
    white-space: normal;
    text-transform: none;
    text-align: left;
    letter-spacing: -.035em;
    opacity: 1 !important;
    transform: none !important;
  }
  .services-video {
    position: relative;
    inset: auto;
    width: 100%;
    border-radius: 16px;
    margin-bottom: 40px;
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
    will-change: auto;
  }
  .services-wheel-layout {
    position: relative;
    inset: auto;
    display: block;
    height: auto;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto;
    will-change: auto;
  }
  .services-art { display: none; }
  .services-copy { position: static; transform: none; }
  .services-copy-items { display: grid; gap: 32px; min-height: 0; max-width: none; counter-reset: service; }
  .services-copy-item {
    position: relative;
    inset: auto;
    gap: 16px;
    padding: 32px 0 0;
    border-top: 1px solid rgba(255, 255, 255, .24);
    opacity: 1 !important;
    transform: none;
    pointer-events: auto;
    counter-increment: service;
  }
  .services-copy-item::before { content: '0' counter(service); color: #8eb0ff; font-size: 16px; line-height: 24px; }
  .services-copy-item h3 { font-size: 32px; line-height: 40px; }
  .services-copy-item p { max-width: 48ch; color: rgba(255, 255, 255, .88); font-size: 16px; line-height: 24px; }
  .services-copy-item h3, .services-copy-item p { transform: none; transition: none; }

  .reviews-section { order: 2; padding: 64px 0 48px; border-radius: 0; }
  .reviews-content-wrap { transform: none !important; will-change: auto; }
  .reviews-heading-row { width: 100%; padding: 0 var(--pad-side-desktop) 16px; text-align: left; }
  .reviews-title { font-size: 40px; line-height: 48px; }
  .reviews-title .rv-word-in, .reviews-nav, .review-slide,
  .review-bubble, .review-photo, .review-who, .review-stars svg { opacity: 1 !important; transform: none !important; }
  .skiper49-container { --bubble-h: 360px; }
  .review-slide { width: calc(100% - 64px); max-width: 400px; }
  .review-slide.is-flip { flex-direction: column; }
  .review-bubble, .is-flip .review-bubble { margin: 0 0 32px; padding: 24px; gap: 16px; }
  .is-flip .review-tail { top: calc(100% - 2px); bottom: auto; transform: none; }
  .review-text { font-size: 16px; line-height: 24px; }
  .review-more { min-height: 48px; font-size: 16px; }
  .review-person { padding-left: 24px; }
  .reviews-nav { margin-top: 16px; }
  .reviews-arrow { width: 48px; height: 48px; }

}
