/*
 * The home hero: a wordmark and one question at the centre, the agents and the
 * things they work on floating around it, then a row of agent chips and four
 * columns of tiles. Composition and mood after the Shop app's home; every
 * object, colour and word here is Cadrane's own (original SVG objects drawn in
 * the characters' style, the six demonstration campaigns, the nine agents).
 * Sizes are in container units (cqw) so the whole cluster scales as one piece.
 */
.hero-shop {
  --tone-lilac: #e7e1ff;
  --tone-mint: #d7f5e4;
  --tone-pink: #ffe0eb;
  --tone-blue: #dce6ff;
  --tone-lemon: #f6ffb1;
  --shop-ink: #f3f6f1;
  --shop-dark-ink: #191b18;
  --shop-muted: #a8b2ab;
  --shop-card-shadow:
    0 22px 44px rgba(25, 27, 24, 0.11), 0 3px 8px rgba(25, 27, 24, 0.07);
  min-height: 0;
  padding: clamp(70px, 6vw, 92px) 0 28px;
  overflow: clip;
}
.hero-shop .tone-lilac {
  --tone: var(--tone-lilac);
}
.hero-shop .tone-mint {
  --tone: var(--tone-mint);
}
.hero-shop .tone-pink {
  --tone: var(--tone-pink);
}
.hero-shop .tone-blue {
  --tone: var(--tone-blue);
}
.hero-shop .tone-lemon {
  --tone: var(--tone-lemon);
}
.hero-shop .atmosphere-glow {
  opacity: 0.55;
}

/* ---------- The stage ---------- */
.shop-stage {
  position: relative;
  max-width: 1320px;
  margin: 0 auto;
  container-type: inline-size;
}
.shop-cluster {
  position: relative;
  height: 42cqw;
  pointer-events: none;
}
.shop-item {
  position: absolute;
  left: calc(var(--x) * 1cqw);
  top: calc(var(--y) * 1cqw);
  width: calc(var(--w) * 1cqw);
  transform: rotate(var(--r, 0deg));
  transform-origin: 50% 60%;
  will-change: transform;
}
.shop-item img {
  display: block;
  width: 100%;
  height: auto;
}
.shop-cut img {
  filter: drop-shadow(0 16px 18px rgba(25, 27, 24, 0.12));
}
.shop-tile {
  aspect-ratio: 1;
  border-radius: 1.9cqw;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shop-card-shadow);
}
.shop-tile img {
  height: 100%;
  object-fit: cover;
}
/* White product cards: art on a tinted ground, a name, one fact. */
.shop-card {
  padding: 0.7cqw;
  border-radius: 2.1cqw;
  background: #fff;
  box-shadow: var(--shop-card-shadow);
  display: grid;
  gap: 0.35cqw;
  font-size: max(11px, 1.02cqw);
}
.shop-card-art {
  display: grid;
  place-items: center;
  aspect-ratio: 1.12;
  border-radius: 1.5cqw;
  background:
    radial-gradient(circle at 50% 38%, #fff 0 12%, transparent 58%),
    var(--tone, var(--tone-lilac));
}
.shop-card .companion {
  width: 80%;
  height: auto;
  aspect-ratio: 1;
  margin: 0;
}
.shop-card b {
  padding: 0.35em 0.5em 0;
  font-family: inherit;
  font-weight: 650;
  font-size: 1.12em;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--shop-dark-ink);
}
.shop-card small {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0 0.5em 0.4em;
  font-size: 0.9em;
  color: #555d58;
}
.shop-card small i {
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  background: #1f9d63;
  flex: none;
}

/* ---------- The centre ---------- */
.shop-center {
  position: relative;
  z-index: 3;
  display: grid;
  justify-items: center;
  gap: 0;
  margin-top: -13.2cqw;
  padding: 0 20px;
  text-align: center;
}
.hero-shop .shop-center .shop-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.18em;
  margin: 0;
  font-family: inherit;
  font-weight: 700;
  font-size: clamp(46px, 6.6cqw, 88px);
  line-height: 1;
  letter-spacing: -0.045em;
  color: #fff;
}
.hero-shop .shop-wordmark .cadrane-symbol {
  color: #b6f23a;
  display: inline-grid;
  width: 0.86em;
  height: 0.86em;
}
.shop-wordmark svg {
  width: 100%;
  height: 100%;
}
.hero-shop .shop-center h1 {
  margin: 0.7em 0 0;
  font-family: inherit;
  font-weight: 500;
  font-size: clamp(17px, 1.75cqw, 24px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--shop-ink);
}
.hero-shop .shop-center h1 .title-line {
  display: inline;
  font: inherit;
}
.hero-shop .shop-center h1 .title-line + .title-line::before {
  content: " ";
}
.hero-shop .shop-center h1 span,
.hero-shop .shop-center h1 em {
  font: inherit;
  letter-spacing: inherit;
}
.hero-shop .shop-center h1 em {
  font-style: normal;
  color: var(--shop-muted);
}
.shop-ask {
  position: relative;
  display: flex;
  align-items: center;
  width: min(640px, 100%);
  margin-top: clamp(18px, 2.4cqw, 30px);
  padding: 8px 8px 8px 30px;
  border-radius: 999px;
  background: #fff;
  box-shadow:
    0 14px 34px rgba(25, 27, 24, 0.09),
    0 0 0 1px rgba(25, 27, 24, 0.07);
}
.shop-ask:focus-within {
  box-shadow:
    0 14px 34px rgba(25, 27, 24, 0.12),
    0 0 0 2px var(--blue, #3536dc);
}
.shop-ask input {
  flex: 1;
  box-shadow: none;
  min-width: 0;
  height: 48px;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: inherit;
  font-weight: 400;
  font-size: clamp(15px, 1.35cqw, 18px);
  line-height: 1.2;
  color: var(--shop-dark-ink);
}
.shop-ask input::placeholder {
  color: #6a6b66;
}
.shop-ask button {
  flex: none;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: var(--blue, #3536dc);
  color: #fff;
  cursor: pointer;
  transition: transform 0.18s ease;
}
.shop-ask button:hover {
  transform: scale(1.06);
}
.shop-ask button:focus-visible {
  outline: 3px solid #191b18;
  outline-offset: 3px;
}
.shop-ask button svg {
  width: 24px;
  height: 24px;
}
.shop-ask .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.hero-shop .shop-center .hero-note {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--shop-muted);
}

/* ---------- The team: nine agents, each on its own card ---------- */
.team-strip {
  max-width: 1320px;
  margin: clamp(34px, 4.4cqw, 60px) auto 0;
  padding: 0 24px;
}
.team-title {
  margin: 0 0 20px;
  text-align: center;
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.3;
  color: var(--shop-muted);
}
.team-title b {
  font-weight: 650;
  color: var(--shop-ink);
}
.team-list {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.team-list li {
  display: flex;
  min-width: 0;
}
.team-list li:nth-child(even) {
  transform: translateY(12px);
}
.team-card {
  flex: 1;
  min-width: 0;
  align-content: start;
  display: grid;
  gap: 2px;
  padding: 7px 7px 12px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shop-card-shadow);
  color: var(--shop-dark-ink);
  text-decoration: none;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}
.team-card:hover {
  transform: translateY(-6px) rotate(-1deg);
  box-shadow:
    0 28px 48px rgba(0, 0, 0, 0.28),
    0 3px 8px rgba(0, 0, 0, 0.12);
}
.team-card:focus-visible {
  outline: 3px solid var(--blue, #3536dc);
  outline-offset: 3px;
}
.team-art {
  position: relative;
  display: block;
  aspect-ratio: 1;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 50% 108%,
      rgba(255, 255, 255, 0.95) 0 30%,
      transparent 62%
    ),
    var(--tone-deep, var(--tone));
}
.team-art .companion {
  position: absolute;
  inset: 6% 4% 0;
  width: auto;
  height: auto;
  margin: 0;
  filter: drop-shadow(0 8px 8px rgba(25, 27, 24, 0.2));
}
.team-card b {
  padding: 9px 7px 0;
  font-family: inherit;
  font-weight: 700;
  font-size: clamp(13px, 1.06vw, 16px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.team-card small {
  padding: 0 7px;
  font-size: clamp(11.5px, 0.9vw, 13px);
  line-height: 1.25;
  color: #555d58;
}

/* ---------- The agents in front: big cards ---------- */
.hero-shop .tone-lilac {
  --tone-deep: #cdc3ff;
}
.hero-shop .tone-mint {
  --tone-deep: #b4ebcd;
}
.hero-shop .tone-pink {
  --tone-deep: #ffc4d8;
}
.hero-shop .tone-blue {
  --tone-deep: #bfd2ff;
}
.hero-shop .tone-lemon {
  --tone-deep: #ecfb7d;
}
.agent-card {
  padding: 0.7cqw 0.7cqw 0.55cqw;
  border-radius: 2.7cqw;
  gap: 0.6cqw;
  font-size: max(11px, 1.08cqw);
  overflow: visible;
}
.agent-art {
  position: relative;
  display: block;
  aspect-ratio: 0.96;
  border-radius: 2.1cqw;
  background: var(--tone-deep, var(--tone));
}
.agent-bg {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
}
.agent-bg::before {
  content: "";
  position: absolute;
  left: -22%;
  bottom: -34%;
  width: 112%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.62);
}
.agent-bg::after {
  content: "";
  position: absolute;
  right: -30%;
  top: -34%;
  width: 82%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 0.18cqw solid rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 0 1.6cqw rgba(255, 255, 255, 0.18);
}
.agent-art .agent-product {
  position: absolute;
  right: -9%;
  bottom: 4%;
  z-index: 1;
  width: 46%;
  height: auto;
  transform: rotate(8deg);
  filter: drop-shadow(0 1.1cqw 1.1cqw rgba(25, 27, 24, 0.22));
}
.agent-art .agent-photo {
  right: -7%;
  bottom: 9%;
  width: 40%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 0.4cqw solid #fff;
  border-radius: 1.5cqw;
  transform: rotate(7deg);
}
.agent-art .companion {
  position: absolute;
  z-index: 2;
  left: -12%;
  bottom: -8%;
  width: 94%;
  height: auto;
  aspect-ratio: 1;
  margin: 0;
  filter: drop-shadow(0 1.4cqw 1.2cqw rgba(25, 27, 24, 0.26));
}
.agent-bubble {
  position: absolute;
  left: 7%;
  top: 7%;
  z-index: 3;
  max-width: 62%;
  padding: 0.55em 0.95em;
  border-radius: 1.2em 1.2em 1.2em 0.25em;
  background: #fff;
  box-shadow: 0 0.5cqw 1.3cqw rgba(25, 27, 24, 0.16);
  font-size: 1em;
  font-weight: 650;
  line-height: 1.15;
  color: var(--shop-dark-ink);
}
.agent-no {
  position: absolute;
  right: 6%;
  top: 6%;
  z-index: 3;
  display: grid;
  place-items: center;
  min-width: 2.3em;
  height: 2.3em;
  padding: 0 0.5em;
  border-radius: 999px;
  background: rgba(25, 27, 24, 0.86);
  font-size: 0.86em;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: #fff;
}
.agent-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6em;
  padding: 0.2em 0.35em 0.1em 0.7em;
}
.agent-meta > span:first-child {
  display: grid;
  gap: 0.2em;
}
.agent-card .agent-meta b {
  padding: 0;
  font-family: inherit;
  font-weight: 700;
  font-size: 1.6em;
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--shop-dark-ink);
}
.agent-card .agent-meta small {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0;
  font-size: 1em;
  color: #555d58;
}
.agent-meta small i {
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  background: #1f9d63;
  box-shadow: 0 0 0 0.25em rgba(31, 157, 99, 0.22);
  animation: agent-live 1.8s ease-in-out infinite;
}
@keyframes agent-live {
  50% {
    box-shadow: 0 0 0 0.45em rgba(31, 157, 99, 0);
  }
}
.agent-go {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.6em;
  height: 2.6em;
  border-radius: 50%;
  background: var(--shop-dark-ink);
  color: #fff;
}
.agent-go svg {
  width: 1.3em;
  height: 1.3em;
}
.shop-cutout img {
  filter: drop-shadow(0 1.2cqw 1.4cqw rgba(0, 0, 0, 0.3));
}
.shop-photo {
  filter: drop-shadow(0 1cqw 1.4cqw rgba(0, 0, 0, 0.3));
}
.shop-photo .shop-tile {
  display: block;
  box-shadow: none;
}

/* ---------- Tablet and phone, agents and team ---------- */
@media (max-width: 1000px) {
  .team-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .team-list li:nth-child(even) {
    transform: none;
  }
}
@media (max-width: 700px) {
  .shop-item.t-hide {
    display: none;
  }
  .agent-card {
    font-size: 3.2cqw;
    padding: 1.6cqw 1.6cqw 1.2cqw;
    border-radius: 6cqw;
  }
  .agent-art {
    border-radius: 4.6cqw;
  }
  .team-strip {
    padding: 0;
  }
  .team-title {
    padding: 0 20px;
  }
  .team-list {
    grid-template-columns: repeat(9, 34vw);
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scroll-padding-left: 20px;
    gap: 12px;
    padding: 6px 20px 22px;
    scrollbar-width: none;
  }
  .team-list li {
    scroll-snap-align: start;
  }
}
@media (prefers-reduced-motion: reduce) {
  .agent-meta small i {
    animation: none;
  }
}

/* ---------- Rows of tiles ---------- */
.shop-rows {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 34px 30px;
  max-width: 1320px;
  margin: clamp(40px, 5.4cqw, 76px) auto 0;
  padding: 0 24px;
}
.shop-col h2 {
  margin: 0 0 14px;
  font-family: inherit;
  font-weight: 600;
  font-size: clamp(22px, 2.1vw, 28px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.shop-col h2 a {
  color: var(--shop-ink);
  text-decoration: none;
}
.shop-col h2 a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.shop-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(25, 27, 24, 0.08);
}
.shop-tile-link {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--tone, #e8e8e3);
  color: var(--shop-dark-ink);
  text-decoration: none;
  isolation: isolate;
}
.shop-tile-link:focus-visible {
  outline: 3px solid var(--blue, #3536dc);
  outline-offset: -3px;
}
.shop-tile-link img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.shop-tile-link img.art {
  inset: 4% 8% 18% 8%;
  width: 84%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px rgba(25, 27, 24, 0.1));
}
.shop-tile-link:hover img {
  transform: scale(1.05);
}
.shop-tile-link span {
  position: absolute;
  left: 12px;
  right: 8px;
  bottom: 10px;
  z-index: 1;
  font-family: inherit;
  font-weight: 650;
  font-size: clamp(14px, 1.15vw, 16px);
  line-height: 1.15;
  letter-spacing: -0.005em;
}
.shop-tile-link.photo::after {
  content: "";
  position: absolute;
  inset: 40% 0 0;
  z-index: 0;
  background: linear-gradient(transparent, rgba(12, 14, 12, 0.6));
}
.shop-tile-link.photo span {
  color: #fff;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}
.hero-shop .hero-foot-shop,
.hero-shop .hero-foot-shop span,
.hero-shop .hero-foot-shop button,
.hero-shop .hero-foot-shop a {
  color: #d3dad5;
  opacity: 1;
}
.hero-shop .hero-foot-shop {
  position: static;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1320px;
  margin: clamp(36px, 4.6vw, 64px) auto 0;
  padding: 18px 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  transform: none;
  left: auto;
  right: auto;
  bottom: auto;
}

.shop-item.d-hide {
  display: none;
}

/* ---------- Tablet and phone ---------- */
@media (max-width: 1000px) {
  .shop-rows {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .shop-item.t-hide {
    display: none;
  }
}
@media (max-width: 700px) {
  .hero-shop {
    padding-top: 92px;
  }
  .shop-cluster {
    height: 88cqw;
  }
  .shop-item {
    left: calc(var(--mx, var(--x)) * 1cqw);
    top: calc(var(--my, var(--y)) * 1cqw);
    width: calc(var(--mw, var(--w)) * 1cqw);
  }
  .shop-item.m-hide {
    display: none;
  }
  .shop-item.d-hide {
    display: block;
  }
  .shop-card {
    font-size: 3cqw;
    padding: 1.6cqw;
    border-radius: 5cqw;
  }
  .shop-card-art {
    border-radius: 3.6cqw;
  }
  .shop-center {
    margin-top: -6cqw;
  }
  .shop-wordmark {
    font-size: 17cqw;
  }
  .hero-shop h1 {
    font-size: 17px;
  }
  .shop-ask {
    padding-left: 22px;
  }
  .shop-ask input {
    font-size: 15px;
  }
  .shop-rows {
    grid-template-columns: repeat(4, 74vw);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 18px;
    padding: 6px 20px 18px;
    scrollbar-width: none;
  }
  .shop-col {
    scroll-snap-align: center;
  }
}
@media (prefers-reduced-motion: reduce) {
  .shop-item {
    will-change: auto;
  }
  .team-card,
  .shop-ask button,
  .shop-tile-link img {
    transition: none;
  }
}

/* ---------- The wall of squares behind the hero ---------- */
.hero-shop > pixel-wall {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 0;
  height: min(100%, 1240px);
  opacity: 0.6;
  -webkit-mask-image: linear-gradient(#000 0%, #000 55%, transparent 100%);
  mask-image: linear-gradient(#000 0%, #000 55%, transparent 100%);
}
.hero-shop > :not(pixel-wall):not(.hero-atmosphere) {
  position: relative;
  z-index: 1;
}
.hero-shop > .hero-atmosphere {
  z-index: 0;
}
