/* ============================================================
   mobile.css — redr labs responsive layer
   Covers: portrait + landscape for phones and tablets
   Breakpoints:
     ≤ 768px  — tablet portrait / large phone landscape
     ≤ 480px  — phone portrait
     ≤ 380px  — small phone (SE, Galaxy A)
   Orientation overrides at bottom of each section.
   ============================================================ */


/* ============================================================
   0. GLOBAL / SHARED UTILITIES
   ============================================================ */

@media (max-width: 768px) {

  html, body {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
  }

  /* Prevent horizontal bleed from fixed-width elements */
  img, video, canvas, svg {
    max-width: 100%;
  }

  /* Touch targets — all interactive elements at least 44px tall */
  a, button, [onclick] {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* Bracket buttons — global override */
  .btn-learn {
    padding: 14px 32px;
    font-size: 11px;
    letter-spacing: 0.12em;
  }

  .btn-learn-wrap::before,
  .btn-learn-wrap::after,
  .btn-learn::before,
  .btn-learn::after {
    width: 10px;
    height: 10px;
  }

  /* Scroll indicator — hide on small screens */
  .scroll-indicator {
    display: none;
  }

  /* Section dividers */
  .section-divider {
    height: 1px;
  }
}


/* ============================================================
   1. HEADER — header.html
   ============================================================ */

@media (max-width: 768px) {

  .site-header {
    top: 12px;
    width: calc(100% - 28px);
    border-radius: 12px;
  }

  .header-inner {
    height: 60px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .logo {
    font-size: 1.2rem;
  }

  /* Nav hidden — burger shown (already in header.html, reinforced here) */
  .centered-nav {
    display: none !important;
  }

  .menu-toggle {
    display: flex !important;
    justify-content: center; 
  }


  /* Mobile overlay */
  .mobile-overlay {
    gap: 32px;
  }

  .mobile-overlay a {
    font-size: 1.3rem;
    letter-spacing: 0.18em;
  }

  /* Contact link — hide text label, keep icon area tappable */
  .contact-link {
    font-size: 0.7rem;
    letter-spacing: 0.12em;
  }

  /* Dropdown — disable on mobile (nav is in overlay) */
  /* Hide hover dropdowns ONLY in the hidden desktop nav */
  .centered-nav .nav-dropdown {
    display: none !important;
  }

  /* Reveal and format the dropdown links inside the mobile menu overlay */
  .mobile-overlay .nav-dropdown {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    position: static; /* Overrides any absolute positioning from desktop */
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin-top: 16px;
    gap: 24px;
  }

  /* Make the sub-links look visually distinct from top-level links */
  .mobile-overlay .nav-dropdown a {
    font-size: 1.1rem; /* Slightly smaller than the 1.3rem main links */
    opacity: 0.8; 
  }
}

/* Landscape phone — compact header */
@media (max-width: 768px) and (orientation: landscape) {

  .site-header {
    top: 8px;
  }

  .header-inner {
    height: 52px;
    padding: 0 18px;
  }

  .mobile-overlay {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px 40px;
    padding: 0 24px;
  }

  .mobile-overlay a {
    font-size: 1.1rem;
  }
}


/* ============================================================
   2. FOOTER — footer.html
   ============================================================ */

@media (max-width: 768px) {

  .site-footer {
    padding: 48px 24px 56px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 36px;
  }

  .footer-logo,
  .footer-contact,
  .footer-links {
    width: 100%;
  }

  .footer-logo .logo {
    font-size: 1.5rem;
  }

  .copyright {
    margin-top: 8px;
    font-size: 0.7rem;
  }

  .footer-contact h4,
  .footer-links h4 {
    font-size: 0.65rem;
    margin-bottom: 14px;
  }

  .address-info,
  .info-link,
  .footer-links a {
    font-size: 0.8rem;
    line-height: 1.9;
  }
}

@media (max-width: 768px) and (orientation: landscape) {

  .footer-inner {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 28px;
  }

  .footer-logo  { width: 100%; }
  .footer-contact,
  .footer-links { width: calc(50% - 14px); }
}


/* ============================================================
   3. INDEX.HTML
   ============================================================ */

/* ── Hero ── */
@media (max-width: 768px) {

  /* index hero shares .hero with other pages */
  .hero-title {
    font-size: clamp(52px, 14vw, 80px);
    margin-bottom: 16px;
  }

  .hero-subtitle {
    font-size: 14px;
    margin-bottom: 40px;
    padding: 0 16px;
  }

  .hero-content {
    padding: 0 24px 48px;
    text-align: center;
  }
}

@media (max-width: 480px) {

  .hero-title {
    font-size: clamp(44px, 16vw, 64px);
  }

  .hero-subtitle {
    font-size: 13px;
    padding: 0 8px;
  }
}

/* Landscape phone hero — reduce height */
@media (max-width: 768px) and (orientation: landscape) {

  .hero {
    height: 100svh;
    min-height: 320px;
  }

  .hero-title {
    font-size: clamp(40px, 8vw, 64px);
    margin-bottom: 10px;
  }

  .hero-subtitle {
    font-size: 13px;
    margin-bottom: 28px;
  }
}

/* ── Mission section ── */
@media (max-width: 768px) {

  .mission-section {
    height: auto;
    min-height: 60vh;
    padding: 80px 24px;
  }

  .mission-bracket-wrap {
    padding: 36px 28px;
    max-width: 100%;
  }

  .mission-text {
    font-size: clamp(18px, 5vw, 26px);
    line-height: 1.7;
  }
}

@media (max-width: 768px) and (orientation: landscape) {

  .mission-section {
    min-height: auto;
    padding: 60px 24px;
  }

  .mission-text {
    font-size: clamp(16px, 4vw, 22px);
  }
}

/* ── Software section ── */
@media (max-width: 768px) {

  .software-section {
    padding: 72px 24px 96px;
  }

  .software-heading {
    margin-bottom: 40px;
    font-size: 9px;
  }

  .software-item {
    padding: 32px 0;
  }

  .software-item-cat {
    font-size: 9px;
    margin-bottom: 10px;
  }

  .software-item-name {
    font-size: clamp(28px, 8vw, 44px);
    white-space: normal;
    letter-spacing: -0.03em;
  }

  .software-item-name-wrap {
    margin-bottom: 20px;
  }

  .software-item-bottom {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .software-item-sub {
    font-size: 9px;
  }

  .software-item-desc {
    font-size: 10px;
    max-width: 100%;
  }

  /* Always show "learn more" link on touch devices */
  .software-item-learn {
    opacity: 1 !important;
    transform: none !important;
    font-size: 9px;
  }
}

@media (max-width: 768px) and (orientation: landscape) {

  .software-section {
    padding: 56px 24px 72px;
  }

  .software-item-bottom {
    grid-template-columns: 160px 1fr auto;
    gap: 0 28px;
  }

  .software-item-learn {
    opacity: 1;
    transform: none;
  }
}

/* ── About section ── */
@media (max-width: 768px) {

  .about-section {
    grid-template-columns: 1fr;
    padding: 72px 24px 80px;
    gap: 48px;
    min-height: auto;
  }

  .about-title {
    font-size: clamp(28px, 7vw, 44px);
    line-height: 1.2;
  }

  .about-title-wrap {
    margin-bottom: 28px;
  }

  .about-body {
    font-size: 12px;
    max-width: 100%;
  }

  .about-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 28px 0;
  }

  .about-row-label {
    font-size: 20px;
  }

  .about-row-desc {
    font-size: 11px;
    line-height: 1.8;
  }

  /* Hover button — always visible on touch */
  .about-hover-btn-wrap {
    position: static;
    opacity: 1 !important;
    pointer-events: auto !important;
    display: flex;
    margin-top: 24px;
  }

  .about-title-wrap:hover .about-title {
    filter: none;
  }
}

@media (max-width: 768px) and (orientation: landscape) {

  .about-section {
    grid-template-columns: 1fr 1fr;
    gap: 0 40px;
    padding: 60px 24px;
  }

  .about-hover-btn-wrap {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }

  .about-title-wrap:hover .about-hover-btn-wrap {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 380px) {

  .about-section {
    padding: 60px 18px 72px;
  }

  .about-row-label {
    font-size: 18px;
  }


  /* Forces the container to expand and safely stack the text and button */
  .hero-content, 
  .mission-bracket-wrap { 
    display: flex;
    flex-direction: column;
    align-items: center;
    height: auto !important; /* Prevents the container from crushing the button */
  }

  /* Ensures the text physically pushes the button down */
  .hero-subtitle,
  .mission-text {
    margin-bottom: 32px !important; 
  }



}


/* ============================================================
   4. OS.HTML
   ============================================================ */

/* ── Hero ── */
@media (max-width: 768px) {

  .hero-content {
    padding: 0 24px 72px;
    margin-top: auto;
  }

  .hero-eyebrow {
    font-size: 8px;
    letter-spacing: 0.22em;
    margin-bottom: 14px;
  }

  /* os.html hero title is separate from index */
  .arch-section .hero-title,
  .os-hero .hero-title {
    font-size: clamp(48px, 12vw, 72px);
  }
}

/* ── Architecture pipeline ── */
@media (max-width: 768px) {

  .arch-section {
    padding: 80px 0 100px;
  }

  .arch-header {
    padding: 0 24px;
    margin-bottom: 48px;
  }

  .arch-title {
    font-size: clamp(24px, 6vw, 38px);
  }

  .arch-subtitle {
    font-size: 12px;
    max-width: 100%;
  }

  /* Pipeline scrolls horizontally — keep it, but hint with gradient */
  .pipeline-outer {
    padding: 0 24px 48px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }

  .pipeline-outer::after {
    content: '';
    position: sticky;
    right: 0;
    top: 0;
    width: 48px;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(0,0,0,0.8));
    pointer-events: none;
    flex-shrink: 0;
  }

  .pipeline-inner {
    min-width: 900px;
    gap: 0;
  }

  .stage {
    min-width: 200px;
    scroll-snap-align: start;
  }

  .node {
    padding: 16px 14px;
  }

  .node-name {
    font-size: 9px;
  }

  .node-desc {
    font-size: 9px;
  }

  .sub-node {
    padding: 11px 12px;
  }

  .sub-node-name {
    font-size: 8px;
  }

  .sub-node-detail {
    font-size: 8px;
  }

  /* Pipeline scroll hint label */
  .arch-section::before {
    content: 'scroll →';
    display: block;
    text-align: center;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8px;
    letter-spacing: 0.24em;
    color: rgba(255,255,255,0.2);
    text-transform: uppercase;
    margin-bottom: 16px;
    padding: 0 24px;
  }
}

/* ── Detail panel — full screen on mobile ── */
@media (max-width: 768px) {

  .detail-panel {
    width: 100%;
    top: auto;
    bottom: 0;
    height: 70vh;
    transform: translateY(100%);
    border-left: none;
    border-top: 0.5px solid rgba(255,255,255,0.15);
    border-radius: 16px 16px 0 0;
    padding: 32px 24px 48px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .detail-panel.open {
    transform: translateY(0);
  }

  .detail-close {
    top: 16px;
    right: 16px;
    font-size: 16px;
    min-height: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Panel drag handle visual hint */
  .detail-panel::before {
    content: '';
    display: block;
    width: 36px;
    height: 3px;
    border-radius: 2px;
    background: rgba(255,255,255,0.15);
    margin: 0 auto 24px;
  }

  .detail-title {
    font-size: 16px;
    padding-right: 32px;
  }

  .detail-body {
    font-size: 11px;
  }
}

@media (max-width: 768px) and (orientation: landscape) {

  .detail-panel {
    width: 85%;
    height: 100%;
    top: 0;
    bottom: 0;
    right: 0;
    transform: translateX(100%);
    border-top: none;
    border-radius: 0;
    border-left: 0.5px solid rgba(255,255,255,0.15);
  }

  .detail-panel.open {
    transform: translateX(0);
  }

  .detail-panel::before {
    display: none;
  }
}

/* ── Metrics section ── */
@media (max-width: 768px) {

  .metrics-grid {
    padding: 72px 24px !important;
  }

  .bottom-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 40px 24px !important;
    margin-top: 48px !important;
  }

  .metric-value {
    font-size: clamp(36px, 9vw, 56px) !important;
  }

  .metric-label {
    font-size: 11px !important;
    margin-top: 10px !important;
  }
}

@media (max-width: 480px) {

  .bottom-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
}

/* ── Features grid ── */
@media (max-width: 768px) {

  .features-section {
    padding: 72px 24px 80px;
  }

  .features-title {
    font-size: clamp(22px, 6vw, 36px);
  }

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

  .feature-card {
    padding: 32px 24px;
  }

  .feature-name {
    font-size: 10px;
  }

  .feature-desc {
    font-size: 11px;
  }
}

@media (max-width: 480px) {

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

  .feature-card {
    padding: 28px 20px;
  }
}

/* ── CTA section (os.html) ── */
@media (max-width: 768px) {

  .cta-section {
    padding: 100px 24px;
  }

  .cta-title {
    font-size: clamp(28px, 8vw, 52px);
    line-height: 1.1;
  }

  .cta-sub {
    font-size: 12px;
    padding: 0 8px;
  }
}

@media (max-width: 768px) and (orientation: landscape) {

  .arch-section::before {
    display: none;
  }

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


/* Fix for overlapping text in Pipeline Nodes on os.html */
@media (max-width: 768px) {
  
  /* Give the columns a little more breathing room */
  .stage {
    min-width: 260px; /* Increased from 200px to prevent text crushing */
  }

  /* Force a strict vertical stack for the main nodes */
  .node {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
  
  /* Force a strict vertical stack for the sub-nodes */
  .sub-node {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 4px;
  }

  /* Ensure the text blocks take up full width and don't float side-by-side */
  .node-name, 
  .node-desc, 
  .sub-node-name, 
  .sub-node-detail {
    width: 100%;
    display: block;
  }
  
  /* Add a little gap below the icon so it doesn't crowd the text */
  .node-icon {
    margin-bottom: 16px;
  }
}


/* ============================================================
   5. ENTERPRISE.HTML
   ============================================================ */

/* ── Hero ── */
@media (max-width: 768px) {

  .hero-content {
    padding: 0 24px 72px;
  }
}

/* ── Intel section ── */
@media (max-width: 768px) {

  .intel-section {
    padding: 72px 0 60px;
  }

  .intel-header {
    padding: 0 24px;
    margin-bottom: 40px;
  }

  .intel-title {
    font-size: clamp(26px, 7vw, 44px);
    line-height: 1.1;
  }

  .intel-subtitle {
    font-size: 11px;
    max-width: 100%;
  }

  /* Layer tabs — scrollable row */
  .layer-tabs {
    padding: 0 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    border-bottom: 0.5px solid rgba(255,255,255,0.07);
    scrollbar-width: none;
  }

  .layer-tabs::-webkit-scrollbar {
    display: none;
  }

  .layer-tab {
    font-size: 7px;
    padding: 14px 16px 12px;
    letter-spacing: 0.18em;
    flex-shrink: 0;
    display: inline-block;
    min-height: auto;
  }
}

/* ── Pillar grid ── */
@media (max-width: 768px) {

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

  .pillar-card {
    padding: 24px 18px 20px;
  }

  .pillar-name {
    font-size: 8px;
    letter-spacing: 0.1em;
  }

  .pillar-desc {
    font-size: 9px;
    display: none; /* shown in detail panel */
  }

  /* Always show pip */
  .pillar-card.active .pillar-pip {
    opacity: 1;
  }
}

@media (max-width: 480px) {

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

  .pillar-card {
    padding: 20px 18px;
  }

  .pillar-desc {
    display: block;
    font-size: 9px;
  }
}

/* ── Pillar detail panel ── */
@media (max-width: 768px) {

  .pillar-detail {
    border-top: 0.5px solid rgba(255,255,255,0.07);
  }

  .detail-inner {
    grid-template-columns: 1fr;
  }

  .detail-left {
    padding: 32px 24px 24px;
    border-right: none;
    border-bottom: 0.5px solid rgba(255,255,255,0.07);
  }

  .detail-title {
    font-size: clamp(18px, 5vw, 26px);
  }

  .detail-body {
    font-size: 11px;
    line-height: 1.85;
    max-width: 100%;
  }

  .detail-right {
    padding: 24px 24px 32px;
  }

  .metric-key {
    font-size: 7px;
  }

  .metric-val {
    font-size: 9px;
  }

  .detail-sub-label {
    font-size: 6px;
    letter-spacing: 0.24em;
  }

  .detail-sub-item span {
    font-size: 7px;
  }
}

/* ── Use cases grid ── */
@media (max-width: 768px) {

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

  .uc-card {
    padding: 28px 24px;
    border-right: none !important;
  }

  .uc-title {
    font-size: 16px;
  }

  .uc-body {
    font-size: 10px;
    line-height: 1.8;
  }
}

@media (max-width: 768px) and (orientation: landscape) {

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

  .uc-card:nth-child(even) {
    border-right: none;
  }

  .uc-card:nth-child(odd) {
    border-right: 0.5px solid rgba(255,255,255,0.07);
  }
}

/* ── Segments grid ── */
@media (max-width: 768px) {

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

  .seg-card {
    padding: 28px 20px 24px;
  }

  .seg-name {
    font-size: clamp(16px, 4vw, 22px);
    margin-bottom: 12px;
  }

  .seg-sub {
    font-size: 7px;
    margin-bottom: 14px;
  }

  .seg-list-text {
    font-size: 7px;
  }
}

@media (max-width: 480px) {

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

/* ── Radar section ── */
@media (max-width: 768px) {

  .radar-section {
    grid-template-columns: 1fr;
    padding: 60px 24px;
    gap: 36px;
  }

  .radar-statement {
    font-size: clamp(20px, 6vw, 30px);
  }

  .radar-row-title {
    font-size: 7px;
  }

  .radar-row-body {
    font-size: 10px;
  }

  /* Disable blur-swap on touch — no hover */
  .radar-statement:hover {
    filter: none;
  }
}

/* ── Enterprise CTA section ── */
@media (max-width: 768px) {

  .cta-section {
    padding: 72px 24px;
    gap: 28px;
  }

  .cta-heading {
    font-size: clamp(28px, 8vw, 52px);
  }

  .cta-btn {
    padding: 18px 48px;
    font-size: 11px;
    letter-spacing: 0.16em;
  }
}


/* ============================================================
   6. COMMAND.HTML
   ============================================================ */

/* ── Hero ── */
@media (max-width: 768px) {

  .hero-content {
    padding: 0 24px 72px;
    margin-top: auto;
  }

  .hero-subtitle {
    font-size: 13px;
    max-width: 100%;
    letter-spacing: 0.01em;
    line-height: 1.7;
  }
}

/* ── Module blocks — collapse sticky layout ── */
/* Disable sticky/fixed behaviors for Module Blocks on command.html mobile */
/* ── Module blocks — collapse sticky layout ── */
@media (max-width: 768px) {

  .modules-section {
    display: block !important; /* Forces vertical flow */
  }

  .module-block {
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    height: auto !important; /* Allows container to grow with content */
    min-height: min-content !important;
    top: auto !important; 
  }

  .module-left {
    position: relative !important; 
    top: auto !important;
    height: auto !important;
    width: 100% !important;
    transform: none !important; /* Overrides JS scroll-stacking */
    border-right: none !important;
    border-bottom: 0.5px solid rgba(255,255,255,0.06);
    padding: 64px 24px 40px !important; /* Increased padding to prevent title overlap */
  }

  .module-right {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    padding: 48px 24px 80px !important;
    transform: none !important; 
    display: flex;
    flex-direction: column;
    gap: 32px; /* Uniform spacing between text and imagery */
  }

  /* Target the specific overlapping text from your screenshot */
  .module-title {
    font-size: clamp(28px, 8vw, 44px) !important;
    line-height: 1.1 !important;
    margin-bottom: 24px !important;
    position: relative !important;
  }
}

@media (max-width: 768px) and (orientation: landscape) {

  .module-block {
    flex-direction: row !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
  }

  .module-left {
    height: auto !important;
    border-right: 0.5px solid rgba(255,255,255,0.06) !important;
    border-bottom: none !important;
    padding: 40px 24px 40px 24px !important;
  }

  .module-right {
    padding: 40px 24px !important;
    gap: 32px;
  }

  .module-title {
    font-size: clamp(22px, 4vw, 36px);
  }
}

/* ── Forge section ── */
@media (max-width: 768px) {

  .forge-section {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;      /* Centers child elements horizontally */
    justify-content: center !important;  /* Centers child elements vertically */
    padding: 40px 24px !important;       /* Adjusted padding to prevent overflow */
    min-height: 70vh !important;         /* Outer section dictates the height */
  }

  .forge-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100% !important;
    margin-top: 0 !important; /* <--- ADD THIS LINE to kill the bleed-through */
  }

  .forge-eyebrow {
    font-size: 9px;
    margin-bottom: 16px;
    text-align: center !important;
  }

  .forge-title {
    text-align: center !important;
    width: 100% !important;
    margin: 0 auto 16px auto !important; /* Added a slight bottom margin for spacing */
  }

  .forge-body {
    margin: 0 auto !important;
    max-width: 420px !important;
    text-align: center !important;
  }
}

@media (max-width: 768px) and (orientation: landscape) {

  .forge-section {
    min-height: 50vh;
    justify-content: center !important; 
    padding: 32px 24px;
  }

  .forge-content {
    max-width: 420px;
  }
}

/* ── Command CTA ── */
@media (max-width: 768px) {

  .cta-section {
    padding: 100px 24px;
  }

  .cta-title {
    font-size: clamp(30px, 8vw, 52px);
  }

  .cta-sub {
    font-size: 12px;
  }
}


/* ============================================================
   7. RESEARCH.HTML
   ============================================================ */

/* ── Hero ── */
@media (max-width: 768px) {

  .hero-eyebrow {
    font-size: 8px;
    letter-spacing: 0.24em;
    margin-bottom: 14px;
  }
}

/* ── Satellite section ── */
@media (max-width: 768px) {

  .satellite-section {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .sat-left {
    padding: 72px 24px 40px;
  }

  .sat-right {
    padding: 0 24px 72px;
    gap: 32px;
  }

  .sat-eyebrow {
    font-size: 8px;
    margin-bottom: 18px;
  }

  .sat-title {
    font-size: clamp(26px, 7vw, 42px);
    margin-bottom: 24px;
  }

  .sat-body {
    font-size: 12px;
    max-width: 100%;
    line-height: 1.85;
  }

  .uc-item {
    padding-top: 24px;
  }

  .uc-header {
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
  }

  .uc-num {
    font-size: 7px;
    letter-spacing: 0.2em;
  }

  .uc-title {
    font-size: 13px;
    letter-spacing: -0.01em;
  }

  .uc-body {
    font-size: 11px;
    line-height: 1.8;
    max-width: 100%;
  }

  .uc-coords {
    font-size: 8px;
    margin-top: 8px;
    word-break: break-all;
  }
}

@media (max-width: 768px) and (orientation: landscape) {

  .satellite-section {
    grid-template-columns: 1fr 1fr;
  }

  .sat-left {
    padding: 60px 24px 60px 24px;
  }

  .sat-right {
    padding: 60px 24px 60px 16px;
    gap: 24px;
  }
}

/* ── Quantum section ── */
@media (max-width: 768px) {

  .quantum-section {
    padding: 72px 24px 80px;
  }

  .q-top {
    max-width: 100%;
    margin-bottom: 56px;
  }

  .q-eyebrow {
    font-size: 8px;
    margin-bottom: 14px;
  }

  .q-title {
    font-size: clamp(20px, 6vw, 34px);
    line-height: 1.25;
    margin-bottom: 24px;
  }

  .q-body {
    font-size: 12px;
    max-width: 100%;
    line-height: 1.85;
    margin-bottom: 16px;
  }

  .q-grid {
    grid-template-columns: 1fr;
    border: none;
    gap: 1px;
    background: rgba(255,255,255,0.06);
  }

  .q-card {
    padding: 32px 24px;
  }

  .q-card-tag {
    font-size: 7px;
    margin-bottom: 12px;
  }

  .q-card-name {
    font-size: 17px;
    margin-bottom: 6px;
  }

  .q-card-sub {
    font-size: 9px;
    margin-bottom: 14px;
  }

  .q-card-desc {
    font-size: 11px;
    line-height: 1.8;
  }
}

@media (max-width: 768px) and (orientation: landscape) {

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

  .q-card {
    padding: 28px 20px;
  }

  .quantum-section {
    padding: 60px 24px 72px;
  }
}

/* ── Market intelligence section ── */
@media (max-width: 768px) {

  .market-section {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .mkt-left {
    padding: 72px 24px 40px;
  }

  .mkt-right {
    padding: 0 24px 72px;
    gap: 32px;
  }

  .mkt-eyebrow {
    font-size: 8px;
    margin-bottom: 18px;
  }

  .mkt-title {
    font-size: clamp(26px, 7vw, 42px);
    margin-bottom: 24px;
  }

  .mkt-body {
    font-size: 12px;
    max-width: 100%;
  }

  .mkt-signals {
    gap: 8px;
    margin-top: 6px;
  }

  .mkt-signal {
    padding: 5px 10px;
  }

  .mkt-signal-label {
    font-size: 7px;
    letter-spacing: 0.16em;
  }

  .mkt-ticker {
    margin-top: 28px;
    padding-top: 16px;
    gap: 20px;
    flex-wrap: wrap;
  }

  .mkt-ticker-label {
    font-size: 6px;
    letter-spacing: 0.22em;
  }

  .mkt-ticker-val {
    font-size: 11px;
  }

  .mkt-ticker-chg {
    font-size: 8px;
  }
}

@media (max-width: 768px) and (orientation: landscape) {

  .market-section {
    grid-template-columns: 1fr 1fr;
  }

  .mkt-left {
    padding: 60px 24px 60px 24px;
  }

  .mkt-right {
    padding: 60px 24px 60px 16px;
    gap: 24px;
  }
}

@media (max-width: 480px) {

  .mkt-ticker {
    gap: 16px;
  }

  .mkt-ticker-item {
    min-width: calc(50% - 8px);
  }
}


/* ============================================================
   8. PERFORMANCE — disable heavy effects on low-power mobile
   ============================================================ */

@media (max-width: 768px) {

  /* Reduce backdrop-filter cost on older phones */
  .site-header {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  /* Subtle parallax / blur hover effects don't fire on touch —
     remove the blur transitions to avoid paint storms */
  .about-title-wrap:hover .about-title,
  .radar-statement:hover,
  .about-row-label:hover {
    filter: none !important;
  }

  /* Shimmer animations — simplify on mobile */
  .pillar-shimmer,
  .seg-shimmer,
  .feature-card .shimmer {
    display: none;
  }
}

/* prefers-reduced-motion — respect system setting */
@media (prefers-reduced-motion: reduce) {

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .scroll-line,
  .node-pulse,
  .pillar-pip,
  .mkt-signal-dot {
    animation: none !important;
  }
}


/* ============================================================
   9. SMALL PHONE — 380px and below (SE, Galaxy A, etc.)
   ============================================================ */

@media (max-width: 380px) {

  .site-header {
    width: calc(100% - 20px);
    top: 10px;
  }

  .header-inner {
    padding: 0 14px;
    height: 56px;
  }

  .logo {
    font-size: 1.1rem;
  }

  .hero-title {
    font-size: clamp(38px, 14vw, 56px);
  }

  .hero-subtitle {
    font-size: 12px;
  }

  .btn-learn {
    padding: 12px 24px;
    font-size: 10px;
  }

  .software-section {
    padding: 56px 18px 72px;
  }

  .about-section {
    padding: 56px 18px 64px;
  }

  .sat-left,
  .mkt-left {
    padding: 56px 18px 32px;
  }

  .sat-right,
  .mkt-right {
    padding: 0 18px 56px;
  }

  .quantum-section {
    padding: 56px 18px 64px;
  }

  .intel-header {
    padding: 0 18px;
  }

  .layer-tabs {
    padding: 0 18px;
  }

  .detail-left,
  .detail-right {
    padding: 24px 18px;
  }

  .pillar-card {
    padding: 18px 14px;
  }

  .seg-card {
    padding: 22px 16px 20px;
  }

  .forge-content {
    padding: 24px 18px;
  }

  .module-left {
    padding: 44px 18px 24px !important;
  }

  .module-right {
    padding: 24px 18px 48px !important;
  }

  .cta-section {
    padding: 72px 18px;
  }

  .footer-inner {
    gap: 28px;
  }

  .site-footer {
    padding: 40px 18px 48px;
  }
}


/* ============================================================
   10. TABLET — 769px – 1024px (iPad portrait, small laptops)
   ============================================================ */

@media (min-width: 769px) and (max-width: 1024px) {

  .hero-content {
    padding: 0 40px 80px;
  }

  .software-section {
    padding: 80px 40px 120px;
  }

  .about-section {
    padding: 80px 40px;
    gap: 0 48px;
  }

  .intel-header,
  .layer-tabs {
    padding-left: 40px;
    padding-right: 40px;
  }

  .features-section,
  .cta-section {
    padding: 80px 40px;
  }

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

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

  .module-left {
    padding: 72px 40px 60px 40px;
  }

  .module-right {
    padding: 72px 40px 80px 40px;
  }

  .forge-section {
    padding: 60px 40px;
  }

  .sat-left,
  .mkt-left {
    padding: 80px 40px 80px 40px;
  }

  .sat-right,
  .mkt-right {
    padding: 80px 40px 80px 32px;
  }

  .quantum-section {
    padding: 100px 40px;
  }

  .radar-section {
    padding: 72px 40px;
  }

  .detail-left {
    padding: 40px 40px;
  }

  .detail-right {
    padding: 40px 40px;
  }

  .detail-panel {
    width: 280px;
  }
}

/* Tablet landscape */
@media (min-width: 769px) and (max-width: 1024px) and (orientation: landscape) {

  .module-block {
    grid-template-columns: 1fr 1fr;
  }

  .module-left {
    height: 100vh;
  }

  .pillar-grid {
    grid-template-columns: repeat(5, 1fr);
  }

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

/* ============================================================
   8.5 CONTACT.HTML
   ============================================================ */

/* ── Single column on tablet portrait ── */
@media (max-width: 900px) {

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

  .contact-left {
    position: relative;
    height: auto;
    top: 0;
    padding: 72px 40px 56px;
    border-right: none;
    border-bottom: 0.5px solid rgba(255,255,255,0.07);
  }

  .contact-right {
    padding: 56px 40px 80px;
  }
}

/* ── Phone portrait ── */
@media (max-width: 768px) {

  .contact-left {
    padding: 60px 24px 48px;
  }

  .contact-right {
    padding: 48px 24px 72px;
  }

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

  .form-field {
    border-right: none !important;
  }

  .submit-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .submit-note {
    max-width: 100%;
  }

  .interest-pills {
    gap: 6px;
  }

  .interest-pill {
    font-size: 7px;
    padding: 7px 12px;
  }

  .left-title {
    font-size: clamp(32px, 10vw, 52px);
  }

  .left-body {
    max-width: 100%;
    font-size: 12px;
  }

  .page-index {
    display: none;
  }
}

/* ── Phone landscape — restore two columns ── */
@media (max-width: 768px) and (orientation: landscape) {

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

  .contact-left {
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    padding: 48px 32px;
    border-right: 0.5px solid rgba(255,255,255,0.07);
    border-bottom: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .contact-right {
    padding: 48px 32px;
    overflow-y: auto;
  }

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

  .form-field:nth-child(even) {
    border-right: none;
  }
}

/* ── Small phone ── */
@media (max-width: 380px) {

  .contact-left  { padding: 48px 18px 40px; }
  .contact-right { padding: 40px 18px 60px; }

  .form-field {
    padding: 18px 18px 14px;
  }

  .btn-submit {
    padding: 14px 36px;
    font-size: 10px;
  }
}

/* ============================================================
   11. DOCS.HTML & DOC.HTML (Documentation pages)
   ============================================================ */

/* ── Topbar ── */
@media (max-width: 768px) {

  .topbar {
    padding: 0 18px;
  }

  .topbar-tabs {
    display: none;
  }

  .topbar-right {
    gap: 12px;
  }

  .topbar-link {
    display: none;
  }
}

/* ── Layout shell — hide sidebar, collapse main ── */
@media (max-width: 768px) {

  .sidebar {
    display: none;
  }

  .toc {
    display: none;
  }

  .main {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
    padding: 32px 20px 80px;
  }
}

/* ── Typography ── */
@media (max-width: 768px) {

  .doc-h1 {
    font-size: clamp(22px, 7vw, 32px);
  }

  .doc-h2 {
    font-size: 1.2rem;
  }

  .doc-lead {
    font-size: 0.85rem;
  }
}

/* ── Grid components — single column ── */
@media (max-width: 768px) {

  .feature-grid,
  .model-grid,
  .data-domain-grid,
  .next-grid,
  .security-grid {
    grid-template-columns: 1fr;
  }

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

  /* Pipeline — stack vertically */
  .pipeline-stages {
    flex-direction: column;
  }

  .pipeline-stage {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .pipeline-arrow {
    display: none;
  }

  /* Partner strip — stack vertically */
  .partner-strip-body {
    grid-template-columns: 1fr;
  }

  .partner-strip-cell {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .partner-strip-cell:last-child {
    border-bottom: none;
  }

  /* Touch target override — doc links are block/flex, not inline-flex */
  .sidebar-item,
  .toc-list a,
  .next-card {
    display: flex;
  }
}

/* ── Troubleshooting — wrap tag below title ── */
@media (max-width: 480px) {

  .trouble-q {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .trouble-q-tag {
    margin-left: 0;
  }
}

/* ── Doc footer ── */
@media (max-width: 480px) {

  .doc-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Small phone ── */
@media (max-width: 380px) {

  .main {
    padding: 24px 16px 64px;
  }

  .doc-h1 {
    font-size: clamp(20px, 8vw, 28px);
  }
}


/* ============================================================
   9. SMALL PHONE — 380px and below (SE, Galaxy A, etc.)
   ============================================================ */

@media (max-width: 380px) {

  .about-section {
    padding: 60px 18px 72px;
  }

  .about-row-label {
    font-size: 18px;
  }

  /* Forces the container to expand and safely stack the text and button */
  .hero-content, 
  .mission-bracket-wrap { 
    display: flex;
    flex-direction: column;
    align-items: center;
    height: auto !important; 
  }

  /* Ensures the text physically pushes the button down */
  .hero-subtitle,
  .mission-text {
    margin-bottom: 32px !important; 
  }

} /* <-- THIS IS THE CLOSING BRACKET FOR THE 380PX MEDIA QUERY */


/* ============================================================
   10. TABLET FIXES
   ============================================================ */

/* Fix for overlapping text/button in About Section on touch/tablet/mobile */
@media (max-width: 1024px) {
  .about-title-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 64px; /* Added breathing room */
  }

  .about-hover-btn-wrap {
    position: relative !important; /* Pulls it out of the absolute overlay */
    inset: auto !important;
    opacity: 1 !important;         /* Makes it permanently visible */
    pointer-events: auto !important;
    margin-top: 32px;              /* Adds breathing room below the title */
  }

  /* Disable the blur effect on tap/hover for touch devices */
  .about-title-wrap:hover .about-title {
    filter: none !important;
  }
}
