/* ==========================================================================
   Vitesse Ventures LLC — responsive layer
   Deliberate layouts per breakpoint, not a scaled-down desktop.
   1600+ / 1400 / 1200 / 992 / 768 / 576 / 480 / 414 / 390 / 375 / 360 / 320
   ========================================================================== */

/* ---------------------------------------------------------------- 1500+ */
@media (min-width: 1500px) {
  :root {
    --container: 1400px;
  }
}

/* ---------------------------------------------------------------- 1600+ */
@media (min-width: 1650px) {
  :root {
    --container: 1480px;
    --header-h: 90px;
    --header-total: calc(38px + 90px);
    --header-stuck-h: 74px;
  }
  .hero-title {
    font-size: clamp(4rem, 3.2rem + 2.4vw, 5.4rem);
  }
}

/* --------------------------------------------------------------- <=1399 */
@media (max-width: 1399.98px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  }

  .hero-card-1 {
    left: -1%;
  }
  .hero-card-2 {
    right: 0;
  }
}

/* --------------------------------------------------------------- <=1199 */
@media (max-width: 1199.98px) {
  :root {
    --header-h: 76px;
    --header-total: calc(38px + 76px);
    --header-stuck-h: 62px;
  }

  /* desktop nav gives way to the off-canvas menu */
  .primary-nav,
  .header-cta {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .header-bar-inner {
    justify-content: space-between;
  }

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

  .exp-card {
    min-height: 300px;
  }

  .flow-track {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.9rem;
  }

  .flow-dot {
    width: 58px;
    height: 58px;
  }

  .flow-line {
    top: 28px;
  }

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

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

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

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

  .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(2rem, 1.5rem + 2vw, 3rem);
  }

  /* page-nav: utility bar is still visible at this breakpoint,
     CSS fallback top stays at var(--header-total). JS handles runtime. */
}

/* ---------------------------------------------------------------- <=991 */
@media (max-width: 991.98px) {
  :root {
    --header-h: 72px;
    /* Utility bar is hidden at this breakpoint, total = nav bar only */
    --header-total: 72px;
    --header-stuck-h: 72px;
    --section-y: clamp(3.75rem, 2.5rem + 5vw, 5.5rem);
  }

  html,
  body {
    overflow-x: hidden !important;
    max-width: 100vw;
  }

  /* Disable directional/slide-in animations on mobile screens to preserve responsiveness */
  .js [data-reveal],
  .js [data-stagger] > * {
    transform: none !important;
  }

  .js [data-reveal].is-revealed,
  .js [data-stagger].is-revealed > * {
    transform: none !important;
    transition: opacity 0.5s var(--ease-out) !important;
  }

  .header-utility {
    display: none;
  }

  body.has-overlay-hero .site-main {
    padding-top: 0;
  }

  /* hero: text first, network visual below */
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(2.5rem, 1.5rem + 4vw, 4rem);
  }

  .hero-visual {
    min-height: 360px;
    order: 2;
    overflow: hidden;
    max-width: 100%;
  }

  .hero-card-1 {
    left: 0;
    top: 6%;
  }
  .hero-card-2 {
    right: 0;
    bottom: 12%;
  }
  .hero-card-3 {
    display: none;
  }

  .hero-scroll {
    display: none;
  }

  .hero-meta {
    gap: 1.25rem 2rem;
  }

  /* generic two-column collapses */
  .split,
  .overview-grid,
  .velocity-head,
  .reach-grid,
  .leader-grid,
  .contact-grid,
  .hero-editorial-grid,
  .tab-panel-grid,
  .media-duo {
    grid-template-columns: minmax(0, 1fr);
  }

  .overview-grid.is-media-right .overview-media {
    order: 0;
  }

  .hero-editorial-grid {
    gap: clamp(1.5rem, 1rem + 3vw, 2.5rem);
    align-items: start;
  }

  .tabs {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-6);
  }

  .tabs-list {
    border-left: 0;
    border-top: 2px solid var(--border);
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 0;
  }

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

  .tab-btn {
    border-bottom: 2px solid transparent;
    padding: 0.9rem 1.15rem;
    white-space: nowrap;
  }

  .tab-btn::before {
    display: none;
  }

  .tab-btn[aria-selected='true'] {
    border-bottom-color: var(--orange);
    background: transparent;
  }

  .feature-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature-media {
    min-height: 260px;
  }

  .benefit-grid,
  .why-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .why-grid {
    gap: 1rem;
  }

  .leader-media img {
    aspect-ratio: 4 / 4.4;
    object-position: center top;
  }

  .vm-grid,
  .region-pair {
    grid-template-columns: minmax(0, 1fr);
  }

  .region-card {
    padding-bottom: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
  }

  /* page-nav: utility bar is hidden at <=991px, so header-total = nav bar only.
     The CSS fallback top therefore matches the updated --header-total token.
     JS also updates this at runtime via updatePageNavTop(). */
  .page-nav {
    top: var(--header-total);
  }

  .side-panel {
    position: static;
  }

  .error-inner {
    grid-template-columns: minmax(0, 1fr);
    text-align: left;
  }

  .error-visual {
    order: -1;
  }

  .error-visual img {
    max-width: 380px;
    margin-inline: auto;
  }

  .error-code {
    font-size: clamp(5rem, 3rem + 14vw, 9rem);
  }

  .contact-grid {
    gap: var(--space-8);
  }

  .info-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------------------------------------------------------------- <=767 */
@media (max-width: 767.98px) {
  :root {
    --header-h: 68px;
    --header-total: 68px;
    --header-stuck-h: 68px;
    --gutter: 1.15rem;
    --radius-lg: 18px;
  }

  .brand-mark {
    width: 38px;
  }

  .brand-name {
    font-size: 1.12rem;
  }

  .nav-toggle-label {
    display: none;
  }

  /* flow becomes a vertical timeline */
  .flow-track {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin-top: var(--space-6);
  }

  .flow-line {
    left: 28px;
    right: auto;
    top: 34px;
    bottom: 34px;
    width: 2px;
    height: auto;
  }

  .flow-line i {
    transform-origin: top center;
    background: linear-gradient(180deg, var(--primary), var(--orange));
  }

  .flow.is-revealed .flow-line i {
    transform: scaleY(1);
  }

  .flow-step {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 0 1.25rem;
    text-align: left;
    align-items: center;
    padding: 0.85rem 0;
  }

  .flow-dot {
    width: 56px;
    height: 56px;
    margin: 0;
  }

  .flow-step h4 {
    margin-bottom: 0.15rem;
  }

  .flow-num {
    position: static;
    transform: none;
    grid-column: 2;
  }

  .expertise-grid,
  .cap-grid,
  .benefit-grid,
  .why-grid,
  .value-grid,
  .chain,
  .gallery,
  .quick-links,
  .info-stack,
  .form-row,
  .related-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .exp-card {
    min-height: 0;
    padding: var(--space-6);
  }

  .exp-card-media {
    opacity: 1;
  }
  .exp-card::before {
    opacity: 1;
  }
  .exp-card h3,
  .exp-card .exp-card-foot .link-arrow {
    color: #fff;
  }
  .exp-card p {
    color: rgba(255, 255, 255, 0.78);
  }
  .exp-card-icon {
    background: var(--accent);
    color: var(--primary-deep);
  }
  .exp-card-num {
    color: var(--accent);
  }
  .exp-card-foot {
    border-color: rgba(255, 255, 255, 0.22);
  }

  .gallery-item,
  .gallery-item.is-wide {
    grid-column: span 1;
    aspect-ratio: 4 / 3;
  }

  .intro-facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-top {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .footer-bottom-links {
    gap: 0.85rem;
  }

  .footer-social {
    padding-top: var(--space-3);
  }

  .strip-inner {
    height: 60px;
  }

  .strip-label {
    display: none;
  }

  .hero-meta {
    flex-direction: column;
    gap: 0.75rem;
  }

  .hero-card {
    min-width: 0;
    padding: 0.7rem 0.85rem;
  }

  .hero-card-1 {
    top: 2%;
  }
  .hero-card-2 {
    bottom: 4%;
  }

  .hero-visual {
    min-height: 300px;
  }

  .process-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
  }

  .process-item:hover {
    padding-left: 0;
  }

  .process-num {
    font-size: 1.5rem;
  }

  .editorial-item {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1rem;
  }

  .editorial-item .ico {
    display: none;
  }

  .timeline {
    padding-left: 2.25rem;
  }

  .timeline-progress {
    left: 8px;
    bottom: 2.2rem;
  }

  .timeline-item::before {
    left: calc(-2.25rem + 3px);
  }

  .timeline-item:not(:last-child)::after {
    left: calc(-2.25rem + 8px);
  }

  .section-head-split {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-5);
  }

  .slider-toolbar {
    width: 100%;
    margin-left: 0;
  }

  .slider-nav {
    margin-left: auto;
  }

  .media-duo img {
    min-height: 200px;
  }

  .cta-band-actions .btn {
    width: 100%;
  }

  .map-frame iframe {
    height: 320px;
  }

  .error-hero {
    min-height: 0;
  }

  .pullquote {
    padding: var(--space-5);
  }
}

/* ---------------------------------------------------------------- <=575 */
@media (max-width: 575.98px) {
  :root {
    --gutter: 1rem;
    --fs-display: clamp(2.1rem, 1.3rem + 5vw, 2.75rem);
    --fs-h1: clamp(1.85rem, 1.35rem + 3.4vw, 2.4rem);
    --fs-h2: clamp(1.6rem, 1.25rem + 2.4vw, 2.1rem);
  }

  .mobile-menu-inner {
    width: 100%;
  }

  .btn {
    padding: 0.9rem 1.25rem;
  }

  .btn-lg {
    width: 100%;
    padding: 1.05rem 1.4rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-claims {
    gap: 0.4rem;
  }

  .hero-title {
    letter-spacing: -0.025em;
  }

  .bg-word {
    font-size: clamp(4rem, 20vw, 8rem);
  }

  .hero-card-2 {
    right: 0;
  }

  .empty-state {
    padding: var(--space-6) var(--space-5);
  }

  .fact-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .slider-btn {
    width: 42px;
    height: 42px;
  }

  .breadcrumbs ol {
    font-size: 0.68rem;
  }
}

/* ---------------------------------------------------------------- <=479 */
@media (max-width: 479.98px) {
  .hero-card-1 {
    display: none;
  }

  .hero-card-2 {
    bottom: 0;
  }

  .hero-visual {
    min-height: 250px;
  }

  .hero-node-label {
    font-size: 0.55rem;
    padding: 0.2rem 0.4rem;
  }

  .reach-marker-label {
    font-size: 0.58rem;
    padding: 0.15rem 0.35rem;
  }

  .exp-card,
  .cap-card,
  .benefit-card,
  .form-panel,
  .info-card,
  .region-card {
    padding-left: var(--space-5);
    padding-right: var(--space-5);
  }

  .fact-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .quick-link {
    font-size: 0.84rem;
    padding: 0.85rem 1rem;
  }

  .sp-2 {
    display: none;
  }
}

/* ---------------------------------------------------------------- <=413 */
@media (max-width: 413.98px) {
  :root {
    --gutter: 0.9rem;
  }

  .brand-sub {
    letter-spacing: 0.2em;
    font-size: 0.55rem;
  }

  .mobile-nav-link {
    font-size: 1.08rem;
    padding: 0.85rem 0.9rem;
  }

  .timeline {
    padding-left: 1.9rem;
  }

  .timeline-progress {
    left: 8px;
    bottom: 2rem;
  }

  .timeline-item::before {
    left: calc(-1.9rem + 3px);
    width: 11px;
    height: 11px;
  }

  .timeline-item:not(:last-child)::after {
    left: calc(-1.9rem + 8px);
  }

  .flow-step {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 0 1rem;
  }

  .flow-dot {
    width: 46px;
    height: 46px;
  }

  .flow-dot .ico {
    width: 20px;
    height: 20px;
  }

  .flow-line {
    left: 23px;
  }
}

/* ---------------------------------------------------------------- <=389 */
@media (max-width: 389.98px) {
  :root {
    --header-h: 64px;
    --gutter: 0.85rem;
  }

  .brand-mark {
    width: 34px;
  }

  .brand-name {
    font-size: 1.04rem;
  }

  .btn {
    font-size: 0.875rem;
  }

  .hero-node {
    width: 10px;
    height: 10px;
  }

  .hero-card-value {
    font-size: 0.86rem;
  }
}

/* ---------------------------------------------------------------- <=374 */
@media (max-width: 374.98px) {
  :root {
    --gutter: 0.8rem;
  }

  .hero-title {
    font-size: 1.95rem;
  }

  .section-label {
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    gap: 0.5rem;
  }

  .strip-item {
    font-size: 0.85rem;
  }

  .mobile-menu-foot {
    padding: var(--space-4);
  }
}

/* ---------------------------------------------------------------- <=359 */
@media (max-width: 359.98px) {
  :root {
    --gutter: 0.75rem;
  }

  .brand-name {
    font-size: 0.98rem;
  }

  .brand-sub {
    display: none;
  }

  .hero-lead,
  .section-lead {
    font-size: 0.98rem;
  }

  .mobile-sub-link span {
    font-size: 0.94rem;
  }

  .fact-value {
    font-size: 0.92rem;
  }
}

/* ---------------------------------------------------------------- <=319 */
@media (max-width: 319.98px) {
  .brand-text {
    display: none;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .btn {
    padding: 0.8rem 1rem;
    font-size: 0.82rem;
  }

  .field-control {
    padding: 0.8rem 0.85rem;
    font-size: 0.88rem;
  }
}

/* ------------------------------------------------------- print / output */
@media print {
  .site-header,
  .site-footer,
  .page-transition,
  .cta-band,
  .hero-scroll,
  .strip {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }

  .site-main {
    padding-top: 0;
  }

  .js [data-reveal],
  .js [data-stagger] > * {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }

  a[href^='http']::after {
    content: ' (' attr(href) ')';
    font-size: 0.75em;
    color: #444;
  }
}
