/* SILC public home — tablet & mobile layout */

html,
body.silc-home {
  max-width: 100%;
  overflow-x: clip;
}

body.silc-home .silc-bridge__video-wrap {
  width: min(1020px, calc(100% - 32px));
  max-width: 100%;
}

body.silc-home .silc-bridge__player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0d171c;
}

body.silc-home .silc-bridge__player--file {
  aspect-ratio: auto;
}

body.silc-home .silc-bridge__player--file video {
  position: static;
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  background: #0d171c;
}

body.silc-home .silc-bridge__player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  border: 0;
  display: block;
  object-fit: contain;
  background: #0d171c;
}

@media (max-width: 980px) {
  /* ---------- Top bar ---------- */
  body.silc-home .v3topbar__inner {
    width: calc(100% - 32px);
    min-height: 64px;
    padding: 10px 0;
    gap: 10px;
  }

  body.silc-home .v3brand {
    min-width: 0;
    max-width: calc(100% - 150px);
    gap: 8px;
  }

  body.silc-home .v3topbar .v3brand__logo img {
    height: 30px !important;
    max-height: 30px !important;
    max-width: 112px !important;
  }

  body.silc-home .v3topbar .v3brand__name {
    font-size: 0.95rem !important;
    overflow: visible;
    text-overflow: clip;
  }

  body.silc-home .v3lang {
    padding: 7px 12px;
    font-size: 0.8rem;
  }

  body.silc-home .v3navToggle {
    width: 42px;
    height: 42px;
  }

  /* Keep brand, language and close button above the open menu sheet */
  body.silc-home .v3topbar .v3brand,
  body.silc-home .v3topbar .v3lang,
  body.silc-home .v3topbar .v3navToggle {
    position: relative;
    z-index: 61;
  }

  body.silc-home .v3topbar .v3nav {
    padding-top: calc(84px + env(safe-area-inset-top, 0px));
  }

  /* ---------- Chapters ---------- */
  body.silc-home .silc-chapter {
    --silc-edge: 20px;
    --silc-card-min-h: 0px;
    --silc-card-pad: 22px;
    --silc-card-gap: 14px;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    min-height: 0;
    padding: 56px 0;
    overflow: clip;
  }

  body.silc-home .silc-panel-rail--single {
    max-width: none;
  }

  body.silc-home .silc-chapter__space {
    width: var(--silc-shell-w);
    padding-inline: 0 !important;
  }

  /* Side image becomes a cover image above the section content */
  body.silc-home .silc-chapter__frame,
  body.silc-home .silc-chapter__frame--start,
  body.silc-home .silc-chapter__frame--end {
    position: relative;
    inset: auto;
    top: auto;
    width: var(--silc-shell-w);
    max-width: 640px;
    margin: 0 auto 28px;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }

  body.silc-home .silc-chapter__ghost {
    display: none !important;
  }

  body.silc-home .silc-chapter__head {
    max-width: none;
    margin-bottom: 28px;
  }

  body.silc-home .silc-chapter__index {
    font-size: 2.6rem;
    margin-bottom: 6px;
  }

  body.silc-home .silc-chapter__line {
    margin-bottom: 16px;
  }

  body.silc-home .silc-chapter__head h2 {
    font-size: clamp(1.6rem, 6.5vw, 2.1rem);
  }

  body.silc-home .silc-chapter__head p {
    font-size: 0.98rem;
    line-height: 1.75;
  }

  body.silc-home .silc-panel {
    height: auto;
  }

  body.silc-home .silc-panel--prose {
    font-size: 1rem;
    line-height: 1.85;
  }

  body.silc-home .silc-panel-rail,
  body.silc-home .silc-panel-stack {
    grid-template-columns: 1fr;
  }

  body.silc-home .silc-panel-rail--services {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.silc-home a.silc-panel.silc-panel--service {
    min-height: 118px;
    padding: 18px 16px;
    gap: 12px;
  }

  body.silc-home a.silc-panel.silc-panel--service h3 {
    font-size: 1rem;
  }

  body.silc-home .silc-section-cta {
    margin-top: 22px;
  }

  /* ---------- Stats ---------- */
  body.silc-home .silc-stats__stage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  body.silc-home .silc-stat-card {
    min-height: 0;
    transform: none;
  }

  body.silc-home .silc-stat-card__face {
    min-height: 132px;
    padding: 20px 12px;
    gap: 6px;
  }

  body.silc-home .silc-stat-card__num {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
  }

  body.silc-home .silc-stat-card__label {
    font-size: 0.85rem;
  }

  body.silc-home .silc-stat-card__orb {
    width: 90px;
    height: 90px;
  }

  /* ---------- Archive teaser ---------- */
  body.silc-home .silc-archive-teaser {
    min-height: 0;
  }

  body.silc-home .silc-archive-teaser__visual {
    min-height: 160px;
    max-height: 200px;
  }

  body.silc-home .silc-archive-teaser__title {
    font-size: clamp(1.25rem, 6vw, 1.55rem);
  }

  /* ---------- Bridge (image + intro video) ---------- */
  body.silc-home .silc-bridge {
    padding: 32px 0 48px;
    gap: 36px;
  }

  body.silc-home .silc-bridge__shot {
    width: calc(100% - 24px);
  }

  body.silc-home .silc-bridge__video-wrap {
    width: calc(100% - 24px);
    max-width: 100%;
  }


  body.silc-home .silc-bridge__frame {
    border-radius: 16px;
    aspect-ratio: 4 / 3;
  }

  body.silc-home .silc-bridge__video-card {
    gap: 20px;
    padding: 22px 16px;
    border-radius: 18px;
  }

  body.silc-home .silc-bridge__player {
    border-radius: 12px;
  }

  /* ---------- Contact ---------- */
  body.silc-home .silc-panel-rail--contact {
    grid-template-columns: 1fr;
  }

  body.silc-home .silc-btn--wide {
    width: 100%;
  }

  /* ---------- Footer ---------- */
  body.silc-home .silc-footer {
    --silc-edge: 20px;
    padding-top: 44px;
  }

  body.silc-home .silc-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px 20px;
    padding-bottom: 28px;
  }

  body.silc-home .silc-footer__brand {
    grid-column: 1 / -1;
  }

  body.silc-home .silc-footer__logo img {
    height: 48px !important;
    max-height: 48px !important;
  }

  body.silc-home .silc-footer__mail {
    word-break: break-all;
  }

  body.silc-home .silc-footer__bottom {
    text-align: center;
  }
}

@media (min-width: 640px) and (max-width: 980px) {
  body.silc-home .silc-stats__stage {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body.silc-home .silc-panel-rail--services {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.silc-home .silc-panel-rail:not(.silc-panel-rail--services):not(.silc-panel-rail--contact),
  body.silc-home .silc-panel-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.silc-home .silc-footer__grid {
    grid-template-columns: 1.3fr 1fr 1fr;
  }

  body.silc-home .silc-footer__brand {
    grid-column: auto;
  }
}

@media (max-width: 359px) {
  body.silc-home .v3brand__name {
    display: none;
  }

  body.silc-home .silc-footer__grid {
    grid-template-columns: 1fr;
  }
}
