/* MoonStar Studio homepage: hero with the photo trail, the black Recent work deck,
   tilted service cards, the studio polaroids and the gang board. */

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid; grid-template-rows: 1fr auto;
  overflow: hidden;
}
.hero__trail { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
/* Website shots from the portfolio and the design demos, as small framed screens. */
.trail-img {
  position: absolute; left: 0; top: 0;
  width: clamp(150px, 17vw, 290px);
  aspect-ratio: 16 / 10;
  object-fit: cover; object-position: top;
  border: 3px solid #fff;
  background: var(--well);
  opacity: 0;
  will-change: transform, opacity;
  box-shadow: 0 20px 40px -24px rgba(0, 0, 0, 0.5);
}

.hero__copy {
  position: relative; z-index: 2;
  align-self: center;
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(18px, 1.9vw, 30px);
  padding: 120px var(--gutter) 24px;
  text-align: center;
}
.hero__title { font-size: clamp(46px, 7.6vw, 140px); line-height: 0.95; }
.hero__title .word { clip-path: inset(-0.6em -0.3em -0.03em -0.3em); }
.hero__lede { max-width: 34ch; font-size: clamp(17px, 1.35vw, 22px); line-height: 1.35; }
.hero .more { --d: 1000ms; margin-top: 2px; }

/* Client logos, moving slowly under the headline (only shown once there are real ones) */
.marquee {
  --d: 1200ms;
  position: relative; z-index: 2;
  overflow: hidden;
  padding: 18px 0 28px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track { display: flex; width: max-content; animation: marquee 70s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group { display: flex; align-items: center; gap: 18px; padding-right: 18px; }
.client-logo { display: block; height: 40px; width: auto; max-width: 200px; object-fit: contain; filter: grayscale(1); }
/* Each client: its logo (Admin → Site content → Clients) or its name, with a small red star
   between them */
.client-name {
  display: inline-flex; align-items: center; gap: 18px;
  font: 800 clamp(18px, 1.6vw, 24px)/1 var(--sans); letter-spacing: -0.02em; text-transform: uppercase;
  color: var(--ink); opacity: 0.55; white-space: nowrap;
}
.client-name::after { content: '✦'; font-size: 0.6em; color: var(--red); opacity: 0.9; }
.client-name--logo { opacity: 0.75; }
@keyframes marquee { to { transform: translate3d(-50%, 0, 0); } }

/* ---------- Recent work: Lasso's deck, on white ---------- */

.deck-section {
  --n: 4;
  --per: 70svh;
  position: relative;
  height: calc(100svh + (var(--n) - 1) * var(--per));
}
.deck-section__sticky {
  position: sticky; top: 0;
  height: 100svh;
  display: flex; flex-direction: column; align-items: center;
  padding: 92px var(--gutter) 22px;
  overflow: hidden;
}
.deck-section__head { display: grid; gap: 12px; justify-items: center; position: relative; z-index: 1; }
/* Recent work sits on black, the page's one dark section, so the red and white frames pop */
.deck-section { background: var(--ink); color: #fff; }
.deck-section .kicker { color: rgba(255, 255, 255, 0.78); }
.deck-section .display { color: #fff; }
.deck-section .btn { --btn-hover: #fff; --btn-hover-fg: var(--ink); }
.deck-section .deck-card { box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.85); }
.deck { position: relative; flex: 1; width: 100%; margin-top: 16px; }
.deck-card {
  position: absolute; left: 50%; bottom: 52px;
  width: var(--cw, 560px);
  padding: clamp(9px, 0.85vw, 13px);
  background: var(--frame);
  box-shadow: 0 30px 60px -32px rgba(22, 21, 19, 0.5);
  transform-origin: 50% 0;
  will-change: transform;
}
.deck-card--white { box-shadow: 0 0 0 1px var(--line), 0 30px 60px -32px rgba(22, 21, 19, 0.5); }
.deck-card__media { position: relative; display: block; overflow: hidden; background: var(--well); }
.deck-card__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 0.9s var(--ease-out); }
.deck-card__media::after {
  content: ''; position: absolute; inset: 45% 0 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.32));
  pointer-events: none;
}
.deck-card__title {
  position: absolute; left: 5%; right: 5%; bottom: 7%; z-index: 1;
  text-align: center;
  font: 800 calc(var(--cw, 560px) * var(--fs, 0.11))/0.86 var(--sans);
  text-transform: uppercase; letter-spacing: -0.045em;
  text-wrap: balance;
  color: #fff;
  text-shadow: 0 6px 40px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.deck-card.is-front:hover .deck-card__media img { transform: scale(1.05); }
/* "Concept" on the design demos, as on the Work page. */
.deck-card__tag {
  position: absolute; left: 12px; top: 12px; z-index: 1;
  padding: 6px 8px 5px;
  background: var(--ink); color: #fff;
  font: 700 11px/1 var(--sans); text-transform: uppercase; letter-spacing: 0.04em;
  pointer-events: none;
}
.deck-card:not(.is-front) { pointer-events: none; }
.deck-section__btn { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 30; }
.deck-section__btn [data-work-count] { opacity: 0.7; }

.deck-dots {
  position: absolute; right: var(--gutter); top: 50%; z-index: 30;
  display: grid; gap: 10px; transform: translateY(-50%);
}
.deck-dots li { width: 8px; height: 8px; border: 1.5px solid var(--red); border-radius: 50%; transition: background-color 0.3s; }
.deck-dots li.is-on { background: var(--red); }

/* Reduced motion: no pinning, the cases simply stack as tilted frames. */
.deck-section.is-static { height: auto; }
.deck-section.is-static .deck-section__sticky { position: relative; height: auto; overflow: visible; padding: 16vh var(--gutter) 12vh; }
.deck-section.is-static .deck {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5vw 4vw;
  align-items: start;
  max-width: 1200px; margin: 7vh auto 6vh;
}
.deck-section.is-static .deck-card {
  --cw: 42vw;
  position: relative; left: auto; bottom: auto;
  width: auto;
  pointer-events: auto;
  transform: rotate(var(--tilt, -1deg));
}
.deck-section.is-static .deck-card:nth-child(even) { --tilt: 1.2deg; margin-top: 6vw; }
.deck-section.is-static .deck-section__btn { position: static; transform: none; }
.deck-section.is-static .deck-dots { display: none; }


/* ---------- Services (Lasso's tilted cards) ---------- */

.services {
  display: flex; flex-direction: column; align-items: center;
  gap: 14px;
  padding: 14vh var(--gutter) 14vh;
  overflow-x: clip;
}
.service-cards {
  --w: clamp(220px, 20vw, 310px);
  display: grid; grid-template-columns: repeat(4, var(--w));
  justify-content: center;
  margin: 7vh 0 8vh;
}
.service-card {
  position: relative;
  display: block;
  margin: 0 -0.4vw;
  padding: 10px 10px 0;
  background: var(--frame); color: var(--frame-fg);
  box-shadow: 0 34px 60px -34px rgba(0, 0, 0, 0.55);
  transform: translate3d(0, var(--y, 0px), 0) rotate(var(--rot, 0deg));
  transition: transform 0.7s var(--ease-out);
}
.service-card__media { position: relative; display: block; }
.service-card img { width: 100%; aspect-ratio: 0.8; object-fit: cover; background: var(--well); }
.service-card__title {
  position: relative;
  display: block;
  margin-top: -0.45em;
  padding: 0 4px;
  font: 800 calc(var(--w) * 0.135)/0.86 var(--sans);
  text-transform: uppercase; letter-spacing: -0.045em;
  text-align: center;
  text-wrap: balance;
}
.service-card__line {
  display: block;
  font-family: var(--serif);
  font-size: clamp(17px, 1.25vw, 20px); line-height: 1.06;
  text-align: center;
  text-wrap: balance;
  padding: 8px 18px 22px;
}
.service-card:nth-child(1) { --rot: -5deg; --y: 22px; }
.service-card:nth-child(2) { --rot: 2deg; --y: -10px; z-index: 2; }
.service-card:nth-child(3) { --rot: -2.5deg; --y: 12px; z-index: 1; }
.service-card:nth-child(4) { --rot: 5deg; --y: -4px; }
.service-card:hover,
.service-card:focus-visible { --rot: 0deg; --y: -18px; z-index: 5; }
.js [data-pending] .service-card { opacity: 0; }

/* ---------- Who we are (Lasso polaroids) ---------- */

.about {
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: center;
  gap: 5vw;
  padding: 10vh var(--gutter) 16vh;
  max-width: 1440px; margin: 0 auto;
}
.about__photos { position: relative; height: clamp(400px, 42vw, 680px); }

.polaroid {
  position: absolute;
  background: #fff;
  padding: clamp(8px, 0.8vw, 12px) clamp(8px, 0.8vw, 12px) clamp(30px, 3vw, 46px);
  box-shadow: 0 0 0 1px rgba(22, 21, 19, 0.05), 0 24px 50px -26px rgba(0, 0, 0, 0.45);
  transform: translate3d(0, var(--py, 0px), 0) rotate(var(--rot, 0deg));
}
.polaroid--a { --rot: -3.5deg; left: 4%; top: 3%; width: 56%; }
.polaroid--b { --rot: 4.5deg; left: 55%; top: 24%; width: 38%; }

/* Clearly-marked placeholder for a real team photo */
.slot {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px;
  aspect-ratio: 1.02;
  background: #f1eeeb;
  color: #8a847e;
  text-align: center;
}
.slot--tall { aspect-ratio: 0.78; }
.slot svg { width: 40px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.slot__title { font: 400 clamp(20px, 1.8vw, 28px)/1 var(--serif); color: #5a554f; }
.slot__note { font: 700 11px/1 var(--sans); text-transform: uppercase; letter-spacing: 0.08em; }

.sticker {
  position: absolute; width: 46%; left: -26%; top: -16%;
  pointer-events: none;
  transform: rotate(-12deg);
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.18));
}
.sticker svg { width: 100%; height: auto; overflow: visible; }
.sticker circle { fill: var(--red); stroke: #fff; stroke-width: 3; }
.sticker__star { fill: #fff; }
.sticker text { font-family: var(--bubble); font-size: 14px; letter-spacing: 0.02em; text-anchor: middle; fill: #fff; }

.about__text {
  display: flex; flex-direction: column; align-items: center;
  gap: 18px; text-align: center;
}
.about__text .lede { max-width: 40ch; margin: 6px 0 0; }

/* The three promises, as short lines with a hand-drawn wave */
.promises { display: grid; gap: 10px; text-align: left; margin: 2px 0 10px; }
.promises li { position: relative; padding-left: 36px; font-family: var(--serif); font-size: clamp(20px, 1.6vw, 25px); line-height: 1.1; }
.promises b { font-weight: 400; color: var(--red); font-style: italic; }
.promises li::before {
  content: ''; position: absolute; left: 0; top: 0.42em; width: 24px; height: 9px;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 8'%3E%3Cpath d='M1 4q2.5-4 5 0t5 0 5 0 5 0' fill='none' stroke='%23d9333f' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}


/* ---------- The gang: Lasso's crew board, MoonStar colours ---------- */

.home-faq { padding-top: clamp(40px, 8vh, 90px); }
.faq__body a { color: var(--red); font-weight: 600; }

.gang { position: relative; padding: 14vh var(--gutter) 10vh; overflow-x: clip; display: flex; flex-direction: column; }
.gang__head {
  position: relative; z-index: 3;
  width: min(560px, 44vw); margin-left: 7vw;
  display: grid; justify-items: center; gap: 14px; text-align: center;
}
.badge { position: absolute; left: -4%; top: -110px; width: 132px; transform: rotate(-12deg); }
.badge svg { width: 100%; height: auto; overflow: visible; }
.badge ellipse:first-child { fill: var(--red); }
.badge ellipse:nth-child(2) { fill: #fff; stroke: var(--red); stroke-width: 4; }
.badge text { font-family: var(--bubble); font-size: 48px; text-anchor: middle; fill: var(--red); }

.gang__board { position: relative; height: clamp(780px, 74vw, 1280px); margin: -12vw 0 0; }
.mate {
  position: absolute; left: var(--x); top: var(--y); width: var(--w);
  transform: translate3d(0, var(--py, 0px), 0);
}
.slot--mate { aspect-ratio: 0.8; border: 2px dashed rgba(22, 21, 19, 0.18); }
/* A real team photo, the same shape as the placeholders. */
.mate__photo {
  display: block; width: 100%; height: auto; aspect-ratio: 0.8; object-fit: cover;
  box-shadow: 0 30px 60px -30px rgba(22, 21, 19, 0.55);
}
.mate__name {
  /* --ny moves a sticker off a real photo's face (set on the mate's figure). */
  position: absolute; left: -10%; top: var(--ny, 18%);
  font-family: var(--bubble); font-size: clamp(34px, 4.3vw, 76px); line-height: 1;
  color: var(--c);
  -webkit-text-stroke: 0.06em var(--ink); paint-order: stroke fill;
  text-shadow: 0.03em 0.06em 0 var(--ink);
  transform: rotate(var(--tilt, -8deg));
  transition: transform 0.5s var(--ease-out);
}
.mate:hover .mate__name { transform: rotate(calc(var(--tilt, -8deg) * -0.6)) scale(1.08); }
.mate__role { margin-top: 10px; font: 700 12px/1.3 var(--sans); text-transform: uppercase; }

.gang-sticker { position: absolute; z-index: 2; pointer-events: none; }
.gang-sticker--talk { width: clamp(110px, 10vw, 170px); transform: rotate(-14deg); }
.gang-sticker--talk path { fill: var(--red); stroke: var(--ink); stroke-width: 3; }
.gang-sticker--talk text { font-family: var(--bubble); font-size: 17px; text-anchor: middle; fill: #fff; stroke: var(--ink); stroke-width: 3; paint-order: stroke fill; }
.gang-sticker--word {
  font-family: var(--bubble); font-size: clamp(30px, 3vw, 54px); line-height: 1;
  color: #fff;
  -webkit-text-stroke: 0.07em var(--ink); paint-order: stroke fill;
  text-shadow: 0.04em 0.07em 0 var(--red);
  transform: rotate(-9deg);
}
.gang-sticker--word b { color: var(--red); font-weight: 400; }
.gang-scribble { position: absolute; z-index: 2; width: clamp(110px, 11vw, 190px); pointer-events: none; }
.gang-scribble path { fill: none; stroke: var(--red); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 760px) {
  .gang__head { width: 100%; margin: 6vh 0 0; }
  .badge { left: 2%; top: -84px; width: 84px; }
  /* One mate per row, big, zig-zagging left and right (the owner's choice over two small ones). */
  .gang__board { height: auto; margin: 8vh 0 4vh; display: grid; grid-template-columns: 1fr; gap: 12vw; }
  .gang__board .mate { position: relative; left: auto; top: auto; width: 82%; }
  .gang__board .mate:nth-of-type(even) { justify-self: end; }
  .gang-sticker, .gang-scribble { display: none; }
  .mate__name { font-size: 48px; left: -4%; }
  .mate__role { font-size: 13px; }
}

@media (max-width: 1100px) {
  .service-cards { --w: clamp(220px, 34vw, 300px); grid-template-columns: repeat(2, var(--w)); row-gap: 34px; }
  .service-card:nth-child(3) { --y: 0px; }
  .service-card:nth-child(4) { --y: -22px; }
}

@media (max-width: 960px) {
  .about { grid-template-columns: 1fr; padding-top: 8vh; gap: 10vh; }
  .about__photos { order: 2; height: 92vw; max-height: 640px; }
}

@media (max-width: 760px) {
  .hero__copy { padding-top: 100px; }
  .hero__title { font-size: clamp(40px, 11.6vw, 80px); }
  .deck-section { --per: 62svh; }
  .deck-section__sticky { padding-top: 78px; }
  .deck-card { bottom: 66px; }
  .deck-card__media img { aspect-ratio: 4 / 5; }
  .deck-dots { right: 8px; }
  .deck-section.is-static .deck { grid-template-columns: 1fr; gap: 10vw; }
  .deck-section.is-static .deck-card { --cw: 88vw; }
  .deck-section.is-static .deck-card__media img { aspect-ratio: 16 / 10; }
  .deck-section.is-static .deck-card:nth-child(even) { margin-top: 0; }


  .services { padding-top: 10vh; }
  .service-cards { --w: min(290px, 74vw); grid-template-columns: var(--w); margin: 5vh 0; row-gap: 0; }
  .service-card { margin: -2vw 0; }
  .service-card:nth-child(1) { --rot: -4deg; --y: 0px; }
  .service-card:nth-child(2) { --rot: 3deg; --y: 0px; }
  .service-card:nth-child(3) { --rot: -2deg; --y: 0px; }
  .service-card:nth-child(4) { --rot: 3.5deg; --y: 0px; }
  .price { right: -10px; top: -12px; width: 74px; height: 74px; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
  .service-card { transition: none; }
}
