/**
 * Exhaustive phone / small-screen overrides.
 * Loaded after style.css on every page.
 */

/* ── Global text & overflow ── */
@media (max-width: 640px) {
  html {
    scroll-padding-top: calc(var(--nav-h) + var(--safe-top) + 0.5rem);
  }

  body {
    overflow-x: hidden;
  }

  h1, h2, h3, p, li, span, a, button, label {
    overflow-wrap: anywhere;
  }

  code {
    word-break: break-word;
    white-space: normal;
  }

  img, video, iframe {
    max-width: 100%;
  }

  .hero-video {
    max-width: none;
  }

  /* Lighter background on phones */
  .bg-orb {
    filter: blur(80px);
    opacity: 0.65;
  }

  .bg-orb--1 {
    width: 70vw;
    height: 70vw;
  }

  .bg-orb--2 {
    width: 55vw;
    height: 55vw;
  }

  .bg-orb--3 {
    width: 40vw;
    height: 40vw;
  }

  .bg-aurora {
    opacity: 0.45;
  }

  .demo-section-glow {
    width: 120vw;
    height: 50vh;
    right: -30%;
    opacity: 0.7;
  }
}

/* ── Navbar ── */
@media (max-width: 640px) {
  .nav-links {
    padding-bottom: calc(1rem + var(--safe-bottom));
  }

  .nav-brand {
    min-width: 0;
    flex-shrink: 1;
  }

  .nav-account::after {
    height: 14px;
  }
}

/* ── Hero ── */
@media (max-width: 640px) {
  .hero {
    min-height: 100svh;
    min-height: 100dvh;
    align-items: center;
  }

  .hero-video {
    /* Zoom out so more of the footage is visible on tall phones */
    transform: scale(1);
    object-fit: cover;
    object-position: center 42%;
    opacity: 0.5;
  }

  .hero-video-gradient {
    background: linear-gradient(
      180deg,
      rgba(3, 3, 4, 0.5) 0%,
      rgba(3, 3, 4, 0.14) 40%,
      rgba(3, 3, 4, 0.22) 100%
    );
  }

  .hero-video-vignette {
    background: radial-gradient(ellipse at center, transparent 10%, rgba(3, 3, 4, 0.62) 100%);
  }

  .hero-content {
    padding: 5.5rem 1rem 3.25rem;
    max-width: 100%;
  }

  .hero-label {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    margin-bottom: 0.85rem;
  }

  .hero-title {
    font-size: clamp(1.85rem, 8.2vw, 2.45rem);
    min-height: 2.2em;
    margin-bottom: 1.1rem;
    line-height: 1.15;
  }

  .hero-sub {
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.75rem;
    padding: 0 0.25rem;
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .hero-actions {
    gap: 0.7rem;
  }

  .hero-actions .btn {
    border-radius: 8px;
    font-size: 0.92rem;
  }

  .cursor {
    font-size: 0.92em;
  }

  /* Shorter black→blue bridge under hero on phones */
  #products {
    padding-top: 4.25rem;
    padding-bottom: 3rem;
  }

  #products::before {
    height: 12rem;
    background: linear-gradient(
      180deg,
      #030304 0%,
      #030304 16%,
      rgba(3, 3, 4, 0.85) 38%,
      rgba(5, 8, 18, 0.45) 68%,
      transparent 100%
    );
  }

  .section-head {
    text-align: left;
    margin-bottom: 1.5rem;
  }

  .products-grid {
    gap: 0.9rem;
  }

  .product-card {
    border-radius: 10px;
  }

  .product-card-inner {
    padding: 1rem 1.05rem 1.1rem;
  }

  .container {
    width: min(100% - 1.5rem, var(--max-w));
  }
}

/* ── Sections (shared) ── */
@media (max-width: 640px) {
  .section-label {
    font-size: 0.65rem;
    letter-spacing: 0.12em;
  }

  .section-head h2,
  .split-content h2,
  .faq-header h2 {
    font-size: clamp(1.35rem, 5.5vw, 1.65rem);
    line-height: 1.2;
  }

  .section-desc,
  .split-intro,
  .faq-intro {
    max-width: 100%;
    font-size: 0.88rem;
    line-height: 1.65;
  }

  .split-content {
    min-width: 0;
  }

  .split-media {
    min-width: 0;
  }

  .media-frame {
    border-radius: calc(var(--radius) + 2px);
  }
}

/* ── Products grid ── */
@media (max-width: 640px) {
  .product-card {
    max-width: 100%;
  }

  .product-card-inner--has-image {
    overflow: hidden;
  }

  .product-card-media {
    margin: 0 -1.15rem;
  }

  .product-card-name {
    font-size: 1rem;
    line-height: 1.4;
  }

  .product-card-row {
    padding-top: 0.95rem;
  }

  .products-loading,
  .products-error {
    padding: 0 0.5rem;
    font-size: 0.85rem;
  }
}

/* ── Features / cheat menu ── */
@media (max-width: 640px) {
  #features .split-layout {
    gap: 1.5rem;
  }

  #features .split-content .section-label {
    margin-bottom: 0.45rem;
  }

  .menu-category-list {
    gap: 0.45rem;
  }

  .menu-category-label {
    font-size: 0.85rem;
  }

  .cheat-menu-chrome {
    font-size: 0.72rem;
  }

  .cheat-menu-panel-title {
    font-size: 0.82rem;
    min-width: 0;
  }

  .cheat-menu-row:not(.cheat-menu-row--slider) {
    align-items: flex-start;
    gap: 0.55rem;
  }

  .cheat-menu-row:has(.cheat-select),
  .cheat-menu-row:has(.cheat-action-btn) {
    flex-direction: column;
    align-items: stretch;
  }

  .cheat-menu-row:has(.cheat-select) .cheat-select,
  .cheat-menu-row:has(.cheat-action-btn) .cheat-action-btn {
    width: 100%;
    min-height: 40px;
    font-size: 0.75rem;
  }

  .cheat-menu-row:has(.cheat-toggle) {
    align-items: center;
  }

  .cheat-menu-row--slider .cheat-menu-row-top {
    gap: 0.5rem;
  }

  .cheat-slider {
    height: 6px;
  }

  .cheat-slider::-webkit-slider-thumb {
    width: 22px;
    height: 22px;
  }

  .cheat-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
  }
}

/* ── Demo / video ── */
@media (max-width: 640px) {
  .demo-section {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .demo-features {
    gap: 0.55rem;
  }

  .demo-feature-text {
    font-size: 0.84rem;
    line-height: 1.55;
  }

  .demo-feature-icon {
    width: 34px;
    height: 34px;
  }

  .video-facade-play {
    width: 54px;
    height: 54px;
  }

  .video-placeholder {
    padding: 1rem;
    text-align: center;
    font-size: 0.75rem;
  }

  .video-placeholder p {
    max-width: 18rem;
    line-height: 1.5;
  }

  .video-wrap iframe {
    min-height: 200px;
  }
}

/* ── FAQ ── */
@media (max-width: 640px) {
  .faq-section {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .faq-header {
    margin-bottom: 1.5rem;
    padding: 0 0.15rem;
  }

  .faq-list {
    border-radius: calc(var(--radius) + 2px);
  }

  .faq-q-text {
    font-size: 0.88rem;
    padding-right: 0.25rem;
  }

  .faq-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
  }

  .faq-item.open .faq-answer-inner {
    padding-bottom: 1rem;
  }
}

@media (max-width: 400px) {
  .faq-meta {
    flex-direction: column;
    gap: 0.25rem;
  }

  .faq-meta-sep {
    display: none;
  }
}

/* ── Footer ── */
@media (max-width: 640px) {
  .footer-brand img {
    width: 28px;
    height: 28px;
  }

  .footer-brand {
    font-size: 0.9rem;
  }

  .footer-links a {
    font-size: 0.78rem;
    padding: 0.35rem 0.15rem;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }

  .footer-copy {
    font-size: 0.72rem;
    line-height: 1.5;
    padding-top: 1rem;
  }

  .footer-credit {
    font-size: 0.68rem;
    line-height: 1.5;
    padding: 0 0.5rem;
  }
}

/* ── Modals (policy) ── */
@media (max-width: 640px) {
  .modal {
    width: calc(100vw - 1.25rem);
    max-width: calc(100vw - 1.25rem);
    margin: auto;
    border-radius: calc(var(--radius) + 4px);
  }

  .modal h3 {
    font-size: 1.1rem;
    padding-right: 2rem;
  }

  .modal-close {
    top: 0.85rem;
    right: 0.85rem;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
  }

  .modal-body {
    font-size: 0.85rem;
    line-height: 1.75;
  }

  .modal-body ul,
  .modal-body ol {
    padding-left: 1.1rem;
  }
}

/* ── Cart drawer ── */
@media (max-width: 640px) {
  .cart-drawer-title {
    font-size: 1.05rem;
  }

  .cart-drawer-close {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .cart-drawer-body {
    padding: 0.85rem 1rem;
    -webkit-overflow-scrolling: touch;
  }

  .cart-empty {
    font-size: 0.88rem;
    padding: 2rem 0.5rem;
  }

  .cart-item-name {
    font-size: 0.88rem;
    line-height: 1.35;
  }

  .cart-item-variant,
  .cart-item-price {
    font-size: 0.78rem;
  }

  .cart-item-actions {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .cart-qty-btn {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .cart-item-remove {
    min-height: 36px;
    padding: 0.35rem 0;
  }

  .cart-total-row {
    font-size: 0.9rem;
  }

  .cart-toast {
    font-size: 0.84rem;
    text-align: center;
    padding: 0.85rem 1rem;
  }
}

/* ── Account / login modal ── */
@media (max-width: 640px) {
  .account-modal-header {
    padding: 1rem 1.1rem 0.85rem;
  }

  .account-modal-title {
    font-size: 1.05rem;
  }

  .account-modal-sub {
    font-size: 0.8rem;
    line-height: 1.5;
  }

  .account-modal-close {
    width: 44px;
    height: 44px;
  }

  .account-modal-body {
    padding: 1.25rem 1.1rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .account-modal-note {
    font-size: 0.85rem;
    padding: 0 0.25rem;
  }

  .account-modal-icon {
    width: 52px;
    height: 52px;
  }
}

/* ── Product page ── */
@media (max-width: 640px) {
  .product-page .page-section {
    padding-bottom: 2rem;
  }

  .product-breadcrumb {
    gap: 0.35rem 0.5rem;
    line-height: 1.5;
  }

  .product-breadcrumb #breadcrumb-name {
    display: inline-block;
    max-width: min(42vw, 9rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
  }

  .product-loading,
  .product-error {
    padding: 2rem 0.5rem;
    font-size: 0.88rem;
  }

  .product-gallery-main-wrap {
    border-radius: 10px;
    aspect-ratio: 4 / 3;
    touch-action: pan-y pinch-zoom;
  }

  .product-gallery-counter {
    font-size: 0.7rem;
    top: 0.55rem;
    right: 0.55rem;
  }

  .product-gallery-dots {
    margin-top: 0.65rem;
    gap: 0.35rem;
  }

  .product-gallery-dot {
    width: 8px;
    height: 8px;
    padding: 0;
  }

  .product-gallery-thumb {
    width: 64px;
    height: 64px;
  }

  .product-title {
    font-size: clamp(1.4rem, 5.5vw, 1.75rem);
    line-height: 1.2;
  }

  .product-price {
    font-size: clamp(1.5rem, 6vw, 1.85rem);
  }

  .product-rating {
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
  }

  .product-star {
    font-size: 0.95rem;
  }

  .product-rating-count {
    font-size: 0.8rem;
  }

  .product-variants-label {
    font-size: 0.85rem;
  }

  .product-variant-name {
    font-size: 0.85rem;
  }

  .product-variant-price {
    font-size: 0.8rem;
  }

  .product-qty-btn {
    width: 40px;
    height: 40px;
    font-size: 1.15rem;
  }

  .product-qty-value {
    font-size: 1rem;
    min-width: 1.5rem;
  }

  .product-about {
    margin-bottom: 1.5rem;
  }

  .product-about-title {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
  }

  .product-about-text {
    font-size: 0.88rem;
    line-height: 1.7;
    max-width: 100%;
  }

  .product-details {
    padding-top: 1.25rem;
    margin-top: 0.5rem;
  }

  .product-feature-title {
    font-size: 0.95rem;
    margin-bottom: 0.65rem;
  }

  .product-feature-list li {
    font-size: 0.8rem;
    line-height: 1.5;
    padding-left: 0.9rem;
  }
}

/* ── Reviews page ── */
@media (max-width: 640px) {
  .reviews-page .page-section {
    padding-bottom: 2rem;
  }

  .reviews-header h1 {
    font-size: clamp(1.45rem, 5.5vw, 1.85rem);
    line-height: 1.15;
  }

  .reviews-sub {
    font-size: 0.85rem;
    line-height: 1.55;
  }

  .reviews-summary {
    padding: 0.9rem 1rem;
  }

  .reviews-summary-score {
    font-size: 1.85rem;
  }

  .reviews-stars {
    font-size: 0.8rem;
  }

  .reviews-count {
    font-size: 0.72rem;
  }

  .reviews-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.35rem;
    margin-bottom: 1.25rem;
    margin-inline: -0.15rem;
    padding-inline: 0.15rem;
  }

  .reviews-filters::-webkit-scrollbar {
    display: none;
  }

  .reviews-filter {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .reviews-loading,
  .reviews-error,
  .reviews-empty {
    font-size: 0.85rem;
    padding: 0 0.25rem;
  }

  .review-card-top {
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
  }

  .review-date {
    white-space: normal;
    font-size: 0.68rem;
  }

  .review-text {
    font-size: 0.85rem;
    -webkit-line-clamp: 8;
  }

  .review-reply {
    font-size: 0.78rem;
    padding: 0.65rem 0.75rem;
  }

  .reviews-pagination {
    margin-top: 1.5rem;
    gap: 0.75rem;
  }

  .reviews-page-btn {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
  }

  .reviews-page-label {
    font-size: 0.78rem;
    min-width: 6rem;
  }
}

/* ── Status page ── */
@media (max-width: 640px) {
  .status-page .page-section {
    padding-bottom: 2rem;
  }

  .status-page-header h1 {
    font-size: clamp(1.45rem, 5.5vw, 1.85rem);
    line-height: 1.15;
  }

  .status-page-header p {
    font-size: 0.85rem;
    line-height: 1.55;
  }

  .status-meta {
    font-size: 0.75rem;
    line-height: 1.55;
    margin-bottom: 1.5rem;
  }

  .status-loading,
  .status-error,
  .status-empty {
    font-size: 0.85rem;
    padding: 0 0.25rem;
  }

  .status-row-name {
    font-size: 0.92rem;
    line-height: 1.35;
  }

  .status-badge {
    font-size: 0.6rem;
    padding: 0.28rem 0.55rem;
  }

  .status-graph-labels {
    font-size: 0.62rem;
  }

  .status-graph {
    gap: 1px;
  }

  .status-row-footer {
    font-size: 0.75rem;
  }

  .status-legend {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.78rem;
    margin-bottom: 1.25rem;
  }

  .status-external {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 0.75rem 1rem;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.02);
  }
}

/* ── Extra-small phones (≤480px) ── */
@media (max-width: 480px) {
  .container {
    width: min(100% - 1.15rem, var(--max-w));
  }

  .nav-inner {
    width: min(100% - 1.15rem, var(--max-w));
  }

  .hero-content {
    padding: 4.5rem 0.5rem 2.5rem;
  }

  .hero-title {
    font-size: clamp(1.7rem, 8vw, 2.05rem);
    min-height: 2.15em;
  }

  .hero-sub {
    font-size: 0.88rem;
    margin-bottom: 1.4rem;
  }

  .hero-video {
    object-position: center 36%;
  }

  #products {
    padding-top: 3.25rem;
  }

  #products::before {
    height: 9.5rem;
  }

  .section {
    padding: 2.5rem 0;
  }

  .media-frame--menu,
  .cheat-menu {
    min-height: 300px;
  }

  .cheat-menu-status {
    display: none;
  }

  .product-title {
    font-size: 1.35rem;
  }

  .product-price {
    font-size: 1.45rem;
  }

  .reviews-summary-score {
    font-size: 1.65rem;
  }

  .status-graph {
    height: 20px;
  }
}

/* ── Tiny phones (≤360px) ── */
@media (max-width: 360px) {
  :root {
    --nav-h: 60px;
  }

  .nav-logo {
    width: 30px;
    height: 30px;
  }

  .nav-actions {
    margin-right: 0.2rem;
  }

  .nav-toggle {
    width: 40px;
    height: 40px;
  }

  .nav-account,
  .nav-cart {
    min-width: 36px;
    width: 36px;
    height: 36px;
    min-height: 36px;
  }

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

  .hero-sub {
    font-size: 0.92rem;
  }

  .product-card-inner {
    padding: 1.1rem 1rem;
  }

  .product-card-media {
    margin: 0 -1rem;
  }

  .cheat-menu-tab {
    font-size: 0.68rem;
    padding: 0.45rem 0.55rem;
  }

  .cheat-menu-row-label {
    font-size: 0.68rem;
  }

  .product-breadcrumb #breadcrumb-name {
    max-width: 7rem;
  }

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

/* ── Landscape phones ── */
@media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: 100svh;
    min-height: 100dvh;
    padding-top: calc(var(--nav-h) + var(--safe-top));
  }

  .hero-video {
    transform: scale(1);
    object-position: center center;
  }

  .hero-content {
    padding: 1.5rem 1rem;
  }

  .hero-title {
    font-size: 1.75rem;
    min-height: auto;
    margin-bottom: 0.75rem;
  }

  .hero-sub {
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
  }

  .hero-actions {
    flex-direction: row;
    justify-content: center;
  }

  .hero-actions .btn {
    width: auto;
    min-width: 140px;
  }

  .nav-links {
    max-height: calc(100dvh - var(--nav-h) - var(--safe-top));
  }

  .account-modal-body {
    justify-content: flex-start;
    padding-top: 0.75rem;
  }
}
