/* RESONATE BUILD: magic-makers.css | v2026-01-04R | hash:787859 | updated: 2026-01-04 */
/* === Magic Makers === */

/* Global safeguards */
html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* prevent any sideways scroll */
}


/* Match "Your Vision" hero title sizing, but centred for this page */
.vision-hero-text--center {
  text-align: center;
}

.vision-hero-text--center h1{
  font-size: clamp(2.45rem, 3.45vw, 3.12rem);
  letter-spacing: 0.02em;
  text-transform: none;
  margin: 0 0 1.1rem;
  position: relative;
  display: inline-block;
  padding-bottom: 14px;
}

.vision-hero-text--center h1::after{
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 76px;
  height: 2px;
  background: rgba(203, 179, 131, 0.9);
  border-radius: 2px;
}

/* Intro */
#magic-makers {
  padding: 2.5em 0 1em;
  text-align: center;
}


#magic-makers p {
  max-width: 750px;
  margin: 0 auto 2em;
  color: #555;
  line-height: 1.7;
}

/* Ensure Instagram heading inherits the same visual weight as other section titles */
#magic-instagram .magic-instagram-header h2 {
  margin: 0 0 0.55em;
  font-size: 2em;
  font-weight: 600;
  color: #222;
  position: relative;
  display: inline-block;
  padding-bottom: 14px;

}

#magic-instagram .magic-instagram-header h2::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 76px;
  height: 2px;
  background: rgba(203, 179, 131, 0.9);
  border-radius: 2px;
}


/* Masonry wrapper */
#magic-gallery {
  background-color: #fff;
  padding: 0 0 3em;
}

.magic-gallery-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 0.75em;
  box-sizing: border-box;
    transform: none !important; /* no horizontal drift */
}

/* (Unused now if you’ve removed the h3, but harmless to keep) */
.magic-gallery-inner h3 {
  font-size: 1.6em;
  text-align: center;
  margin: 0 0 0.75em;
}

/* --- TRUE COLLAGE FIX --- */
.magic-gallery-grid,
#magic-gallery-grid {
  display: block;
  column-count: 3;
  column-gap: 3px;
  font-size: 0;         /* eliminate inline spacing */
  line-height: 0;       /* eliminate vertical gaps */
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
}

.magic-gallery-item {
  display: inline-block;  /* inline fixes Safari gaps */
  width: 100%;
  margin-bottom: 3px;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  overflow: hidden;
}

.magic-gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 0;
  transition: transform 0.3s ease;
}

/* aspect rhythm */
.magic-gallery-item:nth-child(3n+1) img { aspect-ratio: 4/5; }
.magic-gallery-item:nth-child(3n+2) img { aspect-ratio: 3/2; }
.magic-gallery-item:nth-child(3n)   img { aspect-ratio: 16/9; }
.magic-gallery-item:nth-child(5n)   img {
  aspect-ratio: 5/4;
  transform: scale(1.02);
}
.magic-gallery-item img:hover { transform: scale(1.03); }

@media (max-width: 640px){
  .vision-hero-text--center h1{
    font-size: clamp(2.2rem, 8vw, 2.6rem);
  }
}

@media (max-width:1024px){
  .magic-gallery-grid,
  #magic-gallery-grid {
    column-count: 2;
  }
}
@media (max-width:600px){
  .magic-gallery-grid,
  #magic-gallery-grid {
    column-count: 1;
  }
}

/* CTA */
.magic-cta {
  background: #f3ede5;
  text-align: center;
  padding: 3em 1em;
}
.magic-cta h3 {
  font-size: 1.8em;
  margin-bottom: .5em;
}
.magic-cta p {
  color: #555;
  max-width: 700px;
  margin: 0 auto 1.5em;
}
.magic-cta-button {
  background: #000;
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 1em 3em;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .08em;
  transition: background .3s;
}
.magic-cta-button:hover {
  background: #333;
}

/* === Instagram Carousel === */
#magic-instagram {
  background: #fff;
  text-align: center;
  padding: 3em 0 4em; /* no horizontal padding to avoid offsets */
}

/* Make the whole thing feel more edge-to-edge */
.magic-instagram-inner {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 0.5em; /* tiny breathing room at edges */
  box-sizing: border-box;
}

/* Keep text nicely contained while strip stretches wider */
.magic-instagram-header {
  max-width: 800px;
  margin: 0 auto 1.5em;
  padding: 0 0.5em;
  box-sizing: border-box;
}

.magic-instagram-inner h3 {
  font-size: 1.6em;
  margin-bottom: .5em;
}

.magic-instagram-subtitle {
  color: #777;
  margin: 0;
}

/* Viewport */
.magic-instagram-wrapper {
  position: relative;
  overflow: hidden;   /* hides edges of the moving strip */
  margin-top: 1.5em;
}

/* Moving strip – CSS marquee using transform (GPU friendly) */
.magic-instagram-strip {
  display: flex;
  gap: 12px;
  will-change: transform;
  animation: insta-marquee 40s linear infinite;
}

/* base keyframes: move one full set to the left
   We duplicate the image set in JS, so -50% = one full loop. */
@keyframes insta-marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.magic-instagram-strip a {
  flex: 0 0 250px;
  display: block;
  aspect-ratio: 3 / 4; /* 1080×1440 */
  overflow: hidden;
  border-radius: 4px;
}

.magic-instagram-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width:768px){
  .magic-instagram-strip a {
    flex: 0 0 200px;
  }
}

/* === Magic Makers gallery loader + fade === */

/* Allow loader overlay inside each tile */
.magic-gallery-item {
  position: relative;
}

/* Loader overlay using Resonate ident */
.magic-gallery-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7f7f7;
  transition: opacity 0.3s ease;
}

.magic-gallery-loader--hidden {
  opacity: 0;
  pointer-events: none;
}

/* Small spinning ident loader (overrides generic img rules) */
.magic-gallery-item .magic-gallery-loader img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: invert(1);
  opacity: 0.9;
  animation: ident-hover-spin 1.2s linear infinite;
}

/* Fade-in for actual gallery images */
.magic-gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 0;
  opacity: 0; /* start hidden */
  transition: opacity 1.3s ease, transform 0.35s ease;
}

/* Use a more specific selector so this overrides the base rule above */
.magic-gallery-item img.magic-gallery-img--visible {
  opacity: 1;
}



/* === Refine my ideas button (match Let's Begin CTA behaviour) === */
#refine-ideas-button{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  border: none;
  cursor: pointer;
  text-decoration: none;
  background: #000;
  color: #fff;
  padding: 14px 30px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  box-shadow: 0 10px 28px rgba(0,0,0,0.16);
  width: auto;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
}


#refine-ideas-button .hero-button-label{
  text-decoration: none !important; /* no underline ever */
}

#refine-ideas-button .hero-button-ident{
  width: 0;
  opacity: 0;
  margin-left: 0;
  overflow: hidden;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: width 280ms ease, opacity 200ms ease, margin-left 280ms ease;
}

@media (hover: hover) and (pointer: fine){
  #refine-ideas-button:hover .hero-button-ident .ident-spin{
    animation: nav-logo-spin 0.9s linear;
  }
}

/* Fallback keyframes in case style.css doesn't define nav-logo-spin */
@keyframes nav-logo-spin{
  from{ transform: rotate(0deg); }
  to{ transform: rotate(360deg); }
}

/* Ensure the CTA button stays pill-shaped even if other styles exist */
#refine-ideas-button{ border-radius: 999px !important; }

/* Deterrents (not true protection): reduce casual saving/dragging on media */
#magic-gallery img, 
#magic-gallery video,
#magic-instagram img {
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}


@media (hover: hover) and (pointer: fine){
  #refine-ideas-button:hover .hero-button-ident{
    width: 26px;
    opacity: 1;
    margin-left: 14px;
  }
  #refine-ideas-button:hover .hero-button-ident .ident-spin{
    animation: nav-logo-spin 0.9s linear;
  }
}
#refine-ideas-button:focus-visible .hero-button-ident,
#refine-ideas-button:active .hero-button-ident{
  width: 26px;
  opacity: 1;
  margin-left: 14px;
}

#refine-ideas-button .hero-button-ident .ident-spin{ width:24px; height:24px; }

/* --- Desktop gallery preload (prevents masonry reshuffle) --- */
.magic-gallery-preload {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 55vh;
  color: #555;
  font-size: 1rem;
  letter-spacing: 0.01em;
}
.magic-gallery-preload-spinner{
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(0,0,0,0.18);
  border-top-color: rgba(203, 179, 131, 0.9);
  margin-right: 10px;
  animation: magic-preload-spin 0.9s linear infinite;
}
@keyframes magic-preload-spin { to { transform: rotate(360deg); } }

#magic-gallery-grid.magic-gallery-grid--hidden {
  opacity: 0;
  pointer-events: none;
}
#magic-gallery-grid.magic-gallery-grid--ready {
  opacity: 1;
  transition: opacity 420ms ease;
}

/* ==========================
   JS Instagram marquee (track) — mobile Safari stable
   ========================== */
.magic-instagram-wrapper{ --insta-speed: 42; } /* px/sec desktop */
@media (max-width:768px){
  .magic-instagram-wrapper{ --insta-speed: 42; } /* px/sec mobile */
}

/* When JS takes over, stop the base CSS animation on the strip */
.magic-instagram-strip.mm-insta-js-track{
  animation: none !important;
  display: block !important;
  gap: 0 !important;
  transform: none !important;
}

.magic-instagram-strip.mm-insta-js-track .mm-insta-track{
  display: flex;
  flex-wrap: nowrap;
  width: max-content;
  will-change: transform;
  transform: translate3d(0,0,0);
}

.magic-instagram-strip.mm-insta-js-track .mm-insta-group{
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  padding-right: 12px; /* seam spacing included in scrollWidth */
  flex: 0 0 auto;
  width: max-content;
}

.magic-instagram-strip.mm-insta-js-track .magic-instagram-thumb{
  flex: 0 0 250px;
  aspect-ratio: 3 / 4;
  display: block;
  overflow: hidden;
  border-radius: 4px;
  margin: 0;
}

@media (max-width:768px){
  .magic-instagram-strip.mm-insta-js-track .magic-instagram-thumb{
    flex-basis: 200px;
  }
}

.magic-instagram-strip.mm-insta-js-track .magic-instagram-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.magic-instagram-strip.mm-insta-js-track .mm-insta-spacer{
  flex: 0 0 12px;
  width: 12px;
  height: 1px;
}
