/* Dedykowany layout mobile — max-width: 820px */

@media (max-width: 820px) {
  :root {
    --header-h: 3.75rem;
    --mobile-cta-h: 4.35rem;
  }

  html,
  body {
    overflow-x: hidden;
    max-width: 100%;
  }

  body {
    padding-bottom: calc(var(--mobile-cta-h) + env(safe-area-inset-bottom, 0px));
  }

  body.nav-open {
    overflow: hidden;
  }

  body.nav-open .mobile-cta {
    opacity: 0;
    pointer-events: none;
  }

  .container {
    width: auto;
    max-width: 100%;
    margin-inline: 0.85rem;
  }

  .section {
    padding: 3.25rem 0;
  }

  .section__title {
    max-width: none;
    font-size: clamp(1.7rem, 7.5vw, 2.2rem);
  }

  .section__lead {
    font-size: 0.95rem;
  }

  /* ----- Header / full-screen menu ----- */
  .site-header {
    height: var(--header-h);
    z-index: 60;
  }

  .site-header__inner {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-inline: 0;
    padding-inline: 0.85rem;
    justify-content: space-between;
  }

  .brand {
    font-size: 1.02rem;
    margin-right: auto;
  }

  .nav-toggle {
    display: inline-grid !important;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
    margin-left: auto;
    border: 1px solid rgba(200, 245, 66, 0.35);
    background: rgba(11, 13, 12, 0.55);
    font-size: 1.15rem;
    z-index: 70;
    position: relative;
  }

  .site-nav {
    position: fixed !important;
    inset: 0 !important;
    z-index: 65;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 0.2rem;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: calc(var(--header-h) + 0.75rem) 1.25rem 2rem;
    border: 0 !important;
    border-radius: 0 !important;
    background:
      radial-gradient(ellipse 80% 45% at 50% 0%, rgba(200, 245, 66, 0.14), transparent 55%),
      #090b0a !important;
    backdrop-filter: none;
    transform: translate3d(100%, 0, 0);
    opacity: 1;
    visibility: visible;
    pointer-events: none;
    transition: transform 0.32s var(--ease);
  }

  .site-nav.is-open {
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
  }

  .site-nav a {
    padding: 0.9rem 0.2rem;
    font-size: 1.45rem;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink) !important;
    border-bottom: 1px solid var(--line);
  }

  .site-nav a:last-child {
    border-bottom: 0;
  }

  /* ----- Hero ----- */
  .hero {
    min-height: 100svh;
    min-height: 100dvh;
    align-items: end;
    max-width: 100%;
    overflow: hidden;
  }

  .hero__media img {
    object-position: center 20%;
  }

  .hero__brand .brand-break {
    display: block;
  }

  .cursor-light {
    display: none !important;
  }

  .fireflies {
    display: none !important;
  }

  html {
    --cursor-glow: none;
  }

  .reveal,
  .reveal--left,
  .reveal--right,
  .reveal--scale {
    filter: blur(calc((1 - var(--p)) * 1px));
    transform: translate3d(0, calc((1 - var(--p)) * 36px), 0) scale(calc(0.97 + var(--p) * 0.03));
    clip-path: none;
  }

  .why__col.is-tilting,
  .project.is-tilting,
  .process__step.is-tilting,
  .contact__card.is-tilting {
    transform: none !important;
  }

  .hero__veil {
    background:
      linear-gradient(
        180deg,
        rgba(11, 13, 12, 0.25) 0%,
        rgba(11, 13, 12, 0.45) 32%,
        rgba(11, 13, 12, 0.88) 58%,
        #0b0d0c 78%,
        #0b0d0c 100%
      ),
      radial-gradient(circle at 50% 18%, rgba(200, 245, 66, 0.1), transparent 42%);
  }

  .hero__content {
    width: auto;
    max-width: 100%;
    margin: 0 0.85rem;
    padding: calc(var(--header-h) + 1rem) 0 calc(1.25rem + var(--mobile-cta-h));
    box-sizing: border-box;
  }

  .hero__brand {
    font-size: clamp(2.55rem, 12.5vw, 3.25rem);
    margin-bottom: 0.65rem;
    max-width: 100%;
    overflow-wrap: normal;
    word-break: normal;
    white-space: normal;
    line-height: 0.92;
  }

  .hero__title {
    font-size: 1.05rem;
    max-width: 100%;
    margin-bottom: 0.55rem;
  }

  .hero__text {
    font-size: 0.92rem;
    max-width: 100%;
    margin-bottom: 1.1rem;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .hero__actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .hero__actions .btn {
    width: 100%;
    min-height: 3.05rem;
  }

  /* ----- Sections ----- */
  .why__grid,
  .features__grid,
  .process__steps,
  .projects,
  .showcase__layout,
  .contact__box {
    grid-template-columns: 1fr !important;
    gap: 0.8rem;
  }

  .why__col,
  .process__step,
  .contact__card {
    padding: 1.1rem 1rem 1.15rem;
    border-radius: 1.05rem;
  }

  .feature {
    padding: 1rem 0.05rem 0.9rem;
  }

  .feature h3 {
    font-size: 1.15rem;
  }

  .project__media {
    aspect-ratio: 16 / 11;
  }

  .project__body {
    padding: 1rem 1rem 1.15rem;
  }

  .project__body h3 {
    font-size: 1.25rem;
  }

  .side-note {
    grid-template-columns: 1fr;
    justify-items: start;
    padding: 1rem 1rem 1.1rem;
  }

  .side-note__icon {
    width: 3.75rem;
    height: 3.75rem;
  }

  .side-note__actions .btn {
    width: 100%;
    justify-content: center;
    font-size: 0.78rem;
    word-break: break-all;
  }

  .showcase__main {
    min-height: 200px;
  }

  .showcase__side figure {
    min-height: 140px;
  }

  .showcase__layout {
    margin-top: 1.35rem;
  }

  .downloads {
    display: grid;
    grid-template-columns: 1fr;
  }

  .downloads .btn,
  .project__body .btn {
    width: 100%;
  }

  .site-footer {
    padding-bottom: 1.1rem;
  }

  .site-footer__inner {
    width: auto;
    margin-inline: 0.85rem;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.82rem;
  }

  /* ----- Sticky mobile CTA ----- */
  .mobile-cta {
    display: grid !important;
    grid-template-columns: 1.1fr 1fr;
    gap: 0.5rem;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 55;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.6rem 0.75rem calc(0.6rem + env(safe-area-inset-bottom, 0px));
    background: rgba(8, 10, 9, 0.96);
    border-top: 1px solid rgba(200, 245, 66, 0.28);
    backdrop-filter: blur(14px);
    transition: opacity 0.2s ease;
  }

  .mobile-cta .btn {
    min-height: 2.85rem;
    padding: 0.6rem 0.55rem;
    font-size: 0.9rem;
    border-radius: 999px;
  }

  .mobile-cta .btn--ghost {
    border-color: rgba(242, 245, 240, 0.28);
  }
}

@media (min-width: 821px) {
  .mobile-cta {
    display: none !important;
  }
}

