/* BK Global Advisory - responsive overrides. Breakpoints: 1280/1024/768/480 */

/* BREAKPOINT 1280px - Smaller laptops */
@media (max-width: 1280px) {

  .primary-nav ul { gap: 1.75rem; }

  .services-stack { max-width: 800px; }

  .case-featured { gap: 2rem; }

  /* Section 05 - keep image column proportionally larger at 1280 */
  .whybk-grid {
    grid-template-columns: 1fr 1fr 1.4fr;
    gap: 2.5rem;
  }

  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
    gap: 1.75rem;
  }
}

/* BREAKPOINT 1024px - Tablet landscape / small laptops */
@media (max-width: 1024px) {

  .header-inner { gap: 1rem; }
  .primary-nav { display: none; }
  .menu-toggle { display: flex; }
  .header-actions .cta-pill--small { display: none; }

  /* Section 02 - Who We Are */
  .wwa-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .wwa-visual {
    max-width: 480px;
    margin: 0 auto;
  }
  .wwa-content {
    max-width: 100%;
  }

  /* Section 04 */
  .services-header {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .services-stack-wrapper {
    height: auto;
  }
  .services-sticky {
    position: relative;
    height: auto;
    min-height: auto;
    padding: 2rem 0;
    display: block;
  }
  .services-stack {
    height: auto;
    perspective: none;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }
  .service-card {
    position: relative;
    opacity: 1;
    transform: none;
    inset: auto;
    min-height: 320px;
  }
  .service-card.is-prev { opacity: 1; transform: none; }
  .services-progress { display: none; }

  /* Section 05 */
  .whybk-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  /* Image becomes a centered featured card when grid collapses.
     Rotation softened so the corners don't crash into adjacent sections at full width. */
  .whybk-image {
    max-width: 460px;
    margin: 0 auto;
    transform: rotate(8deg);
  }
  .whybk-image.reveal {
    transform: rotate(8deg) translateY(30px);
  }
  .whybk-image.reveal.is-visible {
    transform: rotate(8deg) translateY(0);
  }

  /* Section 06 — founders stay 2-up at 1024 (portrait photos suit side-by-side);
     stacking + horizontal divider handled in the 768 block below. */

  /* Section 07 */
  .case-featured {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Section 08 */
  .process-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .footer-col--brand {
    grid-column: 1 / -1;
  }

  /* New dubai images - stack below text */
  .svc__head-grid,
  .finalcta-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  /* Locations carousel - 3 visible at tablet */
  .loc {
    flex: 0 0 33.3333vw;
  }

  /* Audience - 2 columns at tablet */
  .audience-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  /* ABOUT PAGE - Origin grid stacks */
  .about-origin-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .about-origin-head {
    position: static;
  }
  /* ABOUT PAGE - Leadership stacks to single column, portrait on top */
  .about-leader,
  .about-leader--reverse {
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 640px;
  }
  .about-leader--reverse .about-leader-portrait { order: 1; }
  .about-leader--reverse .about-leader-body { order: 2; }

  /* CONTACT PAGE - Grid stacks */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .contact-info {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
  }
  .contact-info .contact-card {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 240px;
  }

  /* SERVICES PAGE - index strip wraps to 3 cols, service blocks stack vertically */
  .services-index-inner {
    grid-template-columns: repeat(3, 1fr);
  }
  .services-index-item {
    border-bottom: 1px solid var(--border-faint);
  }
  .services-index-item:nth-child(3n) {
    border-right: 0;
  }
  .services-index-item:nth-last-child(-n+2) {
    border-bottom: 0;
  }
  .service-block,
  .service-block--left,
  .service-block--right {
    grid-template-columns: 1fr;
    gap: clamp(1.5rem, 3vw, 2rem);
    max-width: 720px;
  }
  /* Always image-on-top, content-below when stacked */
  .service-block--left .service-block-body,
  .service-block--right .service-block-body { order: 2; }
  .service-block--left .service-block-visual,
  .service-block--right .service-block-visual { order: 1; }
}

/* BREAKPOINT 768px - Tablet portrait / large phones */
@media (max-width: 768px) {

  body { font-size: 15px; }

  .site-header { padding: 1rem 0; }
  .brand-logo { height: 36px; }
  .site-header.is-scrolled .brand-logo { height: 30px; }

  section { padding: clamp(3.5rem, 8vw, 5rem) 0; }

  /* Section 01 - Hero */
  .hero-headline { font-size: clamp(2rem, 8vw, 4rem); }
  .hero-eyebrow { letter-spacing: 2.5px; margin-bottom: 1.5rem; }
  .hero-subtitle { margin: 1.25rem auto 2rem; }
  .hero-ctas { flex-direction: column; gap: 1rem; }
  .scroll-cue { bottom: 1.25rem; }

  /* Section 03 - The Bridge */
  .bridge-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  .bridge-side--before { order: 1; }
  .bridge-center { order: 2; }
  .bridge-side--after { order: 3; }
  .bridge-list { display: inline-block; text-align: left; }

  /* Section 04 - Services (stack content on mobile/tablet) */
  .service-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 1.5rem;
    text-align: center;
  }
  .service-card-visual {
    order: -1;
    min-height: 140px;
  }
  .service-svg { max-width: 180px; }
  .service-card-header { justify-content: center; gap: 1rem; }
  .service-card-tags { justify-content: center; }
  .service-card-body { text-align: center; margin-left: auto; margin-right: auto; }

  /* Section 06 - Founders */
  .founders-grid { grid-template-columns: 1fr; }
  .founder-panel--right::before {
    top: 0;
    bottom: auto;
    left: 8%;
    right: 8%;
    width: auto;
    height: 1px;
  }

  /* Section 8.5 - Audience: tighten padding at tablet portrait */
  .audience-card { padding: 1.5rem 1.25rem 1.25rem; }

  /* Section 07 - Cases */
  .case-featured { padding: 1.75rem 1.5rem; }
  .case-pullquote p { font-size: clamp(1.6rem, 6vw, 2rem); }
  .case-stats { grid-template-columns: 1fr; gap: 1.25rem; padding: 1.5rem 0; }
  .case-stat { align-items: flex-start; }
  .case-ticker { flex-direction: column; align-items: flex-start; gap: 0.75rem; }

  /* Section 08 - Process */
  .process-timeline { padding-left: 34px; }
  .process-dot { left: -28px; }
  .process-line { left: 10px; }

  /* Section 09 - Final CTA */
  .finalcta-ctas { flex-direction: column; align-items: stretch; }
  .finalcta-ctas .cta-pill { justify-content: center; }

  /* Locations carousel - 2 visible on small tablet */
  .loc {
    flex: 0 0 50vw;
    aspect-ratio: 4 / 5;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 0.5rem; }

  /* ABOUT PAGE - Method 2-col becomes 1-col */
  .about-method-list {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }
  /* ABOUT PAGE - Principles tighten on tablet portrait */
  .about-principle {
    grid-template-columns: 56px 1fr;
    gap: 1.25rem;
  }
  /* ABOUT PAGE - Origin strip shorter on mobile */
  .about-origin-strip { height: clamp(220px, 40vw, 320px); }
  /* ABOUT PAGE - CTA buttons stack on tablet portrait */
  .about-cta-buttons { flex-direction: column; align-items: stretch; }
  .about-cta-buttons .cta-pill { justify-content: center; }

  /* CONTACT PAGE - Form 2-col rows collapse, founder cards stack */
  .form-row--2 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .contact-founders-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .contact-info .contact-card {
    flex: 1 1 100%;
  }
  .form-actions { flex-direction: column; align-items: stretch; }
  .form-actions .cta-pill { justify-content: center; width: 100%; }

  /* SERVICES PAGE - index goes vertical, icons inline with names */
  .services-index-inner {
    grid-template-columns: 1fr;
  }
  .services-index-item {
    border-right: 0;
    border-bottom: 1px solid var(--border-faint);
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    text-align: left;
    padding: 1.25rem 1.5rem;
  }
  .services-index-item:last-child {
    border-bottom: 0;
  }
  .services-index-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
  }
  .services-index-icon svg {
    width: 22px;
    height: 22px;
  }
  .services-index-name {
    max-width: none;
    font-size: 15px;
  }
  /* Service blocks already collapsed in 1024 rule above */
}

/* BREAKPOINT 480px - Small phones */
@media (max-width: 480px) {

  :root { --container-pad: 1.25rem; }

  body { font-size: 14.5px; }

  /* Header */
  .brand-logo { height: 32px; }

  /* Hero */
  .hero-headline {
    font-size: clamp(1.8rem, 9vw, 3rem);
    letter-spacing: -0.02em;
  }
  .hero-eyebrow {
    font-size: 9px;
    letter-spacing: 2px;
  }
  .hero-subtitle { font-size: 1rem; }
  .hero-ctas .cta-pill { width: 100%; justify-content: center; }

  /* Who We Are */
  .wwa-headline { font-size: clamp(1.6rem, 7vw, 2rem); }
  .wwa-checks { grid-template-columns: 1fr; gap: 10px; }
  .wwa-badge-brand {
    top: -20px;
    right: -12px;
    padding: 12px 16px 12px 14px;
    gap: 12px;
  }
  .wwa-badge-logo { width: 64px; }
  .wwa-badge-cap { font-size: 14px; }
  .wwa-badge-sub { font-size: 9px; }
  .wwa-visual-offset { inset: 12px -12px -12px 12px; }

  /* Bridge */
  .bridge-badge { width: 56px; height: 56px; font-size: 20px; }
  .bridge-list li { font-size: 14px; }

  /* Services */
  .services-headline { font-size: 1.75rem; }
  .service-card {
    padding: 1.5rem 1.25rem;
    min-height: 280px;
  }
  .service-card-title { font-size: 1.25rem; }
  .service-card-num { font-size: 2.25rem; }
  .service-card-body { font-size: 13px; }

  /* Why BK */
  .whybk-headline { font-size: 1.6rem; }
  .whybk-dossier { gap: 1rem 1rem; }
  .whybk-block { padding-bottom: 1rem; }
  .whybk-line { font-size: 15px; }
  .whybk-desc { font-size: 13px; }
  .whybk-image {
    max-width: 320px;
    transform: rotate(4deg);
  }
  .whybk-image.reveal {
    transform: rotate(4deg) translateY(30px);
  }
  .whybk-image.reveal.is-visible {
    transform: rotate(4deg) translateY(0);
  }

  /* Locations carousel - 1 card visible on phone (with peek) */
  .loc {
    flex: 0 0 78vw;
    aspect-ratio: 5 / 6;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
  }
  /* Slow down a little so phone users can read each card */
  .locations-strip {
    animation-duration: 42s;
  }

  /* Founders */
  .founder-content { padding: 1.5rem 1.25rem; }
  .founder-first, .founder-last { font-size: 1.6rem; }
  .founder-quote { font-size: 0.92rem; }
  .founder-tag { font-size: 10px; }

  /* Cases */
  .case-pullquote p { font-size: 1.5rem; }
  .case-featured { padding: 1.5rem 1.25rem; }

  /* Process */
  .process-phase-title { font-size: 1.1rem; }
  .process-phase { padding-bottom: 2rem; }

  /* Audience - single column at phone */
  .audience-grid { grid-template-columns: 1fr; }
  .audience-card { padding: 1.5rem 1.25rem 1.25rem; }
  .audience-title { font-size: 17px; }

  /* Final CTA */
  .finalcta-headline { font-size: 2.2rem; }

  /* Footer */
  .footer-tagline { font-size: 1.5rem; }
  .footer-logo { height: 52px; }

  /* ABOUT PAGE - Phone typography refinement */
  .about-hero { padding-top: clamp(4rem, 10vw, 6rem); }
  .about-hero-headline { font-size: clamp(2rem, 9vw, 2.75rem); }
  .about-hero-lede { font-size: 1rem; }
  .about-origin-body p { font-size: 15px; }
  .about-origin-body p:first-child::first-letter {
    font-size: 3em;
  }
  .about-principle {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 1.5rem 0;
  }
  .about-principle-num { padding-top: 0; }
  .about-principle-title { font-size: 1.15rem; }
  .about-principle-text { font-size: 14.5px; }
  .about-leader-name { font-size: clamp(1.75rem, 9vw, 2.25rem); }
  .about-leader-bio { font-size: 14.5px; }
  .about-method-step { gap: 1rem; }
  .about-method-num { font-size: 2.25rem; }
  .about-method-step-title { font-size: 1.1rem; }
  .about-promise-text { font-size: clamp(1.25rem, 6vw, 1.75rem); }
  .about-promise-mark { font-size: 4.5rem; }
  .about-cta-headline { font-size: clamp(1.75rem, 8vw, 2.25rem); }

  /* CONTACT PAGE - phone polish */
  .contact-form-headline { font-size: clamp(1.5rem, 7vw, 2rem); }
  .contact-founders-headline { font-size: clamp(1.5rem, 7vw, 2rem); }
  .founder-contact-name { font-size: clamp(1.5rem, 8vw, 2rem); }
  .founder-contact-card { padding: 1.5rem 1.25rem; }
  .contact-card { padding: 1.25rem; }
  .form-field input,
  .form-field textarea,
  .form-field select { font-size: 16px; /* prevent iOS zoom on focus */ }

  /* SERVICES PAGE - phone polish */
  .service-block-title { font-size: clamp(1.4rem, 7vw, 1.85rem); }
  .service-block-desc { font-size: 15px; }
  .service-block { padding: 2.25rem 0; }
  .service-block-tags span { font-size: 9.5px; padding: 4px 10px; }
  .service-block-includes { margin-top: 1.5rem; padding-top: 1.25rem; }
  .service-block-includes li { font-size: 14px; }
}

/* ===================================================================
   SERVICES LIST v2 + DETAIL PAGE — Responsive overrides
   =================================================================== */

@media (max-width: 1024px) {
  /* Services list cards stack */
  .svc-card,
  .svc-card--right,
  .svc-card--left {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 720px;
  }
  .svc-card--right .svc-card-body,
  .svc-card--left  .svc-card-body { order: 2; }
  .svc-card--right .svc-card-visual,
  .svc-card--left  .svc-card-visual { order: 1; }

  /* Service detail — overview, deliverables, faq go single col */
  .svc-detail-hero-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .svc-detail-hero-meta {
    position: static;
  }
  .svc-detail-overview-grid,
  .svc-detail-deliverables-grid,
  .svc-detail-faq-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .svc-detail-overview-head,
  .svc-detail-deliverables-head,
  .svc-detail-faq-head {
    position: static;
  }

  /* Audience + process + related grids collapse to 2 cols */
  .svc-detail-audience-grid,
  .svc-detail-related-grid {
    grid-template-columns: 1fr 1fr;
  }
  .svc-detail-audience-card:last-child,
  .svc-detail-related-card:last-child {
    grid-column: 1 / -1;
    max-width: calc(50% - 0.625rem);
    justify-self: center;
    width: 100%;
  }
  .svc-detail-process-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Stats 2-col */
  .svc-detail-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
  /* At 2-col, items in the left column (1st + 3rd) should have no left border */
  .svc-detail-stat:nth-child(odd) {
    border-left: 0;
    padding-left: 0;
  }
  /* But the 2nd item (right column, row 1) still needs its divider —
     the :first-child reset from base CSS still applies though, so re-restore for non-first odd items */
  .svc-detail-stat:nth-child(even) {
    border-left: 1px solid var(--border-soft);
    padding-left: 1.25rem;
  }
}

@media (max-width: 768px) {
  /* Cards: visual aspect ratio more compact on mobile */
  .svc-card-visual { aspect-ratio: 16 / 11; }
  .svc-card { padding: 2.5rem 0; }

  /* All grids collapse to 1 col */
  .svc-detail-audience-grid,
  .svc-detail-related-grid,
  .svc-detail-process-grid {
    grid-template-columns: 1fr;
  }
  .svc-detail-audience-card:last-child,
  .svc-detail-related-card:last-child {
    max-width: none;
  }
  .svc-detail-stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .svc-detail-hero { padding: clamp(4rem, 10vw, 6rem) 0 3rem; }
  .svc-detail-headline { max-width: none; }
}

@media (max-width: 480px) {
  /* Cards: tighter type */
  .svc-card-title { font-size: clamp(1.25rem, 6vw, 1.6rem); }
  .svc-card-summary { font-size: 14.5px; }
  .svc-card-num { font-size: 2.5rem; }
  .svc-card { padding: 2rem 0; }

  /* Detail hero */
  .svc-detail-headline { font-size: clamp(1.85rem, 9vw, 2.5rem); }
  .svc-detail-lede { font-size: 1rem; }
  .svc-detail-num { font-size: 1.5rem; }
  .svc-detail-hero-ctas { flex-direction: column; align-items: stretch; }
  .svc-detail-hero-ctas .cta-pill { justify-content: center; }

  /* Stats single col on smallest */
  .svc-detail-stats-grid { grid-template-columns: 1fr; }
  /* No dividers when stats stack into a single column */
  .svc-detail-stat,
  .svc-detail-stat:nth-child(even) {
    border-left: 0;
    padding-left: 0;
  }

  /* Overview body drop-cap a hair smaller */
  .svc-detail-overview-body p { font-size: 15px; }
  .svc-detail-overview-body p:first-child::first-letter { font-size: 3em; }

  /* Deliverables single col */
  .svc-detail-deliverable {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 1.5rem 0;
  }
  .svc-detail-deliverable-num { padding-top: 0; }

  /* FAQ tighter */
  .svc-detail-faq-item summary { font-size: 1rem; padding: 1.25rem 0; }
  .svc-detail-faq-item p { font-size: 14.5px; padding-right: 0; }

  /* H2 phone scale */
  .svc-detail-h2 { font-size: clamp(1.5rem, 7vw, 2rem); }
}
