/* KITE — shared responsive layer (loaded on every page, after site.css).
   Breakpoints: 599 phone · 600–1023 tablet · 1024+ desktop. Desktop rules are not touched here. */

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img, video, svg { max-width: 100%; }
img { height: auto; }
body { overflow-x: clip; }

/* keyboard users always see where they are */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 3px solid #0798D1; outline-offset: 3px; border-radius: 4px; }

/* ---- touch targets: at least ~44px, without moving the layout (hit area grows, drawing stays) ---- */
@media (max-width: 1023px), (pointer: coarse) {
  .nav-cta-btn, .btn, .svc-tab-btn, .about-tab-btn, .portfolio-filter-pill, .cs-view-all, .about-btn-view-work,
  .cs-scroll, .footer-cta-pill, .contact-submit { min-height: 44px; }
  .nav-cta-btn, .btn, .svc-tab-btn, .about-tab-btn, .portfolio-filter-pill, .cs-view-all, .about-btn-view-work, .footer-cta-pill {
    display: inline-flex; align-items: center; justify-content: center;
  }
  /* header button stays compact; its tap area grows without making the pill taller */
  .nav-cta-btn { min-height: 36px; padding-inline: 14px; font-size: 12px; white-space: nowrap; position: relative; }
  .nav-cta-btn::after { content: ""; position: absolute; inset: -5px 0; }
  .footer-nav-links a, .footer-email, .footer-brand-logo-wrap, .cs-more, .contact-link-btn, .sticky-social-item,
  .nav-scrolled-logo, .portfolio-card a { position: relative; }
  .footer-nav-links a, .footer-email { display: inline-flex; align-items: center; min-height: 44px; }
  .footer-brand-logo-wrap, .cs-more, .contact-link-btn, .sticky-social-item, .nav-scrolled-logo { }
  .footer-brand-logo-wrap::after, .cs-more::after, .contact-link-btn::after, .sticky-social-item::after, .nav-scrolled-logo::after {
    content: ""; position: absolute; inset: -8px; }
}

/* ---- phones ---- */
@media (max-width: 599px) {
  :root { --page-pad: clamp(16px, 5vw, 24px); }
  .header-inner { padding: 0 14px; }
  .nav-tagline { display: none; }
  .site-footer { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  .footer-social-wrap .social-icon-row { flex-wrap: wrap; gap: 10px; }
  h1, h2, h3 { overflow-wrap: anywhere; hyphens: manual; }
}

/* ---- tablets ---- */
@media (min-width: 600px) and (max-width: 1023px) {
  .site-footer .footer-inner, .site-footer > div { max-width: 860px; margin-inline: auto; }
}

/* ---- motion: respect the visitor's setting everywhere ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---- floating social bar: desktop only (phones/tablets have the same links in the menu and footer) ---- */
@media (max-width: 1023px) {
  html body .sticky-social-bar, html body.page-about .sticky-social-bar { display: none !important; }
}

/* no empty screen-height gap around the section on tablets */
@media (max-width: 1023px) {
  #latest { min-height: 0 !important; }
}

/* phones: lift the hero text so the client logos fit in the sky above the middle building */
@media (max-width: 599px) {
  #hero .hero-copy { position: relative; top: -9svh; margin-top: 40px; }
}

/* ---- phones: one type scale + one section rhythm for the homepage ----
   (site.css sets these per section with !important; this layer is loaded later and uses the same weight to unify them) */
@media (max-width: 599px) {
  :root { --h2-size: clamp(2rem, 9vw, 2.6rem); --h3-size: clamp(1.5rem, 7vw, 1.9rem); --sec-y: clamp(44px, 12vw, 60px); }
  #latest .latest-title, #services .svc-section-title, #about .about-headline, #case-studies .cs-section-title {
    font-size: var(--h2-size) !important; line-height: 1.1 !important; text-wrap: balance;
  }
  #services .svc-pane-title { font-size: var(--h3-size) !important; line-height: 1.15 !important; text-wrap: balance; }
  .ready-headline { font-size: clamp(2.4rem, 12vw, 3.2rem) !important; text-wrap: balance; }
  #services, #about, #ready-to-fly-section { padding-block: var(--sec-y) !important; }
  #latest { padding-block: calc(var(--sec-y) * .7) !important; }
  #about .about-headline { margin-bottom: 18px !important; }
  #about .about-body p, #services .svc-pane-text { font-size: 1rem !important; line-height: 1.6 !important; }
  .menu-pill { min-height: 52px; }
}

/* iOS ignores overflow:hidden on <body>: lock the root too while the red menu is open */
html:has(.mobile-nav.open) { overflow: hidden; }

/* phones: the red ring is shown at full size (readable text) and the headline is pushed clear of it */
@media (max-width: 599px) {
  /* case studies: keep the pinned cards below the fixed header, with a shorter scroll gap between them */
  .case-studies-section .cs-deck { width: calc(100% - 24px); margin-top: 28px; }
  .case-studies-section { padding: 36px 0 44px !important; }
  .case-studies-section .cs-deck-card { top: 84px; margin-bottom: 9vh; }
  .case-studies-section .cs-all-wrap { margin-top: 20px; }
  .case-studies-section .cs-deck-card:last-child { margin-bottom: 0; }

}

.svc-pane-title .svc-br { display: block; }

/* services pane copy (single-column layout, <=960px): use the full card width and let the title wrap naturally */
@media (max-width: 960px) {
  #services .svc-pane-title .svc-br { display: inline; }
  #services .svc-copy-col { align-items: center; width: 100%; text-align: center; }
  #services .svc-pane-title {
    width: 100%; max-width: 100%; margin: 0 0 12px !important;
    font-size: clamp(1.9rem, 8.4vw, 2.3rem) !important; line-height: 1.12 !important;
    letter-spacing: 0 !important; text-wrap: balance;
  }
  #services .svc-pane-tagline { font-size: 1.05rem !important; line-height: 1.35; margin: 0 0 12px !important; text-wrap: balance; }
  #services .svc-pane-desc { font-size: .95rem !important; line-height: 1.6 !important; margin: 0 auto 24px !important; max-width: 34ch; text-wrap: pretty; }
  #services .svc-tabs-nav { gap: 8px 8px !important; }
  #services .svc-tab-btn { font-size: 13px !important; padding: 9px 16px !important; }
}

@media (max-width: 599px) {

  /* zoom the hero art in so the side buildings leave more open sky behind the copy */
  .hero-illustration-img { transform: translate(0, calc(32% + (812px - 100vh) * .5)) scale(1.9); transform: translate(0, calc(32% + (812px - 100svh) * .5)) scale(1.9); transform-origin: 50% 100%; }
  /* wider logo window: the script sizes it to the sky gap, widen it past the zoomed-in buildings */
  .hero-clients {
    left: 15% !important; width: 70% !important;
    -webkit-mask-image: linear-gradient(to right, transparent, black 14%, black 86%, transparent);
    mask-image: linear-gradient(to right, transparent, black 14%, black 86%, transparent);
  }
  .hero-clients .marquee-track img.hero-client-strip { height: 58px; padding-right: 36px; }
  .brand-ring { --ring-radius: 72px; --ring-space-weight: 0.6; }
  .brand-ring .ring-char { font-size: 15px; letter-spacing: 0; }
}

/* About page hero on phones: balanced headline, readable copy, tighter gap down to the kite */
@media (max-width: 640px) {
  .about-hero-section { padding: 92px 0 28px; }
  .about-hero-section .about-hero-container { padding: 0 22px; gap: 0; }
  .about-hero-section .about-eyebrow { font-size: 1.05rem; margin-bottom: 10px; }
  .about-hero-section .about-hero-title { margin: 0 0 16px; }
  .about-hero-section .about-hero-title-l1 {
    font-size: clamp(1.9rem, 8.6vw, 2.5rem); line-height: 1.12; text-wrap: balance;
  }
  .about-hero-section .about-hero-title-l2 { font-size: clamp(2.5rem, 11.5vw, 3.3rem); line-height: 1.05; margin-top: 8px; }
  .about-hero-section .about-hero-desc {
    font-size: 1rem; line-height: 1.6; max-width: 34ch; margin: 0 auto 18px; text-wrap: pretty;
  }
  .about-hero-section .about-hero-actions { margin: 8px 0 0; }
  .about-hero-section .about-btn-view-work { font-size: 15px; padding: 12px 38px; }
  .about-hero-section .about-hero-visual { margin-top: -6px; }
  .about-hero-section .about-kite-wrap { max-width: 400px; transform: translateY(8px) scale(1.04); }
}

/* About page "Our Flights So Far" on phones: smaller type, three even stat columns */
@media (max-width: 640px) {
  .about-flights-section .about-flights-card { padding: 20px 16px 40px; }
  .about-flights-section .about-flights-inner { gap: 10px; }
  .about-flights-section .about-flights-title br { display: none; }
  .about-flights-section .about-flights-title { white-space: nowrap; }
  .about-flights-section .about-flights-eyebrow { font-size: 12px; margin-bottom: 2px; }
  .about-flights-section .about-flights-title,
  .about-flights-section .about-flights-title * { font-size: 1.4rem; line-height: 1.1; }
  .about-flights-section .about-stats-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%;
  }
  .about-flights-section .about-stat-item { align-items: center; text-align: center; gap: 6px; }
  .about-flights-section .about-stat-number,
  .about-flights-section .about-stat-number * { font-size: 1.75rem; }
  .about-flights-section .about-stat-label { font-size: 11.5px; line-height: 1.25; text-wrap: balance; }
}

/* About page Vision + Mission banners on phones: compact, centered, short divider between heading and copy */
@media (max-width: 640px) {
  .about-vision-section, .about-mission-section { padding: 44px 0 40px; }
  .about-vision-section .about-vision-container,
  .about-mission-section .about-mission-container { padding: 0 20px; gap: 0; }
  .about-vision-section .about-statement-eyebrow,
  .about-mission-section .about-statement-eyebrow { font-size: 13px; letter-spacing: .02em; margin-bottom: 6px; }
  .about-vision-section .about-statement-title,
  .about-mission-section .about-statement-title { font-size: clamp(1.45rem, 6.8vw, 1.75rem); line-height: 1.15; letter-spacing: 0; }
  .about-vision-section .about-statement-title .statement-line,
  .about-mission-section .about-statement-title .statement-line { white-space: nowrap; }
  /* short horizontal divider replaces the hidden vertical one */
  .about-vision-section .about-statement-divider,
  .about-mission-section .about-statement-divider {
    display: block; width: 44px; height: 3px; margin: 16px auto 16px;
  }
  .about-vision-section .about-statement-desc,
  .about-mission-section .about-statement-desc { font-size: .95rem; line-height: 1.6; max-width: 33ch; margin: 0 auto; text-wrap: pretty; }
  .about-vision-section .about-statement-tagline { font-size: .95rem; line-height: 1.4; margin-top: 12px; }
}

/* Phone menu: big left-aligned list with a small kite beside the current / pressed item */
@media (max-width: 599px) {
  .mobile-nav .menu-overlay-links {
    display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
    gap: 6px; max-width: none; width: 100%; margin: auto 0; padding-left: 38px;
  }
  .mobile-nav .menu-pill {
    width: auto; min-height: 0; padding: 4px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none;
    color: #fff; font: 700 clamp(2.1rem, 10.5vw, 2.7rem)/1.15 'Sour Gummy', sans-serif; letter-spacing: 0;
    justify-content: flex-start; transform: none;
  }
  .mobile-nav .menu-pill:hover, .mobile-nav .menu-pill:focus-visible, .mobile-nav .menu-pill:active {
    background: transparent; color: #fff; transform: none; box-shadow: none;
  }
  .mobile-nav .menu-pill::before {
    content: ''; position: absolute; left: -36px; top: 50%; width: 26px; height: 30px;
    margin-top: -15px; opacity: 0; transform: translateX(-8px) rotate(-18deg) scale(.6);
    transition: opacity .25s ease, transform .35s cubic-bezier(.2,.9,.3,1.3);
    background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 30'%3E%3Cpath d='M13 1 24 12 13 21Z' fill='%23FAB944'/%3E%3Cpath d='M13 1 2 12 13 21Z' fill='%23fff'/%3E%3Cpath d='M2 12 13 21 13 17Z' fill='%23CCEFFE'/%3E%3Cpath d='M24 12 13 21 13 17Z' fill='%2310A9E2'/%3E%3Cpath d='M13 21c-1 3 2 4 0 8' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  }
  .mobile-nav .menu-pill.is-current::before,
  .mobile-nav .menu-pill:hover::before,
  .mobile-nav .menu-pill:active::before,
  .mobile-nav .menu-pill:focus-visible::before { opacity: 1; transform: none; }
}

/* home case-study deck: keep each card on its own GPU layer so the sticky stack doesn't repaint while scrolling */
.cs-deck-card { will-change: transform; }
.cs-deck-art { transform: translateZ(0); backface-visibility: hidden; }
