/* ==========================================================================
   Singularity Hypertech — RESPONSIVE (all @media rules, applies over common + home)
   ========================================================================== */
/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
/* Below the 1440 Figma canvas the challenge section stops being a fixed 785px
   composition: the right rail returns to normal flow so nothing gets clipped. */
@media (max-width: 1439px) {
  .challenge {
    height: auto;
  }
  .challenge::before {
    top: auto;
    bottom: 0;
  }
  .challenge-grid {
    height: auto;
  }
  .challenge-left {
    padding: 100px 48px 100px 64px;
  }
  .challenge-right {
    height: auto;
    padding: 100px 40px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
  }
  .challenge-right h2 {
    position: static;
    width: 100%;
    max-width: 552px;
  }
  .system-card {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    max-width: 656px;
    height: auto;
  }
  .system-list {
    position: static;
    width: auto;
    min-width: 0;
    margin: 42px 40px 0;
    padding: 26px 0 56px;
  }
  .system-list li {
    width: 100%;
    max-width: 370px;
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
    /* let a pill grow rather than spill its text once the rail narrows */
    height: auto;
    min-height: 48px;
    flex: 0 0 auto;
    padding: 10px 44px;
  }

  /* process: Figma's fixed 426.67 + 733 tracks and 653px cards go fluid */
  .process-grid {
    padding: 0 64px;
    gap: 56px;
  }
  .process-intro {
    flex: 0 0 360px;
    width: 360px;
  }
  .process-intro h2 {
    line-height: 1;
    letter-spacing: -0.045em;
  }
  .timeline {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }
  .tl-card {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    height: auto;
    min-height: 155.5px;
    padding: 24px 33px;
  }
  .tl-card-inner {
    width: 100%;
  }

  /* why: Figma's 72px display type and 100/80 gutters go fluid */
  .why {
    min-height: 0;
  }
  .why-inner {
    padding: 0 64px;
  }
  .why-head h2 {
    font-size: 40px;
    letter-spacing: -0.025em;
  }
  .why-head p {
    width: 100%;
    line-height: 1.4;
  }

  /* choose: Figma's fixed 360 + 800 tracks go fluid */
  .choose-grid {
    padding: 100px 64px;
    gap: 56px;
  }
  .choose-nav {
    flex: 0 0 300px;
    width: 300px;
  }
  .choose-menu li:not(:last-child)::after {
    width: 100%;
  }
  .choose-panels {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }
  .choose-panel {
    width: 100%;
  }
  .choose-cols > div {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
  }

  /* execution gap: Figma's fixed 543px cards go fluid */
  .gap-cards {
    flex-wrap: wrap;
  }
  .gap-card {
    flex: 1 1 min(400px, 100%);
    width: auto;
    max-width: 100%;
    min-width: 0;
    height: auto;
    min-height: 404px;
  }
  .gap-body,
  .gap-glow .gap-body {
    width: 100%;
  }
  .gap-list li {
    width: 100%;
  }
  .gap-badge {
    right: 0;
  }
  .gap-head,
  .gap-head p {
    width: 100%;
  }
  .gap-head h2 {
    font-size: 40px;
  }

  /* what we do: keep Figma sizes; only the gutters and track widths flex */
  .whatwedo .container {
    padding: 0 64px;
  }
  .whatwedo .section-head {
    width: 100%;
  }
  /* chips size to their text and wrap onto as many lines as they need —
     no sideways scroll, nothing cut mid-word */
  .wwd-tabs {
    margin-bottom: 46px;
  }
  .wwd-row {
    height: var(--wwd-card, 344px);
    flex: 0 0 var(--wwd-card, 344px);
    gap: 40px;
  }
  .wwd-img {
    height: var(--wwd-card, 344px);
  }
}

@media (min-width: 1081px) and (max-width: 1320px) {
  /* keep the gauge 1:1 (scaling exposes the glow box edges); pin the ring
     centre 250px from the right edge and narrow the paragraph to clear it */
  .hero-gauge {
    left: calc(100% - 991px);
  }
  .hero-sub {
    max-width: 580px;
  }
  .hero-sub .br-desk {
    display: none;
  }
}

@media (max-width: 1080px) {
  .wwd-text h3 {
    font-size: 37px;
    line-height: 1.2;
  }
  .hero-sub .br-desk,
  .process-intro .br-desk {
    display: none; /* let the copy wrap naturally on narrow screens */
  }
  .site-header,
  .site-header.scrolled {
    padding-left: 32px;
    padding-right: 32px;
  }
  /* bento type scales with the shrinking tracks so cards stop feeling crowded */
  .bento-num {
    font-size: 56px;
  }
  .bento-card h3 {
    font-size: 19px;
  }
  .proof .section-head h2 {
    font-size: 35px;
  }
  .hero {
    padding: 150px 0 60px;
  }
  .hero-inner {
    min-height: 0;
    flex-direction: column; /* stack copy over orb — was a row that crushed the text */
    align-items: stretch;
  }
  .hero-copy {
    max-width: none;
    min-width: 0;
  }
  .hero-title span {
    white-space: normal;
  }
  /* gauge drops below the copy; crop the art to x 472-998 (rings centred,
     735 +/- 263), y 170-675 so the shelf runs to the section's bottom edge */
  .hero {
    padding-bottom: 0;
  }
  .hero-visual {
    position: relative;
    inset: auto;
    width: 100%;
    aspect-ratio: 526 / 505;
    margin-top: 24px;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 22%);
  }
  .hero-gauge {
    left: -89.7%;   /* 472 / 526 */
    top: auto;
    width: 189.7%;  /* 998 / 526 */
    margin-top: -32.3%; /* 170 / 526 */
  }
  .challenge-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 46px;
  }
  /* process: stack the copy above the rail */
  .process-grid {
    flex-direction: column;
    gap: 46px;
    padding: 0 32px;
  }
  .process-intro {
    position: static; /* release the sticky column once the grid stacks */
    flex: 0 0 auto;
    width: 100%;
    align-self: auto;
  }
  .process-shape {
    display: none;
  }
  .timeline {
    flex: 0 0 auto;
    width: 100%;
  }
  .challenge-grid::before {
    display: none; /* no vertical divider once columns stack */
  }
  /* challenge: release the fixed 785px canvas and un-absolute the right rail */
  .challenge {
    height: auto;
    padding: 0 0 90px;
  }
  .challenge::before {
    top: auto;
    bottom: -60px;
    width: 240px;
    height: 240px;
  }
  .challenge-grid {
    height: auto;
    padding: 0 32px;
  }
  .challenge-left {
    padding: 90px 0 0;
  }
  .challenge-left h2,
  .challenge-left p,
  .quote-card {
    width: 100%;
  }
  .challenge-right {
    border-left: 0;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 30px;
  }
  .challenge-right h2 {
    position: static;
    width: 100%;
  }
  .system-card {
    position: static;
    width: 100%;
    min-width: 0;
    height: auto;
    max-width: 656px;
  }
  .system-list {
    position: static;
    width: auto;
    min-width: 0;
    margin: 24px;
    padding: 26px 0 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
  }
  .system-list li {
    margin-left: auto;
    margin-right: auto;
    max-width: calc(100% - 40px);
  }
  /* why: flatten the two row groups into one wrapping track, so every cell
     flows 2-up continuously - 6 items read 2/2/2 and 5 items 2/2/1, instead of
     each group wrapping to 2+1 on its own and leaving a half-empty line */
  .why-rows {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 32px 40px;
  }
  .why-row {
    display: contents;
  }
  .why-cell {
    flex: 1 1 46%;
    min-width: 240px;
  }
  .footer-grid {
    grid-template-columns: 1.4fr repeat(2, minmax(0, 1fr));
  }
  .footer-news {
    grid-column: 1;
  }
}

@media (max-width: 860px) {
  /* below this width the stage stops pinning and the cards just stack */
  .ind-stage,
  .ind-rail {
    position: static;
    height: auto;
    margin-top: 0;
  }
  .ind-head {
    padding-top: 60px;
  }
  .ind-stage {
    padding: 24px 0 30px;
  }
  .ind-rail .container {
    padding: 0 0 70px;
    gap: 20px;
  }
  .ind-rail .ind-card,
  .ind-rail .ind-card:nth-child(odd),
  .ind-rail .ind-card:nth-child(even) {
    align-self: stretch;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  .nav-pill,
  .nav-cta {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }
  /* open dropdown is always a solid dark panel with light text,
     regardless of the header's light/dark section state */
  .nav-pill.open,
  .site-header.on-light .nav-pill.open {
    display: flex;
    position: absolute;
    top: 88px;
    left: 20px;
    right: 20px;
    flex-direction: column;
    gap: 4px;
    padding: 14px;
    background: rgba(10, 8, 30, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    backdrop-filter: blur(14px);
    box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
  }
  .nav-pill.open a,
  .site-header.on-light .nav-pill.open a {
    color: #e9e9f2;
    padding: 13px 16px;
  }
  .nav-pill.open a:hover,
  .site-header.on-light .nav-pill.open a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
  }
  /* the panel can outgrow a phone once every submenu is in it */
  .nav-pill.open {
    max-height: calc(100dvh - 120px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  /* dropdowns become accordions: label on the left, caret on the right */
  .nav-pill.open .nav-item {
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .nav-pill.open .nav-item > a,
  .nav-pill.open .nav-item > .nav-label {
    flex: 1 1 auto;
  }
  .nav-pill.open .nav-label {
    padding: 13px 16px;
    color: #e9e9f2;
  }
  /* 44px hit area, but no visible pill - just the chevron */
  .nav-pill.open .nav-caret,
  .site-header.on-light .nav-pill.open .nav-caret {
    width: 44px;
    height: 44px;
    margin: 0;
    flex: 0 0 44px;
    background: none;
    color: #e9e9f2;
  }
  .nav-pill.open .nav-menu {
    position: static;
    display: none;
    width: 100%;
    min-width: 0;
    margin: 2px 0 6px;
    padding: 4px 0 4px 12px;
    transform: none;
    opacity: 1;
    visibility: visible;
    background: none;
    border: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
  }
  /* hover must not open it on touch - only the caret does */
  .nav-pill.open .nav-item.open .nav-menu {
    display: block;
  }
  .nav-pill.open .nav-menu::before {
    display: none;
  }
  .nav-pill.open .nav-menu a {
    padding: 11px 14px;
    font-size: 15px;
  }
  /* bento: 3 fixed Figma columns -> 2 fluid columns */
  .bento {
    height: auto;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .bento-a {
    grid-column: 1;
    grid-row: 1 / span 2;
    min-height: 420px;
  }
  .bento-b {
    grid-column: 2;
    grid-row: 1;
  }
  .bento-c {
    grid-column: 2;
    grid-row: 2;
    min-height: 260px;
  }
  .bento-d {
    grid-column: 1 / span 2;
    grid-row: 3;
    min-height: 300px;
  }
  .bento-e {
    grid-column: 1 / span 2;
    grid-row: 4;
  }
  .proof .section-head,
  .proof .section-head p {
    width: 100%;
  }
  .proof .section-head h2 {
    font-size: 35px;
  }
  /* insights: featured stacks above the list */
  .insights-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .insights-head h2 {
    font-size: 35px;
  }
  .gap-cards {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
  }
  .gap-card {
    flex: 0 0 auto;
    min-height: 0;
  }
  .gap-badge {
    position: static;
    align-self: flex-start;
    order: -1;
  }
  /* with no fade to close the section, the stacked list needs real breathing room */
  .whatwedo {
    padding-bottom: 90px;
  }
  /* no pinning on touch — the section returns to normal document flow */
  .whatwedo {
    padding: 72px 0 0;
  }
  .wwd-track {
    height: auto !important;
  }
  .wwd-pin {
    position: static;
    min-height: 0;
    padding: 0;
    overflow: visible;
  }
  .wwd-list {
    max-height: none !important;
    padding-bottom: 0;
    overflow: visible;
  }
  .wwd-list.has-fade {
    -webkit-mask-image: none;
    mask-image: none;
  }
  /* rows stack: image over copy */
  .wwd-row {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    min-height: 0;
    flex: 0 0 auto;
    gap: 20px;
  }
  .wwd-img,
  .wwd-text {
    flex: 0 0 auto;
    width: 100%;
  }
  .wwd-img {
    height: 240px;
  }
  .wwd-list {
    gap: 56px;
  }
  .wwd-text p {
    font-size: 15px;
  }
  .wwd-text h3 {
    padding-top: 4px;
    font-size: 33px;
    line-height: 1.2;
    letter-spacing: -0.02em;
  }
  .choose-cols {
    gap: 24px;
  }
  /* every section shares one gutter on small screens (was 64px on
     .whatwedo/.why from the 1439 block, 32px on choose/process) */
  .whatwedo .container,
  .why-inner {
    padding: 0 32px;
  }
  /* release the sticky rail once the two columns stack */
  .choose-grid {
    flex-direction: column;
    gap: 40px;
    padding: 72px 32px;
    align-items: stretch;
  }
  .choose-nav {
    position: static;
    top: auto;
    flex: 0 0 auto;
    width: 100%;
    gap: 36px;
  }
  .choose-nav h2 {
    font-size: 35px;
    line-height: 1;
    letter-spacing: -0.03em;
  }
  .choose-lead {
    /* the rail's gap drops to 36px here */
    margin-top: -24px;
    max-width: none;
  }
  .choose-menu li:not(:last-child)::after {
    width: 100%;
  }
  .choose-item {
    font-size: 17px;
  }
  .choose-item.is-active,
  .choose-panel h3 {
    font-size: 20px;
  }
  .choose-panels {
    flex: 0 0 auto;
    width: 100%;
    gap: 72px;
  }
  .choose-panel {
    width: 100%;
    gap: 24px;
  }
  .choose-img img {
    height: 240px;
  }
  .insights-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 32px;
  }
  .insight-feature-body {
    padding-right: 44px;
  }
  .insight-thumb {
    flex: 0 0 104px;
    width: 104px;
  }
  .insight-item {
    gap: 16px;
    padding: 20px 0;
  }
}

@media (max-width: 560px) {
  .hero-sub {
    margin: 16px 0 32px;
  }
  .hero-actions {
    gap: 14px;
  }
  .hero-actions .btn {
    flex: 1 1 100%;
  }

  .site-header,
  .site-header.scrolled {
    padding-left: 16px;
    padding-right: 16px;
  }
  .nav-inner {
    padding: 7px 7px 7px 14px;
  }
  .brand-icon {
    width: 36px;
    height: 36px;
  }
  .brand-word {
    font-size: 15px;
  }
  .brand-powered {
    margin-left: 44px;
    font-size: 8px;
  }
  .container {
    padding: 0 20px;
  }
  /* one 20px gutter for every section, matching .container */
  .whatwedo .container,
  .why-inner {
    padding: 0 20px;
  }
  .choose-grid {
    padding: 56px 20px;
  }
  .process-grid {
    padding: 0 20px;
  }
  .bento {
    grid-template-columns: 1fr;
    padding: 10px;
    gap: 10px;
  }
  .bento-a,
  .bento-b,
  .bento-c,
  .bento-d,
  .bento-e {
    grid-column: 1;
    grid-row: auto;
    min-height: 0;
  }
  .bento-a {
    min-height: 380px;
  }
  .bento-num {
    font-size: 51px;
  }
  .bento-card h3 {
    font-size: 19px;
  }
  .system-list {
    padding: 20px 0 24px;
  }
  .system-list li {
    max-width: calc(100% - 24px);
    padding: 0 40px;
    font-size: 14px;
  }
  .system-list li::after {
    display: none;
  }
  .system-list .check {
    left: 16px;
  }
  .quote-card {
    height: auto;
    padding: 24px 22px;
    font-size: 15px;
    place-items: center start;
  }
  .bento-a {
    min-height: auto;
  }
  .bento-e {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  /* Services + Outcomes stay side by side on mobile rather than stacking,
     which used to leave a large dead gap between them */
  .choose-cols {
    flex-direction: row;
    gap: 20px;
  }
  .choose-cols > div {
    flex: 1 1 0;
    min-width: 0;
  }
  /* keep two stats per line on mobile instead of one long column
     (the track lives on .why-rows now - .why-row is display:contents above) */
  .why-rows {
    gap: 28px 20px;
  }
  .why-cell {
    flex: 1 1 calc(50% - 10px);
    max-width: calc(50% - 10px); /* the odd cell out must not stretch full width */
    min-width: 0;
  }
  .why-num {
    font-size: 41px;
    line-height: 41px;
  }
  .why-cell h3 {
    font-size: 16px;
    line-height: 1.4;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-news {
    grid-column: auto;
    margin-top: 0;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 20px;
  }
  .hero {
    padding-top: 130px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track,
  .orbit-spin,
  .orbit-icon img,
  .orbit-radar,
  .orb-field-a,
  .orb-field-b,
  .orb-sweep,
  .orb-dot,
  .orb-glow,
  .orb-pin,
  .gap-smoke::before,
  .gap-smoke::after {
    animation: none !important;
  }
}

/* ==========================================================================
   MOBILE — section heads stay on one line, the .choose rail turns horizontal
   Appended after the blocks above so these win where they overlap.
   Applies wherever .insights / .choose are used (home, approach, services).
   ========================================================================== */
@media (max-width: 860px) {
  /* "Latest insights" and its button sit on the same line, not stacked */
  .insights-head {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
  }
  .insights-head h2 {
    font-size: 35px;
    line-height: 1.1;
    min-width: 0;
  }
  .insights-all {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 12px 20px;
    font-size: 15px;
  }

  /* --- the seven/six pillars become one horizontal, swipeable rail --- */
  .choose-menu {
    flex-direction: row;
    align-items: center;
    gap: 28px;
    padding-top: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;          /* Firefox */
    -ms-overflow-style: none;       /* old Edge */
    /* bleed past the section padding so the row can scroll edge to edge */
    margin-inline: -32px;
    padding-inline: 32px;
    scroll-padding-inline: 32px;
  }
  .choose-menu::-webkit-scrollbar {
    display: none;
  }
  .choose-menu li {
    flex: 0 0 auto;
    align-self: center;
    scroll-snap-align: start;
  }
  /* the hairlines were row separators for the vertical list */
  .choose-menu li:not(:last-child)::after {
    display: none;
  }
  .choose-item {
    position: relative;
    width: auto;
    padding-bottom: 10px;
    white-space: nowrap;
    font-size: 14px;
  }
  /* active state can't grow the type here or the row would reflow on every
     scroll, so it changes colour and gains an underline instead */
  .choose-item.is-active {
    font-size: 14px;
    color: #fff;
  }
  .choose-item.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--brand);
  }
}

@media (max-width: 560px) {
  .choose-menu {
    margin-inline: -20px;
    padding-inline: 20px;
    scroll-padding-inline: 20px;
    gap: 22px;
  }
  .insights-head h2 { font-size: 30px; }
  .insights-all { padding: 11px 16px; font-size: 14px; }
}

/* CTA gauge responsive rules moved to css/shared.css */

/* Orbit glow/nodes must never widen the page on phones */
@media (max-width: 768px) {
  .industries { overflow-x: clip; }
}
