/* ───────────────────────────────────────────────────────────────────────────
   OSPREXON — Responsive polish (loaded last)
   Desktop ≥1280px: untouched. Tablet/mobile: readable type scale + balanced CTAs.
   ─────────────────────────────────────────────────────────────────────── */

/* ════════════════════════════════════════════════════════════════════════
   Tablet — 768px–1279px: bump body copy where vw clamps read too small
   ════════════════════════════════════════════════════════════════════════ */
@media (min-width: 768px) and (max-width: 1279px) {
  /* RESPONSIVE: Section intros — vw-only clamps were under-shooting on iPad. */
  .pricing__lede,
  .pricing__stage-sub,
  .about-os__lede,
  .clients__subtitle,
  .finder-subheading {
    font-size: clamp(1rem, 1.35vw, 1.08rem);
  }

  .pricing__stage-title {
    font-size: clamp(1.5rem, 2.8vw, 1.85rem);
  }

  .pricing-tier__highlights li,
  .pricing-tier__list li {
    font-size: 0.84rem;
  }
}

/* ════════════════════════════════════════════════════════════════════════
   Mobile — ≤767px: primary typography + hero CTA balance
   ════════════════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
  /* RESPONSIVE: Taller frame so enlarged headline + compact CTA aren't cramped. */
  .frame {
    height: clamp(660px, 102vw, 780px);
    min-height: 0;
  }

  /* ── Hero: headline hierarchy over decorative cards ── */
  .hero-text {
    top: 40%;
    width: min(94%, 100%);
    gap: clamp(0.65rem, 2vh, 0.9rem);
    padding-inline: 0.25rem;
  }

  .card--todo {
    top: 4%;
    left: 4%;
    width: clamp(75px, 18vw, 130px);
  }

  .card--deadlines {
    display: none !important;
  }

  .card--wins {
    display: none !important;
  }

  .service-cards {
    bottom: 4%;
    right: 2%;
    z-index: 3;
    transform: scale(0.9);
    transform-origin: bottom right;
  }

  .hero__tagline {
    font-size: clamp(0.9rem, 3.5vw, 1.1rem);
    line-height: 1.35;
  }

  .hero__title {
    font-size: clamp(1.9rem, 8.5vw, 2.85rem);
    letter-spacing: -0.045em;
  }

  .hero__title-line--muted {
    font-size: 0.92em;
  }

  /* RESPONSIVE: CTA was visually heavier than the headline — compact pill. */
  .hero__cta .cta {
    min-width: 0;
    width: auto;
    max-width: min(100%, 220px);
    margin-inline: auto;
  }

  .hero__cta .cta,
  .frame .cta {
    min-height: 44px;
    padding: 0.5rem 0.95rem;
    gap: 0.4rem;
    border-radius: 11px;
    box-shadow: 0 6px 3px #fff288;
  }

  .hero__cta .cta__label,
  .frame .cta__label {
    font-size: clamp(0.88rem, 2.9vw, 0.98rem);
    line-height: 1.15;
    white-space: normal;
    text-align: center;
  }

  .hero__cta .cta__arrow,
  .frame .cta__arrow {
    width: 17px;
    height: 17px;
  }

  /* ── Who we are (About) ── */
  .about-os__title {
    font-size: clamp(2rem, 8.2vw, 2.85rem);
    line-height: 1.05;
  }

  .about-os__lede {
    font-size: clamp(1.02rem, 3.6vw, 1.14rem);
    line-height: 1.65;
  }

  .about-os__eyebrow {
    font-size: 0.74rem;
  }

  .about-os__service-title {
    font-size: 1.05rem;
  }

  .about-os__service-sub {
    font-size: 0.88rem;
  }

  .about-os__founders {
    font-size: 0.95rem;
  }

  /* ── Testimonials (Clients) ── */
  .clients__title {
    font-size: clamp(2.05rem, 8.5vw, 3.1rem);
    line-height: 1;
  }

  .clients__subtitle {
    font-size: clamp(1rem, 3.5vw, 1.12rem);
    line-height: 1.6;
  }

  .clients__eyebrow {
    font-size: 0.72rem;
  }

  .t-card__quote {
    font-size: clamp(0.86rem, 3.1vw, 0.98rem);
    line-height: 1.48;
  }

  .t-card__name {
    font-size: 0.9rem;
  }

  .t-card__role {
    font-size: 0.76rem;
  }

  .clients__trust {
    font-size: 0.8rem;
  }

  /* ── Pricing ── */
  .pricing__title {
    font-size: clamp(2rem, 7.5vw, 2.85rem);
  }

  .pricing__lede {
    font-size: clamp(1rem, 3.5vw, 1.12rem);
    line-height: 1.65;
  }

  .pricing__eyebrow {
    font-size: 0.74rem;
  }

  .pricing__stage-title {
    font-size: clamp(1.45rem, 5.5vw, 2rem);
  }

  .pricing__stage-sub {
    font-size: clamp(0.98rem, 3.2vw, 1.06rem);
    line-height: 1.6;
  }

  .pricing__nav-text {
    font-size: 0.95rem;
  }

  .pricing-brief__title {
    font-size: 1.15rem;
  }

  .pricing-brief__desc {
    font-size: 0.94rem;
    line-height: 1.55;
  }

  .pricing-brief__price strong {
    font-size: 1.5rem;
  }

  .pricing-tier__name {
    font-size: 1.08rem;
  }

  .pricing-tier__tagline {
    font-size: 0.92rem;
    line-height: 1.45;
  }

  .pricing-tier__price-now,
  .pricing-tier__price--static strong {
    font-size: clamp(1.45rem, 5.5vw, 1.75rem);
  }

  .pricing-tier__price-was {
    font-size: 0.78rem;
  }

  .pricing-tier__price-unit {
    font-size: 0.84rem;
  }

  .pricing-tier__highlights li {
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .pricing-tier__list li,
  .pricing-tier__scope-label {
    font-size: 0.88rem;
  }

  .pricing-tier__scope-meta {
    font-size: 0.72rem;
  }

  .pricing-tier__cta {
    font-size: 0.9rem;
  }

  .pricing-tiers:not(.swiper-initialized) .pricing-tier {
    flex: 0 0 min(88vw, 320px);
  }

  .pricing-tiers.swiper-initialized .swiper-slide.pricing-tier {
    width: min(88vw, 320px);
  }
}

/* ════════════════════════════════════════════════════════════════════════
   Small phones — ≤480px
   ════════════════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .hero__title {
    font-size: clamp(1.7rem, 9vw, 2.4rem);
  }

  .about-os__title {
    font-size: clamp(1.85rem, 8.8vw, 2.35rem);
  }

  .clients__title {
    font-size: clamp(1.9rem, 9vw, 2.5rem);
  }

  .pricing__title {
    font-size: clamp(1.85rem, 8.5vw, 2.35rem);
  }
}

/* ════════════════════════════════════════════════════════════════════════
   Tablet — 1024px and below (layout + overflow)
   ════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .pricing-tier__highlights li,
  .pricing-tier__list li,
  .pricing-tier__name,
  .pricing-tier__tagline {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .pricing-tier__cta {
    white-space: normal;
    text-align: center;
    line-height: 1.25;
  }
}

/* ════════════════════════════════════════════════════════════════════════
   Tablet portrait — 768px and below (layout + tap targets)
   ════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .finder-sidebar .finder-section-label {
    grid-column: 1 / -1;
    margin-block: 12px 6px;
  }

  .pricing-tier__cta {
    min-height: 44px;
    padding-block: 0.7rem;
  }

  .pricing-brief__btn {
    min-height: 44px;
  }

  .pricing-brief__price {
    flex-wrap: wrap;
  }

  .pricing-brief__price span {
    white-space: normal;
  }

  .site-footer__socials a {
    width: 44px;
    height: 44px;
  }

  .site-footer__bar-links a {
    display: inline-block;
    padding-block: 6px;
  }

  .closing__btn {
    min-height: 44px;
  }

  .pricing-brief__title,
  .pricing-brief__desc {
    overflow-wrap: anywhere;
  }
}

/* ════════════════════════════════════════════════════════════════════════
   Mobile — 640px and below
   ════════════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .closing__btn {
    min-height: 44px;
    padding: 12px 18px;
  }

  .pricing-tiers {
    scroll-padding-inline: 4px;
  }

  .finder-title {
    min-width: 0;
  }
}

/* ════════════════════════════════════════════════════════════════════════
   Small mobile — 480px and below
   ════════════════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .about-os__founders-label {
    line-height: 1.45;
    word-break: break-word;
  }

  .site-header {
    gap: 0.4rem;
  }

  .site-footer__bar-links {
    gap: 10px 16px;
  }
}

/* ════════════════════════════════════════════════════════════════════════
   Extra-narrow — ≤380px
   ════════════════════════════════════════════════════════════════════════ */
@media (max-width: 380px) {
  .pricing__nav-btn {
    min-height: 70px;
    padding: 8px 4px;
  }

  .pricing__nav-text {
    font-size: 0.76rem;
  }

  .pricing-brief__btn {
    width: 100%;
  }

  .finder-content {
    padding: 10px;
  }
}

/* ════════════════════════════════════════════════════════════════════════
   Laptop — 1280×720 / 1366×768 (desktop width, short height)
   Width stays desktop; only tighten vertical rhythm + clip risks.
   ════════════════════════════════════════════════════════════════════════ */
@media (min-width: 1280px) and (max-height: 820px) {
  .about-os {
    min-height: auto;
    margin-top: clamp(1.25rem, 3vw, 2rem);
    padding-block: clamp(2.75rem, 6svh, 4rem);
    padding-bottom: calc(clamp(2.75rem, 6svh, 4rem) + 3rem);
  }

  .about-os__inner {
    gap: clamp(1.75rem, 3.5vw, 2.75rem);
  }

  .about-os__stage {
    max-height: min(400px, 52svh);
    min-height: min(300px, 46svh);
  }

  .about-os__title {
    font-size: clamp(2.1rem, 3.2vw, 2.85rem);
  }

  .finder-section {
    padding-block: var(--section-pad-y, clamp(3rem, 6vw, 5rem));
  }

  .finder-intro {
    margin-bottom: clamp(1.25rem, 2.5vw, 1.75rem);
  }

  .finder-body {
    min-height: clamp(360px, 50svh, 460px);
  }

  .finder-preview iframe {
    height: clamp(260px, 44svh, 360px);
  }

  .clients {
    padding-block: clamp(2rem, 4svh, 3rem) clamp(1.25rem, 3vw, 2rem);
  }

  .clients__head {
    margin-bottom: clamp(28px, 4vw, 56px);
  }

  .clients__pin {
    height: min(70svh, 560px);
    min-height: clamp(440px, 66svh, 520px);
  }

  .clients__scene {
    inset: clamp(24px, 3.5vw, 44px) clamp(20px, 3.5vw, 56px)
      clamp(32px, 4.5vw, 56px);
  }

  .clients__cards {
    bottom: clamp(88px, 11vw, 128px);
    height: clamp(185px, 20vw, 240px);
    width: min(52vw, 320px);
  }

  .envelope-img {
    width: min(56vw, 460px);
  }

  .clients__envelope-shadow {
    width: min(48vw, 400px);
    height: min(6vw, 72px);
  }

  .t-card {
    padding: clamp(18px, 2vw, 24px) clamp(20px, 2.2vw, 26px)
      clamp(16px, 1.8vw, 22px);
  }

  .t-card::before {
    font-size: clamp(100px, 12vw, 128px);
    top: -18px;
  }

  .t-card__quote {
    font-size: clamp(0.92rem, 1.05vw, 1.02rem);
    margin-bottom: 12px;
  }

  .pricing {
    padding-block: clamp(3rem, 6svh, 5rem) clamp(3.5rem, 7svh, 6rem);
  }

  .pricing__nav {
    max-height: calc(100svh - 2.5rem);
    overflow-y: auto;
    scrollbar-width: thin;
  }

  .pricing-tier {
    padding: 1.15rem 1.1rem 1.25rem;
  }

  .closing__cta {
    padding-top: clamp(48px, 7svh, 80px);
    padding-bottom: clamp(36px, 5svh, 64px);
  }
}

/* ════════════════════════════════════════════════════════════════════════
   Touch targets — all viewports (WCAG 2.5.5)
   ════════════════════════════════════════════════════════════════════════ */
.menu__toggle {
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  padding: 10px 8px;
  justify-content: center;
  align-items: stretch;
}

.finder-icon-btn {
  min-width: 36px;
  min-height: 32px;
}

.finder-nav-item {
  min-height: 44px;
  align-items: center;
}

.site-menu__close,
.site-menu__cta-btn,
.pricing-brief__btn {
  min-height: 44px;
}

.site-menu__link {
  min-height: 44px;
  align-items: center;
}

.finder-preview-close,
.cta-modal__close {
  min-width: 44px;
  min-height: 44px;
}

/* ════════════════════════════════════════════════════════════════════════
   Narrow header — wordmark must not force horizontal scroll
   ════════════════════════════════════════════════════════════════════════ */
@media (max-width: 420px) {
  .brand-wordmark {
    font-size: clamp(1.05rem, 5.2vw, 1.28rem);
    letter-spacing: 0.02em;
  }
}

/* ════════════════════════════════════════════════════════════════════════
   Pricing — sidebar + tier grid between 901px–1100px
   (prevents crushed 3-column cards beside the nav)
   ════════════════════════════════════════════════════════════════════════ */
@media (min-width: 901px) and (max-width: 1100px) {
  .pricing__layout {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 1rem;
  }

  .pricing-tiers--trio,
  .pricing-tiers--many {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ════════════════════════════════════════════════════════════════════════
   Tablet landscape / short height — ≤1279px wide, ≤820px tall
   (iPad 1024×768, small laptops in tablet breakpoint)
   ════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1279px) and (max-height: 820px) {
  .about-os {
    min-height: auto;
    padding-block: clamp(2.5rem, 6svh, 3.75rem);
    padding-bottom: calc(clamp(2.5rem, 6svh, 3.75rem) + 2.75rem);
  }

  .about-os__stage {
    max-height: min(380px, 50svh);
    min-height: min(280px, 44svh);
  }

  .finder-body {
    min-height: clamp(340px, 48svh, 440px);
  }

  .clients__pin {
    height: min(68svh, 540px);
    min-height: clamp(420px, 64svh, 500px);
  }

  .clients__cards {
    bottom: clamp(80px, 10vw, 120px);
    height: clamp(175px, 18vw, 220px);
    width: min(54vw, 300px);
  }

  .envelope-img {
    width: min(58vw, 400px);
  }
}

/* ════════════════════════════════════════════════════════════════════════
   Decorative layers — clip off-screen paint (marquee, pricing orbs)
   ════════════════════════════════════════════════════════════════════════ */
.pricing__bg {
  contain: strict;
}

.about-os__marquee {
  contain: paint;
}

/* ════════════════════════════════════════════════════════════════════════
   Overflow safety — ≤1279px
   ════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1279px) {
  .pricing__stage-sub,
  .pricing-brief__desc,
  .about-os__lede,
  .closing__sub,
  .clients__subtitle,
  .finder-subheading,
  .pricing-tier__price-was,
  .pricing-tier__price-unit,
  .site-footer__brand-wrap p,
  .site-menu__meta-block a {
    overflow-wrap: anywhere;
  }
}

/* ════════════════════════════════════════════════════════════════════════
   Ultra-narrow — ≤320px (Galaxy Fold, budget phones)
   ════════════════════════════════════════════════════════════════════════ */
@media (max-width: 320px) {
  /* ── Hero ── */
  .hero__title {
    font-size: clamp(1.35rem, 9.5vw, 1.85rem);
  }

  /* ── About ── */
  .about-os__title {
    font-size: clamp(1.5rem, 9vw, 1.95rem);
  }

  .about-os__lede {
    font-size: clamp(0.88rem, 3.4vw, 1rem);
  }

  .about-os__service {
    padding: 0.7rem 0.75rem;
  }

  .about-os__service-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  .about-os__service-icon svg {
    width: 15px;
    height: 15px;
  }

  .about-os__service-title {
    font-size: 0.85rem;
  }

  .about-os__service-sub {
    font-size: 0.76rem;
  }

  .about-os__stage {
    min-height: 240px;
    max-height: 320px;
  }

  .about-os__avatar {
    width: 36px;
    height: 36px;
    margin-left: -10px;
  }

  .about-os__founders {
    padding: 0.5rem 0.7rem;
    gap: 0.4rem;
    font-size: 0.82rem;
  }

  .about-os__paper {
    font-size: 0.64rem;
    padding: 0.35rem 0.55rem;
  }

  .about-os__stamp {
    padding: 0.5rem 0.65rem;
  }

  .about-os__stamp-mark {
    font-size: 1.5rem;
  }

  .about-os__stamp-line {
    font-size: 0.55rem;
  }

  /* ── Clients ── */
  .clients__title {
    font-size: clamp(1.5rem, 8.5vw, 1.95rem);
  }

  /* ── Pricing ── */
  .pricing__title {
    font-size: clamp(1.5rem, 9vw, 1.95rem);
  }

  .pricing__nav-btn {
    min-height: 64px;
    padding: 6px 3px;
  }

  .pricing__nav-text {
    font-size: 0.7rem;
  }

  .pricing__nav-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }

  .pricing__nav-icon svg {
    width: 14px;
    height: 14px;
  }

  .pricing__stage {
    padding: 0.75rem;
    border-radius: 16px;
  }

  .pricing-tier {
    padding: 0.75rem;
    border-radius: 14px;
  }

  .pricing-tier__name {
    font-size: 0.88rem;
  }

  .pricing-tier__tagline {
    font-size: 0.75rem;
  }

  .pricing-tier__price-now,
  .pricing-tier__price--static strong {
    font-size: clamp(1.2rem, 5vw, 1.45rem);
  }

  .pricing-tier__highlights li,
  .pricing-tier__list li {
    font-size: 0.72rem;
  }

  .pricing-tier__cta {
    font-size: 0.78rem;
    min-height: 40px;
    padding: 0.5rem 0.7rem;
  }

  .pricing-brief {
    padding: 0.85rem;
    gap: 0.75rem;
  }

  .pricing-brief__title {
    font-size: 0.95rem;
  }

  .pricing-brief__desc {
    font-size: 0.8rem;
  }

  /* ── Finder ── */
  .finder-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 6px;
  }

  .finder-body {
    grid-template-columns: 1fr;
    min-height: clamp(360px, 56vh, 480px);
  }

  .finder-sidebar {
    display: none;
  }

  .finder-topbar {
    grid-template-columns: auto 1fr auto;
    padding: 0 8px;
    height: 40px;
  }

  .finder-title {
    font-size: 12px;
  }

  .folder-thumb {
    width: 80px;
    height: 64px;
  }

  .finder-meta {
    font-size: 10px;
    max-width: 90px;
  }

  .finder-heading {
    font-size: clamp(1.2rem, 5vw, 1.6rem);
  }

  .finder-subheading {
    font-size: clamp(0.85rem, 3.2vw, 0.95rem);
  }

  /* ── Closing / Footer ── */
  .closing__title {
    font-size: clamp(1.55rem, 8.5vw, 1.95rem);
  }

  .closing__sub {
    font-size: clamp(0.88rem, 3.2vw, 0.98rem);
  }

  .closing__btn {
    padding: 10px 14px;
    font-size: 12.5px;
  }

  .closing__stat {
    padding: 16px 14px 18px;
    border-radius: 14px;
  }

  .closing__stat-num {
    font-size: clamp(1.35rem, 5.5vw, 1.65rem);
  }

  .closing__stat-label {
    font-size: 11.5px;
  }

  .site-footer {
    gap: 18px;
    font-size: 12.5px;
  }

  .site-footer__brand {
    font-size: 1.25rem;
  }

  .site-footer h4 {
    font-size: 10px;
    margin-bottom: 10px;
  }

  .site-footer ul {
    gap: 8px;
  }
}

/* ════════════════════════════════════════════════════════════════════════
   Finder grid — mobile fallbacks (≤640px: 3 cols, ≤480px: 2 cols)
   ════════════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .finder-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 8px;
  }

  .folder-thumb {
    width: 88px;
    height: 70px;
  }
}

@media (max-width: 480px) {
  .finder-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 8px;
  }

  .finder-body {
    grid-template-columns: 1fr;
    min-height: clamp(400px, 60vh, 520px);
  }

  .finder-sidebar {
    display: none;
  }
}
