/* =========================================
   Purracle — shared styles
   ========================================= */

:root {
  --bg: #000000;
  --bg-soft: #0a0a0a;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-strong: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f5f0e6;
  --text-dim: #b8b2c4;
  --text-muted: #7a7488;
  --accent: #c084fc;
  --accent-pink: #ec4899;
  --accent-violet: #8b5cf6;
  --headline: #f6ebcf;

  --gradient-neon: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  --gradient-glow: radial-gradient(circle at 20% 30%, rgba(168, 85, 247, 0.45) 0%, rgba(168, 85, 247, 0) 55%);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --maxw: 1200px;

  --font-display: "Cormorant Garamond", "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--accent);
}

img,
svg {
  display: block;
  max-width: 100%;
}

/* =========================================
   Layout helpers
   ========================================= */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================
   Header
   ========================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 22px 0;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(0, 0, 0, 0.70);
  border-bottom: 1px solid transparent;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand__logo {
  height: 26px;
  width: auto;
}

.brand__mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--gradient-neon);
  box-shadow: 0 0 18px rgba(192, 132, 252, 0.55);
}

.nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav a {
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.nav a:hover {
  color: var(--text);
}

/* Language switcher */
.lang {
  position: relative;
}

.lang__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.lang__btn:hover {
  background: var(--bg-card-strong);
  border-color: rgba(255, 255, 255, 0.22);
}

.lang__flag {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.lang__chevron {
  width: 12px;
  height: 12px;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.lang.is-open .lang__chevron {
  transform: rotate(180deg);
}

.lang__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: rgba(17, 8, 32, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.lang.is-open .lang__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang__option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
}

.lang__option:hover {
  background: rgba(255, 255, 255, 0.06);
}

.lang__option.is-active {
  background: rgba(168, 85, 247, 0.15);
  color: var(--accent);
}

/* =========================================
   Hero
   ========================================= */
.hero {
  position: relative;
  min-height: calc(100vh - 92px);
  display: flex;
  align-items: center;
  padding: 40px 0 80px;
  overflow: hidden;
  background: #000000;
}

.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(46px);
  pointer-events: none;
  z-index: 0;
}

.hero__glow--purple {
  width: 504px;
  height: 504px;
  left: -200px;
  top: -208px;
  background: radial-gradient(50% 50% at 50% 50%, #8332A5 0%, #000000 100%);
  opacity: 0.6;
}

.hero__glow--red {
  width: 770px;
  height: 770px;
  right: -110px;
  top: 50%;
  transform: translateY(calc(-50% - 88px));
  background: radial-gradient(50% 50% at 50% 50%, #A53234 0%, #000000 100%);
  opacity: 0.7;
}

.hero__inner {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 60px;
  position: relative;
  z-index: 2;
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 62px;
  width: 576px;
  max-width: 100%;
  flex-shrink: 0;
}

.hero__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
  width: 100%;
}

.hero__title {
  font-family: "DM Sans", sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 56px;
  line-height: 72px;
  letter-spacing: 0;
  color: #EBD3FF;
  margin: 0;
  width: 100%;
}

.hero__subtitle {
  font-family: "DM Sans", sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 24px;
  line-height: 35px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  width: 100%;
}

/* Store buttons (image-based) */
.store-buttons {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
}

.store-btn {
  display: inline-block;
  line-height: 0;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.store-btn img {
  height: 57px;
  width: auto;
  display: block;
}

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

/* Hero visual (cat) */
.hero__visual {
  position: relative;
  width: 588px;
  height: 651px;
  flex-shrink: 0;
  flex-grow: 0;
}

.hero__cat {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Fireflies around the cat
   Two-layer structure: outer wrapper drifts along an organic path,
   inner core twinkles in size/opacity, creating a living particle. */
.sparkle {
  position: absolute;
  width: 14px;
  height: 14px;
  z-index: 3;
  pointer-events: none;
  will-change: transform, opacity;
}

.sparkle::before,
.sparkle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Outer soft halo */
.sparkle::before {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    rgba(255, 245, 220, 0.95) 0%,
    rgba(255, 220, 170, 0.55) 25%,
    rgba(255, 180, 110, 0.18) 55%,
    rgba(255, 180, 110, 0) 75%
  );
  filter: blur(1px);
}

/* Inner bright 4-point star core */
.sparkle::after {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at center, #fff 0%, #fff 12%, rgba(255, 255, 255, 0) 22%),
    linear-gradient(0deg,   rgba(255, 255, 255, 0) 46%, #fff 50%, rgba(255, 255, 255, 0) 54%),
    linear-gradient(90deg,  rgba(255, 255, 255, 0) 47%, #fff 50%, rgba(255, 255, 255, 0) 53%);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%, 30% 100%, 100% 30%;
  filter: drop-shadow(0 0 4px #fff) drop-shadow(0 0 10px rgba(255, 215, 160, 0.85));
  animation: firefly-pulse 2.4s ease-in-out infinite;
}

/* Individual placements + drift animations */
.sparkle--1  { top: 6%;   left: 18%; width: 14px; height: 14px; animation: drift-a 11s ease-in-out infinite; }
.sparkle--2  { top: 14%;  left: 72%; width: 10px; height: 10px; animation: drift-b 9s  ease-in-out infinite; animation-delay: -1.5s; }
.sparkle--3  { top: 30%;  left: 4%;  width: 12px; height: 12px; animation: drift-c 13s ease-in-out infinite; animation-delay: -3s;   }
.sparkle--4  { top: 22%;  left: 88%; width: 16px; height: 16px; animation: drift-d 14s ease-in-out infinite; animation-delay: -5s;   }
.sparkle--5  { top: 48%;  left: 2%;  width: 8px;  height: 8px;  animation: drift-e 8s  ease-in-out infinite; animation-delay: -2s;   }
.sparkle--6  { top: 52%;  left: 94%; width: 12px; height: 12px; animation: drift-f 12s ease-in-out infinite; animation-delay: -4s;   }
.sparkle--7  { top: 70%;  left: 8%;  width: 10px; height: 10px; animation: drift-g 10s ease-in-out infinite; animation-delay: -6s;   }
.sparkle--8  { top: 78%;  left: 86%; width: 14px; height: 14px; animation: drift-h 13s ease-in-out infinite; animation-delay: -1s;   }
.sparkle--9  { top: 38%;  left: 52%; width: 8px;  height: 8px;  animation: drift-i 9s  ease-in-out infinite; animation-delay: -3.5s; }
.sparkle--10 { top: 90%;  left: 42%; width: 12px; height: 12px; animation: drift-j 11s ease-in-out infinite; animation-delay: -2.5s; }

/* Per-firefly inner pulse timing variation */
.sparkle--2::after  { animation-duration: 3.1s; animation-delay: -0.4s; }
.sparkle--3::after  { animation-duration: 2.7s; animation-delay: -1.1s; }
.sparkle--4::after  { animation-duration: 3.5s; animation-delay: -0.8s; }
.sparkle--5::after  { animation-duration: 2.2s; animation-delay: -1.4s; }
.sparkle--6::after  { animation-duration: 3.0s; animation-delay: -0.6s; }
.sparkle--7::after  { animation-duration: 2.5s; animation-delay: -1.7s; }
.sparkle--8::after  { animation-duration: 3.3s; animation-delay: -0.2s; }
.sparkle--9::after  { animation-duration: 2.1s; animation-delay: -0.9s; }
.sparkle--10::after { animation-duration: 2.9s; animation-delay: -1.3s; }

/* =========================================
   Features section (homepage second block)
   ========================================= */
.features {
  padding: 20px 0 70px;
}

.features__track {
  display: flex;
  align-items: stretch;
  gap: 16px;
}

.features__item {
  flex: 1 1 0;
  min-width: 0;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.features__item img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
}

/* Core twinkle: size + opacity + rotation */
@keyframes firefly-pulse {
  0%, 100% {
    opacity: 0.25;
    transform: translate(-50%, -50%) scale(0.55) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1) rotate(45deg);
  }
}

/* Organic drift paths — each firefly follows a unique loop */
@keyframes drift-a {
  0%, 100% { transform: translate(0, 0); }
  25%      { transform: translate(18px, 22px); }
  50%      { transform: translate(-14px, 32px); }
  75%      { transform: translate(-22px, 10px); }
}
@keyframes drift-b {
  0%, 100% { transform: translate(0, 0); }
  33%      { transform: translate(-26px, 18px); }
  66%      { transform: translate(-10px, 36px); }
}
@keyframes drift-c {
  0%, 100% { transform: translate(0, 0); }
  20%      { transform: translate(28px, -12px); }
  50%      { transform: translate(40px, 22px); }
  80%      { transform: translate(12px, 28px); }
}
@keyframes drift-d {
  0%, 100% { transform: translate(0, 0); }
  30%      { transform: translate(-30px, 16px); }
  60%      { transform: translate(-44px, 42px); }
  85%      { transform: translate(-14px, 28px); }
}
@keyframes drift-e {
  0%, 100% { transform: translate(0, 0); }
  40%      { transform: translate(24px, -18px); }
  70%      { transform: translate(36px, 14px); }
}
@keyframes drift-f {
  0%, 100% { transform: translate(0, 0); }
  25%      { transform: translate(-22px, -20px); }
  60%      { transform: translate(-36px, 12px); }
  85%      { transform: translate(-10px, -8px); }
}
@keyframes drift-g {
  0%, 100% { transform: translate(0, 0); }
  35%      { transform: translate(22px, -26px); }
  70%      { transform: translate(34px, -10px); }
}
@keyframes drift-h {
  0%, 100% { transform: translate(0, 0); }
  30%      { transform: translate(-26px, -20px); }
  55%      { transform: translate(-42px, -38px); }
  80%      { transform: translate(-18px, -22px); }
}
@keyframes drift-i {
  0%, 100% { transform: translate(0, 0); }
  40%      { transform: translate(-20px, -28px); }
  75%      { transform: translate(18px, -22px); }
}
@keyframes drift-j {
  0%, 100% { transform: translate(0, 0); }
  30%      { transform: translate(20px, -18px); }
  60%      { transform: translate(-22px, -32px); }
  85%      { transform: translate(-8px, -14px); }
}

@media (prefers-reduced-motion: reduce) {
  .sparkle,
  .sparkle::after {
    animation: none;
  }
  .sparkle::after {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* =========================================
   Content pages (privacy / terms)
   ========================================= */
.page {
  padding: 60px 0 100px;
  min-height: calc(100vh - 92px);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 15px;
  margin-bottom: 36px;
  padding: 8px 0;
}

.back-link:hover {
  color: var(--text);
}

.back-link svg {
  width: 16px;
  height: 16px;
}

.doc-hero {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 48px 40px;
  margin-bottom: 28px;
}

.doc-hero__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(44px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--headline);
  margin: 0 0 14px;
}

.doc-hero__meta {
  color: var(--text-muted);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.doc-body {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 48px;
  color: var(--text-dim);
  font-size: 15.5px;
  line-height: 1.75;
}

.doc-body h2 {
  font-family: var(--font-display);
  color: var(--headline);
  font-weight: 600;
  font-size: 26px;
  margin: 36px 0 14px;
  letter-spacing: -0.005em;
}

.doc-body h2:first-child {
  margin-top: 0;
}

.doc-body h3 {
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  margin: 24px 0 10px;
}

.doc-body p {
  margin: 0 0 16px;
}

.doc-body ul,
.doc-body ol {
  padding-left: 22px;
  margin: 0 0 18px;
}

.doc-body li {
  margin-bottom: 8px;
}

.doc-body strong {
  color: var(--text);
}

.doc-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* =========================================
   Footer
   ========================================= */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 60px;
  background: rgba(8, 4, 13, 0.6);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}

.site-footer__copy {
  color: var(--text-muted);
  font-size: 13px;
}

.site-footer__links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-footer__links a {
  color: var(--text-dim);
  font-size: 14px;
}

.site-footer__links a:hover {
  color: var(--text);
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 1180px) {
  .hero__inner {
    gap: 60px;
  }

  .hero__visual {
    width: 480px;
    height: 530px;
  }

  .hero__title {
    font-size: 48px;
    line-height: 60px;
  }
}

@media (max-width: 960px) {
  .hero {
    padding: 40px 0 60px;
  }

  .hero__inner {
    flex-direction: column;
    gap: 40px;
    text-align: center;
  }

  .hero__content {
    width: 100%;
    align-items: center;
    gap: 40px;
  }

  .hero__text {
    align-items: center;
  }

  .hero__title {
    font-size: 42px;
    line-height: 1.15;
  }

  .hero__subtitle {
    font-size: 18px;
    line-height: 1.55;
  }

  .store-buttons {
    justify-content: center;
  }

  .hero__visual {
    width: 380px;
    height: 420px;
    order: -1;
  }

  .features {
    padding: 12px 0 56px;
  }

  .features .container {
    padding-right: 0;
  }

  .features__track {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 0 24px 8px 0;
    gap: 12px;
  }

  .features__track::-webkit-scrollbar {
    display: none;
  }

  .features__item {
    flex: 0 0 min(62vw, 300px);
    scroll-snap-align: start;
  }

  .nav {
    display: none;
  }

  .doc-hero,
  .doc-body {
    padding: 32px 24px;
  }

  .doc-hero__title {
    font-size: 36px;
    line-height: 1.1;
  }
}

@media (max-width: 520px) {
  .container {
    padding: 0 18px;
  }

  .site-header {
    padding: 16px 0;
  }

  .brand__logo {
    height: 22px;
  }

  .lang__btn {
    padding: 8px 12px;
    font-size: 13px;
  }

  .hero__title {
    font-size: 32px;
    line-height: 1.2;
  }

  .hero__subtitle {
    font-size: 16px;
  }

  .doc-hero__title {
    font-size: 24px;
    line-height: 1.2;
  }

  .hero__visual {
    width: 280px;
    height: 310px;
  }

  .store-btn img {
    height: 48px;
  }

  .store-buttons {
    gap: 14px;
    flex-wrap: wrap;
  }

  .hero__glow--purple {
    width: 360px;
    height: 360px;
    left: -160px;
    top: -160px;
  }

  .hero__glow--red {
    width: 500px;
    height: 500px;
    right: -180px;
  }

  .features .container {
    padding-right: 0;
  }

  .features__track {
    padding-right: 18px;
  }

  .features__item {
    flex-basis: min(78vw, 280px);
    border-radius: 16px;
  }

  .features__item img {
    min-height: 280px;
  }

  .site-footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .site-footer__links {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
  }

  .site-footer__links a {
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
  }
}
