/* ============================================================
   noise-remover.com — Responsive CSS
   Breakpoints:
   xs:  < 480px  (small phones)
   sm:  < 640px  (phones)
   md:  < 768px  (tablets)
   lg:  < 1024px (small laptops)
   xl:  < 1200px (laptops)
   ============================================================ */

/* ============================================================
   LARGE DESKTOP (> 1200px)
   ============================================================ */
@media (min-width: 1200px) {
  .container {
    padding-left: var(--space-8);
    padding-right: var(--space-8);
  }
}

/* ============================================================
   LAPTOP (< 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  :root {
    --nav-height: 60px;
  }

  .section {
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }

  .stat-item:nth-child(2) {
    border-right: none;
  }

  /* Grid */
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   TABLET (< 768px)
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --nav-height: 56px;
  }

  /* Typography */
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl); }

  .section {
    padding-top: var(--space-12);
    padding-bottom: var(--space-12);
  }

  .section-header {
    margin-bottom: var(--space-8);
  }

  .section-header p {
    font-size: var(--text-base);
  }

  /* Navigation */
  .navbar-nav {
    display: none;
  }

  .navbar-cta {
    display: none;
  }

  .navbar-toggle {
    display: flex;
  }

  /* Grids */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .grid-auto {
    grid-template-columns: 1fr;
  }

  /* Form rows */
  .form-row {
    grid-template-columns: 1fr;
  }

  /* Buttons */
  .btn-lg {
    padding: 12px 24px;
    font-size: var(--text-base);
  }

  .btn-xl {
    padding: 14px 28px;
    font-size: var(--text-md);
  }

  /* Page hero */
  .page-hero {
    padding: var(--space-10) var(--space-4) var(--space-8);
  }

  .page-hero h1 {
    font-size: var(--text-3xl);
  }

  .page-hero p {
    font-size: var(--text-base);
  }

  .page-hero-meta {
    flex-direction: column;
    gap: var(--space-3);
  }

  /* Stats band */
  .stats-band {
    padding: var(--space-6) 0;
  }

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

  .stat-item {
    border-right: none;
    border-bottom: 1px solid var(--color-primary-100);
    padding-bottom: var(--space-4);
    margin-bottom: var(--space-4);
  }

  .stat-item:last-child,
  .stat-item:nth-last-child(-n+2) {
    border-bottom: none;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  /* Cookie banner */
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    left: var(--space-3);
    right: var(--space-3);
    bottom: var(--space-3);
  }

  .cookie-banner-actions {
    width: 100%;
    justify-content: flex-end;
  }

  /* Toast */
  .toast-container {
    left: var(--space-3);
    right: var(--space-3);
    top: 70px;
  }

  .toast {
    min-width: unset;
    max-width: 100%;
    width: 100%;
  }

  /* Hero buttons */
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero-buttons .btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }

  /* Audio player */
  .audio-player {
    flex-wrap: wrap;
  }

  .player-track-wrap {
    min-width: 140px;
  }

  .player-volume input {
    width: 54px;
  }

  /* Breadcrumb */
  .breadcrumb {
    flex-wrap: wrap;
  }
}

/* ============================================================
   PHONE (< 640px)
   ============================================================ */
@media (max-width: 640px) {
  :root {
    --nav-height: 56px;
  }

  .container {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  .section {
    padding-top: var(--space-10);
    padding-bottom: var(--space-10);
  }

  /* Typography */
  h1 { font-size: var(--text-2xl); }
  h2 { font-size: var(--text-xl); }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .footer-brand-desc {
    max-width: 100%;
  }

  .footer-legal {
    flex-wrap: wrap;
    gap: var(--space-3);
    justify-content: center;
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Table */
  .data-table th,
  .data-table td {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
  }

  /* Cards */
  .card-body {
    padding: var(--space-4);
  }

  /* Navbar logo text — hide on very small screens */
  .navbar-logo-text {
    font-size: var(--text-sm);
  }
}

/* ============================================================
   LOCKED BRAND HEADER — 2026-09-19
   Full desktop header morphs into a floating capsule on scroll.
   Mobile uses the floating capsule at every scroll position.
   ============================================================ */
.navbar {
  height: 72px;
  background: transparent;
  border-bottom: 1px solid transparent;
  box-shadow: none;
  transition:
    background-color 280ms ease,
    border-color 280ms ease,
    box-shadow 280ms ease;
}

.navbar-inner {
  width: min(calc(100% - 48px), var(--container-xl));
  height: 72px;
  padding: 0 8px 0 4px;
  border: 1px solid transparent;
  border-radius: 0;
  transition:
    width 280ms ease,
    height 280ms ease,
    margin-top 280ms ease,
    padding 280ms ease,
    background-color 280ms ease,
    border-color 280ms ease,
    border-radius 280ms ease,
    box-shadow 280ms ease;
}

.navbar-logo {
  width: 210px;
  height: 52px;
  gap: 0;
  background: url('/assets/images/brand/noise-remover-header.svg') left center / contain no-repeat;
  color: transparent;
  overflow: hidden;
  white-space: nowrap;
  transition:
    width 280ms ease,
    height 280ms ease,
    background-image 280ms ease;
}

.navbar-logo-icon,
.navbar-logo-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.navbar-nav {
  gap: clamp(14px, 1.6vw, 26px);
}

.nav-link {
  padding: 7px 9px;
  border-radius: var(--radius-full);
  line-height: 1;
  transition:
    color var(--transition-base),
    background-color var(--transition-base);
}

.navbar.scrolled {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.navbar.scrolled .navbar-inner {
  width: min(calc(100% - 48px), 920px);
  height: 54px;
  margin-top: 10px;
  padding: 5px 8px 5px 16px;
  background: var(--color-dark);
  border-color: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.2);
}

.navbar.scrolled .navbar-logo {
  width: 180px;
  height: 44px;
  background-image: url('/assets/images/brand/noise-remover-header-dark.svg');
}

.navbar.scrolled .nav-link {
  color: rgba(255, 255, 255, 0.82);
}

.navbar.scrolled .nav-link:hover,
.navbar.scrolled .nav-link.active {
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.12);
}

.navbar.scrolled .nav-link.active::after {
  display: none;
}

.navbar.scrolled .navbar-cta .btn-ghost {
  color: var(--color-dark);
  background: var(--color-white);
  border-color: var(--color-white);
}

.navbar.scrolled .navbar-cta .btn-primary {
  box-shadow: none;
}

.page-content {
  padding-top: 72px;
}

/* Public desktop pages should place their opening surface behind the
   transparent header, matching the landing page without moving hero content. */
@media (min-width: 769px) {
  .page-content {
    padding-top: 0;
  }

  .page-content > .about-hero,
  .page-content > .blog-hero,
  .page-content > .contact-hero,
  .page-content > .faq-hero,
  .page-content > .reviews-hero {
    padding-top: 144px;
  }

  .page-content > .pricing-hero {
    padding-top: 132px;
  }

  .page-content > .studio-header {
    padding-top: calc(var(--space-5) + 72px);
  }

  .page-content > .container:first-child {
    padding-top: calc(var(--space-8) + 72px) !important;
  }
}

body .lp-page {
  padding-top: 0;
}

body .lp-page > .lp-hero {
  padding-top: 144px;
}

@media (max-width: 1024px) and (min-width: 769px) {
  .navbar-inner {
    width: min(calc(100% - 32px), var(--container-xl));
  }

  .navbar-logo {
    width: 145px;
    height: 36px;
  }

  .navbar-nav {
    gap: 6px;
  }

  .nav-link {
    padding-inline: 6px;
    font-size: 12px;
  }

  .navbar.scrolled .navbar-inner {
    width: calc(100% - 32px);
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 76px;
  }

  .navbar,
  .navbar.scrolled {
    height: 76px;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .navbar-inner,
  .navbar.scrolled .navbar-inner {
    width: calc(100% - 24px);
    height: 56px;
    margin-top: max(10px, env(safe-area-inset-top));
    padding: 5px 6px 5px 12px;
    gap: 7px;
    background: var(--color-dark);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: var(--radius-full);
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.22);
  }

  .navbar-logo,
  .navbar.scrolled .navbar-logo {
    width: 140px;
    height: 38px;
    background-image: url('/assets/images/brand/noise-remover-header-dark.svg');
  }

  .navbar-nav {
    display: none;
  }

  .navbar-cta {
    display: flex;
    gap: 0;
    margin-left: auto;
  }

  .navbar-cta .btn-ghost {
    display: none;
  }

  .navbar-cta .btn-primary {
    min-height: 40px;
    padding: 9px 13px;
    border-radius: var(--radius-full);
    box-shadow: none;
    white-space: nowrap;
  }

  .navbar-toggle {
    display: flex;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
  }

  .navbar-toggle span {
    background: var(--color-white);
  }

  .mobile-menu {
    top: 76px;
    left: 12px;
    right: 12px;
    padding: 12px 16px max(20px, env(safe-area-inset-bottom));
    background: var(--color-dark);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    box-shadow: 0 18px 42px rgba(17, 24, 39, 0.28);
    max-height: calc(100dvh - 88px);
  }

  .mobile-nav-link {
    min-height: 46px;
    display: flex;
    align-items: center;
    padding: 11px 8px;
    color: rgba(255, 255, 255, 0.84);
    border-bottom-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
  }

  .mobile-nav-link:hover,
  .mobile-nav-link.active {
    color: var(--color-white);
    background: rgba(255, 255, 255, 0.1);
  }

  .mobile-nav-cta .btn-ghost {
    color: var(--color-white);
    border-color: rgba(255, 255, 255, 0.4);
  }

  .page-content,
  body .lp-page {
    padding-top: 76px;
  }

  body .lp-page > .lp-hero {
    padding-top: 45px;
  }
}

@media (max-width: 380px) {
  .navbar-inner,
  .navbar.scrolled .navbar-inner {
    padding-left: 9px;
    gap: 5px;
  }

  .navbar-logo,
  .navbar.scrolled .navbar-logo {
    width: 126px;
    height: 34px;
  }

  .navbar-cta .btn-primary {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 11px;
  }

  .navbar-toggle {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }
}

@media (max-width: 330px) {
  .navbar-logo,
  .navbar.scrolled .navbar-logo {
    width: 38px;
    height: 38px;
    background-image: url('/assets/images/brand/noise-remover-icon.svg');
  }
}

@media (prefers-reduced-motion: reduce) {
  .navbar,
  .navbar-inner,
  .navbar-logo,
  .nav-link {
    transition: none !important;
  }
}

/* ============================================================
   SMALL PHONE (< 480px)
   ============================================================ */
@media (max-width: 480px) {
  :root {
    --nav-height: 52px;
  }

  h1 { font-size: var(--text-2xl); }

  .container {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  .section {
    padding-top: var(--space-8);
    padding-bottom: var(--space-8);
  }

  .btn {
    font-size: var(--text-xs);
    padding: 9px 18px;
  }

  .btn-lg {
    padding: 11px 20px;
    font-size: var(--text-sm);
  }

  /* Stats all in one column */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Page hero */
  .page-hero {
    padding: var(--space-8) var(--space-4) var(--space-6);
  }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  .navbar,
  .cookie-banner,
  .toast-container,
  footer,
  .btn,
  .mobile-menu {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: #000;
  }

  h1, h2, h3 {
    page-break-after: avoid;
  }

  p, ul, ol {
    page-break-inside: avoid;
  }

  a[href]::after {
    content: ' (' attr(href) ')';
    font-size: 10pt;
    color: #666;
  }
}

/* ============================================================
   UTILITY RESPONSIVE CLASSES
   ============================================================ */

/* Hide/show at breakpoints */
.hide-mobile  { display: block; }
.show-mobile  { display: none; }

@media (max-width: 768px) {
  .hide-mobile  { display: none !important; }
  .show-mobile  { display: block !important; }
  .hide-tablet  { display: none !important; }
}

@media (max-width: 640px) {
  .hide-phone   { display: none !important; }
  .show-phone   { display: block !important; }
}

/* Touch targets — minimum 44x44px on mobile */
@media (max-width: 768px) {
  button,
  .btn,
  a.nav-link,
  input[type="checkbox"],
  input[type="radio"] {
    min-height: 44px;
  }

  .btn-xs,
  .btn-sm {
    min-height: 36px;
  }
}


/* Studio usage bar mobile fix */
@media (max-width: 640px) {
  .studio-usage-bar {
    flex-wrap: nowrap;
    gap: 4px;
    padding: 8px 12px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    align-items: center;
  }
  .studio-usage-bar-icon {
    display: none;
  }
  .studio-usage-bar-label {
    font-size: 10px;
    flex-shrink: 0;
    white-space: nowrap;
  }
  .studio-usage-bar-track {
    flex: 1;
    min-width: 30px;
    max-width: 50px;
    height: 4px;
  }
  .studio-usage-bar-value {
    font-size: 10px;
    flex-shrink: 0;
    white-space: nowrap;
  }
  .studio-plan-badge {
    font-size: 9px;
    padding: 2px 5px;
    flex-shrink: 0;
    white-space: nowrap;
  }
  .studio-usage-bar .btn,
  .studio-usage-bar a.btn {
    font-size: 10px;
    padding: 3px 8px;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: unset;
    margin-left: auto !important;
    border-radius: 20px;
  }
}

@media (max-width: 360px) {
  .studio-usage-bar-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .studio-usage-bar {
    padding-inline: 8px;
  }

  .studio-usage-bar-track {
    min-width: 20px;
  }
}

/* Auth pages mobile fix */
@media (max-width: 640px) {
  .auth-nav-bar {
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 24px;
  }
  .auth-nav-bar span {
    font-size: 12px;
  }
}
