/* ==========================================================================
   Oustad Connect — Responsive
   ========================================================================== */

@media (max-width: 1180px) {
  .nav-link {
    padding-inline: 0.6rem;
    font-size: 0.87rem;
  }

  .main-nav {
    gap: 1rem;
  }
}

@media (max-width: 1024px) {
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-grid {
    gap: 2.5rem;
  }

  .hero-art {
    max-width: 500px;
  }

  .footer-grid {
    grid-template-columns: 1.3fr 0.8fr 1fr;
    gap: 2rem;
  }

  .stats-strip {
    grid-template-columns: repeat(4, 1fr);
  }

  .stat {
    padding: 1.2rem 1.1rem;
  }
}

@media (max-width: 980px) {
  :root {
    --header-h: 70px;
  }

  html {
    scroll-padding-top: calc(var(--header-h) + 16px);
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .main-nav {
    position: absolute;
    inset-block-start: 100%;
    inset-inline: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 0.9rem var(--gutter) 1.5rem;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.99);
    box-shadow: 0 30px 60px -40px rgba(20, 45, 64, 0.6);
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
  }

  .main-nav.is-open {
    display: flex;
    animation: nav-drop 0.28s var(--ease);
  }

  @keyframes nav-drop {
    from {
      opacity: 0;
      transform: translateY(-8px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
  }

  .nav-link {
    display: flex;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    font-size: 0.98rem;
  }

  .nav-actions {
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
  }

  .nav-actions .btn {
    flex: 1;
    max-width: 220px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 3rem;
  }

  .hero-copy {
    max-width: 640px;
  }

  .hero-art {
    max-width: 560px;
  }

  .split {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
  }

  .split--top {
    gap: 2rem;
  }

  .feature-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .feature-row--reverse .feature-media,
  .feature-row--reverse .feature-copy {
    order: 0;
  }

  .feature-media {
    min-height: 300px;
    order: 0;
    max-width: 620px;
    margin-inline: auto;
    width: 100%;
  }

  .feature-copy {
    order: 1;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-desc {
    max-width: 55ch;
  }

  .cta-inner {
    align-items: flex-start;
  }

  .gateway-options {
    gap: 0.85rem;
  }
}

@media (max-width: 820px) {
  .stats-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 1rem;
    align-items: baseline;
  }

  .step::before {
    grid-row: span 2;
    font-size: 0.9rem;
    padding-top: 0.15rem;
  }

  .step h3 {
    margin-top: 0;
  }

  .step p {
    grid-column: 2;
  }

  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  :root {
    --gutter: 20px;
  }

  .section {
    padding-block: clamp(52px, 10vw, 76px);
  }

  .hero {
    padding-block: 2.75rem 4.5rem;
  }

  .hero-title {
    font-size: clamp(2.05rem, 8vw, 2.8rem);
  }

  .hero-lead {
    font-size: 1rem;
  }

  .hero-actions {
    gap: 0.65rem;
  }

  .hero-actions .btn {
    flex: 1 1 200px;
  }

  .hero-trust {
    gap: 0.6rem 1.2rem;
  }

  .hero-art-chip {
    inset-inline-start: 4%;
    inset-block-end: 4%;
    padding: 0.55rem 0.7rem;
  }

  .hero-art-chip-icon {
    width: 32px;
    height: 32px;
  }

  .hero-art-chip-text strong {
    font-size: 0.76rem;
  }

  .hero-art-chip-text span {
    font-size: 0.68rem;
  }

  .page-hero {
    padding-block: 2.4rem 2.6rem;
  }

  .page-title {
    font-size: clamp(1.9rem, 7vw, 2.5rem);
  }

  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .section-head--split {
    align-items: flex-start;
  }

  .feature-media {
    padding: 1.5rem;
    min-height: 280px;
  }

  .feature-art {
    max-width: 260px;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.25rem;
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .cta-panel {
    border-radius: var(--radius-lg);
  }

  .cta-actions {
    width: 100%;
  }

  .cta-actions .btn {
    flex: 1 1 220px;
  }

  .gateway-options {
    grid-template-columns: minmax(0, 1fr);
    text-align: start;
  }

  .gateway h1 {
    font-size: clamp(1.7rem, 6.5vw, 2.2rem);
  }

  .gateway-brand {
    margin-bottom: 1.5rem;
  }

  .quote-card {
    border-radius: var(--radius);
  }
}

@media (max-width: 520px) {
  .brand-sub {
    display: none;
  }

  .brand-name {
    font-size: 0.98rem;
  }

  .header-inner {
    gap: 0.75rem;
  }

  .nav-toggle {
    width: 42px;
    height: 42px;
  }

  .lang-link {
    min-width: 31px;
    font-size: 0.7rem;
  }

  .nav-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .nav-actions .btn {
    max-width: none;
    flex: 1 1 160px;
  }

  .hero-badge {
    font-size: 0.73rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
    width: 100%;
  }

  .hero-trust {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
  }

  .hero-art {
    border-radius: var(--radius-lg);
    padding: 0.6rem;
  }

  .hero-art > img {
    border-radius: calc(var(--radius-lg) - 6px);
  }

  .hero-art-chip {
    position: static;
    width: 100%;
    margin-top: 0.6rem;
    justify-content: flex-start;
    box-shadow: var(--shadow-xs);
  }

  .stats-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .stat {
    padding: 1.1rem 1.2rem;
  }

  .section-title {
    font-size: clamp(1.55rem, 6.4vw, 2rem);
  }

  .feature-art {
    width: min(100%, 230px);
  }

  .feature-art-icon {
    width: 88px;
    height: 88px;
    border-radius: 24px;
  }

  .feature-art-icon img {
    width: 42px;
    height: 42px;
  }

  .feature-art-tag--top {
    inset-inline-start: -4%;
  }

  .feature-art-tag--bottom {
    inset-inline-end: -4%;
  }

  .cta-actions {
    flex-direction: column;
  }

  .cta-actions .btn {
    width: 100%;
    flex: 1 1 auto;
  }

  .footer-note p {
    font-size: 0.76rem;
  }

  .contact-card {
    padding: 1.4rem;
  }

  .gateway {
    padding-block: 2rem;
  }

  .gateway-brand img {
    width: 46px;
    height: 46px;
  }

  .gateway-brand-name {
    font-size: 1.1rem;
  }
}

@media (max-width: 380px) {
  .brand-name {
    font-size: 0.9rem;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .hero-title {
    font-size: 1.9rem;
  }

  .nav-actions .btn {
    flex: 1 1 100%;
  }

  .feature-art-tag {
    font-size: 0.66rem;
    padding: 0.35rem 0.55rem;
  }
}

@media (min-width: 1440px) {
  .hero-art {
    max-width: 590px;
  }
}
