*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --void: #0a0a0f;
  --ink: #1a1a24;
  --mist: #2d2d3a;
  --silver: #9ca3af;
  --gold: #eab308;
  --gold-soft: #fde047;
  --violet: #7c3aed;
  --paper: #faf9f7;
  --transition: 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Sora', system-ui, sans-serif;
  background: var(--void);
  color: var(--paper);
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: 'Instrument Serif', serif; font-weight: 400; }

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

/* Site header / Logo */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  padding: 1rem 1.5rem;
}

.site-logo img {
  width: 200px;
  height: 200px;
  display: block;
  object-fit: contain;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem 8rem;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 100% 80% at 50% 0%, rgba(124, 58, 237, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 80% 60% at 80% 60%, rgba(234, 179, 8, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 60% 80% at 20% 80%, rgba(124, 58, 237, 0.06) 0%, transparent 50%);
}

.hero-orbs { position: absolute; inset: 0; }

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

.orb-1 { width: 400px; height: 400px; background: var(--violet); top: -100px; left: 50%; transform: translateX(-50%); }
.orb-2 { width: 300px; height: 300px; background: var(--gold); bottom: 10%; right: 10%; animation-delay: 1s; }
.orb-3 { width: 250px; height: 250px; background: var(--violet); bottom: 30%; left: 5%; animation-delay: 2s; }

@keyframes orb-pulse {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.3; }
  50% { transform: translateX(-50%) scale(1.2); opacity: 0.6; }
}

.orb-2 { animation: orb-pulse-2 10s ease-in-out 1s infinite; }
.orb-3 { animation: orb-pulse-3 12s ease-in-out 2s infinite; }

@keyframes orb-pulse-2 {
  0%, 100% { transform: scale(1); opacity: 0.2; }
  50% { transform: scale(1.3); opacity: 0.5; }
}

@keyframes orb-pulse-3 {
  0%, 100% { transform: scale(1); opacity: 0.2; }
  50% { transform: scale(1.15); opacity: 0.4; }
}

.hero-content { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }

.hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 1.25rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.2s forwards;
}

.hero-title {
  font-size: clamp(3rem, 10vw, 6rem);
  line-height: 1.05;
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeUp 0.7s 0.4s forwards;
}

.hero-title-main {
  background: linear-gradient(135deg, var(--gold-soft) 0%, var(--gold) 50%, var(--violet) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  font-weight: 300;
  color: var(--silver);
  max-width: 480px;
  margin: 0 auto 2rem;
  line-height: 1.8;
  opacity: 0;
  animation: fadeUp 0.6s 0.6s forwards;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeUp 0.6s 0.8s forwards;
}

.btn {
  display: inline-block;
  padding: 0.9rem 1.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: 6px;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, #ca8a04 100%);
  color: var(--void);
  box-shadow: 0 4px 20px rgba(234, 179, 8, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(234, 179, 8, 0.4);
}

.btn-ghost {
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--paper);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.3);
}

.btn-lg { padding: 1rem 2.25rem; font-size: 1rem; }

.hero-image-wrap {
  margin-top: 2rem;
  opacity: 0;
  animation: fadeUp 1s 0.5s forwards;
}

.hero-image {
  max-width: 280px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 24px 60px rgba(124, 58, 237, 0.3)) drop-shadow(0 12px 30px rgba(0,0,0,0.4));
  animation: float 4s ease-in-out infinite;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* Story */
.story {
  padding: 6rem 1.5rem;
  background: linear-gradient(180deg, var(--void) 0%, #0f0f18 50%, var(--void) 100%);
}

.story-inner { max-width: 640px; margin: 0 auto; }

.story-content p {
  font-size: 1.1rem;
  color: var(--silver);
  margin-top: 1.25rem;
  line-height: 1.9;
}

/* Section titles */
.section-title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  text-align: center;
  margin-bottom: 0.75rem;
  color: var(--paper);
}

.section-desc {
  text-align: center;
  font-size: 1.1rem;
  color: var(--silver);
  max-width: 520px;
  margin: 0 auto 3rem;
}

/* Features */
.features { padding: 6rem 1.5rem; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.feature-card {
  padding: 2.25rem;
  background: linear-gradient(145deg, rgba(30,30,40,0.8) 0%, rgba(20,20,28,0.9) 100%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-8px);
  border-color: rgba(234, 179, 8, 0.2);
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.feature-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, var(--violet) 0%, var(--gold) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.feature-card h3 {
  font-family: 'Instrument Serif', serif;
  font-size: 1.4rem;
  margin-bottom: 0.6rem;
  color: var(--paper);
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--silver);
  line-height: 1.75;
}

/* Collection */
.collection {
  padding: 6rem 1.5rem;
  background: linear-gradient(180deg, var(--void) 0%, #0d0d14 100%);
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .collection-grid { grid-template-columns: 1fr; }
}

.collection-item {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  transition: var(--transition);
}

.collection-item:hover {
  transform: scale(1.02);
  border-color: rgba(234, 179, 8, 0.15);
  background: rgba(255,255,255,0.04);
}

.collection-pen {
  width: 56px;
  height: 160px;
  margin: 0 auto 1.5rem;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.collection-pen-noir { background: linear-gradient(180deg, #1a1a24 0%, #2d2d3a 50%, #eab308 100%); }
.collection-pen-forest { background: linear-gradient(180deg, #14532d 0%, #166534 50%, #b45309 100%); }
.collection-pen-midnight { background: linear-gradient(180deg, #1e3a5f 0%, #1e40af 50%, #fde047 100%); }

.collection-item h3 { font-size: 1.25rem; margin-bottom: 0.4rem; }
.collection-item span { font-size: 0.9rem; color: var(--silver); }

/* CTA */
.cta {
  padding: 7rem 1.5rem;
  text-align: center;
  background: linear-gradient(180deg, #0d0d14 0%, #151520 50%, var(--void) 100%);
}

.cta h2 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 1rem; }
.cta p {
  font-size: 1.15rem;
  color: var(--silver);
  margin-bottom: 2rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* Scroll-triggered animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Where is Papa pages */
.papa-page {
  min-height: 100vh;
  padding: 8rem 1.5rem 4rem;
  max-width: 500px;
  margin: 0 auto;
  color: #4a0020;
}

.papa-page h1 { color: #4a0020; }
.papa-subtitle { color: #7a2040 !important; }

.papa-page h1, .whereispapa-page h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.papa-subtitle { color: var(--silver); margin-bottom: 2rem; }

.papa-tiles-form { margin-bottom: 1.5rem; }

.papa-tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.papa-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  background: rgba(255,255,255,0.55);
  border: 2px solid rgba(255,255,255,0.7);
  border-radius: 12px;
  color: #4a0020;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  box-shadow: 0 2px 12px rgba(180,0,80,0.1);
}

.papa-tile:hover {
  background: rgba(255,255,255,0.8);
  border-color: #f06292;
}

.papa-tile-emoji {
  font-size: 2.5rem;
  line-height: 1;
}

.papa-tile-label {
  font-size: 0.95rem;
  color: #7a2040;
}

.papa-saved {
  margin-top: 1.5rem;
  color: #4a0020;
  font-weight: 600;
}

.papa-link, .papa-edit-link {
  display: inline-block;
  margin-top: 2rem;
  color: #4a0020;
  font-weight: 600;
}

.papa-link:hover, .papa-edit-link:hover { text-decoration: underline; }

/* Where is Papa - big pictogram for non-readers */
.whereispapa-page {
  min-height: 100vh;
  padding: 4rem 1.5rem;
  text-align: center;
}

.whereispapa-title { margin-bottom: 3rem; }

.papa-invisible-link { color: inherit; text-decoration: none; }
.papa-invisible-link:hover, .papa-invisible-link:focus { color: inherit; text-decoration: none; }

.hw-game-icon {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 1.4rem;
  vertical-align: middle;
  text-decoration: none;
  opacity: 0.55;
  transition: opacity 0.2s, transform 0.2s;
  line-height: 1;
}
.hw-game-icon:hover, .hw-game-icon:focus { opacity: 1; transform: scale(1.2); }

.papa-display {
  background: rgba(255,255,255,0.03);
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 24px;
  padding: 4rem 3rem;
  margin-bottom: 2rem;
}

.papa-pictogram {
  font-size: 180px;
  line-height: 1;
  margin-bottom: 1rem;
}

.papa-room-label {
  font-size: 1.5rem;
  color: var(--silver);
}

/* Footer */
.footer {
  padding: 2rem;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer p { font-size: 0.9rem; color: var(--silver); opacity: 0.8; }
