/* ============================================
   뚝딱 Landing Page — Supanova Design System
   ============================================ */

/* --- Base & Reset --- */
html {
  scroll-behavior: smooth;
}

body {
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* --- Grain Texture Overlay --- */
.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* --- Gradient Mesh Background --- */
.gradient-mesh {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.gradient-mesh::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 77, 58, 0.12) 0%, transparent 70%);
  filter: blur(80px);
}

.gradient-mesh::after {
  content: '';
  position: absolute;
  bottom: -10%;
  left: -10%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
  filter: blur(80px);
}

/* --- Glass Components --- */
.glass-pill {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.glass-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* --- Navigation --- */
nav {
  transition: transform 0.3s ease;
}

.nav-scrolled .glass-pill {
  background: rgba(10, 10, 10, 0.85);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0s; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 0.12s; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 0.24s; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 0.36s; }
.reveal-stagger > .reveal:nth-child(5) { transition-delay: 0.48s; }

/* --- Hero Fade-in --- */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-animate {
  animation: fadeSlideUp 0.8s ease-out forwards;
  opacity: 0;
}

.hero-animate-delay-1 { animation-delay: 0.15s; }
.hero-animate-delay-2 { animation-delay: 0.3s; }
.hero-animate-delay-3 { animation-delay: 0.5s; }

/* --- Floating App Cards --- */
@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.floating-card {
  animation: floatCard 4s ease-in-out infinite;
}

.floating-card.card-1 { animation-delay: 0s; animation-duration: 3.8s; }
.floating-card.card-2 { animation-delay: 0.6s; animation-duration: 4.2s; }
.floating-card.card-3 { animation-delay: 1.2s; animation-duration: 3.5s; }
.floating-card.card-4 { animation-delay: 0.3s; animation-duration: 4.5s; }
.floating-card.card-5 { animation-delay: 0.9s; animation-duration: 3.2s; }

/* --- Magnetic CTA Button --- */
.magnetic-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background-color: #ff4d3a;
  color: white;
  font-weight: 700;
  font-size: 1.125rem;
  border-radius: 9999px;
  box-shadow: 0 0 0 0 rgba(255, 77, 58, 0.4);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.magnetic-cta:hover {
  background-color: #ff6f64;
  transform: scale(1.02);
  box-shadow: 0 0 24px 0 rgba(255, 77, 58, 0.25);
}

.magnetic-cta:active {
  transform: scale(0.98);
}

/* --- App Card Hover --- */
.glass-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

/* --- Screenshot Styling --- */
.screenshot {
  transition: transform 0.3s ease;
}

.screenshot:hover {
  transform: scale(1.03);
}

/* --- Arrow Between Screenshots --- */
.arrow-icon {
  transition: transform 0.3s ease;
}

/* --- Phone Mockup Frame --- */
.phone-frame {
  border-radius: 20px;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.15),
    0 10px 15px -3px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

/* --- Custom Checkbox --- */
.app-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  flex-shrink: 0;
}

.app-checkbox:checked {
  border-color: transparent;
}

.app-checkbox:checked::after {
  content: '\2713';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 13px;
  font-weight: 700;
  color: white;
}

/* Per-app checkbox colors */
.app-checkbox[data-app="jjalcak"]:checked { background: #ff4d3a; }
.app-checkbox[data-app="jjikcook"]:checked { background: #f59e0b; }
.app-checkbox[data-app="contract"]:checked { background: #38bdf8; }
.app-checkbox[data-app="jeomgat"]:checked { background: #a78bfa; }
.app-checkbox[data-app="dappul"]:checked { background: #34d399; }

/* Checkbox label highlight */
.checkbox-label {
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.checkbox-label:has(.app-checkbox:checked) {
  background: rgba(255, 255, 255, 0.06);
  transform: scale(1.01);
}

/* --- FAQ Accordion --- */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-answer.open {
  max-height: 200px;
}

.faq-icon {
  transition: transform 0.3s ease;
}

/* --- Responsive Adjustments --- */
@media (max-width: 1023px) {
  .floating-card {
    display: none;
  }
}

@media (max-width: 639px) {
  .magnetic-cta {
    width: 100%;
    justify-content: center;
  }
}
