:root {
  --bg: #0b0d17;
  --bg-elevated: #121526;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.1);
  --text: #f4f5fb;
  --text-muted: #a8b0c8;
  --primary: #7c6cff;
  --primary-2: #ff6bcb;
  --accent: #4fd1c5;
  --gold: #ffd166;
  --radius: 18px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --font: "Outfit", system-ui, sans-serif;
  --display: "Playfair Display", Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
}

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

/* Background orbs */
.bg-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

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

.orb-1 {
  width: 420px;
  height: 420px;
  background: #7c6cff;
  top: -80px;
  left: -60px;
}

.orb-2 {
  width: 360px;
  height: 360px;
  background: #ff6bcb;
  top: 40%;
  right: -100px;
  animation-delay: -6s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: #4fd1c5;
  bottom: -40px;
  left: 30%;
  animation-delay: -12s;
}

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

.hero,
main,
.footer {
  position: relative;
  z-index: 1;
}

/* Hero */
.hero {
  max-width: 960px;
  margin: 0 auto;
  padding: 5.5rem 1.5rem 3rem;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.8rem, 8vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero h1 .line {
  display: block;
  color: var(--text);
}

.gradient-text {
  display: inline-block;
  background: linear-gradient(120deg, var(--primary), var(--primary-2), var(--accent), var(--gold));
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientShift 6s ease infinite, wordPop 0.45s ease;
  min-height: 1.1em;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes wordPop {
  from { transform: scale(0.92); opacity: 0.5; }
  to { transform: scale(1); opacity: 1; }
}

.hero-sub {
  max-width: 34rem;
  margin: 0 auto 2rem;
  color: var(--text-muted);
  font-size: 1.15rem;
}

.hero-sub strong {
  color: var(--text);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white;
  box-shadow: 0 10px 30px rgba(124, 108, 255, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 14px 40px rgba(255, 107, 203, 0.35);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--surface-hover);
}

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

.stat {
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.stat-num {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Sections */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
}

.section-alt {
  background: linear-gradient(180deg, transparent, rgba(124, 108, 255, 0.06), transparent);
}

.section-head {
  text-align: center;
  margin-bottom: 2rem;
}

.section-head h2 {
  margin: 0 0 0.5rem;
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 600;
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
}

/* Compliment cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.1rem;
}

.card {
  position: relative;
  padding: 1.4rem 1.35rem 1.25rem;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-2), var(--accent));
  opacity: 0.85;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 108, 255, 0.35);
}

.card-emoji {
  font-size: 1.75rem;
  margin-bottom: 0.6rem;
}

.card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.15rem;
  font-weight: 700;
}

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

/* Word cloud */
.word-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  max-width: 720px;
  margin: 0 auto;
}

.word-chip {
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.word-chip:hover,
.word-chip.active {
  transform: scale(1.06);
  border-color: transparent;
  background: linear-gradient(135deg, rgba(124, 108, 255, 0.35), rgba(255, 107, 203, 0.35));
  box-shadow: 0 8px 24px rgba(124, 108, 255, 0.25);
}

/* Note form */
.note-form {
  max-width: 560px;
  margin: 0 auto 2rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: grid;
  gap: 1rem;
}

.field-row {
  display: grid;
  gap: 0.4rem;
}

.field-row label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.field-row input,
.field-row textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
}

.field-row input:focus,
.field-row textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 108, 255, 0.2);
}

.form-status {
  margin: 0;
  min-height: 1.25rem;
  font-size: 0.9rem;
  color: var(--accent);
}

.form-status.error {
  color: #ff8a9b;
}

.notes-list {
  display: grid;
  gap: 0.9rem;
  max-width: 720px;
  margin: 0 auto;
}

.notes-loading,
.notes-empty {
  text-align: center;
  color: var(--text-muted);
}

.note-card {
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  animation: fadeIn 0.35s ease;
}

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

.note-card .note-author {
  margin: 0 0 0.35rem;
  font-weight: 700;
  color: var(--gold);
}

.note-card .note-body {
  margin: 0 0 0.5rem;
  color: var(--text);
}

.note-card .note-time {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* CTA */
.cta-section {
  padding-bottom: 4rem;
}

.cta-card {
  max-width: 680px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  text-align: center;
  border-radius: calc(var(--radius) + 6px);
  background:
    linear-gradient(var(--bg-elevated), var(--bg-elevated)) padding-box,
    linear-gradient(135deg, var(--primary), var(--primary-2), var(--accent)) border-box;
  border: 2px solid transparent;
  box-shadow: var(--shadow);
}

.cta-card h2 {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
}

.cta-card p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.cta-card .signature {
  margin: 0;
  color: var(--text);
  font-weight: 600;
}

/* Footer */
.footer {
  text-align: center;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer code {
  font-size: 0.85em;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  background: var(--surface);
}

/* Confetti canvas */
#confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
}

@media (max-width: 600px) {
  .stat-row {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 3.5rem;
  }

  .cta-card {
    padding: 1.75rem 1.25rem;
  }
}
