/* Custom styles that sit on top of Tailwind utilities */

html { scroll-behavior: smooth; }

/* ---------- Background atmosphere ---------- */
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.glow { position: fixed; z-index: 0; width: 38rem; height: 38rem; border-radius: 9999px; filter: blur(120px); opacity: .28; pointer-events: none; }
.glow-a { top: -10rem; left: -10rem; background: #6b2a35; }
.glow-b { bottom: -12rem; right: -10rem; background: #ff5d73; opacity: .14; }

/* ---------- Shimmering "coffee" word ---------- */
.shimmer {
  background: linear-gradient(90deg, #e8c4b8, #f6ead9, #ff5d73, #e8c4b8);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 5s linear infinite;
}
@keyframes shimmer { to { background-position: 250% 0; } }

/* ---------- Illustration ---------- */
.float { animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-16px); } }

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-block; cursor: pointer; border: none;
  padding: .95rem 1.9rem; border-radius: 9999px; font-weight: 700;
  color: #0a0507; background: linear-gradient(135deg, #f6ead9, #ff5d73);
  box-shadow: 0 10px 30px -8px rgba(255,93,115,.55);
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn-primary:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 16px 36px -8px rgba(255,93,115,.75); }
.btn-ghost {
  padding: .95rem 1.9rem; border-radius: 9999px; cursor: pointer; font-weight: 500;
  color: #f6ead9; background: #6b2a35; border: 1px solid #8c3a49;
  box-shadow: 0 8px 20px -8px rgba(0,0,0,.6);
  transition: background .2s;
}
.btn-ghost:hover { background: #a04555; }

/* ---------- Cards, timeline, panel ---------- */
.card {
  padding: 2rem; border-radius: 1.5rem; background: rgba(26,11,15,.65);
  border: 1px solid rgba(232,196,184,.12); backdrop-filter: blur(6px);
  transition: transform .3s ease, border-color .3s ease;
}
.card:hover { transform: translateY(-8px) rotate(-.6deg); border-color: rgba(255,93,115,.5); }

.timeline { position: relative; display: flex; gap: 1.25rem; }
.timeline > span {
  position: absolute; left: -3.4rem; top: 0; width: 2.2rem; height: 2.2rem;
  display: grid; place-items: center; border-radius: 9999px; font-size: .75rem; font-weight: 700;
  background: #ff5d73; color: #0a0507;
}
.timeline h3 { font-family: "Playfair Display", serif; font-size: 1.4rem; margin-bottom: .2rem; }
.timeline p { color: #e8c4b8; }

.ask-panel {
  padding: 3rem 1.5rem; border-radius: 2rem;
  background: radial-gradient(circle at top, rgba(107,42,53,.35), rgba(26,11,15,.6));
  border: 1px solid rgba(232,196,184,.15);
}
#ask-buttons { transition: all .2s; }
#no-btn { transition: left .35s cubic-bezier(.34,1.56,.64,1), top .35s cubic-bezier(.34,1.56,.64,1), transform .35s cubic-bezier(.34,1.56,.64,1); }

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 50; display: flex; padding: 1rem;
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  background: rgba(10,5,3,.8); backdrop-filter: blur(8px);
}
.modal.hidden { display: none; }
.modal-card {
  margin: auto; /* centers when it fits, scrolls from the top when it doesn't */
  width: 100%; max-width: 28rem; padding: 1.5rem 1.25rem; text-align: center; border-radius: 1.75rem;
  background: #1a0b0f; border: 1px solid rgba(255,93,115,.35);
  animation: pop .45s cubic-bezier(.34,1.56,.64,1);
}
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
.field { display: block; }
.field > span { display: block; font-size: .85rem; color: #e8c4b8; margin-bottom: .35rem; }
.field input, .field select {
  width: 100%; padding: .8rem 1rem; border-radius: .9rem; color: #f6ead9;
  background: #0a0507; border: 1px solid #6b2a35; outline: none; color-scheme: dark;
}
.field input:focus, .field select:focus { border-color: #ff5d73; box-shadow: 0 0 0 3px rgba(255,93,115,.2); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
