/* ============================================================
   HANGAR — Mobile layout (composed independently)
   Desktop branding and film remain in the same site.
   ============================================================ */


/* ------------------------------------------------------------
   1. ZÁKLAD — Hidden, visibility, static story
   ------------------------------------------------------------ */
[hidden] {
  display: none !important;
}

.mobile-copy,
.brand-symbol,
.mobile-menu {
  display: none;
}

.desktop-copy {
  display: revert;
}

.chapter a.desktop-copy {
  display: inline-flex;
}

/* Statický stav - príbeh vypnutý */
.static-story .story {
  height: 100svh !important;
}

.static-story .sequence-canvas {
  display: none;
}

.static-story .opening {
  visibility: visible;
  transform: none !important;
}

.static-story .scroll-hint {
  display: none;
}


/* ------------------------------------------------------------
   2. OBRÁZKY — Poster, ceramic, studio
   ------------------------------------------------------------ */
.ceramic-feature > picture,
.studio-section > picture {
  display: block;
  width: 100%;
  height: 100%;
}

.ceramic-feature > picture img,
.studio-section > picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.studio-section > picture img {
  object-position: center 60%;
}

.poster-picture {
  display: contents;
}

.sequence-ready .opening {
  visibility: hidden;
}


/* ------------------------------------------------------------
   3. PRÍSTUPNOSŤ — Focus states
   ------------------------------------------------------------ */
.menu-toggle:focus-visible,
.menu-close:focus-visible {
  outline-offset: 2px;
}


/* ============================================================
   MOBILNÉ ZOBRAZENIE (max-width: 760px)
   ============================================================ */
@media (max-width: 760px) {

  /* ----------------------------------------------------------
     3.1 ROOT PREMENNÉ — Gutter, header výška
     ---------------------------------------------------------- */
  :root {
    --gutter: 24px;
    --mobile-header: calc(72px + env(safe-area-inset-top, 0px));
  }


  /* ----------------------------------------------------------
     3.2 SCROLLING — Safe-area, scrollbar hide
     ---------------------------------------------------------- */
  html {
    scroll-padding-top: var(--mobile-header);
    overflow-x: clip;
    scrollbar-width: none;
  }

  html::-webkit-scrollbar,
  body::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }

  body {
    overflow-x: clip;
  }

  section[id] {
    scroll-margin-top: 12px;
  }


  /* ----------------------------------------------------------
     3.3 NAVIGÁCIA — Header, brand, menu toggle
     ---------------------------------------------------------- */
  .nav {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    height: var(--mobile-header);
    padding:
      env(safe-area-inset-top, 0px)
      max(16px, env(safe-area-inset-right, 0px))
      0
      max(16px, env(safe-area-inset-left, 0px));
    background: #080a0bf5;
    border-bottom: 1px solid #c3cbcd24;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .nav .brand {
    min-height: 44px;
    gap: 9px;
  }

  .nav .brand-symbol {
    display: block;
    width: 26px;
    height: 26px;
  }

  .nav .brand img.brand-wordmark {
    width: 150px;
    height: auto;
  }

  .nav .desktop-nav,
  .nav-cta {
    display: none !important;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    min-width: 48px;
    padding: 0;
    border: 1px solid #c3cbcd35;
    background: #14181b;
    color: var(--accent);
  }

  .menu-bars,
  .menu-bars:before,
  .menu-bars:after {
    display: block;
    width: 19px;
    height: 1px;
    background: currentColor;
    position: relative;
    transition: transform 0.2s, opacity 0.2s;
  }

  .menu-bars:before,
  .menu-bars:after {
    content: '';
    position: absolute;
    left: 0;
  }

  .menu-bars:before {
    top: -6px;
  }

  .menu-bars:after {
    top: 6px;
  }

  .menu-toggle[aria-expanded="true"] .menu-bars {
    background: transparent;
  }

  .menu-toggle[aria-expanded="true"] .menu-bars:before {
    top: 0;
    transform: rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] .menu-bars:after {
    top: 0;
    transform: rotate(-45deg);
  }


  /* ----------------------------------------------------------
     3.4 MOBILNÉ MENU — Panel, navigácia, phone
     ---------------------------------------------------------- */
  html.menu-open,
  body.menu-open {
    overflow: hidden;
  }

  .mobile-menu:not([hidden]) {
    display: block;
    position: fixed;
    inset: var(--mobile-header) 0 0;
    z-index: 90;
    background: #080a0bf5;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 22px 24px max(30px, env(safe-area-inset-bottom, 0px));
  }

  .menu-panel {
    max-width: 520px;
    margin: auto;
  }

  .menu-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding-bottom: 25px;
  }

  .menu-heading p {
    font-size: 9px;
    letter-spacing: 0.15em;
    color: var(--silver);
    margin: 0;
  }

  .menu-close {
    display: flex;
    align-items: center;
    gap: 15px;
    background: transparent;
    color: var(--paper);
    min-height: 44px;
    border: 0;
    font-size: 11px;
    padding: 8px;
  }

  .menu-close .icon-close {
    width: 24px;
    height: 24px;
    color: var(--accent);
  }

  .mobile-menu nav {
    display: flex;
    flex-direction: column;
  }

  .mobile-menu nav a {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 64px;
    padding: 15px 0;
    border-top: 1px solid var(--line);
    font-family: var(--heading);
    text-transform: uppercase;
    font-size: 30px;
    line-height: 1.05;
  }

  .mobile-menu nav a span {
    color: var(--accent);
    font-family: Hangar, Arial, sans-serif;
    font-size: 9px;
  }

  .mobile-menu nav a:last-child {
    border-bottom: 1px solid var(--line);
  }

  .menu-phone {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    margin-top: 25px;
    font-size: 16px;
    letter-spacing: 0.02em;
  }

  .menu-phone .icon-diagonal {
    color: var(--accent);
  }

  .motion-menu-toggle {
    display: block;
    min-height: 44px;
    padding: 10px 0;
    color: var(--silver);
    font-size: 11px;
    border: 0;
    background: none;
    text-decoration: underline;
    text-underline-offset: 5px;
  }


  /* ----------------------------------------------------------
     3.5 PREPÍNAČ DESKTOP/MOBIL COPY
     ---------------------------------------------------------- */
  .desktop-copy,
  .chapter a.desktop-copy {
    display: none !important;
  }

  .mobile-copy {
    display: initial;
  }

  .brand .desktop-copy {
    display: none;
  }


  /* ----------------------------------------------------------
     3.6 FILMOVÝ PRÍBEH — Story, stage, chapters
     ---------------------------------------------------------- */
  .story,
  .motion-on .story {
    height: 560svh;
  }

  .stage {
    height: 100svh;
    min-height: 0;
  }

  .shot {
    object-position: center center;
  }

  .story > .film-top {
    display: none;
  }

  .chapter {
    left: 24px;
    right: 24px;
    max-width: none;
    top: auto;
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    width: auto;
    transform: none;
  }

  .chapter-0 .eyebrow,
  .chapter-0 .intro {
    display: none;
  }

  .chapter-0 h1 {
    font-size: clamp(40px, 11.5vw, 56px);
    line-height: 0.94;
    letter-spacing: -0.012em;
    margin: 0 0 20px;
    max-width: 100%;
  }

  .chapter-0 h1 em {
    white-space: nowrap;
  }

  /* POZNÁMKA: .chapter-1, .chapter-2 { display: none } bolo odstránené,
     aby sa kapitoly zobrazovali aj na mobile. */

  .chapter-4 {
    left: 24px;
    right: 24px;
    top: auto;
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    max-width: none;
    width: auto;
    text-align: left;
    transform: none;
  }

  .chapter-4 .reveal-logo {
    width: 250px;
    max-width: 80%;
    margin: 0 0 12px;
  }

  .chapter-4 p.mobile-copy {
    display: block;
    font-size: 12px;
    letter-spacing: 0.02em;
    margin-bottom: 16px;
    color: var(--silver);
  }


  /* ----------------------------------------------------------
     3.7 MOBILNÉ CTA TLAČIDLO
     ---------------------------------------------------------- */
  .mobile-primary {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 48px;
    background: var(--accent);
    color: #080a0b;
    padding: 15px 18px;
    font-size: 11px;
    border: 1px solid var(--accent);
    width: min(100%, 340px);
  }

  .mobile-primary span,
  .mobile-primary .icon-diagonal {
    font-size: 19px;
    line-height: 1;
    width: 19px;
    height: 19px;
  }

  .chapter-4 .mobile-primary {
    font-size: 10px;
  }


  /* ----------------------------------------------------------
     3.8 GRADIENT — Shade overlay
     ---------------------------------------------------------- */
  .shade {
    background: linear-gradient(
      0deg,
      #080a0bf5 0%,
      #080a0b85 23%,
      transparent 47%,
      transparent 88%,
      #080a0b55
    );
  }


  /* ----------------------------------------------------------
     3.9 FILM BOTTOM — Counter, scroll hint, track
     ---------------------------------------------------------- */
  .film-bottom {
    left: 24px;
    right: 24px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    min-height: 44px;
    gap: 16px;
  }

  .film-bottom .scene-counter {
    display: none;
  }

  .skip-story {
    display: flex;
    align-items: center;
    min-height: 44px;
    font-size: 10px;
    letter-spacing: 0;
  }

  .scroll-hint {
    display: flex;
    font-size: 8px;
    letter-spacing: 0.1em;
    gap: 8px;
  }

  .scroll-hint .mouse {
    display: none;
  }

  .scroll-hint .icon-down {
    width: 10px;
    height: 10px;
    color: var(--silver);
  }

  .film-bottom .mobile-copy {
    display: inline;
  }

  .motion-toggle {
    display: none !important;
  }

  .static-story .chapter {
    bottom: calc(74px + env(safe-area-inset-bottom, 0px));
  }

  .story-track {
    height: 2px;
  }

  .static-story .story-track {
    display: none;
  }


  /* ----------------------------------------------------------
     3.10 UNIVERZÁLNE SEKCE — Section, headings, paragraphs
     ---------------------------------------------------------- */
  .section {
    padding: 64px 24px;
  }

  .section h2 {
    font-size: clamp(42px, 13vw, 58px);
    line-height: 0.98;
    overflow-wrap: normal;
  }

  .section .eyebrow {
    font-size: 9px;
    letter-spacing: 0.15em;
    margin-bottom: 24px;
  }

  .section p,
  .manifesto p:not(.eyebrow) {
    font-size: 14px;
    line-height: 1.8;
  }

  .manifesto {
    gap: 18px;
  }

  .manifesto:after {
    display: none;
  }

  .outline-mark {
    opacity: 0.4;
  }

  .section-heading {
    gap: 10px;
    margin-bottom: 28px;
  }

  .section-heading h2 {
    margin-bottom: 10px;
  }

  .section-heading > p:last-child {
    font-size: 13px;
    line-height: 1.8;
  }


  /* ----------------------------------------------------------
     3.11 SLUŽBY — Service accordion
     ---------------------------------------------------------- */
  .service summary {
    padding: 24px 0;
    gap: 12px;
    grid-template-columns: 22px minmax(0, 1fr) 24px;
    min-height: 88px;
  }

  .service h3 {
    font-size: clamp(26px, 7.8vw, 34px);
    line-height: 1.05;
    margin-bottom: 8px;
  }

  .service .tag {
    font-size: 8px;
    letter-spacing: 0.12em;
  }

  .service .details {
    font-size: 14px;
    padding: 0 12px 25px 34px;
  }

  .service .plus .icon-plus {
    width: 16px;
    height: 16px;
    color: var(--accent);
  }

  .services .service-note {
    font-size: 11px;
    line-height: 1.7;
  }


  /* ----------------------------------------------------------
     3.12 KERAMICKÁ OCHRANA — Ceramic feature
     ---------------------------------------------------------- */
  .ceramic-feature {
    height: 620px;
  }

  .ceramic-feature > picture img {
    object-position: center 42%;
  }

  .ceramic-feature > div {
    top: auto;
    bottom: 40px;
    left: 24px;
    right: 24px;
    max-width: none;
  }

  .ceramic-feature:after {
    background: linear-gradient(0deg, #080a0bf0, transparent 90%);
  }

  .ceramic-feature h2 {
    font-size: 54px;
    line-height: 0.98;
  }

  .ceramic-feature .eyebrow {
    font-size: 9px;
  }

  .ceramic-feature p:not(.eyebrow) {
    font-size: 14px;
    max-width: none;
    line-height: 1.8;
  }


  /* ----------------------------------------------------------
     3.13 INTERIÉR — Interior feature
     ---------------------------------------------------------- */
  .interior-feature {
    gap: 32px;
  }

  .interior-visual img {
    height: 380px;
    object-position: center 45%;
  }

  .interior-visual > picture {
    display: block;
  }

  .interior-copy h2 {
    font-size: clamp(40px, 12vw, 54px);
  }

  .interior-copy p:not(.eyebrow) {
    font-size: 14px;
  }

  .interior-copy .muted {
    max-width: none;
  }

  .text-link {
    min-height: 44px;
    font-size: 12px;
    gap: 24px;
  }


  /* ----------------------------------------------------------
     3.14 PROCES — Process grid
     ---------------------------------------------------------- */
  .process > h2 {
    margin-bottom: 34px;
  }

  .process-grid {
    gap: 26px;
  }

  .process h3 {
    font-size: 30px;
    line-height: 1.05;
  }

  .process article p {
    font-size: 14px;
    line-height: 1.8;
  }


  /* ----------------------------------------------------------
     3.15 ŠTÚDIO — Studio section
     ---------------------------------------------------------- */
  .studio-section {
    height: 720px;
  }

  .studio-section > picture img {
    object-position: center center;
  }

  .studio-section:after {
    background: linear-gradient(180deg, #080a0be8, transparent 66%);
  }

  .studio-copy {
    top: 36px;
    left: 24px;
    right: 24px;
  }

  .studio-copy h2 {
    font-size: clamp(40px, 12vw, 54px);
    line-height: 0.98;
  }

  .studio-copy p {
    font-size: 13px;
    line-height: 1.8;
  }

  .studio-copy small {
    display: block;
    font-size: 10px;
    max-width: 270px;
    line-height: 1.6;
  }


  /* ----------------------------------------------------------
     3.16 KONTAKT — Contact grid, form
     ---------------------------------------------------------- */
  .contact-grid {
    gap: 32px;
  }

  .contact h2 {
    font-size: clamp(44px, 13vw, 60px);
    line-height: 0.98;
  }

  .contact p {
    font-size: 14px;
  }

  .contact-phone {
    font-size: clamp(30px, 8.6vw, 40px);
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
  }

  .contact-phone span,
  .contact-phone .icon-diagonal {
    margin-left: 0;
    width: 14px;
    height: 14px;
  }

  .contact-details address,
  .company-details address {
    font-size: 14px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  form label {
    font-size: 10px;
    letter-spacing: 0.1em;
    margin-bottom: 23px;
  }

  input,
  textarea,
  select {
    font-size: 16px;
    min-height: 48px;
    padding: 14px 0;
    line-height: 1.5;
    max-width: 100%;
  }

  textarea {
    min-height: 100px;
  }

  .button {
    min-height: 50px;
    padding: 17px 18px;
    font-size: 11px;
  }

  .button .icon-diagonal {
    width: 14px;
    height: 14px;
  }

  .form-note {
    font-size: 11px !important;
    line-height: 1.7;
  }

  .booking-status {
    font-size: 12px !important;
    line-height: 1.8;
  }

  .booking-status a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }


  /* ----------------------------------------------------------
     3.17 FIREMNÉ ÚDAJE — Company details
     ---------------------------------------------------------- */
  .company-details {
    margin-top: 48px;
    padding-top: 28px;
    gap: 23px;
  }

  .company-details .eyebrow {
    font-size: 9px;
    margin-bottom: 10px;
  }

  .company-details p:not(.eyebrow),
  .company-details dl {
    font-size: 14px;
    line-height: 1.7;
  }

  .company-details dd {
    overflow-wrap: anywhere;
  }


  /* ----------------------------------------------------------
     3.18 FOOTER
     ---------------------------------------------------------- */
  footer {
    padding: 32px 24px calc(28px + env(safe-area-inset-bottom, 0px));
    gap: 22px;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  footer .brand {
    min-height: 44px;
  }

  footer .brand img.brand-wordmark {
    width: 155px;
  }

  footer > a:not(.brand) {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 11px;
  }

  footer > a:not(.brand) .icon-up,
  footer > a:not(.brand) .icon-diagonal {
    width: 14px;
    height: 14px;
  }

  footer > small {
    font-size: 10px;
    line-height: 1.8;
  }


  /* ----------------------------------------------------------
     3.19 PRÍSTUPNOSŤ — Skip link, focus states
     ---------------------------------------------------------- */
  .access-skip {
    z-index: 120;
    min-height: 44px;
    font-size: 13px;
  }

  .mobile-menu a:focus-visible,
  .mobile-menu button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
  }
}


/* ============================================================
   EXTRA MALÉ OBRAZOVKY (max-width: 359px)
   ============================================================ */
@media (max-width: 359px) {
  .nav .brand img.brand-wordmark {
    width: 134px;
  }

  .nav .brand-symbol {
    width: 23px;
  }

  .chapter,
  .chapter-4 {
    left: 20px;
    right: 20px;
  }

  .chapter-0 h1 {
    font-size: 39px;
  }

  .section {
    padding-left: 20px;
    padding-right: 20px;
  }

  .mobile-menu {
    padding-left: 20px;
    padding-right: 20px;
  }

  .mobile-menu nav a {
    font-size: 27px;
  }

  .section h2 {
    font-size: 42px;
  }

  .contact-phone {
    font-size: 30px;
  }

  .chapter-4 .reveal-logo {
    width: 220px;
  }

  .film-bottom {
    left: 20px;
    right: 20px;
  }
}


/* ============================================================
   NÍZKE MOBILNÉ OBRAZOVKY (landscape, max-height: 680px)
   ============================================================ */
@media (max-width: 760px) and (max-height: 680px) {
  .chapter,
  .chapter-4 {
    bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  }

  .chapter-0 h1 {
    font-size: 40px;
    margin-bottom: 14px;
  }

  .chapter-4 .reveal-logo {
    width: 220px;
  }

  .chapter-4 p.mobile-copy {
    margin-bottom: 10px;
  }

  .chapter-4 .mobile-primary {
    min-height: 46px;
  }

  .film-bottom {
    bottom: calc(6px + env(safe-area-inset-bottom, 0px));
  }
}


/* ============================================================
   EXTRA NÍZKE MOBILNÉ OBRAZOVKY (landscape, max-height: 480px)
   ============================================================ */
@media (max-width: 760px) and (max-height: 480px) {
  .chapter-0 {
    left: 24px;
    right: auto;
    bottom: 58px;
    width: 45%;
  }

  .chapter-0 h1 {
    font-size: 34px;
  }

  .chapter-0 h1 em {
    white-space: normal;
  }

  .mobile-primary {
    max-width: 270px;
  }

  .film-bottom .scroll-hint {
    display: none;
  }

  .static-story .chapter {
    bottom: 54px;
  }

  .menu-heading {
    padding-bottom: 5px;
  }

  .mobile-menu nav a {
    min-height: 48px;
    font-size: 25px;
    padding: 10px 0;
  }
}


/* ============================================================
   REDUKCIA POHYBU — Prístupnosť
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .menu-bars,
  .menu-bars:before,
  .menu-bars:after,
  .sequence-canvas {
    transition: none;
  }
}


/* ============================================================
   SAFE-AREA INSETS — Notch a home indicator
   ============================================================ */
@media (max-width: 760px) {
  .chapter,
  .chapter-4,
  .film-bottom,
  .studio-copy,
  .ceramic-feature > div {
    left: max(24px, env(safe-area-inset-left, 0px));
    right: max(24px, env(safe-area-inset-right, 0px));
  }

  .section,
  footer,
  .mobile-menu {
    padding-left: max(24px, env(safe-area-inset-left, 0px));
    padding-right: max(24px, env(safe-area-inset-right, 0px));
  }
}