/* Homepage-only layout: keep the shared admin and chat styles unchanged. */
.homepage {
  --text-muted: rgba(255, 255, 255, 0.7);
}

.homepage :is(a, button, [role="button"]):focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 5px;
}

.contact-phone {
  color: var(--primary-color);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-underline-offset: 4px;
  user-select: text;
}

.contact-cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.contact-cta button {
  font-family: inherit;
}

.contact-details-link {
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border: 0;
  background: transparent;
  color: #bdcbd4;
  cursor: pointer;
  font-size: 0.95rem;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.contact-action-status {
  flex-basis: 100%;
  min-height: 1.5em;
  color: #bdcbd4;
  font-size: 0.875rem;
  line-height: 1.6;
  text-align: center;
}

.patent-image-item {
  padding: 0;
  font: inherit;
}

.patent-images-grid {
  grid-auto-rows: max-content;
}

.nav-toggle {
  appearance: none;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
}

.nav-services {
  display: none;
}

.hero-content {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  grid-template-areas: "copy visual" "stats visual";
  gap: 2rem 3rem;
}

.hero-text {
  grid-area: copy;
  min-width: 0;
  gap: 1.5rem;
}

.hero-visual {
  grid-area: visual;
  min-width: 0;
}

.hero-title {
  font-size: clamp(2rem, 3.7vw, 3.5rem);
  line-height: 1.3;
}

.hero-title .title-line {
  display: block;
}

.hero-title .title-line:first-child .gradient-text-alt {
  margin-bottom: 0.5rem;
  font-size: 0.65em;
  color: #e7f4ff;
  background: none;
  -webkit-text-fill-color: currentColor;
}

.hero-title .title-line:nth-child(2) .gradient-text {
  font-size: 1em;
  white-space: normal;
  text-wrap: balance;
  animation: none;
}

.hero-title-shine {
  display: none;
}

.hero-subtitle {
  max-width: 34rem;
  font-size: 1.125rem;
  line-height: 1.85;
  color: #bdcbd4;
  text-wrap: pretty;
}

.hero-buttons .btn-primary {
  box-shadow: 0 6px 24px rgba(0, 212, 255, 0.15);
}

.hero-stats {
  grid-area: stats;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

.hero-stats .stat-item {
  min-width: 0;
  padding: 0.4rem 1rem;
  background: none;
  border: 0;
  border-radius: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.hero-stats .stat-item + .stat-item {
  border-left: 1px solid var(--border-color);
}

.hero-stats .stat-item:hover {
  transform: none;
  box-shadow: none;
}

.hero-stats .stat-icon {
  display: none;
}

.hero-stats .stat-number {
  font-size: 2rem;
}

.hero-stats .stat-label {
  margin-top: 0.6rem;
  line-height: 1.5;
}

.section-action {
  margin-top: 2rem;
  text-align: center;
}

.launch-splash {
  transition-duration: 0.25s;
}

.skip-launch-splash .launch-splash {
  display: none;
}

.splash-skip {
  position: absolute;
  right: max(1.5rem, env(safe-area-inset-right));
  bottom: max(1.5rem, env(safe-area-inset-bottom));
  z-index: 5;
  min-height: 44px;
  padding: 0.65rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 30px;
  background: #0a0e27;
  color: #fff;
  font: inherit;
  cursor: pointer;
}

@media (min-width: 769px) and (max-width: 1024px) {
  .nav-menu {
    gap: 1.1rem;
  }

  .nav-link {
    font-size: 0.85rem;
  }

  .logo-text {
    font-size: 1rem;
  }

  .hero-content {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    text-align: left;
  }

  .hero-section {
    padding: 130px 0 70px;
  }

  .hero-visual {
    height: 380px;
  }

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

  .hero-buttons :is(.btn-primary, .btn-secondary) {
    padding: 0.8rem 1rem;
  }
}

@media (max-width: 768px) {
  .modern-nav,
  .modern-nav.scrolled {
    padding: 0.75rem 0;
    /* A filtered ancestor must not contain the fixed full-height menu. */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #080d1e;
  }

  .nav-menu {
    top: 68px;
    left: 0;
    height: calc(100vh - 68px);
    height: calc(100dvh - 68px);
    padding: 1rem max(1.5rem, env(safe-area-inset-right)) max(1.5rem, env(safe-area-inset-bottom)) max(1.5rem, env(safe-area-inset-left));
    gap: 0;
    align-items: stretch;
    background: #080d1e;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    overscroll-behavior: contain;
  }

  .nav-menu.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav-menu > li {
    flex-shrink: 0;
  }

  .nav-menu .nav-link {
    padding: 0.85rem 0;
    font-size: 1.05rem;
  }

  .nav-menu .nav-services {
    display: block;
    margin-top: 1rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
  }

  .nav-services-label {
    margin-bottom: 0.75rem;
    color: #acbdca;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
  }

  .bottom-entries {
    position: static;
    display: grid;
    gap: 0.6rem;
    margin: 1rem;
    animation: none;
  }

  .nav-services .bottom-entries {
    margin: 0;
  }

  .entry-button {
    animation: none;
  }

  .bottom-entries .entry-link {
    padding: 0.85rem 1rem;
    min-height: 48px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.9rem;
    background: rgba(0, 212, 255, 0.05);
    box-shadow: none;
  }

  .entry-link::after {
    content: "↗";
    margin-left: auto;
  }

  .digital-human-entry .entry-link::after {
    content: "→";
  }

  .modern-footer {
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
  }

  .hero-section {
    min-height: auto;
    padding: 96px 0 32px;
  }

  .hero-content {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "copy" "visual" "stats";
    gap: 1.25rem;
    text-align: left;
  }

  .hero-text {
    gap: 1rem;
  }

  .hero-badge {
    align-self: flex-start;
    gap: 0.5rem;
    padding: 0.45rem 0.75rem;
  }

  .hero-badge .badge-text {
    font-size: 0.7rem;
    letter-spacing: 0;
  }

  .hero-title {
    font-size: clamp(1.65rem, 6.8vw, 2.25rem);
  }

  .hero-title .title-line:first-child .gradient-text-alt {
    font-size: 0.7em;
  }

  .hero-subtitle {
    max-width: 34rem;
    font-size: 0.95rem;
    line-height: 1.75;
  }

  .hero-buttons {
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.75rem;
  }

  .hero-buttons :is(.btn-primary, .btn-secondary) {
    width: auto;
    min-height: 48px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  .hero-buttons .btn-primary {
    flex: 1;
  }

  .hero-buttons .btn-secondary {
    flex: 0 0 auto;
    border-color: transparent;
    padding-inline: 0.5rem;
  }

  .hero-visual {
    height: clamp(220px, 62vw, 300px);
  }

  .hero-image-wrapper .hero-image {
    max-height: calc(100% - 32px);
    filter: drop-shadow(0 8px 18px rgba(0, 212, 255, 0.2));
    /* Neutralize an existing desktop parallax handler after viewport changes. */
    transform: none !important;
  }

  .hero-image-wrapper .hero-product-name {
    margin-top: 0.4rem;
    font-family: inherit;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
  }

  .hero-stats {
    padding-top: 1rem;
  }

  .hero-stats .stat-item {
    padding: 0.25rem 0.35rem;
    text-align: center;
  }

  .hero-stats .stat-number {
    font-size: clamp(1.35rem, 5.5vw, 1.75rem);
  }

  .hero-stats .stat-label {
    font-size: 0.75rem;
    margin-top: 0.4rem;
  }

  .hero-section .scroll-indicator {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .homepage :is(.launch-splash, .nav-menu, .hero-text > *, .hero-stats, .hero-visual) {
    animation: none !important;
    transition: none;
  }
}
