/* ============================================================
   TONES GARDEN — Main site page styles
   Page-level rhythm and helpers. Component styles live in JSX.
   ============================================================ */

html, body { margin: 0; padding: 0; }
body { background: var(--bg-1); overflow-x: hidden; }

* { box-sizing: border-box; }

a { color: inherit; text-decoration: none; }

/* ---- Accessibility: visible keyboard focus ----
   Coral ring reads on both light (paper/cream) and dark (forest) surfaces.
   :focus-visible only shows for keyboard/AT, never on mouse click. */
:focus-visible {
  outline: 3px solid var(--tg-coral);
  outline-offset: 2px;
  border-radius: 3px;
}
/* Remove the legacy UA outline only where we provide :focus-visible above */
:focus:not(:focus-visible) { outline: none; }
/* Newsletter input opts out of the ring; give it a clear focus border instead */
.tg-news-input:focus-visible {
  outline: none;
  border-color: var(--tg-coral);
  box-shadow: 0 0 0 3px rgba(248, 138, 122, 0.35);
}

/* ---- Accessibility: respect reduced-motion ----
   Kills the infinite marquee, hover transforms and transitions for users
   who asked their OS to reduce motion. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- container ---- */
.tg-container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---- marquee (full-bleed scrolling band) ---- */
.tg-marquee {
  width: 100%;
  overflow: hidden;
  border-top: 1px solid var(--line-1);
  border-bottom: 1px solid var(--line-1);
  background: var(--bg-1);
  padding: 16px 0;
}
.tg-marquee-track {
  display: flex;
  gap: 64px;
  width: max-content;
  animation: tg-marquee-scroll 38s linear infinite;
}
.tg-marquee--reverse .tg-marquee-track {
  animation-direction: reverse;
}
.tg-marquee-item {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 64px);
  font-variation-settings: "opsz" 64, "wdth" 80, "wght" 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: var(--tg-forest);
  display: inline-flex;
  align-items: center;
  gap: 64px;
  white-space: nowrap;
}
.tg-marquee-glyph {
  width: 36px; height: 36px; flex: none;
  color: var(--tg-teal);
}
@keyframes tg-marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---- product grid layouts ---- */
.tg-pgrid {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 80px var(--gutter) 64px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}
.tg-pgrid .full      { grid-column: span 12; }
.tg-pgrid .seven     { grid-column: span 7; }
.tg-pgrid .five      { grid-column: span 5; }
.tg-pgrid .four      { grid-column: span 4; }
.tg-pgrid .eight     { grid-column: span 8; }
.tg-pgrid .six       { grid-column: span 6; }

/* ---- First Buds section + cards (mobile-first) ---- */
#products { padding: var(--section-y) 0; }
/* Mobile (<768px): cards stacked vertically; inside each card: image top, text bottom */
.tg-firstbuds {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.tg-firstbuds-inner {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  align-items: stretch;
  gap: 0;
  height: 100%;
}
.tg-firstbuds-visual {
  /* Explicit, viewport-responsive height → identical across both cards so the
     text blocks below start at the same level. Shrinks when narrow. */
  position: relative;
  height: clamp(240px, 52vw, 380px);
  min-height: 0;
  order: 1;
  overflow: hidden;
}
.tg-firstbuds-visual img {
  /* Absolute-fill the visual (which has an explicit height) so the image
     scales down reliably instead of overflowing. object-fit keeps aspect. */
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 24px 24px 8px;
  box-sizing: border-box;
}
.tg-firstbuds-text {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  order: 2;
}

/* Flat cards — no drop shadow (kept consistent with the rest of the site) */
.tg-firstbud-card { box-shadow: none; }


/* Desktop (≥768px): 2 cards side-by-side, image-top + text-bottom inside each card */
@media (min-width: 768px) {
  .tg-firstbuds {
    grid-template-columns: 1fr 1fr;
    padding: 0 var(--gutter);
    gap: 28px;
  }
  .tg-firstbuds-inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    align-items: stretch;
    gap: 0;
  }
  .tg-firstbuds-visual {
    order: 1;
    /* Equal explicit height on both cards → aligned text blocks */
    height: clamp(300px, 30vw, 460px);
    min-height: 0;
  }
  .tg-firstbuds-visual img {
    padding: 40px 32px 8px;
  }
  .tg-firstbuds-text {
    order: 2;
    padding: 12px 40px 44px;
    align-items: flex-start;
  }
}

/* ---- best sellers row ---- */
.tg-best {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 24px var(--gutter) 80px;
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1fr;
  gap: 18px;
  align-items: stretch;
}

/* ---- testimonials ---- */
.tg-testi {
  background: var(--tg-pale-teal);
  padding: var(--section-y) 0;
}
.tg-testi-grid {
  max-width: var(--container-w);
  margin: 32px auto 0;
  padding: 0 var(--gutter);
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scroll-padding: 0 var(--gutter);
}
.tg-testi-grid > figure {
  flex: 1 1 0;
  min-width: 300px;       /* below this the row overflows → horizontal scroll
                             (higher = scroll kicks in earlier, cards stay wider/shorter) */
  scroll-snap-align: start;
}

/* ---- about / mission band ---- */
.tg-about {
  padding: var(--section-y) 0;
  background: var(--tg-cream);
}
.tg-about-inner {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 80px;
  align-items: start;
}

/* ---- collab artists band ---- */
.tg-collab {
  background: var(--tg-cream);
  padding: var(--section-y) 0;
  overflow: hidden;
}

/* Bento layout — 3 rows, each row: text card (1/3) + image card (2/3) */
.tg-collab-bento {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.tg-collab-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
  min-height: 360px;
}
/* Reversed rows: image left (2/3), text right (1/3) */
.tg-collab-row--reverse {
  grid-template-columns: 2fr 1fr;
}
.tg-collab-card {
  border-radius: 32px;
  padding: 40px;
  position: relative;
  overflow: hidden;
}
/* Text card: logo pinned top, title+desc pinned bottom */
.tg-collab-card--text {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.tg-collab-card--image {
  min-height: 360px;
}
/* Blob fills the image card as a soft background wash */
.tg-collab-blob {
  position: absolute;
  inset: -20%;
  width: 140%;
  height: 140%;
  border-radius: 50%;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.tg-collab-logo {
  width: auto;
  height: auto;
  max-width: 80px;
  max-height: 80px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .tg-collab-row {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .tg-collab-row--reverse { display: flex; flex-direction: column; }
  .tg-collab-row--reverse > :nth-child(1) { order: 2; }
  .tg-collab-row--reverse > :nth-child(2) { order: 1; }
  .tg-collab-card { border-radius: 22px; padding: 28px; }
  .tg-collab-card--image { min-height: 240px; }
  .tg-collab-logo { max-width: 60px; max-height: 60px; }
}

/* ---- newsletter ---- */
/* Footer zone — single forest surface shared by newsletter + footer,
   so the blurred blobs flow across both without a seam */
.tg-footer-zone {
  position: relative;
  overflow: hidden;
  background: var(--tg-forest);
  color: var(--tg-paper);
}
.tg-news {
  color: var(--tg-paper);
  padding: var(--section-y) 0;
  position: relative;
}

/* ---- common helpers ---- */
.tg-section-head {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
}
.tg-section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(38px, 4.6vw, 64px);
  font-variation-settings: "opsz" 64, "wdth" 85, "wght" 600;
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0;
  text-wrap: balance;
}
.tg-section-head .sub {
  font-size: 18px;
  line-height: 1.5;
  color: var(--fg-2);
  max-width: 52ch;
  margin: 0;
}

/* responsive collapse */
@media (max-width: 980px) {
  .tg-pgrid .seven, .tg-pgrid .five,
  .tg-pgrid .four, .tg-pgrid .eight,
  .tg-pgrid .six { grid-column: span 12; }
  .tg-best { grid-template-columns: 1fr 1fr; }
  .tg-about-inner { grid-template-columns: 1fr; gap: 32px; }
}

/* ============================================================
   Sound Flowers feature section (home page)
   ============================================================ */
.tg-sff {
  background: var(--tg-cream);
  padding: var(--section-y) var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tg-sff-intro {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tg-sff-intro .tg-sff-appicon { margin-top: 16px; }
.tg-sff-title  { margin-top: 20px; }
.tg-sff-desc   { margin-top: 16px; }
.tg-sff-phones   { margin-top: 32px; }
.tg-sff-features { margin-top: 32px; }
.tg-sff-ctas     { margin-top: 36px; }
.tg-sff-appicon {
  width: 100px;
  height: 100px;
  border-radius: 22px;
  overflow: hidden;
  background: transparent;
  object-fit: cover;
  display: block;
}
.tg-sff-title {
  font-family: var(--font-display);
  font-size: clamp(56px, 8vw, 120px);
  font-variation-settings: "opsz" 96, "wdth" 75, "wght" 700;
  text-transform: uppercase;
  line-height: 0.9;
  letter-spacing: -0.03em;
  margin-top: 20px;
  margin-bottom: 0;
  text-wrap: balance;
}
.tg-sff-desc {
  margin-top: 16px;
  margin-bottom: 0;
  max-width: 600px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--fg-2);
  text-wrap: pretty;
}

/* phones row — same 3-column grid as features so each phone aligns with its caption */
.tg-sff-phones {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 36px;
  width: 100%;
  max-width: var(--content-w);
  margin-left: auto;
  margin-right: auto;
}
.tg-sff-phone {
  display: flex;
  justify-content: center;
  align-items: flex-end;
}
.tg-sff-phone img {
  display: block;
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.12));
}
.tg-sff-phone.is-side img {
  max-height: 368px; /* ~20% smaller than previous 460 */
  transform: translateY(22px); /* slightly lower than center */
}
.tg-sff-phone.is-center img {
  max-height: 432px; /* ~20% smaller than previous 540 */
}

/* features grid */
.tg-sff-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  width: 100%;
  max-width: var(--content-w);
  margin-left: auto;
  margin-right: auto;
}
.tg-sff-feature {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}
.tg-sff-num {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  font-variation-settings: "wght" 600;
}
.tg-sff-feat-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-variation-settings: "opsz" 24, "wdth" 92, "wght" 600;
  color: var(--tg-forest);
  line-height: 1.15;
}
.tg-sff-feat-sub {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--fg-2);
}

/* CTAs */
.tg-sff-ctas {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Mobile */
@media (max-width: 768px) {
  /* Mobile: keep 3-col layout like desktop but compact */
  .tg-sff-mobile-stack { display: none; }
  .tg-sff-phones {
    gap: 8px;
    width: 100%;
    justify-content: center;
    align-items: flex-end;
  }
  .tg-sff-phone.is-side { display: flex; }
  .tg-sff-phone img {
    max-height: 220px;
    width: auto;
    max-width: 100%;
  }
  .tg-sff-phone.is-side img  { max-height: 180px; }
  .tg-sff-phone.is-center img { max-height: 220px; }
  .tg-sff-features {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-width: none;
    width: 100%;
  }
  .tg-sff-features .tg-sff-num        { font-size: 14px; }
  .tg-sff-features .tg-sff-feat-title { font-size: 14px; line-height: 1.2; }
  .tg-sff-features .tg-sff-feat-sub   { font-size: 12px; line-height: 1.35; }
  .tg-sff-feature { padding: 0 2px; }
  .tg-sff-ctas {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 360px;
  }
  .tg-sff-ctas > * {
    justify-content: center;
  }
}

/* ============================================================
   Supported By band (home page, before newsletter)
   ============================================================ */
.tg-supported {
  background: var(--tg-paper);
  border-top: 1px solid rgba(19, 64, 62, 0.1);
  border-bottom: 1px solid rgba(19, 64, 62, 0.1);
  padding: 40px var(--gutter);
}
.tg-supported-inner {
  max-width: var(--container-w);
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}
.tg-supported-logos {
  display: flex;
  align-items: flex-end; /* common baseline — logos sit on the same line */
  justify-content: center; /* logos centered as a cluster within the band */
  gap: 122px;
  flex-wrap: wrap;
}
.tg-supported-logo {
  font-variation-settings: "wght" 600;
  font-size: 15px;
  color: var(--tg-forest);
  opacity: 0.75;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
/* Partner logos — normalized by height, with per-logo optical tuning so a wide
   wordmark and square badges read with similar visual weight. */
.tg-supported-logo-img {
  height: 32px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
  opacity: 0.7;
}
.tg-supported-logo-img.is-frenchtech   { height: 54px; }
.tg-supported-logo-img.is-clubbingtv   { height: 52px; }
.tg-supported-logo-img.is-audiofanzine { height: 40px; }
.tg-supported-logo-img.is-hktdc        { height: 48px; }

@media (max-width: 768px) {
  .tg-supported-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 24px;
  }
  .tg-supported-logos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    justify-items: center;
    justify-content: center;
    width: 100%;
    max-width: 360px;
  }
}

/* ============================================================
   Growth Chamber product logos (responsive sizing)
   ============================================================ */
.tg-growth-logo {
  max-width: 140px;
  border-radius: 16px;
}
@media (max-width: 767px) {
  .tg-growth-logo {
    max-width: 80px;
    border-radius: 12px;
  }
}

/* Testimonials: tighter gap on mobile */
@media (max-width: 767px) {
  .tg-testi-grid { gap: 12px; }
}

/* Growth Chamber product name (responsive) */
.tg-growth-name { font-size: 30px; }
@media (max-width: 767px) {
  .tg-growth-name { font-size: 18px; }
}

/* Studio page — compact Growth Chamber preview grid.
   3 across on desktop, stacked on mobile — no intermediate 2+1 reflow. */
.tg-studio-growth-grid {
  margin-top: var(--s-6);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
}
@media (max-width: 767px) {
  .tg-studio-growth-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Sound Flowers detail page (/#/sound-flowers)
   ============================================================ */
.tg-sf-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.tg-sf-grid-2x2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.tg-sf-sub {
  display: flex;
  flex-direction: column;
}
@media (max-width: 860px) {
  .tg-sf-two-col { grid-template-columns: 1fr; gap: 32px; }
  .tg-sf-grid-2x2 { grid-template-columns: 1fr; }
}

/* Sound Flowers — Beyond the Grid (card split + portrait video frames) */
.tg-sf-btg-main {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
  align-items: stretch;
}
.tg-sf-btg-main-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--tg-paper);
  border-radius: 20px;
  padding: 40px;
}
.tg-sf-btg-main-media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  background: var(--tg-paper);
  border-radius: 20px;
  padding: 32px;
}

.tg-sf-btg-row3 {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1.5fr;
  gap: 16px;
  margin-top: 16px;
  align-items: stretch;
}
.tg-sf-btg-card {
  border-radius: 20px;
  padding: 24px;
}
.tg-sf-btg-card-video {
  background: #B1D0CE;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tg-sf-btg-card-text {
  background: var(--tg-paper);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.tg-sf-btg-row3 > .tg-sf-btg-card-text:last-child {
  background: var(--tg-sage);
}

/* Temporary states while videos are being replaced */
.tg-sf-btg-main--text-only { grid-template-columns: 1fr; }
.tg-sf-btg-row3--no-video  { grid-template-columns: 1fr 1fr; }

/* Main card pre-cropped video (natural aspect, rounded corners) */
.tg-sf-btg-main-video {
  width: 100%;
  max-width: 260px;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 14px;
}
/* === Bento rows below the main BTG card === */
.tg-sf-btg-bento {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}
.tg-sf-btg-brow {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 16px;
  min-height: 320px;
}
.tg-sf-btg-bcard {
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}
.tg-sf-btg-bcard--text {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.tg-sf-btg-bcard--image {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
/* iPhone-style image: pushed out of frame for a dynamic bento crop */
.tg-sf-btg-bimg {
  width: 145%;
  height: 145%;
  object-fit: cover;
  object-position: center;
  display: block;
}
/* Strum-style image: fills the whole card, no visible border */
.tg-sf-btg-bimg--zoom {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 767px) {
  .tg-sf-btg-brow { grid-template-columns: 1fr; min-height: 0; }
  .tg-sf-btg-bcard--image { min-height: 220px; }
}

/* Strum card image (replaces strum video) */
.tg-sf-strum-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  margin-top: 16px;
}

/* Portrait video frames — aspect ratio drives card height */
.tg-sf-btg-video-frame {
  width: 100%;
  aspect-ratio: 9 / 16;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 14px;
  background: #0E1820;
}
.tg-sf-btg-video-frame--main { max-width: 260px; }
.tg-sf-btg-video-frame--sub  { max-width: 220px; }
.tg-sf-btg-video-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

@media (max-width: 767px) {
  .tg-sf-btg-main { grid-template-columns: 1fr; }
  .tg-sf-btg-row3 { grid-template-columns: 1fr; }
  .tg-sf-btg-video-frame--main { max-width: 240px; }
}

/* Sound Flowers Hero — left text + right image */
.tg-sf-hero {
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.tg-sf-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1.5fr; /* image ~20% plus grande que le texte */
  gap: 40px;
  align-items: center;
}
.tg-sf-hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}
.tg-sf-hero-image {
  display: flex;
  align-items: center;
  justify-content: center;
}
.tg-sf-hero-image img {
  max-width: 620px;
  width: 100%;
  height: auto;
  display: block;
}
@media (max-width: 767px) {
  /* Empilement mobile : téléphone en haut, bloc texte dessous. */
  .tg-sf-hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .tg-sf-hero-image { order: -1; justify-self: center; }
  /* Le téléphone occupe quasiment toute la largeur pour gagner en hauteur. */
  .tg-sf-hero-image img { max-width: min(440px, 92vw); }
  /* Bloc texte : centré et à la même largeur que l'image (donc aligné dessus),
     mais texte ferré à gauche à l'intérieur. */
  .tg-sf-hero-text {
    justify-self: center;
    max-width: min(440px, 92vw);
    align-items: flex-start;
    text-align: left;
  }
  /* Logo à gauche du titre. */
  .tg-sf-hero-head { display: flex; align-items: center; justify-content: flex-start; gap: 14px; }
  .tg-sf-hero-icon { width: 56px !important; height: 56px !important; margin-bottom: 0 !important; }
}

/* Sound Flowers — Self-Sustained Ecosystem (bento rows) */
.tg-sf-eco-brow {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
  min-height: 320px;
  align-items: stretch;
}
.tg-sf-eco-bcard {
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}
.tg-sf-eco-bcard--text {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.tg-sf-eco-bcard--image {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  min-height: 320px;
  max-height: 480px;
}
.tg-sf-eco-bmedia {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 14px;
}
@media (max-width: 767px) {
  .tg-sf-eco-brow { grid-template-columns: 1fr !important; min-height: 0; }
  .tg-sf-eco-bcard--image { min-height: 240px; }
}

/* Sound Flowers — Self-Sustained Ecosystem */
.tg-sf-eco-main {
  display: grid;
  grid-template-columns: 45% 55%;
  gap: 24px;
  background: var(--tg-sage);
  border-radius: 20px;
  padding: 32px;
  align-items: center;
}
.tg-sf-eco-main-media { display: flex; align-items: center; justify-content: center; min-width: 0; }
.tg-sf-eco-main-text { display: flex; flex-direction: column; justify-content: center; }

.tg-sf-eco-video-frame {
  width: 100%;
  max-width: 260px;
  aspect-ratio: 9 / 16;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 14px;
  background: #0E1820;
}
.tg-sf-eco-video-frame--feat { max-width: 240px; margin-top: 16px; }
.tg-sf-eco-video-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.tg-sf-eco-features {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.tg-sf-eco-card {
  border-radius: 20px;
  padding: 28px;
  display: flex;
  flex-direction: column;
}
.tg-sf-eco-card--paper { background: var(--tg-paper); }
.tg-sf-eco-card--cream { background: var(--tg-cream); }
.tg-sf-eco-card--sage  { background: var(--tg-sage); }
/* Keep card height when video is removed */
.tg-sf-eco-card--minh { min-height: 360px; }

/* Bento Cycles layout */
.tg-sf-bento-cycles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.tg-sf-bento-card.tg-sf-bento-card--wide {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
  padding: 20px 28px;
}
.tg-sf-bento-card {
  border-radius: 20px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  overflow: hidden;
}
.tg-sf-bento-cycles-video {
  flex: 2 1 0;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}
.tg-sf-bento-cycles-label { flex: 1 1 0; }
.tg-sf-cycles-crop {
  width: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  line-height: 0;
}
.tg-sf-cycles-crop video {
  width: 100%;
  height: auto;
  display: block;
}
.tg-sf-bento-cycles-label { flex: 1; }
.tg-sf-bento-video-portrait {
  width: 100%; height: 220px;
  border-radius: 14px; overflow: hidden;
}
/* Bento card pre-cropped video (no container) */
.tg-sf-bento-video {
  width: 100%;
  max-width: 260px;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 14px;
}
/* Project Settings video is taller — narrow it down so its full height
   stays close to the Edit Cycles card height (no crop, full content visible) */
.tg-sf-bento-video--tall {
  max-width: 180px;
}
.tg-sf-portrait-crop {
  width: 100%; height: 100%;
  position: relative; overflow: hidden;
}
.tg-sf-portrait-crop video {
  position: absolute;
  width: 100%; height: 140%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  object-fit: cover;
}
.tg-sf-eco-features--bottom { margin-top: 16px; }

@media (max-width: 680px) {
  .tg-sf-bento-cycles { grid-template-columns: 1fr; }
  .tg-sf-bento-card--wide { flex-direction: column; align-items: flex-start; }
  .tg-sf-bento-cycles-video { width: 100%; flex: 1; }
}

@media (max-width: 767px) {
  .tg-sf-eco-main { grid-template-columns: 1fr; }
  .tg-sf-eco-features { grid-template-columns: 1fr; }
}

/* Sound Flowers — Split sections (Curated Seeds, Precision) */
.tg-sf-split {
  display: flex;
  gap: 16px;
  align-items: stretch;
  width: 100%;
}
.tg-sf-split-card {
  flex: 2;
  border-radius: 32px;
  padding: 40px;
}
.tg-sf-split-card--text {
  flex: 1;
  background: var(--tg-paper);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.tg-sf-split-card--media {
  background: var(--tg-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 490px;
}
.tg-sf-split-placeholder {
  width: 100%;
  max-width: 240px;
  aspect-ratio: 9 / 16;
  margin: 0 auto;
  border-radius: 14px;
  background: rgba(19, 64, 62, 0.15);
}
/* Video inside a split media card */
.tg-sf-split-video {
  width: 100%;
  max-width: 280px;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 14px;
}
/* Smaller modifier for taller/more portrait videos */
.tg-sf-split-video--small {
  max-width: 230px;
}

@media (max-width: 767px) {
  .tg-sf-split { flex-direction: column; }
  .tg-sf-split-card,
  .tg-sf-split-card--text { flex: none; border-radius: 22px; padding: 28px; }
}

/* ---- Sound Flowers feature bento — same grid as the Growth Chamber ---- */
.tg-sf-bento {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.tg-sf-bento-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
  min-height: 360px;
}
.tg-sf-bento-row--reverse {
  grid-template-columns: 2fr 1fr;
}
.tg-sf-bento-card {
  border-radius: 32px;
  padding: 40px;
  position: relative;
  overflow: hidden;
}
/* Text card: heading + body pinned to the bottom of the card */
.tg-sf-bento-card--text {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.tg-sf-bento-card--fill {
  min-height: 360px;
}

@media (max-width: 767px) {
  .tg-sf-bento-row,
  .tg-sf-bento-row--reverse {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .tg-sf-bento-row--reverse > :nth-child(1) { order: 2; }
  .tg-sf-bento-row--reverse > :nth-child(2) { order: 1; }
  .tg-sf-bento-card { border-radius: 22px; padding: 28px; }
  .tg-sf-bento-card--fill { min-height: 200px; }
}

/* ---- footer: logo left + vertical divider + columns right ---- */
.tg-footer-main {
  display: flex;
  align-items: center;
  gap: 72px;
}
.tg-footer-brand { flex: none; padding-left: 24px; }
.tg-footer-cols {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  border-left: 1px solid rgba(251, 248, 242, 0.15);
  padding-left: 72px;
}
.tg-footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
@media (max-width: 767px) {
  .tg-footer-main { flex-direction: column; align-items: center; gap: 32px; }
  .tg-footer-brand { padding-left: 0; }
  .tg-footer-cols {
    grid-template-columns: 1fr;
    gap: 28px;
    text-align: center;
    border-left: none;
    padding-left: 0;
  }
  .tg-footer-col { align-items: center; }
}

/* ---- newsletter inputs ---- */
.tg-news-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}
.tg-news-input {
  padding: 14px 18px;
  border-radius: 999px;
  background: rgba(251, 248, 242, 0.08);
  border: 1px solid rgba(251, 248, 242, 0.18);
  color: var(--tg-paper);
  font-size: 14px;
  font-family: var(--font-sans);
  outline: none;
  width: 100%;
  min-width: 0;
}
.tg-news-input::placeholder { color: rgba(251, 248, 242, 0.5); }
@media (max-width: 560px) {
  .tg-news-inputs { grid-template-columns: 1fr; }
}

/* ---- Sound Flowers feature: mobile interleaved stack (hidden on desktop) ---- */
@media (min-width: 769px) {
  .tg-sff-mobile-stack { display: none !important; }
}

/* ---- Sound Flowers ecosystem: compact bento (mini cards for micro-features) ---- */
.tg-sf-eco-mini-row {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}
.tg-sf-eco-mini-card {
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.tg-sf-eco-mini-media {
  width: 100%;
  aspect-ratio: 16 / 10;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.06);
}
.tg-sf-eco-mini-media video,
.tg-sf-eco-mini-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tg-sf-eco-mini-body {
  flex: 0 0 auto;
  padding: 24px 28px 28px;
  display: flex;
  flex-direction: column;
}
@media (max-width: 767px) {
  .tg-sf-eco-mini-row { grid-template-columns: 1fr !important; }
  .tg-sf-eco-mini-body { padding: 20px 22px 22px; }
}
