/* ========== Variables ========== */
:root {
  --bg: #0a0a0f;
  --bg-soft: #12121a;
  --surface: #16161f;
  --surface-hover: #1c1c28;
  --text: #e8e6ed;
  --text-muted: #9b98a8;
  --accent: #8b7cf7;
  --accent-dim: #6b5bd4;
  --accent-glow: rgba(139, 124, 247, 0.25);
  --ether: #4a4566;
  --border: rgba(255, 255, 255, 0.06);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Outfit", system-ui, sans-serif;
  --space: 1.5rem;
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== Reset & Base ========== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: #a89bf9;
}

/* ========== Noise overlay ========== */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  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='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ========== Container ========== */
.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--space);
}

/* ========== Hero ========== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem var(--space) 6rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, var(--accent-glow) 0%, transparent 55%),
              radial-gradient(ellipse 100% 80% at 50% 100%, rgba(74, 69, 102, 0.4) 0%, transparent 50%);
}

.ripple {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--ether);
  opacity: 0.4;
  animation: ripple-expand 8s ease-out infinite;
}
.ripple.r1 { width: 200px; height: 200px; left: 50%; top: 45%; transform: translate(-50%, -50%); animation-delay: 0s; }
.ripple.r2 { width: 400px; height: 400px; left: 50%; top: 45%; transform: translate(-50%, -50%); animation-delay: 2s; }
.ripple.r3 { width: 600px; height: 600px; left: 50%; top: 45%; transform: translate(-50%, -50%); animation-delay: 4s; }

@keyframes ripple-expand {
  0% { transform: translate(-50%, -50%) scale(0.6); opacity: 0.5; }
  100% { transform: translate(-50%, -50%) scale(1.4); opacity: 0; }
}

.hero-image-wrap {
  position: relative;
  z-index: 1;
  /* margin-bottom: 2rem; */
  animation: float 6s ease-in-out infinite;
}

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

.hero-image {
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4), 0 0 80px var(--accent-glow);
  max-width: 420px;
  width: 100%;
}

.hero-icon {
  width: 160px;
  height: 160px;
  max-width: none;
  border-radius: 28px;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
  background: linear-gradient(180deg, #fff 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fade-in-up 1s ease-out;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: 2rem;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  animation: fade-in-up 1s ease-out 0.2s both;
}

.cta {
  display: inline-block;
  padding: 0.85rem 2rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dim) 100%);
  color: #fff;
  font-weight: 500;
  border-radius: 999px;
  box-shadow: 0 4px 20px var(--accent-glow);
  transition: transform var(--transition), box-shadow var(--transition);
  animation: fade-in-up 1s ease-out 0.4s both;
}
.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--accent-glow);
  color: #fff;
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: fade-in 1s ease-out 1s both;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== Sections ========== */
.section {
  padding: 5rem 0;
  position: relative;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.section-desc {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* ========== Lore ========== */
.lore {
  background: var(--bg-soft);
}

.lore-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 640px;
  margin: 0 auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.lore-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.lore-card p {
  margin-bottom: 1.25rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}
.lore-card p:last-child {
  margin-bottom: 0;
}

.lore-lead {
  font-size: 1.2rem;
  color: var(--text);
}
.lore-lead em {
  color: var(--accent);
  font-style: italic;
}

.lore-close {
  color: var(--text);
  font-weight: 500;
}

/* ========== Features ========== */
.feature-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space);
  max-width: 900px;
  margin: 0 auto;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-align: center;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out, border-color var(--transition), box-shadow var(--transition);
  transition-delay: calc(0.1s * var(--delay, 0));
}

.feature-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-card:hover {
  border-color: rgba(139, 124, 247, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transform: translateY(-4px);
}

.feature-icon-wrap {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 124, 247, 0.12);
  border-radius: 14px;
  color: var(--accent);
}

.feature-icon {
  width: 28px;
  height: 28px;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ========== Companions ========== */
.companions {
  background: var(--bg-soft);
}

.companion-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  max-width: 920px;
  margin: 0 auto;
}

.companion-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: transform var(--transition), border-color var(--transition);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out, border-color var(--transition);
  transition-delay: calc(0.15s * (var(--i, 0)));
}

.companion-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.companion-card:nth-child(1) { --i: 0; }
.companion-card:nth-child(2) { --i: 1; }
.companion-card:nth-child(3) { --i: 2; }

.companion-card:hover {
  border-color: rgba(139, 124, 247, 0.25);
  transform: translateY(-4px);
}

.companion-image-wrap {
  width: 120px;
  height: 120px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-soft);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.companion-image-wrap img {
  width: 80%;
  height: 80%;
  object-fit: contain;
}

.companion-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.name-alt {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
}

.companion-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ========== Privacy & Support ========== */
.footer-section {
  padding-bottom: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.footer-block h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.footer-block p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.footer-block p:last-of-type {
  margin-bottom: 0;
}

.privacy-block a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-support {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background var(--transition), color var(--transition);
}
.btn-support:hover {
  background: var(--accent);
  color: #fff;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ========== Section reveal (JS will add .visible) ========== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
}

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