/* Deeztik responsive/mobile layer — loaded after page styles. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 84px;
}

body { width: 100%; }
img, svg, video { max-width: 100%; }
input, textarea, select, button { font-size: 16px; }
a, button { -webkit-tap-highlight-color: transparent; }

/* Responsive navigation */
.nav-inner { position: relative; }
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  background: var(--bg-1);
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  border-radius: 99px;
  background: var(--text);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.mobile-only { display: none !important; }

/* Make inline graphics and long content resilient. */
.hero-visual canvas,
.hero-visual img,
.mock img,
.mock svg,
.team-avatar svg { max-width: 100% !important; height: auto !important; }
.mock, .card, .form-card, .info-card, .direct-grid { min-width: 0; }
pre, code { overflow-wrap: anywhere; }

@media (max-width: 960px) {
  .page { padding-left: 22px; padding-right: 22px; }
  .hero, .c-hero, .s-hero, .about-hero { padding-top: 56px !important; padding-bottom: 44px !important; }
  .panel, .product-section { padding-top: 72px !important; }
  .hero-inner, .about-hero, .s-hero, .c-hero, .contact-grid, .product-hero {
    gap: 36px !important;
  }
  .h-display { font-size: clamp(44px, 10vw, 68px); }
  .h-section { font-size: clamp(32px, 7vw, 46px); }
  .hero-visual { width: min(100%, 440px); margin-inline: auto; }
  .portfolio, .bento, .pillars, .team, .principles, .index-strip, .features,
  .contact-grid, .product-hero { grid-template-columns: 1fr !important; }
  .product-section:nth-of-type(even) .product-hero > :first-child { order: 1; }
  .product-section:nth-of-type(even) .product-hero > :last-child { order: 2; }
  .meta-row { flex-wrap: wrap; gap: 18px !important; }
  .meta-row > div { min-width: min(140px, 45%); }
  .footer { margin-top: 90px; }
}

@media (max-width: 860px) {
  .nav-inner { padding: 10px 18px; gap: 12px; }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .nav-cta { display: none; }
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    padding: 12px 18px 18px;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    background: rgba(10,10,11,.98);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 18px 34px rgba(0,0,0,.32);
    backdrop-filter: blur(18px);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 11px 14px;
    font-size: 16px;
    border: 1px solid transparent;
  }
  .nav-links a.active { background: var(--bg-2); border-color: var(--border); }
  .nav-links .mobile-only {
    display: flex !important;
    justify-content: space-between;
    margin-top: 4px;
    background: var(--accent);
    color: #071014;
    font-weight: 600;
  }
  body.menu-open { overflow: hidden; }

  .footer-inner { padding-inline: 22px; gap: 34px; }
  .footer-bottom { padding-inline: 22px; }
}

@media (max-width: 640px) {
  .page { padding-left: 16px; padding-right: 16px; }
  .grid-bg { background-size: 40px 40px; }
  .nav-inner { padding-inline: 14px; }
  .nav-brand { gap: 8px; }
  .nav-brand .consortium-badge { display: none; }

  .hero, .c-hero, .s-hero, .about-hero { padding-top: 42px !important; padding-bottom: 34px !important; }
  .panel, .product-section { padding-top: 58px !important; }
  .h-display { font-size: clamp(38px, 12vw, 54px); line-height: 1; }
  .h-section { font-size: clamp(30px, 9vw, 40px); }
  .lead, .hero-sub, .c-hero .side p { font-size: 16px !important; }
  .hero-meta {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 20px 14px !important;
    margin-top: 38px !important;
    padding-top: 24px !important;
  }
  .hero-ctas, .ctas { display: grid !important; grid-template-columns: 1fr; }
  .hero-ctas .btn, .ctas .btn { width: 100%; justify-content: center; }

  .card { padding: 22px; }
  .stats-strip { grid-template-columns: 1fr !important; }
  .stat-cell { padding: 24px !important; }
  .portfolio-card, .bento-card { min-height: auto !important; }

  .form-card { padding: 22px 18px !important; border-radius: 16px; }
  .field-row { grid-template-columns: 1fr !important; gap: 0 !important; }
  .topic-row { gap: 7px !important; }
  .topic { min-height: 42px; padding: 9px 12px !important; }
  .form-foot { flex-direction: column; align-items: stretch !important; }
  .form-foot .btn { width: 100%; justify-content: center; }
  .direct-grid { grid-template-columns: 1fr !important; }
  .info-card, .direct-cell { padding: 20px !important; }

  .product-section { padding-bottom: 64px !important; }
  .product-hero h2 { font-size: clamp(38px, 11vw, 54px) !important; }
  .mock { overflow: hidden; }
  .meta-row { display: grid !important; grid-template-columns: 1fr 1fr; }
  .meta-row > div { min-width: 0; }

  .footer-inner { grid-template-columns: 1fr !important; padding-inline: 16px; }
  .footer-bottom { padding-inline: 16px; flex-direction: column; gap: 8px; }

  .about-mobile-cta, .services-mobile-cta {
    padding: 28px 20px !important;
    grid-template-columns: 1fr !important;
    text-align: left !important;
  }
  .about-mobile-cta > div:last-child { justify-content: flex-start !important; }
}

@media (max-width: 420px) {
  .h-display { font-size: 36px; }
  .nav-brand > span:nth-child(2) { font-size: 14px; }
  .hero-meta { grid-template-columns: 1fr; }
  .meta-row { grid-template-columns: 1fr; }
  .eyebrow { max-width: 100%; white-space: normal; }
  .btn { white-space: normal; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* v20260714 — simplify long product content on small screens */
@media (max-width: 560px) {
  /* hide heavy decorative mocks (code panel, waveform) — keep real screenshots */
  .zvm-mock, .alg-mock { display: none; }
  .product-hero .mock:has(.zvm-mock), .product-hero .mock:has(.alg-mock) { display: none; }
  /* tighten product sections */
  .product-section { padding-top: 48px; padding-bottom: 48px; }
  .product-hero h2 { font-size: clamp(26px, 8vw, 34px); }
  .product-hero p.tagline { font-size: 15px; line-height: 1.55; }
  /* meta rows: single compact line, drop the third item */
  .product-hero .meta-row { gap: 14px; flex-wrap: wrap; }
  .product-hero .meta-row div:nth-child(3) { display: none; }
  /* features collapse to one tight column */
  .features { grid-template-columns: 1fr !important; gap: 10px; }
  .feat { padding: 16px; }
  .feat p { font-size: 13.5px; }
  /* index strip scrolls horizontally instead of stacking tall */
  .index-strip { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; }
}

/* v20260714-2 — 'How we work' sidebar must not stick/overlap on smaller screens */
@media (max-width: 960px) {
  .principles-sticky { position: static !important; top: auto !important; margin-bottom: 28px; }
}
