/* Horse Haven: Idle Merge — candy meadow landing (polaroid + merge-trail layout) */
:root {
  --pink: #ff5fa2;
  --pink-deep: #e83d86;
  --pink-soft: #ffe0ef;
  --yellow: #ffd23f;
  --yellow-edge: #c98a12;
  --sky: #8fd4ff;
  --sky-soft: #d9f0ff;
  --lavender: #f6ecff;
  --meadow: #7bc96f;
  --ink: #4a2340;
  --muted: #6b4560;
  --foam: #fffafc;
  --ribbon: #ff7eb3;
  --shadow: 0 16px 40px rgba(232, 61, 134, 0.18);
  --display: "Fredoka", system-ui, sans-serif;
  --body: "Nunito", system-ui, sans-serif;
  --gutter: clamp(1.1rem, 4vw, 2.75rem);
  --nav-gap: 1rem;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background:
    radial-gradient(900px 480px at 12% -10%, #ffe8f4 0%, transparent 55%),
    radial-gradient(800px 420px at 92% 8%, #d9f0ff 0%, transparent 50%),
    linear-gradient(180deg, var(--lavender) 0%, var(--foam) 42%, #fff5fb 100%);
  line-height: 1.65;
}

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

a,
button {
  font-family: inherit;
}

button {
  cursor: pointer;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 60;
  background: var(--foam);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 999px;
}

.skip-link:focus {
  top: 12px;
}

/* —— Floating capsule nav —— */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: var(--nav-gap) var(--gutter) 0;
  pointer-events: none;
}

.nav__capsule {
  pointer-events: auto;
  width: min(1080px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 12px;
  background: rgba(255, 250, 252, 0.88);
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.nav.is-stuck .nav__capsule {
  box-shadow: 0 12px 36px rgba(74, 35, 64, 0.16);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.brand img {
  border-radius: 12px;
  box-shadow: 0 4px 0 rgba(232, 61, 134, 0.25);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand__text strong {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--pink-deep);
}

.brand__text small {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.nav__links {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.nav__links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 8px 14px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav__links a:hover,
.nav__links a:focus-visible {
  background: var(--pink-soft);
  color: var(--pink-deep);
  outline: none;
}

.nav__end {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--pink-soft);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
}

.nav__toggle span {
  display: block;
  width: 18px;
  height: 2.5px;
  background: var(--pink-deep);
  border-radius: 2px;
  transition: transform 0.2s ease;
}

/* —— Buttons —— */
.btn {
  border: none;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 12px 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn--candy {
  background: linear-gradient(180deg, #ff8ec0 0%, var(--pink) 55%, var(--pink-deep) 100%);
  color: #fff;
  box-shadow: 0 6px 0 var(--pink-deep), 0 10px 24px rgba(232, 61, 134, 0.35);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

.btn--candy:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.btn--candy:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--pink-deep), 0 4px 12px rgba(232, 61, 134, 0.3);
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 3px solid #3d2150;
  border-radius: 16px;
  background: #1f1630;
  color: #fff;
  padding: 12px 20px;
  min-width: 180px;
  box-shadow: 0 8px 0 #3d2150, 0 14px 28px rgba(61, 33, 80, 0.25);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.store-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.store-btn:active {
  transform: translateY(4px);
  box-shadow: 0 3px 0 #3d2150;
}

.store-btn span {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  font-weight: 800;
  font-size: 1.05rem;
}

.store-btn small {
  font-size: 0.68rem;
  font-weight: 600;
  opacity: 0.85;
}

.store-btn--play {
  background: linear-gradient(180deg, #4caf50, #2e7d32);
  border-color: #1b5e20;
  box-shadow: 0 8px 0 #1b5e20, 0 14px 28px rgba(27, 94, 32, 0.28);
}

.store-btn--play:active {
  box-shadow: 0 3px 0 #1b5e20;
}

.store-btn i {
  width: 26px;
  height: 26px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* —— Hero —— */
.hero {
  position: relative;
  padding: 1.25rem 0 0;
  color: var(--ink);
}

.hero__sky {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.float {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  opacity: 0.55;
  background: radial-gradient(circle at 30% 30%, #fff, var(--pink));
  animation: drift 9s ease-in-out infinite;
}

.float--a { top: 18%; left: 8%; width: 18px; height: 18px; }
.float--b { top: 28%; right: 12%; background: radial-gradient(circle at 30% 30%, #fff, var(--yellow)); animation-delay: -3s; }
.float--c { top: 12%; left: 48%; width: 14px; height: 14px; background: radial-gradient(circle at 30% 30%, #fff, #9b7bff); animation-delay: -5s; }

@keyframes drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.hero__stage {
  position: relative;
  width: min(1180px, calc(100% - var(--gutter) * 2));
  margin: 0 auto;
  border-radius: clamp(28px, 5vw, 48px);
  overflow: visible;
  border: 6px solid #fff;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, #ffe0f0, #c9e8ff);
  line-height: 0;
}

.hero__banner {
  width: 100%;
  height: auto;
  aspect-ratio: 1024 / 500;
  object-fit: contain;
  object-position: center center;
  border-radius: calc(clamp(28px, 5vw, 48px) - 4px);
  display: block;
}

.hero__veil {
  display: none;
}

.hero__shelf {
  position: relative;
  z-index: 2;
  width: min(760px, calc(100% - var(--gutter) * 2));
  margin: 1.5rem auto 0;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  background: linear-gradient(180deg, #fff8fc, #ffe8f3);
  border: 4px solid #fff;
  border-radius: 36px 36px 44px 44px;
  box-shadow: var(--shadow);
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 0.75rem;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--pink-deep);
  font-weight: 800;
  font-size: 0.82rem;
  box-shadow: 0 4px 0 var(--pink-soft);
}

.eyebrow i {
  width: 16px;
  height: 16px;
}

.logo-mark {
  display: block;
  font-family: var(--display);
  font-size: clamp(2.4rem, 7vw, 3.75rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--yellow);
  -webkit-text-stroke: 3px #8b3a1a;
  paint-order: stroke fill;
  text-shadow: 0 4px 0 #8b3a1a, 0 10px 24px rgba(139, 58, 26, 0.25);
  margin-bottom: 0.35rem;
}

.logo-sub {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.15rem, 3.2vw, 1.65rem);
  font-weight: 600;
  color: #fff;
  -webkit-text-stroke: 2px var(--pink-deep);
  paint-order: stroke fill;
  text-shadow: 0 3px 0 var(--pink-deep);
  margin-bottom: 0.85rem;
}

.lead {
  margin: 0 auto 1.35rem;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 600;
}

.hero__shelf .cta-row {
  justify-content: center;
}

.wave {
  display: block;
  width: 100%;
  height: clamp(40px, 6vw, 72px);
  color: var(--foam);
  margin-top: -1px;
}

.wave--hero {
  color: #fff6fb;
  margin-top: 2rem;
}

.wave--trail {
  color: #ff8ec4;
  margin-top: 3rem;
}

.wave--download {
  color: #fff6fb;
  display: block;
  margin-bottom: -1px;
}

/* —— Merge trail features —— */
.trail {
  position: relative;
  padding: 1rem var(--gutter) 0;
  background: #fff6fb;
  overflow: visible;
}

.section-head {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto 2.5rem;
}

.section-head h2 {
  font-family: var(--display);
  font-size: clamp(1.85rem, 4.5vw, 2.6rem);
  margin: 0.5rem 0 0.65rem;
  color: var(--ink);
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.section-head--light h2,
.section-head--light p {
  color: #fff;
}

.section-head--light p:not(.pill) {
  color: rgba(255, 255, 255, 0.92);
}

.pill {
  display: inline-block;
  margin: 0;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--yellow);
  color: #8b3a1a;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 3px 0 var(--yellow-edge);
}

.pill--soft {
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
  box-shadow: none;
  backdrop-filter: blur(6px);
}

.trail__path {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  width: min(920px, 100%);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  position: relative;
}

.trail__path::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 1.5rem;
  bottom: 1.5rem;
  width: 4px;
  transform: translateX(-50%);
  background: repeating-linear-gradient(
    180deg,
    var(--pink) 0 10px,
    transparent 10px 20px
  );
  border-radius: 4px;
  opacity: 0.45;
}

.trail__step {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 1rem;
  position: relative;
  z-index: 1;
  width: 100%;
}

.trail__step .trail__badge {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
}

.trail__step--left .trail__bubble {
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
  text-align: right;
}

.trail__step--right .trail__bubble {
  grid-column: 3;
  grid-row: 1;
  justify-self: start;
  text-align: left;
}

.trail__step--left .trail__icon {
  margin-left: auto;
}

.trail__badge {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ff8ec0, var(--pink-deep));
  color: #fff;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  box-shadow: 0 6px 0 var(--pink-deep);
}

.trail__bubble {
  background: #fff;
  border-radius: 28px;
  padding: 1.25rem 1.4rem;
  border: 3px solid var(--pink-soft);
  box-shadow: 0 12px 28px rgba(232, 61, 134, 0.12);
  width: min(100%, 22rem);
}

.trail__icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--pink-soft);
  color: var(--pink-deep);
  margin-bottom: 0.5rem;
}

.trail__icon i {
  width: 22px;
  height: 22px;
}

.trail__bubble h3 {
  font-family: var(--display);
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
}

.trail__bubble p {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}

/* —— Polaroid gallery —— */
.gallery {
  position: relative;
  padding: 3.5rem var(--gutter) 6rem;
  background:
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.2), transparent 40%),
    linear-gradient(160deg, #ff7eb3 0%, #ff5fa2 45%, #c77dff 100%);
  overflow: visible;
}

.polaroids {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(0.75rem, 2vw, 1.35rem);
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.75rem 0.5rem 2.5rem;
  align-items: start;
}

.polaroid {
  appearance: none;
  border: none;
  background: #fff;
  padding: 10px 10px 22px;
  border-radius: 10px;
  box-shadow: 0 14px 32px rgba(74, 35, 64, 0.28);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
  width: 100%;
  max-width: 220px;
  margin: 0 auto;
  z-index: 1;
  cursor: pointer;
}

.polaroid:hover,
.polaroid:focus-visible {
  transform: rotate(0deg) translateY(-8px);
  box-shadow: 0 22px 44px rgba(74, 35, 64, 0.35);
  z-index: 5;
  outline: none;
  filter: brightness(1.03);
}

.polaroid img {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  object-position: center top;
  border-radius: 4px;
  background: linear-gradient(180deg, #f7ecff, #ffe8f4);
}

.polaroid span {
  display: block;
  margin-top: 10px;
  font-family: var(--display);
  font-size: 0.85rem;
  color: var(--ink);
  text-align: center;
}

.polaroid--1 { margin-top: 1.25rem; }
.polaroid--2 { margin-top: 0; }
.polaroid--3 { margin-top: 1.75rem; }
.polaroid--4 { margin-top: 0.35rem; }
.polaroid--5 { margin-top: 1rem; }

/* —— Download —— */
.download {
  padding: 0.5rem var(--gutter) 4rem;
  background: #fff6fb;
}

.download__ribbon {
  width: min(720px, 100%);
  margin: 0 auto;
  text-align: center;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  background: linear-gradient(180deg, #fff, #ffeaf4);
  border-radius: 40px;
  border: 4px solid #fff;
  box-shadow: var(--shadow);
  position: relative;
}

.download__ribbon::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 50%;
  width: 120px;
  height: 28px;
  margin-left: -60px;
  background: linear-gradient(180deg, var(--yellow), #f5b820);
  border-radius: 999px;
  box-shadow: 0 4px 0 var(--yellow-edge);
}

.download__ribbon img {
  margin: 0 auto 0.85rem;
  border-radius: 22px;
  box-shadow: 0 8px 0 rgba(232, 61, 134, 0.2);
}

.download__ribbon h2 {
  font-family: var(--display);
  font-size: clamp(1.7rem, 4vw, 2.35rem);
  margin: 0 0 0.5rem;
}

.download__ribbon p {
  margin: 0 auto 1.35rem;
  max-width: 28rem;
  color: var(--muted);
  font-weight: 600;
}

.download__ribbon .cta-row {
  justify-content: center;
}

/* —— Footer —— */
.footer {
  background: linear-gradient(180deg, #7ec8ff 0%, #5bb0f0 100%);
  color: #fff;
  padding: 2.5rem var(--gutter) 2rem;
  text-align: center;
  clip-path: ellipse(120% 100% at 50% 100%);
  margin-top: -1rem;
  padding-top: 3.5rem;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.25rem 2rem;
  margin-bottom: 1rem;
}

.brand--foot {
  color: #fff;
  font-family: var(--display);
  font-weight: 600;
}

.brand--foot img {
  border-radius: 10px;
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: center;
}

.footer nav a {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid rgba(255, 255, 255, 0.35);
  transition: border-color 0.2s ease;
}

.footer nav a:hover,
.footer nav a:focus-visible {
  border-color: #fff;
  outline: none;
}

.footer > p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
  font-weight: 600;
}

/* —— Modal & lightbox —— */
.modal {
  border: none;
  padding: 0;
  background: transparent;
  max-width: calc(100% - 2rem);
}

.modal::backdrop {
  background: rgba(74, 35, 64, 0.55);
  backdrop-filter: blur(4px);
}

.modal__box {
  background: #fff;
  border-radius: 28px;
  padding: 2rem 1.75rem 1.75rem;
  max-width: 400px;
  margin: auto;
  text-align: center;
  border: 4px solid var(--pink-soft);
  box-shadow: var(--shadow);
  position: relative;
}

.modal__box h2 {
  font-family: var(--display);
  margin: 0 0 0.5rem;
  color: var(--pink-deep);
}

.modal__box p {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-weight: 600;
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--pink-soft);
  color: var(--pink-deep);
  display: grid;
  place-items: center;
  transition: background 0.2s ease;
}

.modal__close:hover {
  background: #ffcce0;
}

.modal__close i {
  width: 20px;
  height: 20px;
}

.lightbox {
  border: none;
  padding: 1rem;
  background: transparent;
  max-width: min(420px, calc(100% - 1.5rem));
}

.lightbox::backdrop {
  background: rgba(30, 12, 28, 0.78);
}

.lightbox img {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  object-position: center;
  border-radius: 16px;
  border: 6px solid #fff;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.4);
  background: #1a0f18;
}

.lightbox .modal__close {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 2;
}

@media (max-width: 1100px) and (min-width: 721px) {
  .polaroids {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .polaroid--1,
  .polaroid--2,
  .polaroid--3,
  .polaroid--4,
  .polaroid--5 {
    margin-top: 0.5rem;
  }
}

/* —— Responsive —— */
@media (max-width: 860px) {
  .trail__path::before {
    left: 24px;
    transform: none;
  }

  .trail__step {
    grid-template-columns: auto 1fr;
    column-gap: 0.85rem;
  }

  .trail__step .trail__badge {
    grid-column: 1;
    grid-row: 1;
  }

  .trail__step--left .trail__bubble,
  .trail__step--right .trail__bubble {
    grid-column: 2;
    grid-row: 1;
    justify-self: stretch;
    width: auto;
    max-width: none;
    text-align: left;
  }

  .trail__step--left .trail__icon {
    margin-left: 0;
  }
}

@media (max-width: 720px) {
  .nav__links {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: var(--gutter);
    right: var(--gutter);
    flex-direction: column;
    background: #fff;
    border-radius: 24px;
    padding: 12px;
    box-shadow: var(--shadow);
    border: 3px solid var(--pink-soft);
  }

  .nav__links.is-open {
    display: flex;
  }

  .nav__toggle {
    display: inline-flex;
  }

  .nav__capsule {
    position: relative;
    border-radius: 28px;
  }

  .nav .btn--candy {
    display: none;
  }

  .hero__shelf {
    margin-top: 1.15rem;
    border-radius: 28px;
  }

  .logo-mark {
    -webkit-text-stroke-width: 2px;
  }

  .polaroids {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-inline: 0.25rem;
  }

  .polaroid--1,
  .polaroid--2,
  .polaroid--3,
  .polaroid--4,
  .polaroid--5 {
    margin-top: 0;
  }

  .polaroid:nth-child(5) {
    grid-column: 1 / -1;
    max-width: 200px;
  }
}

@media (max-width: 480px) {
  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .store-btn {
    justify-content: center;
    width: 100%;
  }

  .polaroids {
    gap: 0.85rem;
  }

  .polaroid span {
    font-size: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .float {
    animation: none;
  }

  .btn,
  .store-btn,
  .polaroid,
  .nav__capsule {
    transition: none;
  }
}
