:root {
  --bg-deep: #1a1210;
  --bg-warm: #2a1814;
  --amber: #ffb86a;
  --amber-soft: #ffd4a3;
  --rose: #ff9a8b;
  --lavender: #c4a7ff;
  --mint: #8fdcc0;
  --cream: #fff8f0;
  --text: #fff5eb;
  --muted: rgba(255, 245, 235, 0.68);
  --glass: rgba(255, 248, 240, 0.08);
  --glass-border: rgba(255, 214, 170, 0.22);
  --glow: rgba(255, 184, 106, 0.45);
  --radius: 24px;
  font-family: "Outfit", -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

h1, h2, h3, .brand {
  font-family: "Noto Serif SC", "Outfit", serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1140px, calc(100% - 32px));
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* Ambient background */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(255, 154, 139, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 20%, rgba(196, 167, 255, 0.16), transparent 50%),
    radial-gradient(ellipse 90% 70% at 50% 100%, rgba(255, 184, 106, 0.12), transparent 60%),
    linear-gradient(165deg, #1a1210 0%, #241612 40%, #1e1420 100%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: drift 14s ease-in-out infinite;
}

.orb-a {
  width: 420px;
  height: 420px;
  top: -80px;
  left: -60px;
  background: rgba(255, 154, 139, 0.35);
}

.orb-b {
  width: 360px;
  height: 360px;
  top: 30%;
  right: -80px;
  background: rgba(196, 167, 255, 0.28);
  animation-delay: -4s;
}

.orb-c {
  width: 300px;
  height: 300px;
  bottom: -40px;
  left: 35%;
  background: rgba(255, 184, 106, 0.25);
  animation-delay: -8s;
}

#sparkles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.75;
}

.cursor-glow {
  position: fixed;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle, rgba(255, 184, 106, 0.12), transparent 70%);
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
  opacity: 0;
}

body:hover .cursor-glow {
  opacity: 1;
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(24px, -18px) scale(1.06); }
}

/* Header */
.header {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: min(920px, calc(100% - 24px));
  border-radius: 999px;
  background: rgba(26, 18, 16, 0.55);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--amber-soft), var(--rose));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-icon {
  color: var(--amber);
  animation: twinkle 2.4s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

.nav {
  display: flex;
  gap: 28px;
  font-size: 0.92rem;
  color: var(--muted);
}

.nav a {
  position: relative;
  transition: color 0.2s;
}

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

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--amber), var(--rose));
  border-radius: 2px;
  transition: width 0.25s;
}

.nav a:hover::after {
  width: 100%;
}

/* Hero */
.hero {
  padding: 140px 0 80px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--amber-soft);
  font-size: 0.88rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 12px var(--glow);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  line-height: 1.18;
  letter-spacing: 0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--amber-soft) 0%, var(--rose) 45%, var(--lavender) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin: 0 0 28px;
  max-width: 520px;
  color: var(--muted);
  font-size: 1.06rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, #ffb86a, #ff9a8b);
  color: #2a1208;
  box-shadow: 0 12px 40px rgba(255, 154, 139, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 16px 48px rgba(255, 184, 106, 0.45);
}

.btn-glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--cream);
  backdrop-filter: blur(12px);
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-chips span {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  background: rgba(255, 248, 240, 0.05);
  border: 1px solid rgba(255, 214, 170, 0.12);
  color: var(--muted);
}

/* Hero stage / pet portal */
.hero-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
}

.stage-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 214, 170, 0.12);
  animation: spin 24s linear infinite;
}

.ring-1 { width: 100%; height: 100%; }
.ring-2 { width: 82%; height: 82%; animation-direction: reverse; animation-duration: 18s; }
.ring-3 { width: 64%; height: 64%; border-color: rgba(196, 167, 255, 0.15); }

@keyframes spin {
  to { transform: rotate(360deg); }
}

.pet-portal {
  position: relative;
  width: min(340px, 90vw);
  padding: 28px 24px 22px;
  border-radius: 32px;
  background: linear-gradient(160deg, rgba(255, 248, 240, 0.12), rgba(255, 248, 240, 0.04));
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(24px);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  text-align: center;
}

.portal-glow {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 184, 106, 0.35), rgba(196, 167, 255, 0.2));
  filter: blur(20px);
  opacity: 0.5;
  z-index: -1;
}

.pet-scene {
  position: relative;
  height: 200px;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, #2a1a3a 0%, #4a2840 45%, #3d2518 100%);
  margin-bottom: 18px;
}

.moon {
  position: absolute;
  top: 18px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff8e8, #ffd4a3);
  box-shadow: 0 0 30px rgba(255, 212, 163, 0.6);
  animation: moon-glow 4s ease-in-out infinite;
}

@keyframes moon-glow {
  0%, 100% { box-shadow: 0 0 30px rgba(255, 212, 163, 0.5); }
  50% { box-shadow: 0 0 50px rgba(255, 212, 163, 0.85); }
}

.house {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
}

.roof {
  width: 0;
  height: 0;
  margin: 0 auto;
  border-left: 52px solid transparent;
  border-right: 52px solid transparent;
  border-bottom: 36px solid #6b4535;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.house::after {
  content: "";
  display: block;
  width: 72px;
  height: 48px;
  margin: -2px auto 0;
  background: linear-gradient(180deg, #8b5a45, #5c3828);
  border-radius: 4px 4px 0 0;
}

.door-light {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 24px;
  background: #ffd4a3;
  border-radius: 2px 2px 0 0;
  box-shadow: 0 0 20px rgba(255, 212, 163, 0.8);
  animation: door-flicker 3s ease-in-out infinite;
}

@keyframes door-flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

.pet-float {
  position: absolute;
  bottom: 52px;
  left: 50%;
  transform: translateX(-50%);
  animation: float-pet 3.5s ease-in-out infinite;
}

.pet-body {
  font-size: 2.8rem;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.4));
}

.pet-shadow {
  width: 48px;
  height: 10px;
  margin: 4px auto 0;
  background: rgba(0,0,0,0.25);
  border-radius: 50%;
  animation: shadow-pulse 3.5s ease-in-out infinite;
}

@keyframes float-pet {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-12px); }
}

@keyframes shadow-pulse {
  0%, 100% { transform: scale(1); opacity: 0.35; }
  50% { transform: scale(0.85); opacity: 0.2; }
}

.firefly {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber-soft);
  box-shadow: 0 0 12px var(--glow);
  animation: fly 6s ease-in-out infinite;
}

.f1 { top: 40%; left: 20%; animation-delay: 0s; }
.f2 { top: 55%; left: 70%; animation-delay: -2s; }
.f3 { top: 30%; left: 55%; animation-delay: -4s; }

@keyframes fly {
  0%, 100% { transform: translate(0, 0); opacity: 0.4; }
  25% { transform: translate(12px, -16px); opacity: 1; }
  50% { transform: translate(-8px, -8px); opacity: 0.6; }
  75% { transform: translate(6px, 10px); opacity: 0.9; }
}

.portal-caption {
  margin-bottom: 16px;
}

.portal-caption strong {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.portal-caption span {
  color: var(--muted);
  font-size: 0.92rem;
  font-style: italic;
}

.portal-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.portal-stats div {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 248, 240, 0.06);
  border: 1px solid rgba(255, 214, 170, 0.1);
}

.portal-stats em {
  display: block;
  font-style: normal;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.portal-stats strong {
  font-size: 1.4rem;
  background: linear-gradient(135deg, var(--amber-soft), var(--rose));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.portal-stats span {
  font-size: 0.8rem;
  color: var(--muted);
  margin-left: 2px;
}

/* Sections */
.section {
  padding: 100px 0;
  position: relative;
  z-index: 2;
}

.section-head {
  text-align: center;
  margin-bottom: 48px;
}

.section-kicker {
  margin: 0 0 8px;
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.feature-card {
  position: relative;
  padding: 28px 22px 36px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  overflow: hidden;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  cursor: pointer;
  user-select: none;
}

.feature-card:active {
  transform: translateY(-2px) scale(0.98);
}

.feature-card.active {
  border-color: rgba(255, 184, 106, 0.55);
  box-shadow: 0 0 40px rgba(255, 184, 106, 0.2);
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 184, 106, 0.4);
}

.feature-glow {
  position: absolute;
  top: -40%;
  left: -20%;
  width: 140%;
  height: 80%;
  background: radial-gradient(circle, rgba(255, 184, 106, 0.15), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

.feature-card:hover .feature-glow {
  opacity: 1;
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 14px;
}

.feature-card h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.card-hint {
  display: block;
  margin-top: 14px;
  font-size: 0.78rem;
  color: rgba(255, 214, 163, 0.55);
  transition: color 0.2s;
}

.feature-card:hover .card-hint,
.mode-card:hover .card-hint {
  color: var(--amber-soft);
}

.section-modes {
  background: linear-gradient(180deg, transparent, rgba(255, 184, 106, 0.04), transparent);
}

.modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.mode-card {
  position: relative;
  padding: 36px 28px 44px;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  cursor: pointer;
  user-select: none;
}

.mode-card:active {
  transform: translateY(-1px) scale(0.98);
}

.mode-card.active {
  border-color: rgba(255, 184, 106, 0.5);
  box-shadow: 0 0 48px rgba(255, 184, 106, 0.18);
}

.mode-card:hover {
  transform: translateY(-4px);
}

.mode-growth {
  background: linear-gradient(145deg, rgba(143, 220, 192, 0.12), rgba(255, 248, 240, 0.04));
}

.mode-memorial {
  background: linear-gradient(145deg, rgba(196, 167, 255, 0.14), rgba(255, 248, 240, 0.04));
}

.mode-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.06) 50%, transparent 60%);
  transform: translateX(-100%);
  animation: shimmer 6s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

.mode-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.mode-tag {
  display: inline-block;
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber-soft);
}

.mode-card h3 {
  margin: 0 0 14px;
  font-size: 1.3rem;
}

.mode-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

/* CTA */
.cta-card {
  text-align: center;
  padding: 56px 32px;
  border-radius: 32px;
  background: linear-gradient(145deg, rgba(255, 184, 106, 0.15), rgba(196, 167, 255, 0.1));
  border: 1px solid var(--glass-border);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
}

.cta-stars {
  color: var(--amber);
  letter-spacing: 0.5em;
  margin-bottom: 16px;
  animation: twinkle 3s ease-in-out infinite;
}

.cta-card h2 {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
}

.cta-card > p {
  margin: 0;
  color: var(--muted);
}

.cta-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 28px 0 20px;
}

.cta-badges span,
.cta-badge {
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  background: rgba(255, 248, 240, 0.06);
  border: 1px solid rgba(255, 214, 170, 0.15);
}

.cta-badge {
  color: inherit;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}

.cta-badge:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 184, 106, 0.4);
  background: rgba(255, 184, 106, 0.12);
}

.cta-badge:active {
  transform: scale(0.97);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.modal.open {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 6, 5, 0.72);
  backdrop-filter: blur(8px);
}

.modal-panel {
  position: relative;
  width: min(440px, 100%);
  padding: 36px 28px 28px;
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(42, 28, 24, 0.95), rgba(30, 20, 32, 0.98));
  border: 1px solid var(--glass-border);
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.5);
  transform: translateY(20px) scale(0.96);
  transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
  text-align: center;
}

.modal.open .modal-panel {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 248, 240, 0.08);
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.modal-close:hover {
  background: rgba(255, 184, 106, 0.2);
  color: var(--cream);
}

.modal-icon {
  font-size: 2.8rem;
  margin-bottom: 12px;
}

.modal-panel h3 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}

.modal-panel p {
  margin: 0;
  color: var(--muted);
}

.modal-detail {
  margin-top: 16px !important;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 214, 170, 0.12);
  line-height: 1.7;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  z-index: 300;
  padding: 14px 22px;
  border-radius: 999px;
  background: rgba(42, 28, 24, 0.92);
  border: 1px solid var(--glass-border);
  color: var(--cream);
  font-size: 0.9rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.35s;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Footer */
.footer {
  padding: 48px 0 64px;
  border-top: 1px solid rgba(255, 214, 170, 0.1);
  position: relative;
  z-index: 2;
}

.footer-inner {
  text-align: center;
}

.footer-brand {
  font-family: "Noto Serif SC", serif;
  font-size: 1.1rem;
  margin: 0 0 8px;
  background: linear-gradient(135deg, var(--amber-soft), var(--rose));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.footer-inner p {
  margin: 6px 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-copy {
  margin-top: 20px !important;
  font-size: 0.82rem !important;
  opacity: 0.6;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay { transition-delay: 0.15s; }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

@media (max-width: 900px) {
  .hero-grid,
  .feature-grid,
  .modes {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 120px;
  }

  .hero-stage {
    min-height: 360px;
  }

  .nav {
    gap: 16px;
    font-size: 0.82rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
