:root {
  --bg: #fff8ec;
  --bg-2: #fff2da;
  --panel: #ffffff;
  --panel-2: #fffaf1;
  --ink: #232733;
  --muted: #7a7f8c;
  --green: var(--jn-green, #a0e747);
  --green-deep: #4c9a1a;
  --green-dim: #edfad6;
  --coral: #ff6b6b;
  --coral-dim: #ffe4e4;
  --blue: #3ea8ff;
  --blue-dim: #e3f3ff;
  --yellow: #ffb020;
  --yellow-dim: #fff1d6;
  --juniora-h: 38px;
  --shadow: 0 14px 30px rgba(35,39,51,0.08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html, body {
  background: var(--bg); color: var(--ink); font-family: var(--jn-font);
  overflow-x: hidden;
}
body { padding-bottom: var(--juniora-h); position: relative; }
button { cursor: pointer; border: none; font-family: var(--jn-font); }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }

/* ============ BACKGROUND BLOBS ============ */
.blob { position: fixed; border-radius: 50%; filter: blur(60px); opacity: 0.35; z-index: 0; animation: floatBlob 12s ease-in-out infinite; pointer-events: none; }
.blob-1 { width: 300px; height: 300px; background: var(--yellow); top: -80px; right: -60px; }
.blob-2 { width: 260px; height: 260px; background: var(--blue); top: 40vh; left: -100px; animation-delay: -4s; }
.blob-3 { width: 260px; height: 260px; background: var(--coral); bottom: -60px; right: -60px; animation-delay: -8s; }
@keyframes floatBlob { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(16px,-18px) scale(1.07); } }
@media (prefers-reduced-motion: reduce) { .blob { animation: none !important; } }

/* ============ SHARED ============ */
section { position: relative; z-index: 2; max-width: 640px; margin: 0 auto; padding: 60px 22px; }
#forms { padding-top: 54px; }
.section-title { text-align: center; font-size: clamp(21px, 4.6vw, 27px); margin-bottom: 10px; }
.section-sub { text-align: center; color: var(--muted); font-size: 14.5px; line-height: 1.95; margin-bottom: 30px; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

.btn-primary {
  background: var(--ink); color: #fff; font-weight: 900; font-size: 14.5px;
  padding: 15px 28px; border-radius: 16px; box-shadow: 0 12px 26px rgba(35,39,51,0.22);
  transition: transform .18s ease, box-shadow .18s ease;
}
.btn-primary:hover { transform: translateY(-2px) scale(1.03); }
.btn-primary:active { transform: translateY(0) scale(0.96); }

/* ============ COIN RAIN ============ */
.coin-rain { position: fixed; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.rain-coin {
  position: absolute; top: -60px; display: inline-block;
  animation-name: coinFall; animation-timing-function: linear; animation-iteration-count: 1;
  filter: drop-shadow(0 6px 8px rgba(35,39,51,0.12));
}
@keyframes coinFall {
  0% { transform: translate(0, -10vh) rotate(0deg); opacity: 0; }
  8% { opacity: 1; }
  50% { transform: translate(var(--sway), 55vh) rotate(calc(var(--spin) * 0.5)); }
  92% { opacity: 1; }
  100% { transform: translate(0, 115vh) rotate(var(--spin)); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .coin-rain { display: none; } }

/* ============ FLIP CARDS ============ */
.flip-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.flip-card { perspective: 1000px; height: 168px; }
.flip-inner {
  position: relative; width: 100%; height: 100%; transition: transform .55s cubic-bezier(.2,.8,.2,1);
  transform-style: preserve-3d; cursor: pointer;
}
.flip-card.flipped .flip-inner { transform: rotateY(180deg); }
.flip-face {
  position: absolute; inset: 0; backface-visibility: hidden; border-radius: 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 14px; text-align: center; box-shadow: var(--shadow);
}
.flip-front { background: var(--panel); border: 1px solid rgba(35,39,51,0.06); }
.flip-front .fc-emoji { font-size: 40px; }
.flip-front .fc-label { font-size: 13.5px; font-weight: 800; }
.flip-front .fc-tap { font-size: 10.5px; color: var(--muted); }
.flip-back { transform: rotateY(180deg); color: #fff; font-size: 12px; line-height: 1.85; font-weight: 700; }
.flip-back .fb-emoji { font-size: 22px; margin-bottom: 4px; }
.fb-0 { background: linear-gradient(155deg, var(--yellow), #ff8a00); }
.fb-1 { background: linear-gradient(155deg, var(--blue), #1f6fd6); }
.fb-2 { background: linear-gradient(155deg, var(--coral), #ff3f6c); }
.fb-3 { background: linear-gradient(155deg, var(--green), var(--green-deep)); color: #10231f; }

.flip-hint { text-align: center; color: var(--muted); font-size: 12px; margin-top: 14px; }

/* ============ REFLECTION ============ */
.reflect-section { padding-top: 20px; }
.reflect-card {
  background: var(--panel); border-radius: 28px; padding: 30px 24px; box-shadow: var(--shadow);
  border: 1px solid rgba(35,39,51,0.05); text-align: center;
}
.reflect-sub { color: var(--muted); font-size: 13.5px; margin-bottom: 22px; }

.reflect-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }
.reflect-opt {
  background: var(--panel-2); border: 2px solid transparent; border-radius: 16px;
  padding: 13px 16px; font-size: 13.5px; font-weight: 700; color: var(--ink);
  text-align: right; transition: all .15s ease;
}
.reflect-opt:hover { border-color: rgba(35,39,51,0.12); transform: translateY(-1px); }
.reflect-opt.selected { border-color: var(--ink); background: var(--green-dim); }

.reflect-answer { overflow: hidden; max-height: 0; transition: max-height .4s ease; }
.reflect-answer.show { max-height: 240px; }
.reflect-answer-inner {
  margin-top: 18px; background: var(--green-dim); border-radius: 18px; padding: 16px 18px;
  font-size: 13.5px; line-height: 1.95; text-align: right; color: #234512;
  opacity: 0; transform: scale(0.95); transition: opacity .3s ease .1s, transform .3s ease .1s;
}
.reflect-answer.show .reflect-answer-inner { opacity: 1; transform: scale(1); }

.particle { position: fixed; border-radius: 50%; pointer-events: none; z-index: 60; animation: particleBurst .7s ease-out forwards; }
@keyframes particleBurst {
  0% { transform: translate(0,0) scale(1) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--px), var(--py)) scale(0.4) rotate(180deg); opacity: 0; }
}

@media (max-width: 380px) {
  .flip-card { height: 150px; }
}

/* ============ BRAND BAR ============ */
.juniora-overlay {
  position: fixed; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center;
  padding: 8px 14px; background: rgba(13, 15, 19, 0.92); backdrop-filter: blur(6px);
  border-top: 1px solid rgba(255, 255, 255, 0.06); z-index: 1000;
}
.juniora-link { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: #cfd6cf; font-family: var(--jn-font); font-size: 10.5px; font-weight: 600; line-height: 1; opacity: 0.9; }
.juniora-link:hover { opacity: 1; }
.juniora-logo { width: 13px; height: auto; display: block; flex-shrink: 0; }
