/* Responsive refinements. Keep the recovered animation engines and desktop design. */
*, *::before, *::after { box-sizing: border-box; }
main, main section, .booking-card, .booking-step, .showcase-main,
.showcase-index, .industry-copy, .team-person > div { min-width: 0; }
input, select, textarea, fieldset { min-width: 0; max-width: 100%; }
.primary-button, .outline-button, .magnetic > span { max-width: 100%; }
.reveal-line { overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .flight-director-heading, .services-heading { display: flex; flex-direction: column; align-items: stretch; gap: 24px; }
  .flight-director-heading .experience-toggle { align-self: stretch; margin: 0; }
  .flight-director .experience-toggle button { flex: 1 1 0; min-width: 0; white-space: normal; line-height: 1.4; }
  .showcase-heading { grid-template-columns: minmax(0,1fr); gap: 24px; }
  .showcase-heading > div { margin-top: 0; }
  .phone-nav-panel > a { flex-shrink: 0; overflow-wrap: anywhere; }
  .phone-nav-panel { padding-left: max(22px,env(safe-area-inset-left)); }
  .team-intro, .team-layout, .team-experience { grid-template-columns: minmax(0,1fr); gap: 28px; }
  .team-photo { position: static; }
  .booking-layout { grid-template-columns: minmax(0,1fr); }
  .booking-card { max-width: none; }
  .booking-intro, .booking-human > div { min-width: 0; }
  .booking-human img { flex-shrink: 0; }
  .booking-direct a, footer a { overflow-wrap: anywhere; }
}

@media (max-width: 700px) {
  html { scroll-padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .section, .flight-director .why-sticky { padding-top: 44px; padding-bottom: 48px; }
  .section-label { margin-bottom: 28px; line-height: 1.6; }
  /* Reserve the portrait's final height before the image loads. */
  .photo-opening { --hero-safe-top: env(safe-area-inset-top,0px); }
  .photo-opening .opening-frame {
    --portrait-top: calc(82px + env(safe-area-inset-top));
    --portrait-height: min(calc(101.394169834vw - 32.446134347px),344.74017744px);
    position: relative; top: auto;
    padding: calc(var(--portrait-top) + var(--portrait-height) + 28px) max(20px,env(safe-area-inset-right)) 44px max(20px,env(safe-area-inset-left)) !important;
  }
  .photo-opening .opening-copy { width: 100%; min-width: 0; padding: 0; }
  .photo-opening .opening-title { font-size: clamp(30px,8.7vw,48px); line-height: 1.08; overflow-wrap: anywhere; }
  .photo-opening .hero-subtitle { max-width: 40ch; margin-top: 20px; line-height: 1.65; }
  .photo-opening .opening-actions { gap: 12px; margin-top: 28px; }
  .photo-motion-toggle { right: max(20px,env(safe-area-inset-right)); max-width: calc(100% - 40px); }
  .primary-button, .outline-button { white-space: normal; text-align: center; line-height: 1.5; }
  .magnetic > span { min-width: 0; justify-content: center; flex-wrap: wrap; gap: 10px; }
  .showcase-heading h2, .services-heading h2, .flight-director-heading h2,
  .team-intro h2, .booking-intro h2 { font-size: clamp(32px,8.8vw,48px); line-height: 1.1; }
  .showcase-editorial .showcase-caption { flex-direction: column; gap: 8px; padding: 22px 0; }
  .showcase-caption strong { font-size: clamp(27px,7.8vw,36px); overflow-wrap: anywhere; }
  .showcase-editorial .console-bottom { gap: 16px; }
  .showcase-editorial .console-arrows { display: flex; gap: 10px; }
  .showcase-editorial .console-arrows button { min-width: 0; padding: 12px 16px; }
  .showcase-index .showcase-project { grid-template-columns: 20px 64px minmax(0,1fr); gap: 12px; padding: 18px 0; }
  .showcase-project img { width: 64px; height: 58px; }
  .showcase-project-name strong { font-size: 24px; overflow-wrap: anywhere; }
  .showcase-project-name > span { line-height: 1.5; overflow-wrap: anywhere; }
  .flight-director .flight-topline { flex-wrap: wrap; gap: 8px; }
  .flight-director .flight-scene { min-height: 0; max-height: none; width: 100%; height: auto; }
  .flight-controls-top { flex-wrap: wrap; gap: 12px; }
  .flight-controls-top > span { max-width: none; text-align: left; }
  .flight-controls .flight-play { flex: 1 1 135px; }
  .flight-director .flight-summary { padding: 24px 20px; gap: 20px; }
  .flight-summary .benefit-copy h3 { font-size: clamp(27px,7.8vw,34px); }
  .flight-summary .benefit-copy p { line-height: 1.65; }
  .industry-copy { padding: 24px 20px !important; }
  .industry-copy h3 { overflow-wrap: anywhere; }
  .industry-copy p, .team-person p:not(.team-role) { line-height: 1.65; }
  .equipment-tabs button { white-space: normal; }
  .booking-card { padding: 28px 20px; }
  .booking-step h3 { font-size: clamp(26px,7.4vw,32px); line-height: 1.15; }
  .booking-card .project-choices { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .booking-card .project-choices label { min-height: 60px; padding: 16px; font-size: 16px; line-height: 1.5; }
  .project-choices label span { min-width: 0; overflow-wrap: anywhere; }
  .booking-actions { flex-wrap: wrap; }
  .booking-actions .primary-button { margin-left: 0; }
  .call-fields { grid-template-columns: minmax(0,1fr); }
  .field-label input, .field-label select, .field-label textarea { scroll-margin-block: 100px; }
  .booking-progress-label { flex-wrap: wrap; color: #ff7182; }
  footer { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; font-size: 14px; }
  footer > :nth-child(2n) { text-align: left; }
  .cinema-dialog { width: 100%; max-width: 100%; max-height: 100dvh; overflow-y: auto; overscroll-behavior: contain; }
  .project-header, .project-facts { flex-wrap: wrap; min-width: 0; }
  .project-header h2, .project-description { overflow-wrap: anywhere; }
}

/* Motion stays enabled on touch devices; no hover is required to reveal content. */
@media (max-width: 700px) and (prefers-reduced-motion: no-preference) {
  .opening-label, .opening-title > span, .opening-actions { animation: phone-enter .55s both; }
  .opening-title > span { animation-delay: calc(.08s + var(--line)*.09s); }
  .opening-actions { animation-delay: .25s; }
  .reveal-line > span { transform: translateY(105%); transition: transform .55s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--line)*.07s); }
  .revealed .reveal-line > span { transform: translateY(0); }
  .industry-panel > img, .industry-copy { animation: phone-enter .4s both; }
  .photo-drone-maneuver.maneuver-bank { animation-name: phone-drone-bank; }
  .photo-drone-maneuver.maneuver-approach { animation-name: phone-drone-approach; }
  .photo-drone-maneuver.maneuver-swoop { animation-name: phone-drone-swoop; }
}
@keyframes phone-enter { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
@keyframes phone-drone-bank { 0%,100% { transform: none; } 35% { transform: translate(-10px,-6px) rotate(-6deg); } 70% { transform: translate(8px,-3px) rotate(5deg); } }
@keyframes phone-drone-approach { 0%,100% { transform: none; } 50% { transform: translateY(-8px) scale(1.07); } }
@keyframes phone-drone-swoop { 0%,100% { transform: none; } 30% { transform: translate(8px,4px) rotate(5deg); } 65% { transform: translate(-8px,-12px) rotate(-4deg); } }
@media (max-width: 380px) {
  .showcase-editorial .console-arrows { width: 100%; margin-left: 0; }
  .console-arrows button { flex: 1; }
  .showcase-index { padding: 20px 16px; }
  .showcase-index .showcase-project { grid-template-columns: 18px 48px minmax(0,1fr); gap: 10px; }
  .showcase-project img { width: 48px; height: 50px; }
}
