/* ==========================================================================
   101 LOCKER - Responsive Stylesheet  |  css/responsive.css
   Breakpoints: 1280px, 1200px, 1024px, 768px, 600px, 480px
   Mobile-first adjustments applied at each breakpoint.
   ========================================================================== */

/* ==========================================================================
   1280px — Constrained desktops
   ========================================================================== */

/* ==========================================================================
   1200px — Laptops
   ========================================================================== */

/* ==========================================================================
   1024px — Tablets Landscape / Small Laptops
   ========================================================================== */
@media (max-width: 1024px) {

  /* --- Navbar: Hide Desktop Menu & CTA, Enable Touch Toggle --- */
  .nav-menu,
  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
    cursor: pointer;
  }

  .hero::before {
    opacity: 0.5;
  }

  .page-hero-grid {
    grid-template-columns: 1fr;
  }

  .page-hero-grid>* {
    min-width: 0;
  }

  .page-hero-content {
    max-width: 680px;
  }

  .page-hero-visual {
    width: 100%;
    max-width: min(100%, 520px);
    margin-inline: auto;
  }

  /* --- Sticky Video Story Layout --- */
  .story-header {
    margin-bottom: 2rem;
  }

  .story-main-title {
    font-size: clamp(1.8rem, 4vw, 2.2rem);
  }

  .video-story-inner {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 2rem;
  }

  .video-story-sticky {
    position: sticky;
    top: calc(var(--navbar-height, 72px) + 0.5rem);
    height: auto;
    z-index: 50;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.6rem !important;
    background: rgba(33, 30, 22, 0.96) !important;
    backdrop-filter: blur(10px);
    padding: 0.5rem 0.75rem 0.75rem !important;
    margin-inline: -0.75rem;
    border-radius: 14px;
    border: 1px solid rgba(198, 172, 85, 0.2);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  }

  .story-video-display {
    max-height: 200px !important;
    border-radius: 10px;
    border: 1px solid rgba(198, 172, 85, 0.3) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.65);
    overflow: hidden;
  }

  /* Make stepper control bar visible and touch-friendly on tablet & mobile */
  .story-stepper-sticky-bar {
    display: flex !important;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    background: #0A0907 !important;
    border-radius: 10px;
    border: 1px solid rgba(198, 172, 85, 0.25) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  }

  .story-stepper-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .stepper-phase-tag {
    font-size: 0.7rem !important;
    font-weight: 800 !important;
    color: #D1BC75 !important;
    text-transform: uppercase;
  }

  .stepper-phase-title {
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    color: #E7E3D9 !important;
  }

  .story-stepper-tracker {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
  }

  .stepper-line {
    display: none !important;
    /* Hide line passing through numbers on mobile! */
  }

  .stepper-dots {
    display: flex;
    gap: 0.4rem;
    width: 100%;
  }

  .stepper-dot {
    flex: 1;
    height: 32px;
    border-radius: 8px;
    background: #15130F !important;
    border: 1px solid rgba(209, 189, 114, 0.229) !important;
    color: #D2CBB8 !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    touch-action: manipulation;
  }

  .stepper-dot.is-active {
    background: #C6AC55 !important;
    color: #FFFFFF !important;
    border-color: #C6AC55 !important;
    box-shadow: 0 2px 8px rgba(198, 172, 85, 0.35) !important;
  }

  .story-telemetry-cockpit {
    display: none;
  }

  .video-story-panels {
    padding: 0;
    gap: 1rem;
    position: relative;
    z-index: 5;
  }

  .video-story-panel {
    display: flex !important;
    flex-direction: column;
    opacity: 1 !important;
    transform: none !important;
    min-height: auto;
    margin-bottom: 1rem;
    padding: 1.15rem !important;
    background: #0A0907 !important;
    border: 1px solid rgba(209, 189, 114, 0.128) !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.128) !important;
    border-radius: 12px;
  }

  .video-story-panel.is-active {
    border: 1.5px solid #C6AC55 !important;
    background: linear-gradient(135deg, #0A0907 0%, #1C1A11 100%) !important;
    box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.4) !important;
  }

  .video-story-panel-title {
    color: #E7E3D9 !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    margin-bottom: 0.25rem !important;
  }

  .video-story-panel.is-active .video-story-panel-title {
    color: #EBE8DF !important;
  }

  .video-story-panel-desc {
    color: #C9C1AB !important;
    font-size: 0.85rem !important;
    line-height: 1.45 !important;
  }

  .panel-step-badge {
    color: #D1BC75 !important;
    background: rgba(198, 172, 85, 0.12) !important;
    border: 1px solid rgba(198, 172, 85, 0.25) !important;
  }

  .panel-status-pill {
    color: #BCB196 !important;
    background: #15130F !important;
  }

  .video-story-panel.is-active .panel-status-pill {
    color: #D1BC75 !important;
    background: rgba(198, 172, 85, 0.15) !important;
  }

  /* --- Footer & Solution Grids --- */
  .footer-main {
    grid-template-columns: repeat(2, 1fr);
  }

  .solution-industry-block {
    grid-template-columns: 1fr;
    gap: var(--space-6, 1.5rem);
    padding-block: clamp(2.5rem, 5vw, 3.5rem);
  }

  .solution-industry-block--reverse .industry-info,
  .solution-industry-block--reverse .industry-visual-card {
    order: initial;
  }

  /* --- Interactive Service Showcase Tablet & Mobile --- */
  .service-showcase-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
    padding-bottom: 3.5rem !important;
  }

  .service-showcase-tabs {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-snap-type: x mandatory;
    gap: 0.65rem !important;
    padding: 0.5rem 0.25rem 0.85rem !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    margin-inline: -0.5rem;
    padding-inline: 0.5rem;
  }

  .service-showcase-tabs::-webkit-scrollbar {
    display: none !important;
    height: 0 !important;
  }

  .service-tab-btn {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 190px !important;
    max-width: 250px !important;
    scroll-snap-align: center;
    white-space: normal;
    text-align: left;
    display: flex !important;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 0.95rem !important;
    border-radius: 10px;
    cursor: pointer;
    touch-action: manipulation;
  }

  .service-showcase-display {
    width: 100% !important;
    max-width: 100% !important;
  }

  .mockup-header {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    padding: 10px 14px !important;
  }

  .mockup-address {
    order: 3 !important;
    width: 100% !important;
    justify-content: flex-start !important;
    font-size: 0.68rem !important;
    padding: 4px 10px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .mockup-top-metrics {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
  }

  .mockup-stat {
    padding: 7px 10px !important;
    border-radius: 8px !important;
  }

  .mockup-stat .stat-label {
    font-size: 9px !important;
    margin-bottom: 2px !important;
  }

  .mockup-stat .stat-val {
    font-size: 11px !important;
  }

  .mockup-body {
    padding: 12px 14px !important;
  }

  .mockup-highlight-box {
    padding: 12px 14px !important;
    margin-bottom: 12px !important;
    border-radius: 10px !important;
  }

  .mockup-title {
    font-size: 14px !important;
    margin-bottom: 6px !important;
  }

  .mockup-text {
    font-size: 11.5px !important;
    line-height: 1.45 !important;
    margin-bottom: 10px !important;
  }

  .mockup-chips {
    gap: 5px !important;
  }

  .mock-chip {
    font-size: 9px !important;
    padding: 2px 7px !important;
  }
}

@media (max-width: 600px) {

  .nav-cta {
    padding: 0.45rem 0.7rem;
    font-size: 0.72rem;
  }

  .nav-brand-logo {
    height: 38px;
    max-width: 150px;
  }

  .nav-drawer {
    width: min(340px, 92vw);
  }
}

@media (max-width: 480px) {

  .nav-brand {
    flex: 1 1 auto;
    overflow: hidden;
  }

  .nav-brand-logo {
    height: 36px;
    max-width: 135px;
  }

  .nav-cta {
    display: none;
  }

  .nav-toggle {
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
  }

  .nav-drawer {
    width: 100vw;
    max-width: 100vw;
  }
}

/* ==========================================================================
   768px — Tablets portrait
   ========================================================================== */
@media (max-width: 768px) {

  /* Container padding */
  :root {
    --container-px: clamp(1rem, 4vw, 1.5rem);
  }

  /* Mobile Animation Tuning: reduced distance (12px), vertical only to prevent overflow */
  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    transform: translateY(12px) !important;
    transition-duration: 0.45s;
  }

  .reveal.is-revealed,
  .reveal-left.is-revealed,
  .reveal-right.is-revealed,
  .reveal-scale.is-revealed {
    transform: translate(0, 0) scale(1) !important;
  }

  /* Gentle mobile floating: 3–4px maximum movement */
  @keyframes floatSlowMobile {

    0%,
    100% {
      transform: translateY(0);
    }

    50% {
      transform: translateY(-4px);
    }
  }

  @keyframes floatMediumMobile {

    0%,
    100% {
      transform: translateY(0);
    }

    50% {
      transform: translateY(-3px);
    }
  }

  @keyframes floatFastMobile {

    0%,
    100% {
      transform: translateY(0);
    }

    50% {
      transform: translateY(-2px);
    }
  }

  .float-slow {
    animation: floatSlowMobile 5s ease-in-out infinite !important;
  }

  .float-medium {
    animation: floatMediumMobile 4.2s ease-in-out infinite !important;
  }

  .float-fast {
    animation: floatFastMobile 3.2s ease-in-out infinite !important;
  }

  .float-delayed {
    animation: floatSlowMobile 5.5s ease-in-out infinite !important;
  }

  /* Jump to Top Button on Mobile: 48x48px with safe-area support */
  .back-to-top {
    width: 48px;
    height: 48px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    right: 16px;
  }

  .back-to-top .arrow-up-icon {
    width: 18px;
    height: 18px;
  }

  /* Branded Loader size on Mobile: 52x52px */
  .loader-brand-symbol {
    width: 52px;
    height: 52px;
  }

  /* Hero visuals: ensure proper bounding and no horizontal overflow */
  .hero-visual,
  .page-hero-visual {
    max-width: 100%;
    overflow: hidden;
  }

  /* Services grid: 2 cols then 1 */
  .services-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }

  /* Why grid: 2 cols */
  .why-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Trust grid: 2 cols */
  .trust-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* --- About Page: Why MDM Matters Deep Grid --- */
  .why-deep-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    margin-top: 2rem !important;
  }

  .why-deep-col {
    padding: 1.5rem 1.25rem !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.16) !important;
  }

  .why-col-header {
    gap: 12px !important;
    margin-bottom: 1.25rem !important;
  }

  .why-col-header h3 {
    font-size: 1.25rem !important;
    line-height: 1.35 !important;
  }

  .why-point-list {
    gap: 1rem !important;
  }

  .why-point-list li {
    font-size: 0.92rem !important;
    line-height: 1.55 !important;
  }

  .why-point-list strong {
    font-size: 0.95rem !important;
    margin-bottom: 4px !important;
  }

  /* About Page: Simplicity & Workflow grids */
  .simplicity-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }

  .workflow-track {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  /* --- Feature Explorer: Horizontal Scroll on Mobile & Tablet --- */
  .feature-tabs-nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none !important;
    gap: 0.5rem !important;
    padding-bottom: 0.65rem !important;
    margin-bottom: 1.5rem !important;
    scroll-snap-type: x proximity;
  }

  .feature-tabs-nav::-webkit-scrollbar {
    display: none !important;
  }

  .feature-tab-btn {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent;
    padding: 0.55rem 1rem !important;
    font-size: 0.82rem !important;
    border-radius: 99px !important;
  }

  .feature-tab-btn:active {
    transform: scale(0.96) !important;
  }

  .features-card-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  /* Footer: 2 col then simplify */
  .footer-main {
    grid-template-columns: 1fr 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }

  /* CTA banner */
  .cta-banner-actions {
    flex-direction: column;
    align-items: center;
  }

  /* Dropdown: wide dropdown adjust */
  .dropdown--wide {
    min-width: 340px;
  }

  /* -----------------------------------------------------------------------
     MOBILE STORYTELLING SECTION — Stacked Sticky Layout
     ----------------------------------------------------------------------- */

  /* Mobile: hide the telemetry cockpit to save vertical space (stepper stays, styled further down) */
  .story-telemetry-cockpit {
    display: none;
  }

  /* Mobile: compact section padding */
  .video-story {
    padding: 1.5rem 0 2rem;
  }

  /* Mobile: tight header */
  .story-header {
    margin-bottom: 1.25rem;
  }

  .story-main-title {
    font-size: clamp(1.4rem, 5vw, 1.75rem);
  }

  .story-main-desc {
    font-size: 0.85rem;
  }

  /* Mobile video display */
  .story-video-display {
    max-height: 185px !important;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    border: 1px solid rgba(198, 172, 85, 0.3) !important;
    overflow: hidden;
    width: 100%;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.65);
  }

  /* Mobile: Sticky video container with compact padding */
  .video-story-sticky {
    position: sticky !important;
    top: calc(var(--navbar-height, 64px) + 0.35rem) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
    z-index: 50;
    margin-bottom: 1.5rem;
    background: rgba(33, 30, 22, 0.98) !important;
    padding: 0.5rem !important;
    border-radius: 12px;
    border: 1px solid rgba(198, 172, 85, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  }

  .story-stepper-sticky-bar {
    display: flex !important;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    background: #0A0907 !important;
    border-radius: 10px;
    border: 1px solid rgba(198, 172, 85, 0.25) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  }

  .stepper-line {
    display: none !important;
  }

  /* Mobile panels: clean white emerald cards */
  .video-story-panels {
    padding: 0;
    gap: 1.25rem;
  }

  .video-story-panel {
    display: flex !important;
    flex-direction: column;
    opacity: 1 !important;
    transform: none !important;
    min-height: auto;
    padding: 1.15rem;
    border-radius: 12px;
    border: 1px solid rgba(209, 189, 114, 0.128);
    background: #0A0907 !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.128);
    transition: all 0.3s ease;
    cursor: pointer;
  }

  .video-story-panel.is-active {
    border: 1.5px solid #C6AC55 !important;
    background: linear-gradient(135deg, #0A0907 0%, #1C1A11 100%) !important;
    box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.4) !important;
    transform: scale(1.01) !important;
  }

  .video-story-panel-title {
    color: #E7E3D9 !important;
  }

  .video-story-panel.is-active .video-story-panel-title {
    color: #EBE8DF !important;
  }

  .video-story-panel-desc {
    color: #C9C1AB !important;
  }

  /* Panel feature tags on mobile */
  .panel-feature-tags {
    gap: 0.5rem;
    margin-top: 0.75rem;
  }

  .panel-feature-tags li {
    font-size: 12px;
  }
}

/* ==========================================================================
   600px — Large phones
   ========================================================================== */
@media (max-width: 600px) {

  .solution-industry-block {
    padding-block: clamp(2rem, 6vw, 2.75rem);
  }

  .industry-features-grid {
    grid-template-columns: 1fr;
  }

  .industry-visual-card {
    padding: 1.25rem;
  }

  .page-hero {
    padding-bottom: 3.5rem;
  }

  .page-hero-visual,
  .page-hero-visual .hero-visual {
    min-height: 260px;
    max-width: 100%;
    overflow: clip;
  }

  .page-hero-title,
  .page-hero-desc {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .page-hero-actions {
    gap: 0.9rem;
  }

  .ecosystem-network {
    width: min(100%, 460px);
    transform: scale(0.78);
    transform-origin: center;
  }

  /* Services: 1 col */
  .services-grid {
    grid-template-columns: 1fr;
  }

  /* Trust: 1 col */
  .trust-grid {
    grid-template-columns: 1fr;
  }

  /* Why: 1 col */
  .why-grid {
    grid-template-columns: 1fr;
  }

  .simplicity-grid {
    grid-template-columns: 1fr;
  }

  .workflow-track {
    grid-template-columns: 1fr;
  }

  /* Hero */
  .hero-title br {
    display: none;
  }

  /* Industry CTA mobile buttons */
  .industry-cta {
    width: 100%;
    margin-top: 1.25rem !important;
  }

  .industry-cta .btn {
    width: 100%;
    justify-content: center;
    padding: 0.85rem 1.5rem !important;
    font-size: var(--text-base) !important;
  }

  /* Video story: smaller video on small phones */
  .story-video-display {
    max-height: 200px !important;
  }

  .video-story-panel-title {
    font-size: 1.05rem;
  }
}

/* ==========================================================================
   480px — Small phones
   ========================================================================== */
@media (max-width: 480px) {
  :root {
    --navbar-height: 64px;
  }

  /* Navbar brand logo slightly smaller */
  .nav-brand-logo {
    height: 36px;
  }

  /* Section headings */
  .section-title {
    letter-spacing: -0.01em;
  }

  /* Cards padding */
  .service-card {
    padding: var(--space-5);
  }

  /* Mobile drawer full-width */
  .nav-drawer {
    width: 100vw;
  }

  /* Buttons: stack tightly */
  .cta-banner-actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* Footer brand */

  .footer-brand-desc {
    max-width: 100%;
  }

  /* Dropdown in mobile handled by drawer; hide desktop dropdown entirely on mobile */
  .dropdown {
    display: none !important;
  }

  /* About Page mobile refinements */
  .why-deep-col {
    padding: 1.25rem 1rem !important;
  }

  .why-col-header h3 {
    font-size: 1.12rem !important;
  }

  .why-icon {
    width: 34px !important;
    height: 34px !important;
  }

  .why-icon svg {
    width: 18px !important;
    height: 18px !important;
  }

  .why-point-list li {
    font-size: 0.86rem !important;
  }

  .device-network-visual {
    transform: scale(0.85);
    transform-origin: center center;
    max-width: 100% !important;
  }

  /* Video story: prevent HUD badge/status text from overflowing narrow phones */
  .story-video-topbar,
  .story-video-bottom-hud {
    padding-inline: 8px;
    gap: 6px;
  }

  .story-video-badge,
  .meta-tag,
  .hud-telemetry-tag,
  .hud-freq-tag {
    max-width: 48%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .story-video-badge {
    font-size: 9px;
  }

  .hud-freq-tag {
    font-size: 8.5px;
  }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */
@media print {

  .site-header,
.nav-drawer,
.nav-backdrop,
.scroll-progress,
.cta-banner,
.video-story {
    display: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #EFEDE6;
    background: #0A0907;
  }

  .container {
    max-width: 100%;
    padding-inline: 1rem;
  }

  a {
    text-decoration: underline;
    color: inherit;
  }

  .site-footer {
    background: transparent;
    color: #EFEDE6;
    border-top: 1px solid rgba(209, 189, 114, 0.26);
  }
}

/* Mockup Click Flash / Pulse Animation */
@keyframes mockupFeedbackPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(216, 197, 137, 0.4);
    transform: scale(0.995);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(216, 197, 137, 0.15);
    transform: scale(1.005);
  }

  100% {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.65);
    transform: scale(1);
  }
}

.dashboard-mockup.mockup-pulse-active {
  animation: mockupFeedbackPulse 0.45s ease-out;
}

/* Feature Explorer Pulse / Fade-In Feedback */
@keyframes featurePanelFadeIn {
  0% {
    opacity: 0.35;
    transform: translateY(8px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.feature-category-panel.active {
  display: block !important;
  animation: featurePanelFadeIn 0.35s ease-out;
}

.feature-panel-pulse {
  animation: featurePanelFadeIn 0.35s ease-out;
}

/* ==========================================================================
   ZERO TOUCH — Brand Logo & Accent Overrides
   ========================================================================== */

.nav-brand .nav-brand-logo {
  height: 40px;
  width: auto;
  max-width: none;
}

@media (max-width: 991px) {
  .nav-brand .nav-brand-logo {
    height: 34px;
  }
}

@media (max-width: 380px) {
  .nav-brand .nav-brand-logo {
    height: 28px;
  }
}
