/* ============================================
   Jacob's Contrition — Styles
   ============================================ */

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

:root {
  --pink-soft: #e8a0bf;
  --pink-muted: #d4a5c7;
  --purple: #7b5ea7;
  --purple-light: #9b7cc4;
  --purple-faint: #efe6f7;
  --cream: #fdf6e3;
  --cream-warm: #faf3e0;
  --gold: #c9a84c;
  --gold-light: #d4b86a;
  --rose: #c74b7a;
  --rose-deep: #a83860;
  --text-dark: #2e2536;
  --text-mid: #5c4a6b;
  --text-light: #8a7896;
  --white-warm: #fffcf7;
  --bg-hero-top: #f5dce8;
  --bg-hero-bottom: #fdf8f4;
  --card-bg: #fffdf9;
  --shadow-soft: 0 2px 20px rgba(123, 94, 167, 0.08);
  --shadow-lift: 0 8px 30px rgba(123, 94, 167, 0.12);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
}

html {
  -webkit-text-size-adjust: 100%;
}

html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

body {
  font-family: 'Lora', Georgia, serif;
  color: var(--text-dark);
  background: var(--white-warm);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  border: none;
  cursor: pointer;
  font-family: inherit;
  background: none;
}

/* --- Scroll Progress --- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--purple-light), var(--pink-soft), var(--gold));
  z-index: 200;
  transform-origin: left;
}

/* --- Three.js Canvas --- */
#bgCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* GSAP handles reveal — autoAlpha sets visibility+opacity */

/* ============================================
   Navigation
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 252, 247, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(212, 165, 199, 0.15);
  transition: box-shadow 0.3s ease;
}

.nav.scrolled {
  box-shadow: 0 2px 24px rgba(123, 94, 167, 0.08);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: var(--text-dark);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: clamp(16px, 3vw, 32px);
}

.nav-links a {
  font-family: 'Lora', serif;
  font-size: 0.875rem;
  color: var(--text-mid);
  transition: color 0.2s ease;
  white-space: nowrap;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--purple-light);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links a:hover { color: var(--purple); }
.nav-links a:hover::after { width: 100%; }

.forgive-btn {
  font-family: 'Lora', serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--pink-soft));
  padding: 10px 22px;
  border-radius: 50px;
  white-space: nowrap;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.forgive-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(199, 75, 122, 0.3);
}

.forgive-btn:active { transform: translateY(0) scale(0.97); }

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  z-index: 110;
}

.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ============================================
   Hero
   ============================================ */
.hero {
  position: relative;
  padding-top: 64px;
  background: linear-gradient(180deg, var(--bg-hero-top) 0%, var(--bg-hero-bottom) 70%, var(--white-warm) 100%);
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  z-index: 1;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(40px, 8vw, 80px) clamp(20px, 4vw, 40px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.hero-text { max-width: 520px; }

.badge {
  display: inline-block;
  font-family: 'Lora', serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--purple);
  background: var(--purple-faint);
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 24px;
}

.hero-heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-dark);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.hero-cursive {
  font-family: 'Caveat', cursive;
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  font-weight: 600;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--purple), var(--pink-soft));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  color: var(--text-light);
  line-height: 1.6;
  max-width: 380px;
}

.hero-image-wrap {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-image-container {
  position: relative;
  width: clamp(280px, 90%, 420px);
  aspect-ratio: 1 / 1.05;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(212, 165, 199, 0.35),
              0 4px 16px rgba(123, 94, 167, 0.1);
  will-change: transform;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* hero image is now a direct <img> */

.floating-heart {
  position: absolute;
  bottom: -10px;
  left: -10px;
  font-size: 2rem;
  color: #e25555;
  filter: drop-shadow(0 2px 6px rgba(226, 85, 85, 0.35));
  z-index: 2;
  border: none;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  padding: 8px;
}

.floating-heart:active {
  transform: scale(1.4);
}

.mini-heart-burst {
  position: absolute;
  pointer-events: none;
  font-size: 1rem;
  z-index: 10;
}

.sincerely-badge {
  position: absolute;
  top: 30%;
  right: -24px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--purple);
  color: #fff;
  font-family: 'Lora', serif;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 50px;
  box-shadow: 0 4px 16px rgba(123, 94, 167, 0.3);
}

/* ============================================
   Capybara Racing Game
   ============================================ */
.game-section {
  position: relative;
  padding: clamp(40px, 6vw, 80px) clamp(20px, 4vw, 40px);
  background: linear-gradient(180deg, var(--white-warm) 0%, var(--cream) 50%, var(--white-warm) 100%);
  text-align: center;
  z-index: 1;
}

.game-inner {
  max-width: 900px;
  margin: 0 auto;
}

.game-inner .section-title {
  margin-bottom: 4px;
}

.game-inner .section-subtitle {
  font-family: 'Lora', serif;
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: clamp(20px, 3vw, 32px);
}

.game-canvas-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(123, 94, 167, 0.2),
              0 4px 16px rgba(26, 10, 46, 0.15);
  background: #1a0a2e;
}

.game-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ============================================
   Peace Offerings
   ============================================ */
.peace-section {
  position: relative;
  padding: clamp(60px, 10vw, 120px) clamp(20px, 4vw, 40px);
  background: var(--white-warm);
  z-index: 1;
}

.peace-inner {
  max-width: 680px;
  margin: 0 auto;
}

.peace-header {
  text-align: center;
  position: relative;
  margin-bottom: 40px;
}

.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.section-subtitle {
  font-family: 'Lora', serif;
  font-size: 0.95rem;
  color: var(--text-light);
}

.clipboard-icon {
  position: absolute;
  top: -8px;
  right: 0;
  color: var(--purple-light);
  opacity: 0.6;
}

.offers {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.offer-card {
  display: flex;
  gap: 20px;
  background: var(--card-bg);
  border: 1px solid rgba(212, 165, 199, 0.15);
  border-left: 3px solid var(--purple-light);
  border-radius: var(--radius-md);
  padding: clamp(20px, 3vw, 28px);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: box-shadow 0.4s ease, border-color 0.3s ease, background 0.3s ease;
}

.offer-card:hover {
  box-shadow: var(--shadow-lift);
}

.offer-card:active {
  transform: scale(0.98);
}

.offer-card.selected {
  border-left-color: #5cb85c;
  background: linear-gradient(135deg, #f0faf0 0%, var(--card-bg) 100%);
}

.offer-check {
  flex-shrink: 0;
  position: relative;
  width: 36px;
  height: 36px;
}

.offer-number {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  color: #fff;
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 50%;
  transition: opacity 0.2s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.offer-card.selected .offer-number {
  opacity: 0;
  transform: scale(0.5);
}

.check-icon {
  position: absolute;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  padding: 8px;
  background: #5cb85c;
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.5) rotate(-45deg);
  transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.offer-card.selected .check-icon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.offer-content h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.offer-card.selected .offer-content h3 {
  color: #3a7a3a;
}

.offer-content p {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.6;
}

.voucher-btn {
  display: inline-block;
  margin-top: 10px;
  font-family: 'Lora', serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  padding: 8px 18px;
  border-radius: 50px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  cursor: pointer;
}

.voucher-btn:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 4px 16px rgba(123, 94, 167, 0.35);
}

.voucher-btn:active {
  transform: scale(0.97);
}

.bonus-badge {
  display: inline-block;
  margin-top: 10px;
  font-family: 'Lora', serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rose-deep);
  background: rgba(199, 75, 122, 0.08);
  padding: 4px 12px;
  border-radius: 50px;
}

.all-selected-msg {
  text-align: center;
  font-family: 'Caveat', cursive;
  font-size: 1.4rem;
  color: var(--purple);
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.all-selected-msg.visible {
  opacity: 1;
  transform: translateY(0);
}

.sincerely-text {
  font-family: 'Caveat', cursive;
  font-size: 1.5rem;
  color: var(--rose);
  text-align: left;
  padding-left: 8px;
}

/* ============================================
   Digital Flowers
   ============================================ */
.flowers-section {
  position: relative;
  padding: clamp(40px, 6vw, 80px) 0;
  background: linear-gradient(180deg, var(--white-warm) 0%, var(--cream) 100%);
  text-align: center;
  z-index: 1;
  overflow: hidden;
}

.flowers-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(12px, 2vw, 24px);
  max-width: 800px;
  margin: 0 auto clamp(24px, 4vw, 36px);
  padding: 0 clamp(20px, 4vw, 40px);
}

.flowers-duo-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(123, 94, 167, 0.18);
  aspect-ratio: 1;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.flowers-duo-item:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 16px 48px rgba(123, 94, 167, 0.25);
}

.flowers-duo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.flowers-duo-item:hover img {
  transform: scale(1.05);
}

.flowers-text-below {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.1rem, 2.8vw, 1.5rem);
  font-weight: 600;
  font-style: italic;
  color: var(--text-dark);
  max-width: 500px;
  margin: 0 auto 8px;
  line-height: 1.4;
  padding: 0 20px;
}

.flowers-cursive {
  font-family: 'Caveat', cursive;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 600;
  color: var(--gold);
  padding: 0 20px;
  line-height: 1.3;
}

/* ============================================
   Gallery
   ============================================ */
.gallery-section {
  position: relative;
  padding: clamp(60px, 10vw, 120px) clamp(20px, 4vw, 40px);
  background: var(--cream-warm);
  text-align: center;
  z-index: 1;
}

.gallery-inner {
  max-width: 900px;
  margin: 0 auto;
}

.gallery-inner .section-title {
  margin-bottom: clamp(32px, 5vw, 48px);
}

.gallery-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 2vw, 24px);
}

.gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 1;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.4s ease;
}

.gallery-item:hover {
  box-shadow: var(--shadow-lift);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover img {
  transform: scale(1.06);
}

/* ============================================
   Message
   ============================================ */
.message-section {
  position: relative;
  padding: clamp(60px, 10vw, 120px) clamp(20px, 4vw, 40px);
  background: linear-gradient(180deg, var(--cream-warm) 0%, #f7eef3 50%, var(--cream) 100%);
  text-align: center;
  z-index: 1;
}

.message-inner {
  max-width: 600px;
  margin: 0 auto;
}

.message-heart {
  margin-bottom: 28px;
}

.message-heart svg {
  filter: drop-shadow(0 4px 12px rgba(155, 124, 196, 0.3));
}

.message-quote {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.15rem, 2.8vw, 1.5rem);
  font-style: italic;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.65;
  margin-bottom: 32px;
}

.message-sign {
  font-family: 'Caveat', cursive;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  color: var(--purple);
  font-weight: 600;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  position: relative;
  padding: clamp(32px, 5vw, 48px) clamp(20px, 4vw, 40px);
  background: var(--cream);
  text-align: center;
  border-top: 1px solid rgba(212, 165, 199, 0.12);
  z-index: 1;
}

.footer-inner { max-width: 600px; margin: 0 auto; }

.footer-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.footer-tagline {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.footer-links a {
  font-family: 'Lora', serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dark);
  transition: color 0.2s ease;
}

.footer-links a:hover { color: var(--purple); }

.footer-dot { color: var(--text-light); font-size: 0.7rem; }

/* ============================================
   Hearts Canvas
   ============================================ */
#heartsCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(255, 252, 247, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid rgba(212, 165, 199, 0.2);
  }

  .nav-links.open a { font-size: 1rem; }
}

@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 36px;
  }

  .hero-text { max-width: 100%; order: 1; }
  .hero-image-wrap { order: 0; }
  .hero-sub { max-width: 100%; }
  .sincerely-badge { right: -8px; top: 20%; }

  .offer-card { gap: 14px; padding: 18px; }

  .gallery-section { padding-left: 0; padding-right: 0; }
  .gallery-inner .section-title { padding: 0 20px; }

  .gallery-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 14px;
    padding: 0 20px 20px;
    scrollbar-width: none;
  }

  .gallery-track::-webkit-scrollbar { display: none; }

  .gallery-item {
    flex: 0 0 75vw;
    scroll-snap-align: center;
  }

  .forgive-btn { font-size: 0.78rem; padding: 8px 16px; }
}

@media (max-width: 480px) {
  .nav-inner { height: 56px; }
  .hero { padding-top: 56px; }
  .hero-image-container { width: 260px; }
  .gallery-item { flex: 0 0 80vw; }
}
