/* Final responsive layer. Keep this stylesheet loaded after styles.css and hero.css. */

img,
svg,
video {
  max-width: 100%;
}

body.menu-open {
  overflow: hidden;
  touch-action: none;
}

.page[data-page="home"] .hero-court-shell {
  background-image: url("assets/images/hero-padel-match-extended.webp") !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 1024px) {
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea {
    font-size: 16px !important;
  }
}

@media (min-width: 721px) and (max-width: 980px) {
  .page {
    padding-right: 24px;
    padding-left: 24px;
  }

  .row-heading,
  .two-column,
  .auth-layout,
  .checkout-layout,
  .final-cta {
    grid-template-columns: minmax(0, 1fr);
  }

  .page[data-page="home"] .about-signals .instagram-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    overflow: visible;
  }

  .page[data-page="home"] .about-signals .instagram-grid article,
  .page[data-page="home"] .about-signals .instagram-grid article:nth-child(n) {
    grid-column: auto;
    grid-row: auto;
    min-width: 0;
    min-height: 250px;
    scroll-snap-align: none;
  }

  .creator-grid,
  .article-grid,
  .pricing-grid-three {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@media (min-width: 721px) {
  /* Mikołaj's landscape portrait needs a quieter, lower caption so the
     two-line name never reaches the jawline at intermediate widths. */
  .page[data-page="home"] .creator-card:nth-child(2) > div:not(.creator-overlay) {
    bottom: clamp(20px, 2.2vw, 32px);
  }

  .page[data-page="home"] .creator-card:nth-child(2) > div:not(.creator-overlay) > p {
    font-size: clamp(1.55rem, 2.15vw, 2.65rem);
    line-height: .94;
  }

  .page[data-page="home"] .creator-card:nth-child(2) h3 {
    font-size: clamp(1.12rem, 1.45vw, 1.6rem);
  }

  .page[data-page="home"] .creator-card:nth-child(2) span {
    font-size: clamp(.8rem, .85vw, .95rem);
  }
}

@media (max-width: 720px) {
  .assessment-account-card,
  .assessment-card-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .assessment-account-card {
    gap: 20px;
    padding: 20px;
  }

  .assessment-card-actions .button {
    width: 100%;
    text-align: center;
  }

  .assessment-status { align-self: flex-start; }
  .assessment-status-grid { grid-template-columns: minmax(0, 1fr); }
  .page[data-page="assessment"] .dashboard-side { scrollbar-width: none; }
  .page[data-page="assessment"] .dashboard-side::-webkit-scrollbar { display: none; }
  .page[data-page="assessment"] .dashboard-side a { flex: 0 0 auto; white-space: nowrap; }

  .assessment-wizard { margin-top: 28px; }
  .wizard-meta { align-items: flex-start; flex-direction: column; gap: 6px; }
  .wizard-progress { margin: 12px 0 30px; }
  .wizard-question { min-height: 0; }
  .wizard-question h2 { font-size: clamp(1.55rem, 7.4vw, 2rem); }
  .wizard-options,
  .wizard-options-scale { grid-template-columns: minmax(0, 1fr); }
  .wizard-scale-option { min-height: 62px; flex-direction: row; justify-content: flex-start; text-align: left; }
  .wizard-option-label { font-size: 0.92rem; }
  .wizard-control textarea { min-height: 210px; font-size: 1rem; }
  .wizard-navigation { margin-top: 24px; }
  .wizard-navigation .button { min-width: 0; flex: 1; padding-inline: 14px; }
  .assessment-review-section li { align-items: stretch; flex-direction: column; gap: 10px; }
  .assessment-review-edit { align-self: flex-start; padding: 6px 0; }

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

  body {
    min-width: 0;
  }

  .page:not(.ppl-rework) {
    padding-right: 16px;
    padding-left: 16px;
  }

  /* The hero image plane must cancel the full 16px mobile page gutter.
     Keeping this geometry here (after hero.css) prevents 2px white rails
     on both sides of the viewport. */
  .page[data-page="home"] .hero-court-shell {
    width: calc(100% + 32px);
    margin-right: -16px;
    margin-left: -16px;
  }

  h1,
  h2,
  h3,
  p,
  li,
  a,
  button,
  label,
  span {
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
  }

  .site-header {
    top: max(10px, env(safe-area-inset-top));
    width: calc(100% - 20px);
    min-height: 68px;
    padding: 8px 10px 8px 14px;
  }

  .brand {
    min-width: 0;
    gap: 9px;
  }

  .brand-mark {
    width: 44px;
    height: 48px;
    flex: 0 0 44px;
  }

  .brand-text {
    max-width: 165px;
    font-size: .98rem;
    line-height: 1.02;
  }

  .menu-button,
  .drawer-close {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
  }

  .mobile-drawer {
    width: 100%;
    max-width: 430px;
    height: 100vh;
    height: 100dvh;
    padding: max(28px, env(safe-area-inset-top)) 30px max(32px, env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .mobile-drawer a {
    display: flex;
    min-height: 44px;
    align-items: center;
  }

  .button,
  button:not(.icon-button),
  input[type="submit"] {
    min-height: 48px;
    max-width: 100%;
    white-space: normal;
  }

  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea {
    width: 100%;
    min-height: 50px;
    font-size: 16px !important;
  }

  textarea {
    min-height: 132px;
  }

  .row-heading,
  .two-column,
  .auth-layout,
  .checkout-layout,
  .final-cta,
  .contact-form {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .hero-actions,
  .assessment-actions,
  .ppl-rework .rework-actions {
    width: 100%;
    align-items: stretch;
  }

  .hero-actions .button,
  .assessment-actions .button,
  .ppl-rework .rework-actions .button,
  .final-cta .button,
  .contact-form > .button {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .page[data-page="home"] .hero-content h1 {
    font-size: clamp(2.45rem, 10.4vw, 2.75rem);
    line-height: .94;
    letter-spacing: -.035em;
  }

  .page[data-page="home"] .audience-grid.audience-three {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding: 0;
    overflow: hidden;
  }

  .page[data-page="home"] .audience-grid.audience-three::before {
    display: none;
  }

  .page[data-page="home"] .audience-grid.audience-three .audience-card,
  .page[data-page="home"] .audience-grid.audience-three .audience-card:hover {
    min-height: 0;
    padding: 142px 24px 42px;
    align-items: center;
    justify-content: flex-start;
    gap: 18px;
    text-align: center;
    transform: none;
  }

  .page[data-page="home"] .audience-grid.audience-three .audience-card::before,
  .page[data-page="home"] .audience-grid.audience-three .audience-card:hover::before {
    top: 32px;
    left: 50%;
    transform: translateX(-50%);
  }

  .page[data-page="home"] .audience-grid.audience-three .audience-card::after,
  .page[data-page="home"] .audience-grid.audience-three .audience-card:hover::after,
  .page[data-page="home"] .audience-grid.audience-three .audience-card-blue::after,
  .page[data-page="home"] .audience-grid.audience-three .audience-card-orange::after {
    top: 64px;
    left: 50%;
    transform: translateX(-50%);
  }

  .page[data-page="home"] .audience-grid.audience-three .audience-card-orange::before,
  .page[data-page="home"] .audience-grid.audience-three .audience-card-orange:hover::before {
    transform: translateX(-50%) rotate(-24deg);
  }

  .page[data-page="home"] .audience-grid.audience-three .audience-card h3,
  .page[data-page="home"] .audience-grid.audience-three .audience-card p {
    max-width: 100%;
    margin-right: 0;
    margin-left: 0;
    text-align: center;
  }

  .page[data-page="home"] .audience-grid.audience-three .audience-card h3 {
    margin: 0;
  }

  .page[data-page="home"] .about-signals .instagram-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    gap: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
    scroll-snap-type: none;
  }

  .page[data-page="home"] .about-orbit-title {
    width: 100%;
    margin: 18px 0 28px;
    padding-left: 40px;
  }

  .page[data-page="home"] .about-signals .instagram-grid article,
  .page[data-page="home"] .about-signals .instagram-grid article:nth-child(n),
  .page[data-page="home"] .about-signals .instagram-grid article:hover {
    grid-column: auto;
    grid-row: auto;
    grid-template-columns: 78px minmax(0, 1fr);
    grid-template-rows: auto auto;
    min-width: 0;
    min-height: 220px;
    padding: 34px 18px;
    column-gap: 20px;
    row-gap: 8px;
    align-items: start;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.14);
    scroll-snap-align: none;
  }

  .page[data-page="home"] .about-signals .instagram-grid article > svg.situation-symbol,
  .page[data-page="home"] .about-signals .instagram-grid article.situation-review > svg.situation-symbol {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: center;
    justify-self: center;
    width: 72px;
    height: 72px;
    margin: 0;
    transform: none;
  }

  /* The review glyph has speed lines on its left and a large ring on the
     right, so its mathematical centre reads too far toward the copy. */
  .page[data-page="home"] .about-signals .instagram-grid article.situation-review > svg.situation-symbol {
    width: 68px;
    height: 68px;
    transform: translateX(-8px);
  }

  .page[data-page="home"] .about-signals .instagram-grid article > span {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    margin: 0;
  }

  .page[data-page="home"] .about-signals .instagram-grid article > h3 {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    width: 100%;
    max-width: 100%;
    margin: 0;
  }

  .page[data-page="home"] .about-signals .instagram-grid article:last-child {
    border-bottom: 0;
  }

  .creator-grid,
  .article-grid,
  .article-grid.wide,
  .pricing-grid-three {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .creator-card,
  .auth-card,
  .cart-panel,
  .checkout-card {
    width: 100%;
  }

  .page[data-page="home"] .creator-card,
  .page[data-page="home"] .creator-card:nth-child(2) {
    display: grid;
    grid-template-rows: auto auto auto;
    min-height: 0;
    overflow: hidden;
    background: #082319;
    transform: none;
  }

  .page[data-page="home"] .creator-card:nth-child(2) {
    background: #092746;
  }

  .page[data-page="home"] .creator-card::after {
    display: none;
  }

  .page[data-page="home"] .creator-card img {
    position: relative;
    inset: auto;
    grid-row: 1;
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    object-fit: contain;
    object-position: center;
    filter: saturate(.96) contrast(1.03);
    transform: none;
  }

  .page[data-page="home"] .creator-card:nth-child(2) img {
    object-position: center;
  }

  .page[data-page="home"] .creator-card:hover img {
    transform: none;
  }

  .page[data-page="home"] .creator-card > div:not(.creator-overlay) {
    position: static;
    grid-row: 2;
    padding: 28px 24px 24px;
    background: #082319;
  }

  .page[data-page="home"] .creator-card:nth-child(2) > div:not(.creator-overlay) {
    background: #092746;
  }

  .page[data-page="home"] .creator-card > div:not(.creator-overlay) > p {
    margin-bottom: 10px;
    font-size: clamp(1.65rem, 8vw, 2.15rem);
    line-height: .96;
  }

  .page[data-page="home"] .creator-card h3 {
    margin-bottom: 14px;
    font-size: clamp(1.08rem, 5.4vw, 1.35rem);
    line-height: 1.08;
  }

  .page[data-page="home"] .creator-card span {
    padding-top: 14px;
    font-size: .95rem;
    line-height: 1.5;
  }

  .page[data-page="home"] .creator-overlay,
  .page[data-page="home"] .creator-card:nth-child(2) .creator-overlay {
    position: static;
    inset: auto;
    grid-row: 3;
    display: block;
    max-height: none;
    padding: 0 24px 32px;
    overflow: visible;
    background: #082319;
    opacity: 1;
    transform: none;
  }

  .page[data-page="home"] .creator-card:nth-child(2) .creator-overlay {
    background: #092746;
  }

  .page[data-page="home"] .creator-overlay p,
  .page[data-page="home"] .creator-card:nth-child(2) .creator-overlay p {
    max-width: 100%;
    margin: 0;
    padding-top: 22px;
    font-size: 1rem;
    line-height: 1.62;
  }

  .ppl-rework .rework-hero {
    width: 100%;
    min-height: 0;
    padding: 136px 20px 56px;
    overflow: hidden;
  }

  .ppl-rework .rework-hero h1,
  .ppl-rework .assessment-stage h1 {
    max-width: 100%;
    font-size: clamp(2.7rem, 11.4vw, 3.15rem);
    line-height: .97;
    letter-spacing: -.035em;
    overflow-wrap: normal;
  }

  .ppl-rework .community-eight,
  .ppl-rework .assessment-scan,
  .ppl-rework .shop-racket,
  .ppl-rework .knowledge-mark {
    right: -36px;
    max-width: 210px;
    opacity: .2;
    pointer-events: none;
  }

  .assessment-rework .assessment-scan p {
    display: none;
  }

  .shop-rework .shop-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
  }

  .shop-rework .shop-filters button {
    min-width: 0;
    min-height: 46px;
    padding: 8px 7px;
    font-size: .72rem;
  }

  .shop-rework .shop-card {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 0 16px;
    min-width: 0;
    padding: 20px;
    overflow: hidden;
  }

  .shop-rework .product-cover {
    width: 52px;
    min-width: 0;
  }

  .shop-rework .shop-card > div,
  .shop-rework .shop-card h2,
  .shop-rework .shop-card p,
  .shop-rework .shop-card-footer {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .shop-rework .shop-card h2 {
    font-size: clamp(1.55rem, 7.6vw, 2rem);
    overflow-wrap: anywhere;
  }

  .knowledge-rework .knowledge-feature-link {
    width: 100%;
    min-width: 0;
    padding: 36px 20px 48px;
  }

  .knowledge-rework .knowledge-feature h2 {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    font-size: clamp(2rem, 10.5vw, 2.75rem);
    overflow-wrap: anywhere;
  }

  .auth-layout h1,
  .checkout-layout h1,
  .page[data-page="cart"] .subpage-hero h1 {
    font-size: clamp(2.25rem, 10vw, 2.85rem);
    line-height: .98;
    letter-spacing: -.035em;
  }

  .page[data-page="home"] #contact h2 {
    font-size: clamp(2rem, 8.4vw, 2.3rem) !important;
    line-height: .98 !important;
  }

  .page[data-page="home"] #faq .faq-item {
    padding: 20px 64px 20px 24px;
  }

  .page[data-page="home"] #faq .faq-item::after {
    right: 18px;
  }
}

@media (max-width: 359px) {
  .site-header {
    width: calc(100% - 16px);
    padding-left: 10px;
  }

  .brand-text {
    max-width: 124px;
    font-size: .87rem;
  }

  .ppl-rework .rework-hero h1,
  .ppl-rework .assessment-stage h1 {
    font-size: clamp(2.45rem, 12.7vw, 2.8rem);
  }

  .shop-rework .shop-filters {
    grid-template-columns: 1fr;
  }

  .page[data-page="home"] #faq .faq-item {
    padding-left: 20px;
    padding-right: 58px;
  }
}
