/* Cottony promo site.
   Colours come from docs/design/ART-STYLEGUIDE.md; the felt look is the
   styleguide's five rules done in CSS: cream piping around every card, a dashed
   stitch just inside the rim, light from the upper left, and grain on the fill. */

:root {
  --ink: #3C4148;
  --text: #6B4A3A;
  --text-soft: #957868;
  --brand: #EE5A52;
  --berry: #D2386C;
  --berry-deep: #A5264F;
  --pink: #FF7FAC;
  --drop: #5FBCF0;
  --gold: #FFC43F;
  --lilac: #A688EC;
  --mint: #7FD8A8;
  --peach: #FF9166;
  --piping: #FFFAEE;
  --card: #F7E8CB;
  --card-deep: #E7D2AB;
  --cell: #DEC79E;
  --stitch: #BD9770;

  --radius: 30px;
  --shadow: 0 22px 44px -22px rgba(107, 74, 58, .55);
  --font-display: "Fredoka", "Nunito", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-body: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .29 0 0 0 0 .23 0 0 0 .11 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: #FDF4F1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

/* an author `display` would otherwise beat the hidden attribute */
[hidden] { display: none !important; }

.nw { white-space: nowrap; }

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.1;
  margin: 0;
  font-weight: 600;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

a { color: var(--berry); }

button { font: inherit; color: inherit; }

.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px;
}
.skip:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--berry); outline-offset: 3px; border-radius: 10px; }

/* ------------------------------------------------------------------ felt */

.felt {
  position: relative;
  background-color: var(--card);
  background-image:
    radial-gradient(120% 90% at 20% 0%, rgba(255, 255, 255, .55), transparent 55%),
    var(--grain);
  border-radius: var(--radius);
  box-shadow: 0 0 0 6px var(--piping), var(--shadow);
}

.felt::before {
  content: "";
  position: absolute;
  inset: 11px;
  border: 2px dashed rgba(189, 151, 112, .72);
  border-radius: calc(var(--radius) - 10px);
  pointer-events: none;
}

/* ------------------------------------------------------------------ buttons */

.btn {
  --btn: var(--berry);
  --btn-deep: var(--berry-deep);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: 52px;
  padding: 12px 28px;
  border: 0;
  border-radius: 999px;
  background: var(--btn) linear-gradient(180deg, rgba(255, 255, 255, .28), transparent 55%);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 0 0 4px var(--piping), 0 6px 0 3px var(--btn-deep), 0 16px 26px -10px rgba(107, 74, 58, .5);
  transition: transform .18s cubic-bezier(.34, 1.56, .64, 1), box-shadow .18s;
}
.btn::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1.5px dashed rgba(255, 255, 255, .6);
  border-radius: inherit;
  pointer-events: none;
}
.btn:hover { transform: translateY(-2px) scale(1.02); }
.btn:active { transform: translateY(4px) scale(.98); box-shadow: 0 0 0 4px var(--piping), 0 2px 0 3px var(--btn-deep), 0 8px 16px -10px rgba(107, 74, 58, .5); }

.btn-soft {
  --btn: var(--card);
  --btn-deep: var(--card-deep);
  color: var(--text);
}
.btn-soft::after { border-color: rgba(189, 151, 112, .8); }

.cta-row { display: flex; flex-wrap: wrap; gap: 22px 26px; align-items: center; }
.cta-center { justify-content: center; }

/* ------------------------------------------------------------------ nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 250, 238, .78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px dashed rgba(189, 151, 112, .35);
}

.nav-row { display: flex; align-items: center; gap: 20px; min-height: 68px; }

.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
  font-family: var(--font-display); font-weight: 700; font-size: 1.25rem;
}
.brand img { width: 44px; height: 44px; filter: drop-shadow(0 3px 4px rgba(107, 74, 58, .25)); }
.brand-games { color: var(--brand); }

.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  color: var(--text); text-decoration: none; font-weight: 700;
  padding: 8px 12px; border-radius: 999px;
}
.nav-links a:hover { background: rgba(247, 232, 203, .9); color: var(--berry); }

.lang {
  display: flex; padding: 4px; gap: 2px; border-radius: 999px;
  background: var(--card); box-shadow: 0 0 0 3px var(--piping);
}
.lang button {
  border: 0; background: none; cursor: pointer; font-weight: 800; font-size: .85rem;
  padding: 6px 11px; border-radius: 999px; color: var(--text-soft);
}
.lang button[aria-pressed="true"] { background: var(--berry); color: #fff; }

@media (max-width: 880px) {
  .nav-links { display: none; }
  .lang { margin-left: auto; }
}

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  overflow: hidden;
  padding-top: clamp(28px, 5vw, 64px);
  background: linear-gradient(180deg, #B9D7F5 0%, #D8E1F7 38%, #F1E3F3 72%, #F6DDEA 100%);
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}

.status-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 16px 7px 12px; border-radius: 999px;
  background: var(--piping); color: var(--text);
  font-weight: 800; font-size: .92rem;
  box-shadow: 0 0 0 2px rgba(189, 151, 112, .35) inset, 0 8px 18px -12px rgba(107, 74, 58, .6);
}
.status-pill .dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--berry);
  box-shadow: 0 0 0 0 rgba(210, 56, 108, .5);
  animation: ping 1.8s ease-out infinite;
}

.presents {
  margin-top: 22px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.1rem;
  color: var(--brand); letter-spacing: .02em;
}

.hero h1 {
  margin-top: 6px;
  font-size: clamp(2.5rem, 5.6vw, 4.5rem);
  letter-spacing: -.01em;
}
.hero h1 em {
  font-style: normal;
  color: var(--berry);
  display: inline-block;
  animation: squeeze 3.2s ease-in-out infinite;
  transform-origin: 50% 90%;
}

.lead { margin-top: 18px; font-size: clamp(1.05rem, 1.5vw, 1.2rem); max-width: 34em; }

.hero .cta-row { margin-top: 30px; }

.facts {
  list-style: none; padding: 0; margin: 30px 0 0;
  display: flex; flex-wrap: wrap; gap: 10px;
}
.facts li {
  padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 250, 238, .75);
  border: 2px dashed rgba(189, 151, 112, .5);
  font-weight: 800; font-size: .9rem; color: var(--text);
}

.hero-art { margin: 0; position: relative; rotate: 2deg; animation: bob 6s ease-in-out infinite; }
.hero-art img {
  display: block; width: 100%;
  border-radius: 38px;
  box-shadow: 0 0 0 8px var(--piping), 0 30px 50px -24px rgba(107, 74, 58, .6);
}
.hero-art::after {
  content: "";
  position: absolute; inset: 12px;
  border: 2.5px dashed rgba(255, 250, 238, .9);
  border-radius: 28px;
  pointer-events: none;
}

.sky-clouds { position: absolute; inset: 0; pointer-events: none; }
.cloud {
  position: absolute; border-radius: 999px; background: #fff; opacity: .7; filter: blur(2px);
}
.cloud::before, .cloud::after { content: ""; position: absolute; background: inherit; border-radius: 50%; }
.cloud.c1 { width: 220px; height: 60px; left: -40px; top: 90px; animation: drift 38s linear infinite alternate; }
.cloud.c1::before { width: 110px; height: 90px; left: 40px; top: -44px; }
.cloud.c1::after { width: 80px; height: 70px; left: 120px; top: -30px; }
.cloud.c2 { width: 260px; height: 70px; right: -60px; top: 40px; opacity: .6; animation: drift 46s linear infinite alternate-reverse; }
.cloud.c2::before { width: 120px; height: 110px; left: 50px; top: -56px; }
.cloud.c2::after { width: 90px; height: 80px; left: 140px; top: -36px; }
.cloud.c3 { width: 180px; height: 50px; left: 42%; top: 18px; opacity: .45; animation: drift 52s linear infinite alternate; }
.cloud.c3::before { width: 90px; height: 76px; left: 30px; top: -38px; }
.cloud.c3::after { width: 66px; height: 56px; left: 96px; top: -24px; }

.deco { position: absolute; z-index: 1; pointer-events: none; }
.deco-star path, .deco-heart path { stroke: #fff; stroke-width: 1.6; stroke-linejoin: round; }
.deco-star.s1 { width: 38px; left: 4%; top: 58%; fill: var(--gold); animation: bob 5s ease-in-out infinite; }
.deco-star.s2 { width: 30px; right: 6%; top: 12%; fill: #FF9EBE; animation: bob 6.5s ease-in-out -2s infinite; }
.deco-heart.h1 { width: 34px; right: 46%; top: 8%; fill: var(--pink); animation: bob 5.5s ease-in-out -1s infinite; }

.hills { display: block; width: 100%; height: clamp(70px, 10vw, 150px); margin-top: -20px; position: relative; z-index: 1; }

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 560px; margin-inline: auto; order: -1; }
  .deco-heart.h1 { right: 12%; }
  .deco-star.s1 { display: none; }
}

/* ------------------------------------------------------------------ sections */

.section { padding-block: clamp(64px, 9vw, 120px); position: relative; }
.section-blush { background: linear-gradient(180deg, #FBE8F0 0%, #FDF4F1 100%); }
.section-cream { background: #FDF4F1; }
.section-lilac { background: linear-gradient(180deg, #F2E6F8 0%, #EADFF7 60%, #F4E6F3 100%); }
.section-sky { background: linear-gradient(180deg, #E9F2FB 0%, #F5EEF8 100%); }

.section-head { text-align: center; max-width: 760px; margin: 0 auto clamp(40px, 5vw, 64px); }
.section-head h2 { font-size: clamp(2rem, 4vw, 3.1rem); margin-top: 8px; }
.section-head p:not(.kicker) { margin-top: 16px; font-size: 1.12rem; }
.section-head-left { text-align: left; margin: 0 0 32px; }

.kicker {
  display: inline-block;
  font-family: var(--font-display); font-weight: 600; font-size: .95rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--berry);
}

.subhead { text-align: center; max-width: 680px; margin: clamp(64px, 8vw, 96px) auto 40px; }
.subhead h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.subhead p { margin-top: 12px; }

.note-center { text-align: center; margin-top: 36px; font-weight: 700; color: var(--text-soft); }

/* ------------------------------------------------------------------ pillars */

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 56px 34px;
  padding-top: 40px;
}
.pillar { padding: 72px 30px 36px; text-align: center; }
.pillar img {
  position: absolute; left: 50%; top: -48px; width: 96px; height: 96px;
  translate: -50% 0;
  filter: drop-shadow(0 10px 10px rgba(107, 74, 58, .25));
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
}
.pillar:hover img { transform: scale(1.12, .9) translateY(4px); }
.pillar h3 { font-size: 1.55rem; }
.pillar p { margin-top: 10px; }

/* ------------------------------------------------------------------ cast */

.cast {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 26px 20px;
}
.cast li {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; color: var(--ink);
}
.tile {
  display: grid; place-items: center;
  width: 100%; max-width: 160px; aspect-ratio: 1;
  border-radius: 28px;
  background: var(--cell) var(--grain);
  box-shadow: inset 0 6px 12px rgba(107, 74, 58, .25), 0 0 0 5px var(--piping), var(--shadow);
}
.tile img { width: 76%; filter: drop-shadow(0 8px 6px rgba(107, 74, 58, .28)); transform-origin: 50% 100%; }
.cast li:hover .tile img { animation: land .5s cubic-bezier(.34, 1.56, .64, 1); }

/* ------------------------------------------------------------------ specials */

.specials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 34px;
}

.special {
  border: 0; padding: 0; background: none; cursor: pointer; text-align: center;
  perspective: 1200px; min-height: 360px; border-radius: var(--radius);
}
.special-inner {
  position: relative; display: block; width: 100%; height: 100%; min-height: 360px;
  transform-style: preserve-3d;
  transition: transform .7s cubic-bezier(.34, 1.3, .64, 1);
}
.special[aria-pressed="true"] .special-inner { transform: rotateY(180deg); }
.special:hover .special-inner { transform: rotateY(-8deg); }
.special[aria-pressed="true"]:hover .special-inner { transform: rotateY(188deg); }

.face {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 30px 26px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.face.back { transform: rotateY(180deg); }

.mystery { position: relative; width: 132px; height: 132px; display: grid; place-items: center; }
.mystery img { width: 120px; filter: brightness(0) saturate(0) opacity(.18); }
.mystery b {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 3.4rem; font-weight: 700; color: var(--berry);
  text-shadow: 0 3px 0 var(--piping), 0 -3px 0 var(--piping), 3px 0 0 var(--piping), -3px 0 0 var(--piping);
  animation: bob 2.6s ease-in-out infinite;
}
.earn { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; color: var(--ink); }
.tap {
  font-weight: 800; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--berry); padding: 4px 12px; border-radius: 999px; background: rgba(255, 250, 238, .8);
}

.back img { width: 84px; filter: drop-shadow(0 6px 6px rgba(107, 74, 58, .25)); }
.special-name { font-family: var(--font-display); font-weight: 600; font-size: 1.45rem; color: var(--ink); }
.special-text { font-size: 1rem; max-width: 22em; }

/* mini boards: which cells a special or a combo clears */
.mini {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  width: 104px; aspect-ratio: 1;
  padding: 5px; border-radius: 12px;
  background: rgba(222, 199, 158, .55);
}
.mini i { border-radius: 3px; background: rgba(255, 250, 238, .7); }
.mini i.on { background: var(--pink); }
.mini i.src { background: var(--berry); box-shadow: 0 0 0 2px var(--piping); }
.mini i.kind { background: var(--lilac); }
.mini-secret { position: relative; }
.mini-secret i { background: linear-gradient(135deg, #FFB3C9, #FFE08A, #9FE3C1, #9CCBF5, #C9B2F5); background-size: 700% 700%; opacity: .5; animation: shimmer 4s linear infinite; }
.mini-secret::after {
  content: "?"; position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 2.6rem; color: var(--berry);
  text-shadow: 0 2px 0 var(--piping), 0 -2px 0 var(--piping), 2px 0 0 var(--piping), -2px 0 0 var(--piping);
}

/* ------------------------------------------------------------------ combos */

/* flex rather than grid, so an odd card out is centred instead of left behind */
.combos {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 34px 28px;
}
.combo {
  flex: 1 1 190px; max-width: 250px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
  padding: 30px 20px 28px;
}
.pair { display: flex; align-items: center; gap: 4px; }
.pair img { width: 56px; filter: drop-shadow(0 4px 4px rgba(107, 74, 58, .22)); }
.pair i { font-style: normal; font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: var(--berry); }
.combo strong { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; color: var(--ink); margin-top: 4px; }
.combo span:last-child { font-size: .98rem; }
.combo-secret { background-image: radial-gradient(120% 90% at 20% 0%, rgba(255, 255, 255, .7), transparent 55%), linear-gradient(160deg, #FCE3EC, #F5E9CF 60%, #E9E1F7), var(--grain); }

.cascade {
  margin-top: clamp(56px, 7vw, 80px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 26px 40px;
  padding: 36px clamp(28px, 4vw, 48px);
}
.cascade > div { max-width: 30em; }
.cascade h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.cascade p { margin-top: 8px; }

.ladder { list-style: none; padding: 0; margin: 0; display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.ladder li {
  --i: 0;
  display: grid; place-items: center;
  min-width: calc(44px + var(--i) * 7px); height: calc(44px + var(--i) * 7px);
  padding-inline: 8px;
  border-radius: 999px;
  font-family: var(--font-display); font-weight: 700; color: #fff;
  font-size: calc(.95rem + var(--i) * .08rem);
  background: var(--berry);
  box-shadow: 0 0 0 3px var(--piping), 0 4px 0 2px var(--berry-deep);
}
.ladder li:nth-child(1) { --i: 0; background: #F29BB9; box-shadow: 0 0 0 3px var(--piping), 0 4px 0 2px #D07A98; }
.ladder li:nth-child(2) { --i: 1; background: #EC7FA5; box-shadow: 0 0 0 3px var(--piping), 0 4px 0 2px #C86086; }
.ladder li:nth-child(3) { --i: 2; background: #E4638F; box-shadow: 0 0 0 3px var(--piping), 0 4px 0 2px #BD4A74; }
.ladder li:nth-child(4) { --i: 3; background: #DB4D7D; }
.ladder li:nth-child(5) { --i: 4; background: #D2386C; }
.ladder li:nth-child(6) { --i: 5; background: #B92A5B; box-shadow: 0 0 0 3px var(--piping), 0 4px 0 2px #8C1D43; }

/* ------------------------------------------------------------------ try it */

.try-grid {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hud {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 20px;
  padding: 26px 30px 30px;
}
.hud-label { display: block; font-weight: 800; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-soft); }
.hud-value { display: block; font-family: var(--font-display); font-weight: 700; font-size: 2.3rem; line-height: 1.1; color: var(--text); }
.hud-moves { text-align: center; }
.hud-moves .hud-value {
  display: grid; place-items: center; width: 68px; height: 68px; margin: 4px auto 0;
  border-radius: 50%; background: var(--berry); color: #fff; font-size: 1.9rem;
  box-shadow: 0 0 0 4px var(--piping), 0 5px 0 2px var(--berry-deep);
}
.hud-moves .hud-value.low { animation: throb .9s ease-in-out infinite; }

.bar {
  grid-column: 1 / -1;
  position: relative; height: 24px; margin-top: 14px;
  border-radius: 999px; background: var(--card-deep);
  box-shadow: inset 0 3px 6px rgba(107, 74, 58, .25), 0 0 0 3px var(--piping);
}
.bar-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, #FFD978, var(--gold) 55%, #E9A92A);
  transition: width .5s cubic-bezier(.34, 1.2, .64, 1);
}
.notch { position: absolute; top: 50%; width: 38px; height: 38px; translate: -50% -50%; transition: transform .3s; }
.notch.earned { animation: earn .6s cubic-bezier(.34, 1.56, .64, 1); }

.try-actions { margin-top: 30px; }
.fine { margin-top: 22px; font-size: .92rem; color: var(--text-soft); max-width: 32em; }

.board-stage { position: relative; }
.board-frame { z-index: 1; padding: clamp(12px, 2.4vw, 20px); max-width: 560px; margin-inline: auto; }
.board-frame::before { inset: 6px; border-radius: calc(var(--radius) - 5px); }

.board {
  position: relative;
  aspect-ratio: 1;
  border-radius: 20px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  background: #D9C197 var(--grain);
  box-shadow: inset 0 6px 14px rgba(107, 74, 58, .35);
  cursor: pointer;
}
.board:focus-visible { outline-offset: 6px; }

.cells { position: absolute; inset: 0; display: grid; grid-template: repeat(8, 1fr) / repeat(8, 1fr); padding: 1px; }
.cells i { margin: 2px; border-radius: 22%; background: #E9D6B1; box-shadow: inset 0 3px 5px rgba(107, 74, 58, .2); }
.cells i.alt { background: #E2CCA3; }

.pieces, .fx { position: absolute; inset: 0; }
.fx { pointer-events: none; z-index: 3; }

.piece {
  position: absolute; left: 0; top: 0; width: 12.5%; height: 12.5%;
  transform: translate(calc(var(--x, 0) * 100%), calc(var(--y, 0) * 100%));
  transition: transform var(--t, 0ms) var(--ease, ease) var(--d, 0ms);
  z-index: 1;
}
.piece.front { z-index: 2; }
.piece .body { position: absolute; inset: 5%; transform-origin: 50% 85%; }
.piece img { display: block; width: 100%; height: 100%; pointer-events: none; filter: drop-shadow(0 3px 2px rgba(107, 74, 58, .3)); }
.piece .mark {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  -webkit-mask: var(--img) center / 100% 100% no-repeat;
  mask: var(--img) center / 100% 100% no-repeat;
}
.piece[data-special="line_h"] .mark {
  opacity: 1;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .82) 0 10%, transparent 10% 24%);
}
.piece[data-special="line_v"] .mark {
  opacity: 1;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .82) 0 10%, transparent 10% 24%);
}
.piece[data-special="bomb"] .mark {
  opacity: 1;
  background:
    radial-gradient(circle at 30% 36%, #fff 0 6%, transparent 7%),
    radial-gradient(circle at 70% 32%, #fff 0 6%, transparent 7%),
    radial-gradient(circle at 50% 58%, #fff 0 7%, transparent 8%),
    radial-gradient(circle at 30% 76%, #fff 0 5%, transparent 6%),
    radial-gradient(circle at 70% 76%, #fff 0 5%, transparent 6%);
}
/* on the image, so the body stays free for land, pop and hint */
.piece[data-special]:not([data-special=""]) img { animation: glow 1.6s ease-in-out infinite; }

.piece.selected .body { animation: none; transform: scale(1.12); }
.piece.selected::after, .cursor::after {
  content: ""; position: absolute; inset: 3%;
  border: 3px dashed #fff; border-radius: 30%;
  box-shadow: 0 0 0 2px rgba(210, 56, 108, .5);
  animation: spin 6s linear infinite;
  pointer-events: none;
}
.cursor {
  position: absolute; left: 0; top: 0; width: 12.5%; height: 12.5%; z-index: 4; pointer-events: none;
  transform: translate(calc(var(--x, 0) * 100%), calc(var(--y, 0) * 100%));
  transition: transform .12s ease-out;
}
.cursor::after { border-color: var(--berry); box-shadow: 0 0 0 2px #fff; }

.piece.hint .body { animation: hint 1s ease-in-out infinite; }
.piece.land .body { animation: land var(--land, 220ms) cubic-bezier(.34, 1.56, .64, 1); }
.piece.nope .body { animation: nope .26s ease-in-out; }
.piece.pop .body { animation: pop var(--pop, 240ms) cubic-bezier(.36, 0, .66, -.56) forwards; }
.piece.born .body { animation: born .42s cubic-bezier(.34, 1.56, .64, 1); }

.board.quake { animation: quake .18s linear; }

.fx > * { position: absolute; pointer-events: none; }
.fx-puff { width: 16%; translate: -50% -50%; animation: puff .45s ease-out forwards; }
.fx-twinkle { width: 9%; translate: -50% -50%; animation: twinkle .5s ease-out forwards; }
.fx-ring { width: 40%; translate: -50% -50%; animation: ring .5s ease-out forwards; }
.fx-beam {
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .95) 20%, #fff 50%, rgba(255, 255, 255, .95) 80%, transparent);
  box-shadow: 0 0 18px 6px rgba(255, 127, 172, .75);
  animation: beam .42s ease-out forwards;
}
.fx-beam.h { left: 0; width: 100%; height: 7%; translate: 0 -50%; }
.fx-beam.v { top: 0; height: 100%; width: 7%; translate: -50% 0;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .95) 20%, #fff 50%, rgba(255, 255, 255, .95) 80%, transparent); }
.fx-score {
  translate: -50% -50%;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.1rem, 3.2vw, 1.7rem);
  color: var(--berry); white-space: nowrap;
  text-shadow: 0 2px 0 #fff, 0 -2px 0 #fff, 2px 0 0 #fff, -2px 0 0 #fff, 0 6px 12px rgba(107, 74, 58, .35);
  animation: rise .9s ease-out forwards;
}

.combo-tag {
  position: absolute; left: 50%; top: 10%; z-index: 5; translate: -50% 0;
  padding: 6px 18px; border-radius: 999px;
  background: var(--berry); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1rem, 3vw, 1.4rem);
  box-shadow: 0 0 0 4px var(--piping), 0 10px 20px -8px rgba(107, 74, 58, .6);
  opacity: 0; pointer-events: none; white-space: nowrap;
}
.combo-tag.show { animation: tag 1s cubic-bezier(.34, 1.56, .64, 1) forwards; }

.board-end {
  position: absolute; inset: 0; z-index: 6;
  display: grid; place-items: center; padding: 8%;
  background: rgba(247, 232, 203, .55);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  animation: fade .3s ease-out;
}
.end-card { width: 100%; max-width: 380px; padding: 30px 26px 34px; text-align: center; animation: born .5s cubic-bezier(.34, 1.56, .64, 1); }
.end-title { font-size: clamp(1.4rem, 4vw, 1.9rem); }
.end-stars { display: flex; justify-content: center; align-items: flex-end; gap: 4px; margin-top: 12px; }
.end-stars img { width: 58px; }
.end-stars img:nth-child(2) { width: 74px; }
.end-score { margin-top: 8px; font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: var(--text); }
.end-text { margin-top: 8px; font-size: .95rem; }
.end-again { margin-top: 20px; }

/* behind the frame, so they peek round its corners without covering a piece */
.friend { position: absolute; z-index: 0; pointer-events: none; filter: drop-shadow(0 12px 12px rgba(107, 74, 58, .2)); }
.friend-left { width: clamp(90px, 14vw, 170px); left: -6%; bottom: -8%; animation: bob 5s ease-in-out infinite; }
.friend-right { width: clamp(80px, 12vw, 150px); right: -5%; top: -9%; animation: bob 6s ease-in-out -2.5s infinite; }

@media (max-width: 960px) {
  .try-grid { grid-template-columns: 1fr; }
  .section-head-left { text-align: center; }
  .try-copy { max-width: 620px; margin-inline: auto; text-align: center; }
  .hud { text-align: left; }
  .fine { margin-inline: auto; }
  .friend-left { left: -2%; }
  .friend-right { right: -1%; }
}

/* ------------------------------------------------------------------ boosters */

.boosters {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px 28px;
  text-align: center;
}
.booster { position: relative; display: inline-block; }
.booster img { width: 132px; filter: drop-shadow(0 12px 12px rgba(107, 74, 58, .28)); transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.boosters li:hover .booster img { transform: rotate(-8deg) scale(1.06); }
.booster b {
  position: absolute; right: 4px; bottom: 8px;
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--berry); color: #fff; font-family: var(--font-display); font-size: 1.2rem;
  box-shadow: 0 0 0 3px var(--piping);
}
.boosters h3 { margin-top: 14px; font-size: 1.5rem; }
.boosters p { margin-top: 6px; }

.levels {
  margin-top: clamp(64px, 8vw, 96px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 34px;
}
.level-card { padding: 34px 30px; text-align: center; }
.level-card h3 { font-size: 1.4rem; margin-top: 12px; }
.level-card p { margin-top: 8px; }
.level-stars { display: flex; justify-content: center; align-items: flex-end; height: 92px; }
.level-stars img { filter: drop-shadow(0 6px 5px rgba(107, 74, 58, .25)); }
.level-stars img:nth-child(1) { rotate: -12deg; margin-right: -8px; }
.level-stars img:nth-child(3) { rotate: 12deg; margin-left: -8px; }
.line-icon {
  width: 72px; height: 92px; padding: 10px 6px;
  fill: none; stroke: var(--berry); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}

/* ------------------------------------------------------------------ gallery */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 34px;
}
.shot { margin: 0; padding: 14px 14px 18px; display: flex; flex-direction: column; }
.shot::before { inset: 6px; border-radius: calc(var(--radius) - 5px); }
.shot-wide { grid-column: 1 / -1; }
.shot-open {
  display: block; width: 100%; padding: 0; border: 0; border-radius: 20px; overflow: hidden;
  cursor: zoom-in; background: var(--cell); position: relative; z-index: 1;
}
.shot-open img { display: block; width: 100%; height: 420px; object-fit: cover; object-position: top; transition: transform .5s ease; }
.shot-wide .shot-open img { height: auto; aspect-ratio: 1400 / 785; }
.shot-open:hover img { transform: scale(1.03); }
.shot figcaption { padding: 14px 10px 4px; font-weight: 700; position: relative; z-index: 1; }
.chip {
  display: inline-block; margin-right: 6px; padding: 2px 10px; border-radius: 999px;
  font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  background: var(--lilac); color: #fff; vertical-align: 2px;
}
.chip-wip { background: var(--mint); color: #245B41; }

@media (max-width: 880px) {
  .gallery { grid-template-columns: 1fr; }
  .shot-open img { height: 360px; }
}

.lightbox {
  border: 0; padding: 16px; max-width: min(1100px, 94vw); max-height: 94vh;
  border-radius: 24px; background: var(--piping);
  box-shadow: 0 30px 60px -20px rgba(60, 65, 72, .6);
}
.lightbox::backdrop { background: rgba(60, 65, 72, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.lightbox img { display: block; max-width: 100%; max-height: calc(94vh - 110px); margin-inline: auto; border-radius: 14px; }
.lightbox-caption { text-align: center; padding: 12px 40px 2px; font-weight: 700; }
.lightbox-close {
  position: absolute; right: 12px; top: 12px; z-index: 1;
  width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--berry); color: #fff; font-size: 1.6rem; line-height: 1;
  box-shadow: 0 0 0 3px var(--piping);
}

/* ------------------------------------------------------------------ studio */

.studio { text-align: center; }
.lockup { display: inline-flex; align-items: center; gap: 18px; }
.lockup img { width: clamp(88px, 12vw, 132px); filter: drop-shadow(0 12px 12px rgba(107, 74, 58, .3)); }
.lockup-word {
  display: flex; flex-direction: column; align-items: flex-start;
  font-family: var(--font-display); font-weight: 700; line-height: .95;
  font-size: clamp(2.6rem, 6vw, 4.2rem); color: var(--ink);
}
.studio h2 { margin-top: 30px; font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.studio-text { margin: 12px auto 0; max-width: 34em; font-size: 1.12rem; }

.values {
  list-style: none; padding: 0; margin: 48px auto 0; max-width: 820px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 28px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; color: var(--ink);
}
.values li { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.value-icon {
  display: grid; place-items: center; width: 84px; height: 84px; border-radius: 28px;
  background: var(--piping);
  box-shadow: inset 0 0 0 2px rgba(210, 56, 108, .35), 0 12px 22px -14px rgba(107, 74, 58, .7);
  position: relative;
}
.value-icon::after { content: ""; position: absolute; inset: 7px; border: 1.5px dashed rgba(210, 56, 108, .4); border-radius: 22px; }
.value-icon svg { width: 44px; height: 44px; fill: #D9577F; }
.value-icon .cut { fill: none; stroke: var(--piping); stroke-width: 1.6; stroke-linecap: round; }
.value-icon .cut-dot { fill: var(--piping); }

/* ------------------------------------------------------------------ finale */

.finale {
  position: relative;
  padding-top: clamp(72px, 9vw, 120px);
  background: linear-gradient(180deg, #FDF4F1 0%, #E4ECF9 45%, #F4DCEB 100%);
}
.finale-card {
  max-width: 820px; margin-inline: auto; text-align: center;
  padding: clamp(40px, 6vw, 64px) clamp(24px, 5vw, 64px);
}
.finale-logo { width: min(360px, 80%); display: block; margin: 0 auto; filter: drop-shadow(0 10px 12px rgba(107, 74, 58, .25)); }
.finale-friend { position: absolute; width: clamp(90px, 14vw, 150px); left: clamp(-30px, -2vw, -8px); top: -60px; animation: bob 5.5s ease-in-out infinite; }
.finale h2 { margin-top: 18px; font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.finale-card > p { margin: 12px auto 0; max-width: 32em; font-size: 1.12rem; }
.finale .cta-row { margin-top: 30px; position: relative; z-index: 1; }
.soon-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px;
  border: 2px dashed var(--stitch); font-weight: 800; color: var(--text-soft);
}
.soon-pill::before {
  content: ""; width: 18px; height: 18px; border-radius: 50%;
  background: conic-gradient(var(--stitch) 0 25%, transparent 0 50%, var(--stitch) 0 75%, transparent 0);
  animation: spin 3s linear infinite;
}
.share-status { min-height: 1.6em; margin-top: 12px; font-weight: 700; color: var(--berry); }
.hills-foot { margin-top: clamp(48px, 7vw, 80px); height: clamp(50px, 7vw, 100px); }

.foot { background: #EFB6CF; color: #6E3450; padding-block: 8px 30px; text-align: center; font-weight: 700; font-size: .92rem; }

/* ------------------------------------------------------------------ motion */

@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes drift { from { translate: 0 0; } to { translate: 120px 0; } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(210, 56, 108, .5); } 80%, 100% { box-shadow: 0 0 0 10px rgba(210, 56, 108, 0); } }
@keyframes squeeze {
  0%, 70%, 100% { transform: scale(1, 1); }
  76% { transform: scale(1.12, .86); }
  84% { transform: scale(.94, 1.08); }
  92% { transform: scale(1.03, .97); }
}
@keyframes spin { to { rotate: 360deg; } }
@keyframes shimmer { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
@keyframes throb { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
@keyframes earn { 0% { transform: scale(1); } 50% { transform: scale(1.6) rotate(20deg); } 100% { transform: scale(1); } }
@keyframes glow { 0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0)); } 50% { filter: drop-shadow(0 0 7px rgba(255, 255, 255, .95)); } }
@keyframes hint { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.14); filter: drop-shadow(0 0 8px #fff); } }
@keyframes land { 0% { transform: scale(1.18, .82); } 55% { transform: scale(.95, 1.05); } 100% { transform: scale(1, 1); } }
@keyframes nope { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-7%); } 75% { transform: translateX(7%); } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(0); } }
@keyframes born { 0% { transform: scale(.5); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes quake { 0%, 100% { translate: 0 0; } 20% { translate: -6px 2px; } 40% { translate: 5px -3px; } 60% { translate: -3px 2px; } 80% { translate: 2px -1px; } }
@keyframes puff { 0% { transform: scale(.4); opacity: .95; } 100% { transform: scale(1.6); opacity: 0; } }
@keyframes twinkle { 0% { transform: scale(.2) rotate(0); opacity: 1; } 100% { transform: scale(1.4) rotate(90deg); opacity: 0; } }
@keyframes ring { 0% { transform: scale(.2); opacity: 1; } 100% { transform: scale(2.4); opacity: 0; } }
@keyframes beam { 0% { opacity: 0; transform: scale(1, .2); } 25% { opacity: 1; transform: scale(1, 1); } 100% { opacity: 0; transform: scale(1, .6); } }
@keyframes rise { 0% { transform: translateY(10px) scale(.7); opacity: 0; } 20% { transform: translateY(0) scale(1.1); opacity: 1; } 100% { transform: translateY(-46px) scale(1); opacity: 0; } }
@keyframes tag { 0% { opacity: 0; transform: scale(.4); } 20% { opacity: 1; transform: scale(1.1); } 35% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-12px); } }
@keyframes fade { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero h1 em, .hero-art img, .deco, .cloud, .friend, .finale-friend, .mystery b, .status-pill .dot,
  .mini-secret i, .soon-pill::before, .piece.selected::after, .cursor::after,
  .piece[data-special]:not([data-special=""]) img { animation: none; }
  .special-inner { transition: none; }
  .special:hover .special-inner { transform: none; }
  .special[aria-pressed="true"]:hover .special-inner { transform: rotateY(180deg); }
  .board.quake { animation: none; }
}
