/* ==================================================
   Sound Stream Now - styles.css (consolidated, mobile-first fixes)
================================================== */

/* Fonts */
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap");


/* Reset + base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
font-family: "Space Grotesk", sans-serif;
}

:root {
  --primary-color: #2c3333;
  --primary-text-colour: #ffffff;
  --accent-1: #d3d3d3;
  --accent-2: #e7f6f2;
  --neutral-1: #000;
  --neutral-2: #fff;
}

/* ==================================================
   Page structure
================================================== */
html, body {
  height: 100%;
  height: 100dvh;       /* mobile address-bar safe */
  overflow: hidden;     /* body never scrolls */
}

body {
  display: flex;
  flex-direction: column;
  background-color: var(--primary-color);
}

main {
  flex: 1;
  overflow-y: auto;
  scrollbar-gutter: stable;
  padding-bottom: 80px;
}

#footer { margin-top: auto; }

p { margin: 0; }

/* ==================================================
   Header (replaces all previous header rules)
================================================== */
header {
  width: 100%;
  background-color: var(--primary-color);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

#header { min-height: 72px; } /* reserve space while header.html loads */

.top-header {
  position: relative;
  overflow: hidden;
  background: #191718;
  padding-top: env(safe-area-inset-top);
}

.header-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.header-bg img {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: auto;
  max-width: 60%;
  object-fit: cover;
  object-position: right;
}

.header-inner {
  position: relative;   /* keeps content above .header-bg */
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 120px;
  padding: 8px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.logo {
  width: clamp(48px, 14vw, 100px);
  height: auto;
  aspect-ratio: 1;
  flex-shrink: 0;
}

.brand-title {
  font-size: clamp(16px, 5vw, 22px);
  line-height: 1.1;
  letter-spacing: 1px;
  font-weight: 400;
  margin-left: 10px;
  font-synthesis: none;
  color: var(--primary-text-colour) !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.play-badge { flex-shrink: 0; }

.play-badge img {
  display: block;
  height: clamp(36px, 10vw, 55px);
  width: auto;
}

/* Rotating logo */
.rotate { animation: rotation 120s infinite linear !important; }

@keyframes rotation {
  from { transform: rotate(0deg); }
  to   { transform: rotate(359deg); }
}

@media (prefers-reduced-motion: reduce) {
  .rotate { animation: none !important; }
}

@media (max-width: 600px) {
  .header-inner { padding: 8px 12px; min-height: 72px; }
  .brand-title { white-space: normal; }
}

@media (max-width: 480px) {
  .play-badge { display: none; } /* badge also lives in footer */
}

/* ==================================================
   Navigation
================================================== */
.navbar-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 1rem;
}

.primary-nav {
  display: flex;
  list-style: none;
  gap: 16px;
  justify-content: flex-end;
  width: 100%;
}

@media only screen and (max-width: 35em) {
  .navbar-nav,
  .primary-nav { justify-content: flex-start; }
}

.nav-link {
  color: var(--primary-text-colour) !important;
  transition: color 300ms ease-in-out;
}

.nav-link:hover { color: var(--accent-1); }

.nav-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==================================================
   Titles / text
================================================== */
.title-text {
  font-size: 1rem;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-decoration: none;
}

@media (min-width: 768px) {
  .title-text { font-size: 2rem; }
}

.title-font {
  letter-spacing: 1px;
}

.section-title {
  font-size: 18px;
  color: var(--primary-text-colour);
  margin: 8px auto 10px auto;
  text-align: left;
  max-width: 1200px;
  padding-left: 0;
}

.section-title2 {
  
  font-size: clamp(24px, 7vw, 80px);
  color: var(--primary-text-colour);
}

.section-title-left {
  
  font-size: 18px;
  color: #333;
  margin: 0 0 2px 0;
  line-height: 1;
  text-align: left;
  max-width: 1200px;
  padding-left: 6px;
  letter-spacing: 1px;
}

.section-title-left-dark {
  
  font-size: 18px;
  color: #000;
  margin: 2px 0;
  line-height: 1;
  text-align: left;
  max-width: 1200px;
  padding: 4px 8px;
  border: 1px solid #333;
  border-radius: 6px;
}

.section-title-left-dark.feature-embed {
  display: block;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title-left-dark.feature-embed iframe {
  display: block;
  width: 100%;
  height: 700px;
  border: 0;
}

@media (max-width: 600px) {
  .section-title-left-dark.feature-embed iframe { height: 480px; }
}

.section-list {
  max-width: 1200px;
  margin: 20px 0 10px 0;
  padding-left: 30px;
  line-height: 1;
}

.section-list li {
  
  font-size: 18px;
  color: #333;
  line-height: 1;
}

.about-container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 6px;
  padding-right: 6px;
  color: var(--primary-text-colour);
}

.moworks-single { text-align: center; }

.patent-pending {
  text-align: center;
  margin-top: 8px;
  font-size: xx-small;
}

/* ==================================================
   Store badges
================================================== */
.store-badges {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.store-badges .google-play-badge {
  height: 84px;
  width: auto;
  cursor: pointer;
}

.store-badges .ios-badge {
  height: 60px;
  width: auto;
  cursor: pointer;
}

@media (max-width: 600px) {
  .store-badges .google-play-badge { height: 64px; }
  .store-badges .ios-badge { height: 46px; }
}

/* ==================================================
   Discovery dial
================================================== */
.discovery-dial {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

.discovery-dial img {
  display: block;
  width: 180px;
  max-width: 100%;
  height: auto;
  border: none;
  border-radius: 50%;
  clip-path: circle(50%);
  margin: 0 auto;
}

/* ==================================================
   Intro
================================================== */
.ssn-intro {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 100px;
  width: 100%;
}

.ssn-intro-text {
  flex: 0 0 auto;
  text-align: left;
}

.ssn-intro-image {
  flex: 0 0 auto;
  padding-right: 0;
}

.ssn-intro-image img {
  width: 210px;
  max-width: 100%;
  height: auto;
  display: block;
  border: 1px solid #ffffff;
  border-radius: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

@media (max-width: 700px) {
  .ssn-intro {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    padding: 0 12px;
  }

  .ssn-intro-text { flex: 1 1 auto; max-width: 100%; }

  .ssn-intro-image {
    width: 100%;
    text-align: center;
  }

  .ssn-intro-image img {
    width: 155px;
    margin: 0 auto;
  }
}

/* ==================================================
   Hero
================================================== */
#hero {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  background-color: var(--primary-color);
  margin-top: -2px;
  width: 100%;
  text-align: left;
}

.hero-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
}

.hero-text-container p {
  font-size: 12px;
  color: var(--accent-2);
}

.hero-button {
  align-self: flex-start;
  font-size: 14px;
  padding: 1em;
  color: #212121;
  background-color: transparent;
  border: 1px solid var(--accent-2);
  box-shadow: 4px 4px 0 var(--accent-1);
  transition: 300ms ease-in-out;
}

.hero-button:hover {
  background-color: var(--accent-2);
  color: var(--primary-color);
}

@media only screen and (min-width: 768px) {
  .hero-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

@keyframes fade-in {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

/* ==================================================
   Grid items
================================================== */
#grid-container {
  margin: 20px auto;
  max-width: 1200px;
}

.grid-item {
  flex: 1 1 calc(16.66% - 10px);
  min-width: 140px;
  max-width: 180px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.grid-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.grid-item .title-text {
  font-size: 0.85rem;
  display: block;
  margin-bottom: 4px;
}

.grid-item a {
  text-decoration: none !important;
  color: #0d6efd;
}

@media (max-width: 992px) {
  .grid-item {
    flex: 1 1 calc(33.33% - 10px);
    max-width: calc(33.33% - 10px);
  }
}

@media (max-width: 576px) {
  .grid-item {
    flex: 1 1 calc(50% - 10px);
    max-width: calc(50% - 10px);
    min-width: 120px;
  }
}

/* ==================================================
   Playlist grid
================================================== */
.playlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 140px));
  gap: 12px;
  max-width: 1200px;
  margin: 0 auto;
  justify-content: start;
}

@media (max-width: 600px) {
  .playlist-grid {
    justify-content: center;
    padding: 0 12px;
  }
}

.playlist-box {
  width: 140px;
  background: white;
  border-radius: 8px;
  padding: 8px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.playlist-box img {
  width: 112px;
  height: 112px;
  object-fit: cover;
  display: block;
  margin: 0 auto;
  border-radius: 6px;
}

/* Skeleton placeholders */
.skeleton {
  width: 140px;
  background: white;
  border-radius: 8px;
  padding: 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.skeleton-thumb {
  width: 100%;
  height: 112px;
  border-radius: 6px;
  background: linear-gradient(90deg, #ddd 25%, #eee 50%, #ddd 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

.skeleton-text {
  width: 100%;
  height: 14px;
  border-radius: 4px;
  background: #e0e0e0;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ==================================================
   Feature block
================================================== */
#feature-block { display: none; }
#feature-spacer { height: 0; }

.feature-container {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  border-radius: 8px;
  padding: 16px;
  max-width: 100%;
  box-sizing: border-box;
}

.feature-art {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 8px;
  flex-shrink: 0;
}

.feature-text { text-align: left; }

.feature-text h1 {
  font-size: 20px;
  margin: 0 0 10px 0;
  line-height: 1.2;
  color: #000;
}

@media (max-width: 700px) {
  .feature-container { flex-direction: column; }
  .feature-art { max-width: 100%; }
}

/* ==================================================
   Footer
================================================== */
.ssn-footer {
  position: sticky;
  bottom: 0;
  z-index: 10;
  background: #2c3333;
  color: var(--primary-text-colour);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-bottom: env(safe-area-inset-bottom);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 24px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 72px;
}

.footer-center {
  display: flex;
  justify-content: center;
}

.footer-left {
  display: flex;
  gap: 16px;
}

.footer-left a {
  color: var(--primary-text-colour);
  text-decoration: none;
  font-size: 13px;
}

.footer-left a:hover { text-decoration: underline; }

.play-badge-footer img { height: 55px; }

.footer-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-social {
  display: flex;
  gap: 12px;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-social img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 600px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
    text-align: center;
  }

  .footer-left,
  .footer-center,
  .footer-right { justify-content: center; }

  .footer-left { flex-wrap: wrap; }

  .play-badge-footer img { height: 44px; }
}


/* ==================================================
   Support form
================================================== */

.support-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 540px;
    margin: 24px auto;
    text-align: left;
    color: var(--primary-text-colour);
}

.support-form label {
    margin-top: 8px;
    font-weight: 600;
}

.support-form input,
.support-form textarea {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 12px;
    border: 1px solid #777;
    border-radius: 6px;
    background: #181818;
    color: #f8f9fa;
    font: inherit;
    font-size: 16px;
    line-height: 1.5;
    outline: none;
    box-shadow: none;
    transition: border-color 0.2s;
}

.support-form input::placeholder,
.support-form textarea::placeholder {
    color: #aaa;
    opacity: 1;
}

.support-form input:focus,
.support-form textarea:focus {
    border-color: #f8f9fa;
    outline: none;
    box-shadow: none;
}

/* Red border only when validation fails */

.support-form.was-validated input:invalid,
.support-form.was-validated textarea:invalid {
    border-color: #dc3545;
    box-shadow: none;
}

/* Hide validation messages */

.support-form .invalid-feedback,
.support-form .valid-feedback,
.support-form .error-message {
    display: none;
}

.support-form textarea {
    min-height: 160px;
    resize: vertical;
}

/* Light submit button */

.support-form button.support-submit {
    min-height: 48px;
    padding: 10px 20px;
    background-color: #f8f9fa;
    color: #212529;
    border: 1px solid #f8f9fa;
    border-radius: 6px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 150ms ease-in-out;
}

.support-form button.support-submit:hover {
    background-color: #e2e6ea;
    border-color: #dae0e5;
    color: #212529;
}

.support-form button.support-submit:focus-visible {
    outline: 2px solid #f8f9fa;
    outline-offset: 3px;
}

.support-form button.support-submit:disabled {
    opacity: 0.6;
    cursor: wait;
}

.support-note {
    margin: 6px 0;
    color: var(--accent-1);
    font-size: 13px;
    line-height: 1.6;
}

/* Hidden spam trap */

.support-trap {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Support page */

.about-container.support-page {
    padding: 24px 16px;
}

.support-page h1 {
    margin-bottom: 16px;
    font-size: clamp(22px, 5vw, 32px);
    line-height: 1.3;
}

.support-page p {
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.support-page a {
    color: #f8f9fa;
    text-underline-offset: 3px;
}

.support-page a:hover {
    color: #ccc;
}

.support-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 24px auto 0;
}

.support-form,
.support-form label,
.support-form input,
.support-form textarea,
.support-form button,
.support-form p {
    font-family: "Space Grotesk", sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

.support-form label,
.support-form button {
    font-weight: 600;
}


/* Privacy policy only */
.privacy-page {
  font-size: 12px;
  line-height: 1.7;
}

.privacy-page p,
.privacy-page li {
  font-size: inherit;
}

.privacy-page h1 {
  font-size: 22px;
  margin: 20px 0 12px;
}

.privacy-page h2 {
  font-size: 16px;
  margin: 18px 0 8px;
}

.privacy-page h3 {
  font-size: 14px;
  margin: 16px 0 8px;
}

.video-container {
  width: 100%;
  max-width: 800px;
  aspect-ratio: 16 / 9;
  margin: 24px auto;
  overflow: hidden;
  border-radius: 12px;
}

.video-container iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}



/* ==================================================
   Portfolio
================================================== */

.portfolio-section {
    max-width: 800px;
    margin: 20px auto;
    padding: 0 12px;
}

/* Heading */

.portfolio-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
    color: #fff;
}

.portfolio-heading h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 4px;
}

.portfolio-heading span {
    font-size: 12px;
    color: #aaa;
}

.portfolio-heading-label {
    letter-spacing: 2px;
}

/* Category filters */

.portfolio-filters {
    justify-content: flex-start;
}

.portfolio-filter {
    background: transparent;
    border: 1px solid #777;
    color: #ccc;
    border-radius: 6px;
    font-size: 12px;
    padding: 7px 14px;
    transition: background 0.2s, color 0.2s;
}

.portfolio-filter:hover {
    background: #444;
    border-color: #aaa;
    color: #fff;
}

.portfolio-filter.active {
    background: #fff;
    color: #222;
    border-color: #fff;
}

.portfolio-filter:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

/* Portfolio grid */

.portfolio-section #grid-container {
    max-width: 800px;
    margin: 20px auto;
}

/* Cards - sized for 200px images */

.portfolio-section .grid-item {
    position: relative;
    flex: 0 1 240px;
    width: 240px;
    min-width: 0;
    max-width: 240px;
    padding: 16px 12px 16px 32px !important;
    overflow: visible;
    text-align: center;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.portfolio-section .grid-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

/* Project images */

.portfolio-section .popover-img img {
    display: block;
    width: 100% !important;
    max-width: 200px;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
}

/* Vertical category text - LEFT, reading upwards */

.portfolio-section .grid-item::after {
    content: attr(data-category);
    position: absolute;
    left: 8px;
    right: auto;
    top: 50%;
    transform: translateY(-50%) rotate(180deg);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    white-space: nowrap;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 2px;
    color: #999;
    pointer-events: none;
    transition: color 0.25s ease;
}

.portfolio-section .grid-item:hover::after {
    color: #333;
}

/* Popover triggers */

.portfolio-section .popover-img {
    cursor: pointer;
}

.portfolio-section .popover-img:focus-visible {
    outline: 2px solid #333;
    outline-offset: 3px;
}

/* Mobile */

@media (max-width: 576px) {

    .portfolio-heading h2 {
        font-size: 21px;
    }

    .portfolio-filter {
        padding: 6px 10px;
    }

    .portfolio-section .grid-item {
        flex: 1 1 100%;
        width: 100%;
        max-width: 280px;
    }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {

    .portfolio-section .grid-item,
    .portfolio-section .grid-item::after {
        transition: none;
    }

    .portfolio-section .grid-item:hover {
        transform: none;
    }
}


