/**
 * Puck & Wick Responsive Media Queries
 * Precise adaptations for Desktop (1440x900), Tablet (768px - 1024px), and Mobile (390x844)
 */

/* ==========================================================================
   Tablet & Medium Viewports (<= 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  :root {
    --header-height: var(--header-height-mobile);
  }

  /* Header adjustments */
  .nav-menu {
    display: none;
  }

  .nav-pickup-pill {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  /* Hero Section */
  .hero-section {
    padding-block: var(--space-8) var(--space-10);
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--space-5);
    text-align: center;
  }

  .hero-visual {
    order: 1;
    min-height: auto;
  }

  .hero-content {
    order: 2;
    align-items: center;
  }

  .desktop-only-kicker,
  .hero-desktop-headline,
  .hero-desktop-stage-badge {
    display: none !important;
  }

  .hero-stage-overlay {
    background: linear-gradient(180deg, rgba(10, 10, 12, 0.34) 0%, rgba(10, 10, 12, 0.08) 40%, rgba(10, 10, 12, 0.94) 100%);
  }

  .hero-stage-pills {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    z-index: 2;
  }

  .mobile-stage-headline {
    display: block;
  }

  .hero-stage-banner {
    max-width: 100%;
    height: 320px;
  }

  .hero-tagline {
    margin-inline: auto;
  }

  .hero-actions {
    justify-content: center;
    margin-inline: auto;
  }

  /* Story Section */
  .story-editorial-grid {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  .story-narrative {
    text-align: left;
  }

  .story-heritage-card {
    max-width: 560px;
    margin-inline: auto;
    width: 100%;
  }

  .qc-pillars-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }

  /* Stockist Section */
  .stockist-showcase {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-8);
    padding: var(--space-8);
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
  }

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

/* ==========================================================================
   Mobile Viewports (<= 768px) — High-Density, Low-Scroll Editorial Layout
   ========================================================================== */
@media (max-width: 768px) {
  .container,
  .container-wide {
    padding-inline: 0.75rem;
  }

  /* Compact Section Spacing & Headers */
  .hero-section,
  .catalog-section,
  .boxes-section,
  .story-section,
  .stockist-section {
    padding-block: 1.25rem !important;
    min-height: auto !important;
  }

  .section-header,
  .compact-section-header {
    margin-bottom: 0.85rem !important;
  }

  .section-kicker {
    font-size: 0.58rem;
    letter-spacing: 0.14em;
    margin-bottom: 0.2rem;
  }

  .section-title {
    font-size: 1.35rem;
    margin-bottom: 0.2rem;
    line-height: 1.15;
  }

  .section-lead {
    font-size: 0.75rem;
    line-height: 1.38;
  }

  /* 1. Hero Section — 99/100 Editorial Stage + 3-Photo Bento Trio on Mobile */
  .hero-section {
    padding-block: 0.75rem 1.05rem !important;
  }

  .hero-grid {
    gap: 0.7rem;
    text-align: center;
  }

  .hero-visual {
    order: 1;
    min-height: auto;
    width: 100%;
  }

  .hero-stage-banner {
    width: 100%;
    max-width: 100%;
    height: 272px;
    border-radius: 14px;
    text-align: left;
  }

  .hero-stage-pills {
    top: 10px;
    left: 10px;
    right: 10px;
  }

  .hero-glass-tag {
    padding: 4px 10px;
    font-size: 0.53rem;
    letter-spacing: 0.08em;
  }

  .hero-stage-caption {
    bottom: 12px;
    left: 13px;
    right: 13px;
  }

  .hero-title {
    font-size: 1.78rem;
    line-height: 1.05;
  }

  .hero-content {
    order: 2;
    align-items: center;
    width: 100%;
  }

  .hero-tagline {
    font-size: 0.76rem;
    line-height: 1.44;
    margin-bottom: 0.75rem;
    padding-inline: 0.15rem;
    text-align: center;
  }

  .hero-bento-trio {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 0.8rem;
  }

  .hero-mini-bento {
    height: 112px;
    border-radius: 10px;
  }

  .hero-mini-price {
    top: 6px;
    right: 6px;
    padding: 2px 6px;
    font-size: 0.52rem;
  }

  .hero-mini-grad {
    padding: 7px 7px;
  }

  .hero-mini-title {
    font-size: 0.88rem;
    line-height: 1.05;
  }

  .hero-mini-sub {
    font-size: 0.53rem;
    margin-top: 2px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
    margin-bottom: 0;
  }

  .hero-actions .btn {
    width: 100%;
    padding: 0.7rem 0.5rem;
    font-size: 0.68rem;
    letter-spacing: 0.07em;
    gap: 0.25rem;
    min-height: 44px;
  }

  /* Hero atmospheric ambient glows - bounded to prevent horizontal bleed */
  .hero-ambient-glow {
    width: min(260px, 75vw);
    height: min(260px, 75vw);
    right: 0;
    max-width: 100vw;
  }

  .hero-ambient-cold {
    width: min(220px, 65vw);
    height: min(220px, 65vw);
    left: 0;
    max-width: 100vw;
  }

  /* 4. Story & 4 QC Pillars — Single-Screen Mobile Fit */
  .story-editorial-grid {
    gap: 0.65rem;
    margin-bottom: 0.75rem;
  }

  .story-headline {
    font-size: 1.35rem;
    margin-bottom: 0.35rem;
  }

  .story-lead-quote {
    font-size: 0.82rem;
    line-height: 1.38;
    padding-left: 0.6rem;
    margin-bottom: 0.35rem;
  }

  .story-prose p {
    font-size: 0.74rem;
    line-height: 1.4;
    margin-bottom: 0;
  }

  .story-heritage-card {
    padding: 0.65rem 0.75rem;
    gap: 0.45rem;
  }

  .story-heritage-card::before {
    display: none;
  }

  .story-heritage-header {
    padding-bottom: 0.35rem;
    gap: 0.5rem;
  }

  .story-heritage-icon {
    width: 32px;
    height: 32px;
  }

  .story-heritage-icon svg {
    width: 16px;
    height: 16px;
  }

  .story-heritage-title {
    font-size: 0.95rem;
  }

  .story-heritage-sub {
    font-size: 0.55rem;
    letter-spacing: 0.08em;
  }

  /* All 4 Heritage Metrics in 1 Horizontal Row */
  .story-metrics-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.35rem;
  }

  .story-metric-item {
    padding: 0.35rem 0.2rem;
  }

  .story-metric-number {
    font-size: 1.15rem;
    margin-bottom: 0.1rem;
  }

  .story-metric-label {
    font-size: 0.5rem;
    letter-spacing: 0.06em;
  }

  .story-heritage-signature {
    padding-top: 0.35rem;
    font-size: 0.56rem;
  }

  /* 4 QC Pillars in a Compact 2x2 Grid */
  .qc-breakdown {
    padding-top: 0.25rem;
  }

  .qc-pillars-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    margin-top: 0;
  }

  .qc-pillar-card {
    padding: 0.6rem;
  }

  .qc-pillar-header {
    margin-bottom: 0.25rem;
  }

  .qc-pillar-number {
    font-size: 0.95rem;
  }

  .qc-pillar-icon {
    width: 26px;
    height: 26px;
  }

  .qc-pillar-icon svg {
    width: 14px;
    height: 14px;
  }

  .qc-pillar-title {
    font-size: 0.85rem;
    line-height: 1.2;
    margin-bottom: 0.2rem;
  }

  .qc-pillar-desc {
    font-size: 0.66rem;
    line-height: 1.32;
    margin-bottom: 0.35rem;
  }

  .qc-pillar-spec {
    font-size: 0.52rem;
    padding: 0.15rem 0.38rem;
  }

  /* 5. Stockist Section — Compact Single-Screen Card */
  .stockist-showcase {
    grid-template-columns: minmax(0, 1fr);
    padding: 0.75rem;
    gap: 0.65rem;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
  }

  .stockist-showcase::after {
    display: none;
  }

  .stockist-content,
  .stockist-details-card {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .stockist-header {
    margin-bottom: 0.3rem;
  }

  .stockist-boutique-name {
    font-size: 1.15rem;
    margin-bottom: 0.1rem;
  }

  .stockist-location-tagline {
    font-size: 0.62rem;
  }

  .stockist-description {
    font-size: 0.74rem;
    line-height: 1.38;
    margin-bottom: 0.4rem;
  }

  .stockist-features-list {
    gap: 0.2rem;
    margin-bottom: 0.5rem;
  }

  .stockist-feature-item {
    font-size: 0.7rem;
    gap: 0.35rem;
  }

  .stockist-feature-item svg {
    width: 13px;
    height: 13px;
    margin-top: 2px;
  }

  .stockist-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 0.4rem;
  }

  .stockist-actions .btn {
    width: 100%;
    padding: 0.5rem 0.45rem;
    font-size: 0.64rem;
    white-space: normal;
    text-align: center;
    box-sizing: border-box;
    min-height: 44px;
  }

  .stockist-details-card {
    padding: 0.65rem;
    gap: 0.45rem;
  }

  .stockist-pickup-banner {
    padding: 0.4rem 0.55rem;
    gap: 0.45rem;
  }

  .stockist-pickup-icon {
    width: 28px;
    height: 28px;
  }

  .stockist-pickup-icon svg {
    width: 14px;
    height: 14px;
  }

  .stockist-pickup-title {
    font-size: 0.6rem;
  }

  .stockist-pickup-sub {
    font-size: 0.64rem;
  }

  .stockist-address-block {
    padding-bottom: 0.35rem;
    gap: 0.15rem;
  }

  .stockist-address-heading,
  .stockist-hours-heading {
    font-size: 0.58rem;
  }

  .stockist-address-text {
    font-size: 0.72rem;
  }

  .stockist-hours-block {
    gap: 0.2rem;
  }

  .stockist-hours-table td {
    padding-block: 0.15rem;
    font-size: 0.68rem;
  }

  /* 6. Footer — Compact 2-Column Mobile Directory */
  .site-footer {
    padding-top: 1.15rem;
    padding-bottom: 0.85rem;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
  }

  .footer-col-brand,
  .footer-grid > div:last-child {
    grid-column: 1 / -1;
  }

  .footer-brand-lockup {
    margin-bottom: 0.3rem;
  }

  .footer-brand-lockup .brand-mark {
    width: 34px;
    height: 34px;
  }

  .footer-manifesto {
    font-size: 0.72rem;
    line-height: 1.38;
    margin-bottom: 0.4rem;
    max-width: 100%;
  }

  .footer-heading {
    font-size: 0.78rem;
    margin-bottom: 0.3rem;
    padding-bottom: 0.15rem;
  }

  .footer-links-list {
    gap: 0.15rem;
  }

  .footer-link {
    font-size: 0.72rem;
  }

  .footer-stockist-details {
    gap: 0.15rem;
    font-size: 0.7rem;
  }

  .footer-newsletter-text {
    font-size: 0.7rem;
    margin-bottom: 0.35rem;
  }

  .footer-newsletter-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.4rem;
    align-items: start;
  }

  .footer-newsletter-form .btn {
    width: auto !important;
    padding: 0.5rem 0.85rem;
    font-size: 0.68rem;
  }

  .footer-newsletter-msg {
    grid-column: 1 / -1;
    min-height: 0;
  }

  .footer-bottom {
    padding-top: 0.5rem;
    flex-direction: column;
    text-align: center;
    gap: 0.25rem;
    font-size: 0.6rem;
  }

  .footer-bottom-brand {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}

/* ==========================================================================
   Compact Mobile Viewports (<= 480px, including 390x844 iPhone)
   ========================================================================== */
@media (max-width: 480px) {
  .nav-container {
    padding-inline: 0.75rem;
  }

  .nav-actions {
    gap: var(--space-2);
  }

  .brand-name {
    font-size: 1.1rem;
  }

  .brand-subtext {
    font-size: 0.55rem;
  }
}

/* ==========================================================================
   Compact Viewports (<= 360px, including 320x568 iPhone SE)
   Zero horizontal overflow: scrollWidth <= clientWidth
   ========================================================================== */
@media (max-width: 360px) {
  .nav-container {
    padding-inline: var(--space-2);
  }

  .nav-brand {
    gap: var(--space-2);
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand-name {
    font-size: 1.02rem;
  }

  .brand-subtext {
    font-size: 0.5rem;
  }

  .nav-actions {
    gap: 6px;
  }

  .cart-btn,
  .nav-toggle {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 8px;
  }

  .container,
  .container-wide {
    padding-inline: var(--space-2);
  }

  .hero-actions,
  .stockist-actions,
  .qc-pillars-grid {
    grid-template-columns: 1fr;
  }

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

  .footer-newsletter-form {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Desktop High-Resolution Viewports (>= 1440px)
   ========================================================================== */
@media (min-width: 1440px) {
  .hero-title {
    font-size: 3.75rem;
  }

  .hero-tagline {
    font-size: 1.15rem;
  }

  .qc-pillars-grid {
    gap: var(--space-8);
  }
}
