/* ============================================================
   ZYSTACK — Invitation Worlds gallery
   Hero + kartu tema (desain sebelumnya). Section, filter, dan
   grid memakai komponen bawaan Zystack (zh-section, zh-filters,
   .grid, .grid-item) + Isotope dari main.js.
   ============================================================ */
.iw {
  --primary: #3249b3;
  --primary-dark: #263a94;
  --accent: #f8d458;
  --ink: #10163a;
  --muted: #5b6478;
  --line: #e8ecf6;
  --soft: #f6f8ff;
  --display: "Jost", sans-serif;
  --sans: "Poppins", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  background: var(--soft);
  color: var(--ink);
  font-family: var(--sans);
  overflow-x: clip;
}
.iw *, .iw *::before, .iw *::after { box-sizing: border-box; }
.iw a { color: inherit; }
.iw img { display: block; max-width: 100%; }
.iw button, .iw input { font: inherit; }

/* ---------- BUTTONS (hero) ---------- */
.iw .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; border: 1px solid transparent;
  font-size: 13px; font-weight: 600; line-height: 1; text-decoration: none;
  cursor: pointer; transition: 0.25s ease; white-space: nowrap;
}
.iw .btn i { font-size: 16px; }
.iw .btn--accent { background: var(--accent); color: var(--ink); }
.iw .btn--accent:hover { background: #f2c93a; transform: translateY(-2px); box-shadow: 0 14px 30px rgba(248, 212, 88, 0.25); }
.iw .btn--glass { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.3); color: #fff; }
.iw .btn--glass:hover { background: rgba(255, 255, 255, 0.2); transform: translateY(-2px); }

/* ---------- HERO ---------- */
.iw .hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, #182459 0%, #3249b3 58%, #4b68df 100%);
}
.iw .hero__bg { position: absolute; inset: 0; pointer-events: none; }
.iw .hero__bg span { position: absolute; border-radius: 50%; }
.iw .hero__bg span:nth-child(1) {
  top: -180px; right: -120px; width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(248, 212, 88, 0.3) 0%, rgba(248, 212, 88, 0) 70%);
}
.iw .hero__bg span:nth-child(2) {
  bottom: -220px; left: -160px; width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(157, 186, 254, 0.4) 0%, rgba(157, 186, 254, 0) 70%);
}
.iw .hero__bg span:nth-child(3) {
  top: 30%; left: 42%; width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
}
.iw .hero__inner {
  position: relative; z-index: 2; max-width: 1200px; margin: 0 auto;
  padding: 150px 20px 76px; display: grid; gap: 40px;
}
.iw .hero__copy { max-width: 660px; }
.iw .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: #fff;
}
.iw .eyebrow i { font-size: 15px; color: var(--accent); }
.iw .hero h1 {
  font-family: var(--display); font-weight: 700; color: #fff;
  font-size: clamp(2.35rem, 6.4vw, 4.15rem); line-height: 1.05;
  letter-spacing: -0.02em; margin: 18px 0;
}
.iw .hero h1 span { color: var(--accent); }
.iw .hero__lead {
  max-width: 56ch; margin: 0 0 28px;
  font-size: 14.5px; line-height: 1.8; color: rgba(255, 255, 255, 0.8);
}
.iw .hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 34px; }
.iw .hero__stats { display: flex; flex-wrap: wrap; gap: 22px; }
.iw .hero__stats div { padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, 0.22); }
.iw .hero__stats strong {
  display: block; font-family: var(--display); font-size: 27px;
  font-weight: 700; line-height: 1; color: #fff;
}
.iw .hero__stats span {
  display: block; margin-top: 6px; font-size: 9.5px;
  letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.62);
}
.iw .hero__visual { position: relative; display: none; min-height: 410px; }
.iw .hero__glow {
  position: absolute; inset: 12% 8%;
  background: radial-gradient(circle, rgba(248, 212, 88, 0.22), transparent 65%);
  filter: blur(20px);
}
.iw .hero__preview {
  position: absolute; margin: 0; overflow: hidden;
  border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.2);
  background: #0b1020; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}
.iw .hero__preview img { width: 100%; height: 100%; object-fit: cover; }
.iw .hero__preview--main {
  width: 76%; aspect-ratio: 16 / 10; top: 32px; left: 10%;
  transform: rotate(-2deg); z-index: 2;
  animation: iwFloat 7s ease-in-out infinite;
}
.iw .hero__preview--one {
  width: 50%; aspect-ratio: 16 / 10; top: -12px; right: -8px;
  transform: rotate(4deg); z-index: 3;
  animation: iwFloatAlt 8s ease-in-out infinite;
}
.iw .hero__preview--two {
  width: 50%; aspect-ratio: 16 / 10; bottom: -10px; left: -8px;
  transform: rotate(-5deg); z-index: 1;
  animation: iwFloatTwo 9s ease-in-out infinite;
}
.iw .hero__pill {
  position: absolute; right: 4px; bottom: 18px; z-index: 4;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px; border-radius: 999px;
  background: #fff; color: var(--ink); font-size: 11px; font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}
.iw .hero__pill i { color: var(--primary); font-size: 15px; }
@keyframes iwFloat {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-10px) rotate(-2deg); }
}
@keyframes iwFloatAlt {
  0%, 100% { transform: translateY(0) rotate(4deg); }
  50% { transform: translateY(-8px) rotate(4deg); }
}
@keyframes iwFloatTwo {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-8px) rotate(-5deg); }
}
.iw .hero__marquee {
  position: relative; z-index: 2; overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 16, 40, 0.16); padding: 13px 0;
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.iw .marquee__track { display: flex; gap: 30px; width: max-content; animation: iwMarquee 42s linear infinite; }
.iw .marquee__track span {
  font-family: var(--display); font-size: 12px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55); white-space: nowrap;
}
.iw .marquee__track span::after { content: "·"; margin-left: 30px; color: rgba(255, 255, 255, 0.22); }
@keyframes iwMarquee { to { transform: translateX(-50%); } }

/* ---------- KARTU TEMA (desain sebelumnya) ---------- */
.iw .zh-templates-page { background: var(--soft); }

.iw .theme-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 10px 30px rgba(16, 22, 58, 0.04);
  transition: transform 0.35s var(--ease), box-shadow 0.35s, border-color 0.35s;
  animation: iwCardIn 0.55s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 32ms);
}
@keyframes iwCardIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.iw .theme-card:hover,
.iw .theme-card:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(50, 73, 179, 0.38);
  box-shadow: 0 24px 50px rgba(16, 22, 58, 0.12);
}
.iw .theme-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #eef2fb;
}
.iw .theme-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.iw .theme-card:hover .theme-card__media img { transform: scale(1.04); }
.iw .theme-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(16, 22, 58, 0.22), transparent 48%);
  opacity: 0;
  transition: opacity 0.3s;
}
.iw .theme-card:hover .theme-card__media::after { opacity: 1; }
.iw .theme-card__num {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: #fff;
  color: var(--ink);
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(16, 22, 58, 0.12);
}
.iw .theme-card__cat {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: var(--primary);
  color: #fff;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 999px;
}
.iw .theme-card__open {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: var(--primary);
  font-size: 10.5px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(6px);
  transition: 0.3s;
  box-shadow: 0 6px 18px rgba(16, 22, 58, 0.16);
}
.iw .theme-card:hover .theme-card__open { opacity: 1; transform: none; }
.iw .theme-card__body {
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.iw .theme-card__body h3 {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
}
.iw .theme-card__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}
.iw .theme-card__body p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
}
.iw .theme-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
}
.iw .theme-card__tags span {
  font-size: 9.5px;
  font-weight: 500;
  color: var(--primary);
  background: rgba(50, 73, 179, 0.07);
  padding: 4px 8px;
  border-radius: 6px;
}
.iw .theme-card__bar {
  height: 3px;
  background: linear-gradient(to right, var(--accent, var(--primary)), var(--primary));
  opacity: 0.75;
}

/* ---------- RESPONSIVE ---------- */
@media (min-width: 900px) {
  .iw .hero__inner { grid-template-columns: 1.05fr 0.95fr; align-items: center; }
  .iw .hero__visual { display: block; }
}
@media (max-width: 899px) {
  .iw .hero__inner { padding-top: 118px; padding-bottom: 60px; }
}
@media (max-width: 480px) {
  .iw .hero__stats { gap: 16px; }
  .iw .hero__stats div { padding-left: 11px; }
  .iw .hero__stats strong { font-size: 22px; }
  .iw .hero__stats span { font-size: 8.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .iw .marquee__track, .iw .hero__preview { animation: none !important; }
  .iw *, .iw *::before, .iw *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
