/* =========================================================
   Responsive stylesheet — TenebraeCorpus
   - Breakpoints: 980px / 900px / 600px
   - Motion/Print handling
   - SoundCloud slider (mobile tuning)
   - Footer centering on mobile
   ========================================================= */

/* ---------------------------------
   Light color scheme override
-----------------------------------*/
@media (prefers-color-scheme: light){
  :root{
    --bg:#0e0e10;
    --fg:#f3f3f3;
    /* keep other vars from base theme (e.g. --line, --muted, --accent) */
  }
}

/* ---------------------------------
   ≤ 980px
   - Grids / shop layout
-----------------------------------*/
@media (max-width: 980px){
  .shop-grid{ grid-template-columns: 1fr; }
}

/* ---------------------------------
   ≤ 900px
   - Navigation simplification
   - About columns
   - Section spacing
   - SoundCloud slider refinements
-----------------------------------*/
@media (max-width:900px){
  .grid-2{ grid-template-columns: 1fr; }

  .nav-links,
  .lang-selector{ display: none; }

  #hamburger-btn{ display: inline-flex; }

  .about-columns{ grid-template-columns: 1fr; }

  .container.section { padding-top: 5rem; }

  /* SoundCloud slider (compact & readable) */
  .sc-slider{
    margin: 28px auto;
    padding: 0 12px;
  }
  .soundcloud-wrapper{
    border-width: 1px;
    box-shadow: 0 0 12px rgba(204,31,31,0.35);
    border-radius: 10px;
  }
  .sc-meta{
    font-size: 13px;
    line-height: 1.4;
  }
}

/* ---------------------------------
   ≤ 600px
   - Branding
   - SoundCloud slider: touch targets, density
   - Footer: stacked + centered
   - Prevent horizontal scroll
-----------------------------------*/
@media (max-width:650px){
  /* Prevent horizontal overflow on mobile */
  html {
    overflow-x: hidden;
    max-width: 100vw;
  }

  body {
    max-width: 100vw;
  }

  /* Ensure all containers respect viewport width */
  *:not(.back-to-top):not(.lightbox):not(.lightbox *):not([style*="position: fixed"]) {
    max-width: 100%;
  }

  .container {
    max-width: 100%;
  }

  /* Branding */
  .brand img{ max-width:140px; }

  /* SoundCloud: keep visual ratio but a bit shorter */
  .soundcloud-wrapper{ padding-top: 60%; } /* instead of 56.25% */

  /* Controls row with large touch targets (≥44px) */
  .sc-controls{
    display: grid;                /* ensure grid if not already set */
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    margin-top: 10px;
  }
  .sc-btn{
    padding: 10px 14px;
    min-width: 44px;
    min-height: 44px;
    font-size: 14px;
  }

  /* Bigger dots, thumb-friendly spacing */
  .sc-dots{ display:flex; gap:10px; align-items:center; justify-content:center; }
  .sc-dot{ width:11px; height:11px; }

  /* Metadata: slightly smaller + safe wrapping */
  .sc-meta{
    font-size: 12px;
    padding: 2px 4px;
    word-break: keep-all;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Optional: full‑bleed player
     Add data-edge="true" on <section class="sc-slider"> */
  .sc-slider[data-edge="true"]{
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }

  /* Footer: stack + center */
  .footer-inner{
    display:flex;                /* keep flex to stack children */
    flex-direction: column;      /* socials + copyright stacked */
    align-items: center;         /* horizontal centering */
    text-align: center;          /* text centering */
    gap: .5rem;
  }
  .footer .socials{
    justify-content: center;     /* center icons row */
    gap: .6em;                   /* slightly larger spacing for touch */
    flex-wrap: wrap;             /* wrap if needed on small widths */
  }

  .footer .copyright,
  .footer p{
    margin: .5rem 0 0;
    text-align: center;
  }
}

/* ---------------------------------
   Motion preferences
-----------------------------------*/
@media (prefers-reduced-motion: reduce){
  *{
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .mobile-menu{ transform: none !important; }
  #menu-overlay{ transition: none; }
  .site-header{ transition: none; }

  /* Any decorative motion elements */
  .ground-vines{ transform: none !important; }
}

/* ---------------------------------
   Print styles
-----------------------------------*/
@media print{
  body{ background:#fff; color:#000; }
  .site-header, .footer{ border:0; background:#fff; }
  a{ color:#000; text-decoration: underline; }
}