/* Dreamy Downloads — shared styles */
:root {
  --lavender: #c9b6f2;
  --lavender-deep: #9a7fe0;
  --pink: #f7b8d2;
  --pink-deep: #ee8db8;
  --blue: #b5dcf5;
  --blue-deep: #7fbfeb;
  --cream: #fff8fc;
  --ink: #4a3b66;
  --ink-soft: #7a6b94;
  --card: rgba(255, 255, 255, 0.72);
  --line: rgba(154, 127, 224, 0.22);
  --shadow: 0 18px 50px -18px rgba(122, 90, 200, 0.35);
  --grad: linear-gradient(120deg, var(--lavender) 0%, var(--pink) 50%, var(--blue) 100%);
  --grad-deep: linear-gradient(120deg, var(--lavender-deep) 0%, var(--pink-deep) 50%, var(--blue-deep) 100%);
  --script: 'Dancing Script', cursive;
  --fancy: 'Great Vibes', cursive;
  --body: 'Quicksand', system-ui, sans-serif;
  --radius: 22px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--cream);
  background-image:
    radial-gradient(circle at 10% 60%, rgba(247, 184, 210, 0.25), transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(181, 220, 245, 0.3), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(201, 182, 242, 0.25), transparent 50%);
  background-attachment: fixed;
  line-height: 1.6;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(16px, 4vw, 48px);
  transition: background .3s, box-shadow .3s, padding .3s;
}
.nav.scrolled { background: rgba(255, 248, 252, 0.82); backdrop-filter: blur(14px); box-shadow: 0 6px 24px -12px rgba(122, 90, 200, .3); padding-block: 10px; }
.logo { font-family: var(--fancy); font-size: clamp(30px, 4vw, 40px); text-decoration: none; color: #fff; text-shadow: 0 2px 18px rgba(122, 90, 200, .45); transition: color .3s; }
.nav.scrolled .logo { color: var(--lavender-deep); text-shadow: none; }
.logo-link { display: block; line-height: 0; background: rgba(255, 255, 255, .78); backdrop-filter: blur(10px); border-radius: 999px; padding: 4px 18px; box-shadow: 0 8px 26px -10px rgba(122, 90, 200, .45); transition: background .3s, box-shadow .3s; }
.nav.scrolled .logo-link { background: transparent; box-shadow: none; backdrop-filter: none; }
.logo-img { display: block; height: clamp(64px, 9vw, 96px); width: auto; max-width: 70vw; object-fit: contain; }
.logo-link { padding: 0 10px; }
.nav.scrolled .logo-img { height: 60px; }
.footer-logo { height: clamp(70px, 10vw, 110px); margin: 0 auto; }
.nav-links { display: flex; gap: clamp(12px, 3vw, 32px); list-style: none; }
.nav-links a { text-decoration: none; font-weight: 600; color: #fff; text-shadow: 0 1px 10px rgba(74, 59, 102, .35); font-size: 15px; }
.nav.scrolled .nav-links a { color: var(--ink); text-shadow: none; }
.nav-links a:hover { color: var(--pink-deep) !important; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: max(50vh, 460px); height: 50vh;
  display: grid; place-items: center; text-align: center; overflow: hidden;
  border-radius: 0 0 48px 48px;
}
.hero-img { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.06); animation: drift 22s ease-in-out infinite alternate; }
.hero-tint { position: absolute; inset: 0; background: linear-gradient(125deg, #9a7fe0 0%, #ee8db8 50%, #7fbfeb 100%); opacity: .5; mix-blend-mode: normal; }
.hero-glow { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(255,255,255,.35), transparent 65%); }
.hero-content { position: relative; z-index: 2; padding: 90px 16px 40px; max-width: 820px; }
.hero h1 { font-family: var(--script); font-weight: 700; font-size: clamp(48px, 9vw, 104px); line-height: 1.02; color: #fff; text-shadow: 0 4px 30px rgba(74, 59, 102, .35); }
.hero p { margin: 18px auto 30px; font-size: clamp(16px, 2vw, 20px); color: #fff; max-width: 560px; font-weight: 500; text-shadow: 0 1px 12px rgba(74, 59, 102, .4); }
@keyframes drift { from { transform: scale(1.06) translate(0, 0); } to { transform: scale(1.14) translate(-2%, 1%); } }

.sparkle { position: absolute; z-index: 1; color: #fff; pointer-events: none; animation: twinkle 3s ease-in-out infinite; text-shadow: 0 0 12px #fff; }
@keyframes twinkle { 0%, 100% { opacity: .15; transform: scale(.6) rotate(0); } 50% { opacity: 1; transform: scale(1.1) rotate(25deg); } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px;
  padding: 14px 30px; font-weight: 700; font-size: 16px; text-decoration: none; color: #fff;
  background: var(--grad-deep); background-size: 200% 200%; box-shadow: 0 12px 30px -10px rgba(154, 127, 224, .7);
  transition: transform .2s, box-shadow .2s, background-position .5s;
}
.btn:hover { transform: translateY(-2px); background-position: 100% 0; box-shadow: 0 16px 34px -10px rgba(238, 141, 184, .8); }
.btn.white { background: #fff; color: var(--lavender-deep); }
.btn.ghost { background: transparent; color: var(--ink); border: 2px solid var(--line); box-shadow: none; }
.btn.small { padding: 9px 18px; font-size: 14px; }
.btn.danger { background: linear-gradient(120deg, #f59bb0, #ee7d9c); }
.btn:disabled { opacity: .55; pointer-events: none; }

/* ---------- Sections ---------- */
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.section-head { text-align: center; margin: 80px 0 36px; }
.section-head h2 { font-family: var(--script); font-size: clamp(40px, 6vw, 60px); font-weight: 700; background: var(--grad-deep); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.15; }
.section-head p { color: var(--ink-soft); margin-top: 6px; }

/* Main product tiles */
.collections { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.collection {
  position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; text-decoration: none;
  box-shadow: var(--shadow); transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
.collection img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.collection:hover { transform: translateY(-6px) rotate(-.6deg); }
.collection:hover img { transform: scale(1.08); }
.collection .label {
  position: absolute; inset: auto 0 0 0; padding: 50px 18px 18px; text-align: center;
  background: linear-gradient(transparent, rgba(74, 59, 102, .45));
  color: #fff; font-family: var(--script); font-size: clamp(26px, 2.6vw, 34px); font-weight: 700;
}
.collection .count { position: absolute; top: 14px; right: 14px; background: rgba(255, 255, 255, .85); color: var(--lavender-deep); font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; }

/* Product groups */
.group { margin-top: 90px; scroll-margin-top: 90px; }
.group-head { display: flex; align-items: center; gap: 22px; margin-bottom: 26px; }
.group-head img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow); border: 4px solid #fff; flex: none; }
.group-head h3 { font-family: var(--script); font-size: clamp(34px, 4.5vw, 48px); line-height: 1.1; color: var(--lavender-deep); }
.group-head p { color: var(--ink-soft); }
.subs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.sub {
  background: var(--card); backdrop-filter: blur(10px); border: 1px solid #fff; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); cursor: pointer; transition: transform .3s, box-shadow .3s; text-align: left; color: inherit; font: inherit; padding: 0;
}
.sub:hover { transform: translateY(-6px); box-shadow: 0 26px 60px -20px rgba(238, 141, 184, .55); }
.media { position: relative; aspect-ratio: 16 / 9; background: var(--grad); overflow: hidden; }
.media img, .media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media video { opacity: 0; transition: opacity .4s; }
.sub:hover .media video, .sub.playing .media video { opacity: 1; }
.play {
  position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; translate: -50% -50%; border-radius: 50%;
  background: rgba(255, 255, 255, .85); display: grid; place-items: center; box-shadow: 0 8px 24px rgba(122, 90, 200, .35); transition: opacity .3s, scale .3s;
}
.play::after { content: ''; margin-left: 4px; border-style: solid; border-width: 10px 0 10px 16px; border-color: transparent transparent transparent var(--pink-deep); }
.sub:hover .play { opacity: 0; scale: .7; }
.sub-body { padding: 18px 20px 22px; }
.sub-body h4 { font-size: 18px; font-weight: 700; }
.sub-body p { color: var(--ink-soft); font-size: 14px; margin: 4px 0 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sub-foot { display: flex; align-items: center; justify-content: space-between; }
.price { font-family: var(--script); font-size: 30px; font-weight: 700; color: var(--pink-deep); }
.tag { font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: var(--grad); color: var(--ink); }

/* Perks band */
.perks { margin: 100px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.perk { background: var(--card); border: 1px solid #fff; border-radius: var(--radius); padding: 28px; text-align: center; box-shadow: var(--shadow); }
.perk .ico { font-size: 30px; }
.perk h5 { font-family: var(--script); font-size: 28px; color: var(--lavender-deep); margin: 6px 0 4px; }
.perk p { color: var(--ink-soft); font-size: 14px; }

footer { margin-top: 100px; padding: 50px 16px; text-align: center; background: var(--grad); border-radius: 48px 48px 0 0; }
footer .logo { color: var(--ink); text-shadow: none; }
footer p { color: var(--ink-soft); font-size: 14px; margin-top: 6px; }
footer a { font-size: 13px; color: var(--ink-soft); }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(74, 59, 102, .45); backdrop-filter: blur(8px); opacity: 0; pointer-events: none; transition: opacity .3s; }
.modal.open { opacity: 1; pointer-events: auto; }
.modal-card { width: min(860px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--cream); border-radius: 28px; box-shadow: 0 40px 100px -20px rgba(74, 59, 102, .6); transform: translateY(20px) scale(.97); transition: transform .35s cubic-bezier(.2, .8, .2, 1); position: relative; }
.modal.open .modal-card { transform: none; }
.modal-card video { width: 100%; aspect-ratio: 16 / 9; background: var(--grad); object-fit: cover; }
.modal-body { padding: 26px 30px 32px; display: grid; grid-template-columns: 1fr auto; gap: 18px 30px; align-items: start; }
.modal-body h3 { font-family: var(--script); font-size: 42px; line-height: 1.1; color: var(--lavender-deep); }
.modal-body .crumb { font-size: 13px; font-weight: 700; color: var(--pink-deep); text-transform: uppercase; letter-spacing: .08em; }
.modal-body .desc { grid-column: 1 / -1; color: var(--ink-soft); }
.modal-buy { text-align: right; }
.modal-buy .price { font-size: 44px; display: block; line-height: 1; margin-bottom: 10px; }
.close { position: absolute; top: 14px; right: 14px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); font-size: 22px; color: var(--ink); box-shadow: 0 6px 18px rgba(74, 59, 102, .25); }

.toast { position: fixed; left: 50%; bottom: 24px; translate: -50% 0; z-index: 200; background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 14px; opacity: 0; transition: opacity .3s, translate .3s; pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; translate: -50% -8px; }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s, transform .8s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .collections { grid-template-columns: repeat(2, 1fr); }
  .subs { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .subs, .perks { grid-template-columns: 1fr; }
  .collections { gap: 14px; }
  .nav-links { display: none; }
  .modal-body { grid-template-columns: 1fr; padding: 22px; }
  .modal-buy { text-align: left; }
  .group-head img { width: 64px; height: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  *, .hero-img, .sparkle { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
