/**
 * Homepage mobile-only layout & animation helpers (max-width: 768px).
 * Desktop styles are unchanged.
 */

@media (max-width: 768px) {
  /* Hero: keep copy positioned after main stylesheet (sticky rules) */
  #home-section-main .banner-content {
    position: relative !important;
    top: auto !important;
    transform: none !important;
    margin-top: 14vh !important;
    padding: 0 5% !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  #home-section-main .hero-lcp-title {
    font-size: clamp(30px, 8.2vw, 38px) !important;
    line-height: 1.22 !important;
  }

  #home-section-main .banner-content h3.hero-defer-text {
    font-size: clamp(18px, 4.8vw, 22px) !important;
    line-height: 1.35 !important;
    margin-bottom: 10px !important;
    color: #e0e0e0 !important;
  }

  #home-section-main .banner-content p.hero-defer-text {
    font-size: clamp(14px, 3.6vw, 16px) !important;
    line-height: 1.55 !important;
    max-width: 92vw;
    margin-inline: auto;
    color: #ccc !important;
  }

  /* AOS: readable before library loads; animations still run once aos-ready */
  html:not(.aos-ready) [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
  }

  /* Luxury living / schedule scroll section */
  .scroll-bg-section .scroll-content.content-one {
    padding-top: calc(var(--scroll-mobile-header-offset, 80px) + 8px);
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    justify-content: center;
  }

  .scroll-bg-section .scroll-content.content-two {
    justify-content: flex-start;
    align-items: center;
    gap: clamp(16px, 4vw, 24px);
    padding-top: calc(var(--scroll-mobile-header-offset, 80px) + 10px);
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: 100%;
    box-sizing: border-box;
  }

  .scroll-bg-section .device-text {
    order: 1;
    width: 100%;
    max-width: 100%;
    padding: 0 4px;
  }

  .scroll-bg-section .phone-img {
    order: 2;
    width: min(200px, 58vw);
    height: auto;
    margin-inline: auto;
  }

  /* Ambience pinned stage — stable viewport, no inner scroll jank, less dead space */
  #ambience-section.ambience-section {
    min-height: 0;
    overflow: hidden;
  }

  #ambience-section .ambience-pin {
    height: 100svh;
    min-height: 100svh;
    max-height: 100svh;
  }

  #ambience-section .ambience-frame-canvas {
    top: 0;
    bottom: 0;
    height: 100%;
  }

  #ambience-section .ambience-hero h2 {
    font-size: 32px;
    line-height: 1.22;
  }

  #ambience-section .ambience-hero {
    z-index: 2;
    pointer-events: none;
  }

  #ambience-section .ambience-features {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 8px;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 5% max(12px, env(safe-area-inset-bottom));
    bottom: max(12px, env(safe-area-inset-bottom));
    align-content: end;
    z-index: 5;
    opacity: 1;
    visibility: visible;
  }

  #ambience-section .ambience-features .amb-feature {
    position: relative;
    padding: 10px 11px 11px;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    visibility: visible;
  }

  #ambience-section .climate-temp-wave {
    z-index: 4;
    pointer-events: none;
    top: 14%;
    right: 4%;
  }

  /* Features cards */
  .features .section-title {
    font-size: clamp(26px, 7vw, 34px);
    line-height: 1.2;
    padding: 0 4px;
  }

  .features .feature-cards {
    gap: 14px;
  }

  .features .feature-card-box {
    width: 100%;
  }

  /* App showcase */
  .showcase-section .showcase-container {
    width: 100%;
    padding-inline: 0;
  }

  .showcase-section .showcase-text {
    width: 100%;
    align-items: stretch;
  }

  .showcase-section .showcase-taglines {
    -webkit-overflow-scrolling: touch;
    scroll-padding-inline: 8px;
  }

  .showcase-section .showcase-floating-chip {
    max-width: calc(50% - 8px);
    white-space: nowrap;
  }

  .showcase-section .chip-scenes {
    left: 2%;
    top: 12%;
  }

  .showcase-section .chip-secure {
    right: 2%;
    bottom: 14%;
  }

  /* Innovation ring + stats */
  .innovation-section {
    padding: 88px 16px 72px;
  }

  .innovation-section .ring-wrapper {
    width: min(350px, 88vw);
    transform: translateY(-12%);
  }

  .innovation-section .ring-text {
    top: 54%;
    padding: 0 12px;
  }

  .innovation-section .stats-container {
    margin-top: 28px;
    gap: 28px;
    padding: 0 8px;
  }

  .innovation-section .stat-box {
    min-width: 0;
    width: 100%;
    max-width: 320px;
    margin-inline: auto;
  }

  /* Smart orbit */
  .smart-orbit-section {
    padding: 52px 10px 60px;
    overflow: hidden;
  }

  .smart-orbit-section .orbit-header {
    padding: 0 6px;
    margin-bottom: 28px;
  }

  .smart-orbit-section .orbit-eyebrow {
    font-size: 10px;
    padding: 7px 14px;
    margin-bottom: 12px;
  }

  .smart-orbit-section .orbit-header h2 {
    font-size: clamp(17px, 4.2vw, 30px);
    line-height: 1.15;
    white-space: nowrap;
    letter-spacing: -0.03em;
  }

  .smart-orbit-section .orbit-lead {
    font-size: 14px;
    padding: 0 4px;
  }

  .smart-orbit-section .orbit-stats {
    gap: 10px;
  }

  .smart-orbit-section .orbit-stat {
    min-width: 0;
    flex: 1 1 calc(33.333% - 10px);
    padding: 12px 10px;
  }

  .smart-orbit-section .orbit-stat strong {
    font-size: 20px;
  }

  .smart-orbit-section .orbit-stat span {
    font-size: 10px;
  }

  .smart-orbit-section .orbit-stage {
    padding: 0 4px;
  }

  .smart-orbit-section .orbit-container {
    margin-inline: auto;
  }

  .smart-orbit-section .orbit-icon-label {
    font-size: 10px;
    padding: 5px 10px;
    bottom: calc(100% + 6px);
  }

  /* Video */
  .sk-video-section {
    min-height: min(72vh, 520px);
    padding: 24px 12px;
    box-sizing: border-box;
  }

  .sk-video-wrapper {
    width: min(100%, 640px);
    margin-inline: auto;
  }

  /* Clients */
  .clients-section .clients-content {
    padding-inline: 6%;
  }

  /* Society solutions */
  .ss-section .ss-heading {
    padding: 0 8px;
  }

  .ss-section .ss-cards {
    gap: 16px;
  }

  /* Partner / hsmart */
  .hsmart-section .icon-scroll {
    touch-action: pan-y;
  }

  .hsmart-cards .card-wrap {
    width: 100%;
  }

  .hsmart-cards .hsmart-card {
    width: 100%;
  }

  /* Featured products */
  .featured-products-section .featured-products-head h2 {
    font-size: clamp(26px, 7vw, 32px);
    line-height: 1.2;
  }
}

@media (max-width: 576px) {
  .showcase-section .showcase-top-heading {
    font-size: 11px !important;
    letter-spacing: 0.1em;
    padding: 8px 14px;
  }

  .showcase-section .showcase-top-heading br {
    display: none;
  }
}

@media (max-width: 480px) {
  #ambience-section .ambience-hero h2 {
    font-size: 27px;
  }

  #ambience-section .ambience-features {
    gap: 6px;
    padding-inline: 3%;
  }

  #ambience-section .ambience-features .amb-feature {
    padding: 8px 8px 9px;
  }

  #ambience-section .ambience-features .amb-feature h4 {
    font-size: 13px;
  }

  #ambience-section .ambience-features .amb-feature p {
    font-size: 11px;
    line-height: 1.45;
  }

  #home-section-main .banner-content {
    margin-top: 12vh !important;
  }

  .hsmart-cards {
    margin-top: -48px !important;
    padding-bottom: 64px !important;
  }

  .hsmart-section {
    padding-bottom: 88px !important;
  }

  .scroll-bg-section .scroll-content.content-two {
    gap: 14px;
    padding-top: calc(var(--scroll-mobile-header-offset, 80px) + 6px);
  }

  .scroll-bg-section .phone-img {
    width: min(180px, 52vw);
  }
}

@media (max-width: 768px) and (max-height: 520px) and (orientation: landscape) {
  #home-section-main .banner-content {
    margin-top: 8vh !important;
  }

  #home-section-main .hero-lcp-title {
    font-size: clamp(22px, 5vh, 28px) !important;
  }

  .scroll-bg-section .scroll-content.content-two {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
    gap: 10px;
    padding-top: 12px;
  }

  .scroll-bg-section .device-text {
    flex: 1 1 100%;
    order: 1;
  }

  .scroll-bg-section .phone-img {
    order: 2;
    width: min(120px, 28vw);
  }
}
