/* ============================================
   My Story — Splash Landing Page
   Visually stunning, single-viewport, no-scroll
   ============================================ */

/* ---- Page Container ---- */
.splash {
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg,
    #FFF5F0 0%,
    #FFE8D6 20%,
    #F5E6FF 45%,
    #E0F2FE 70%,
    #ECFDF5 100%
  );
  background-size: 400% 400%;
  animation: splash-gradient 18s ease infinite;
}

@keyframes splash-gradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---- Animated Background Blobs ---- */
.splash__blobs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.splash__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: splash-blob-drift 20s ease-in-out infinite;
}

.splash__blob--1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(254, 91, 34, 0.35), transparent 70%);
  top: -10%;
  inset-inline-start: -5%;
  animation-delay: 0s;
}

.splash__blob--2 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.3), transparent 70%);
  bottom: -10%;
  inset-inline-end: -5%;
  animation-delay: -7s;
}

.splash__blob--3 {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.2), transparent 70%);
  top: 50%;
  inset-inline-start: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -13s;
}

@keyframes splash-blob-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(30px, -20px) scale(1.05); }
  66%      { transform: translate(-20px, 15px) scale(0.95); }
}

/* ---- Floating Particles ---- */
.splash__particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.splash__particle {
  position: absolute;
  left: var(--x);
  top: var(--y);
  font-size: var(--s);
  animation: splash-particle-float 5s ease-in-out infinite;
  animation-delay: var(--d);
  opacity: 0.55;
  will-change: transform;
}

@keyframes splash-particle-float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25%      { transform: translate(8px, -12px) rotate(6deg); }
  50%      { transform: translate(-4px, -20px) rotate(-4deg); }
  75%      { transform: translate(6px, -8px) rotate(3deg); }
}

/* ---- Header ---- */
.splash__header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 2vh, 1.5rem) var(--space-lg) 0;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.splash__logo img {
  height: clamp(48px, 7vh, 72px);
  width: auto;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.08));
}

/* ---- Main Content ---- */
.splash__main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-md) var(--space-lg);
  text-align: center;
  min-height: 0;
  position: relative;
  z-index: 10;
}

.splash__heading {
  font-size: clamp(1.5rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--color-text-dark);
  margin-bottom: 0.25rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.splash__heading-accent {
  background: linear-gradient(135deg, #FE5B22 0%, #EC4899 50%, #8B5CF6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.splash__sub {
  font-size: clamp(0.9rem, 1.5vw, 1.15rem);
  color: var(--color-text-muted);
  margin-bottom: clamp(1rem, 3vh, 2rem);
  font-weight: 500;
}

/* ---- Cards Grid ---- */
.splash__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 2.5vw, 2rem);
  max-width: 760px;
  width: 100%;
}

/* ---- Glass Card ---- */
.splash-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(1.25rem, 3vh, 2rem) clamp(1rem, 2vw, 1.75rem);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 24px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.06),
    inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              box-shadow 0.35s ease,
              border-color 0.3s ease;
  color: var(--color-text-dark);
  position: relative;
  overflow: hidden;
}

.splash-card::after {
  content: '';
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  block-size: 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.splash-card--books::after {
  background: linear-gradient(90deg, #FE5B22, #EC4899);
}

.splash-card--store::after {
  background: linear-gradient(90deg, #6366F1, #3B82F6);
}

.splash-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.splash-card:hover::after {
  opacity: 1;
}

/* ---- Card Icon (SVG illustration) ---- */
.splash-card__icon {
  width: clamp(60px, 10vh, 90px);
  height: clamp(60px, 10vh, 90px);
  margin-bottom: clamp(0.5rem, 1.2vh, 0.75rem);
  animation: splash-icon-bounce 3.5s ease-in-out infinite;
}

.splash-card__icon svg {
  width: 100%;
  height: 100%;
}

@keyframes splash-icon-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

/* ---- Card Text ---- */
.splash-card__title {
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  font-weight: 800;
  color: var(--color-text-dark);
  margin-bottom: 0.3rem;
  letter-spacing: -0.01em;
}

.splash-card__desc {
  font-size: clamp(0.78rem, 1.1vw, 0.88rem);
  color: var(--color-text-muted);
  line-height: 1.4;
  margin-bottom: clamp(0.6rem, 1.5vh, 1rem);
}

/* ---- CTA Buttons ---- */
.splash-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.65rem 1.25rem;
  font-size: clamp(0.8rem, 1.1vw, 0.9rem);
  font-weight: 700;
  border-radius: 50px;
  margin-block-start: auto;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.splash-card__btn svg {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.splash-card:hover .splash-card__btn svg {
  transform: translateX(4px);
}

.splash-card__btn--books {
  background: linear-gradient(135deg, #FE5B22, #F97316);
  color: #FFF;
  box-shadow: 0 4px 16px rgba(254, 91, 34, 0.3);
}

.splash-card:hover .splash-card__btn--books {
  box-shadow: 0 6px 24px rgba(254, 91, 34, 0.4);
  transform: translateY(-1px);
}

.splash-card__btn--store {
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  color: #FFF;
  box-shadow: 0 4px 16px rgba(30, 27, 75, 0.3);
}

.splash-card:hover .splash-card__btn--store {
  box-shadow: 0 6px 24px rgba(30, 27, 75, 0.4);
  transform: translateY(-1px);
}

/* ---- Footer ---- */
.splash__footer {
  flex-shrink: 0;
  text-align: center;
  padding: var(--space-sm) var(--space-lg);
  position: relative;
  z-index: 10;
}

.splash__footer-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: 0.25rem;
}

.splash__dot {
  color: var(--color-border);
  user-select: none;
}

.splash__flink {
  font-size: var(--font-size-sm);
  color: var(--color-text-body);
  font-weight: 500;
  transition: color 0.15s ease;
}

.splash__flink:hover {
  color: var(--color-primary);
}

.splash__copy {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin: 0;
}

.splash__footer-row .lang-toggle {
  font-size: var(--font-size-xs);
  padding: 0.3rem 0.7rem;
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .splash__cards {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    max-width: 400px;
  }

  .splash-card {
    padding: 1rem 0.75rem;
    border-radius: 18px;
  }

  .splash__logo img {
    height: 44px;
  }

  .splash__header {
    padding-top: 0.5rem;
  }

  .splash__footer {
    padding: 0.4rem var(--space-md);
  }

  .splash__blob--1 { width: 200px; height: 200px; }
  .splash__blob--2 { width: 180px; height: 180px; }
  .splash__blob--3 { width: 140px; height: 140px; }

  /* Hide some particles on mobile */
  .splash__particle:nth-child(n+6) {
    display: none;
  }
}

@media (max-width: 360px) {
  .splash__cards {
    gap: 0.5rem;
  }

  .splash-card {
    padding: 0.75rem 0.5rem;
  }

  .splash-card__icon {
    width: 50px;
    height: 50px;
  }

  .splash-card__btn {
    padding: 0.5rem 0.5rem;
    font-size: 0.75rem;
  }
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
  .splash {
    animation: none;
    background-position: 0% 50%;
  }
  .splash__blob {
    animation: none;
  }
  .splash__particle {
    animation: none;
    opacity: 0.4;
  }
  .splash-card__icon {
    animation: none;
  }
  .splash-card {
    transition: none;
  }
  .splash-card__btn svg {
    transition: none;
  }
}
