/* ============================================================
   LIEVE ROWAYDA — styles.css
   Romantic, mobile-first, personal. No framework.
   ============================================================ */

/* --- Google Fonts loaded in HTML head --- */

/* --- CSS Variables --- */
:root {
  --cream:        #FDF6F0;
  --blush-light:  #FAE8E2;
  --blush-mid:    #F2C9C0;
  --rose:         #C0415A;
  --rose-dark:    #9B2A42;
  --rose-pale:    #EEB4C0;
  --wa-green:     #25D366;
  --sea:          #4A9BB8;
  --sea-light:    #A8D8EA;
  --sea-dark:     #2D6E87;
  --text-dark:    #2C1A20;
  --text-mid:     #6B3D4A;
  --text-light:   #B08090;
  --white:        #FFFFFF;
  --shadow-soft:  0 8px 40px rgba(192, 65, 90, 0.12);
  --shadow-rose:  0 4px 20px rgba(192, 65, 90, 0.25);
  --radius-card:  28px;
  --radius-btn:   50px;
  --transition:   0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
}

/* --- Grain overlay (subtle texture) --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* --- Floating hearts background --- */
.hearts-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.heart {
  position: absolute;
  bottom: -60px;
  font-size: 1.2rem;
  opacity: 0;
  animation: floatHeart linear infinite;
  user-select: none;
}

.heart:nth-child(1)  { left:  8%; font-size: 0.9rem; animation-duration: 12s; animation-delay: 0s;   }
.heart:nth-child(2)  { left: 18%; font-size: 1.4rem; animation-duration: 15s; animation-delay: 2s;   }
.heart:nth-child(3)  { left: 30%; font-size: 0.8rem; animation-duration: 10s; animation-delay: 4s;   }
.heart:nth-child(4)  { left: 45%; font-size: 1.1rem; animation-duration: 14s; animation-delay: 1s;   }
.heart:nth-child(5)  { left: 60%; font-size: 0.7rem; animation-duration: 11s; animation-delay: 6s;   }
.heart:nth-child(6)  { left: 72%; font-size: 1.3rem; animation-duration: 16s; animation-delay: 3s;   }
.heart:nth-child(7)  { left: 84%; font-size: 0.9rem; animation-duration: 13s; animation-delay: 8s;   }
.heart:nth-child(8)  { left: 92%; font-size: 1.0rem; animation-duration: 17s; animation-delay: 5s;   }
.heart:nth-child(9)  { left: 25%; font-size: 0.6rem; animation-duration: 9s;  animation-delay: 9s;   }
.heart:nth-child(10) { left: 55%; font-size: 1.2rem; animation-duration: 18s; animation-delay: 7s;   }
.heart:nth-child(11) { left: 40%; font-size: 0.8rem; animation-duration: 12s; animation-delay: 11s;  }
.heart:nth-child(12) { left: 77%; font-size: 1.0rem; animation-duration: 14s; animation-delay: 13s;  }

@keyframes floatHeart {
  0%   { transform: translateY(0) rotate(-10deg) scale(0.8); opacity: 0; }
  10%  { opacity: 0.35; }
  80%  { opacity: 0.2; }
  100% { transform: translateY(-110dvh) rotate(15deg) scale(1.1); opacity: 0; }
}

/* --- App wrapper --- */
#app {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px 40px;
}

/* --- Scene container --- */
.scene {
  display: none;
  width: 100%;
  max-width: 480px;
  animation: sceneIn var(--transition) forwards;
}

.scene.active {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scene.exit {
  animation: sceneOut 0.3s ease-in forwards;
}

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

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

/* --- Card --- */
.card {
  background: var(--white);
  border-radius: var(--radius-card);
  padding: 36px 28px 32px;
  width: 100%;
  box-shadow: var(--shadow-soft),
              0 1px 0 rgba(255,255,255,0.9) inset;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--rose-pale), var(--rose), var(--rose-pale));
}

/* sea-blue accent for scene 5 & 6 */
.card.sea-accent::before {
  background: linear-gradient(90deg, var(--sea-light), var(--sea), var(--sea-dark));
}

/* --- Typography --- */
.display {
  font-family: 'Fraunces', Georgia, serif;
  font-optical-sizing: auto;
  font-style: italic;
  font-weight: 700;
  line-height: 1.15;
  color: var(--rose-dark);
}

h1.display { font-size: clamp(2rem, 8vw, 2.6rem); margin-bottom: 10px; }
h2.display { font-size: clamp(1.5rem, 6vw, 2rem);  margin-bottom: 8px;  }
h3.display { font-size: clamp(1.2rem, 5vw, 1.5rem); margin-bottom: 6px; }

.subtitle {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  color: var(--text-mid);
  line-height: 1.5;
  margin-bottom: 28px;
}

p.body-text {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-dark);
  margin-bottom: 14px;
}

p.body-text em {
  font-style: normal;
  color: var(--rose);
  font-weight: 600;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-btn);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  padding: 14px 28px;
  min-height: 48px;
  min-width: 120px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  letter-spacing: 0.01em;
  position: relative;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--rose), var(--rose-dark));
  color: var(--white);
  box-shadow: var(--shadow-rose);
  width: 100%;
  margin-top: 8px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(192, 65, 90, 0.38);
}

.btn-secondary {
  background: var(--blush-light);
  color: var(--rose-dark);
  font-size: 0.95rem;
  padding: 12px 24px;
  min-height: 44px;
  margin-top: 10px;
}

.btn-secondary:hover {
  background: var(--blush-mid);
}

/* dodge button absolute positioning container */
.btn-row {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  min-height: 120px;
  overflow: hidden;
  border-radius: 16px;
}

.btn-dodge {
  position: absolute;
  transition: top 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              left 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
}

/* sea-themed primary for scene 6 */
.btn-sea {
  background: linear-gradient(135deg, var(--sea), var(--sea-dark));
  color: var(--white);
  box-shadow: 0 4px 20px rgba(74, 155, 184, 0.3);
}

.btn-sea:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(74, 155, 184, 0.45);
}

/* --- Scene 0 special: landing deco --- */
.landing-deco {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
  line-height: 1;
  animation: gentlePulse 3s ease-in-out infinite;
}

@keyframes gentlePulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.08); }
}

/* --- Scene 1 & 2: text lines --- */
.lines-block {
  margin-bottom: 24px;
}

.lines-block p {
  padding-left: 18px;
  border-left: 2px solid var(--rose-pale);
  margin-bottom: 16px;
}

.lines-block p:last-child {
  margin-bottom: 0;
}

/* --- Scene 3: Slider --- */
.slider-wrapper {
  width: 100%;
  margin: 20px 0 10px;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-mid);
  margin-bottom: 8px;
  font-family: 'Inter', system-ui, sans-serif;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--rose) var(--pct, 50%), var(--blush-mid) var(--pct, 50%));
  outline: none;
  cursor: pointer;
  transition: background 0.1s;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--rose);
  box-shadow: 0 2px 8px rgba(192, 65, 90, 0.3);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input[type="range"]::-webkit-slider-thumb:active {
  border-color: var(--rose-dark);
  box-shadow: 0 2px 12px rgba(192, 65, 90, 0.5);
}

input[type="range"]::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--rose);
  box-shadow: 0 2px 8px rgba(192, 65, 90, 0.3);
  cursor: pointer;
}

.slider-reaction {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--rose-dark);
  text-align: center;
  min-height: 2rem;
  margin-top: 14px;
  transition: opacity 0.2s;
}

/* --- Scene 4: Photo carousel --- */
.carousel {
  width: 100%;
  position: relative;
  margin: 4px 0 16px;
}

.carousel-track {
  overflow: hidden;
  border-radius: 20px;
  background: var(--blush-light);
  aspect-ratio: 4/5;
  position: relative;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  display: block;
}

.photo-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9rem;
  color: var(--text-light);
}

.photo-placeholder .ph-icon {
  font-size: 2.5rem;
  opacity: 0.6;
}

/* gradient backgrounds for each placeholder */
.carousel-slide:nth-child(1) .photo-placeholder { background: linear-gradient(135deg, #FAE8E2, #F2C9C0); }
.carousel-slide:nth-child(2) .photo-placeholder { background: linear-gradient(135deg, #F2C9C0, #EEB4C0); }
.carousel-slide:nth-child(3) .photo-placeholder { background: linear-gradient(135deg, #EEB4C0, #E8A0B0); }
.carousel-slide:nth-child(4) .photo-placeholder { background: linear-gradient(135deg, #E8A0B0, #EEB4C0); }
.carousel-slide:nth-child(5) .photo-placeholder { background: linear-gradient(135deg, #EEB4C0, #F2C9C0); }

.carousel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.carousel-nav button {
  background: var(--blush-light);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1rem;
  cursor: pointer;
  color: var(--rose-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.carousel-nav button:hover {
  background: var(--blush-mid);
}

.carousel-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blush-mid);
  transition: background 0.2s, transform 0.2s;
  cursor: pointer;
}

.dot.active {
  background: var(--rose);
  transform: scale(1.3);
}

.carousel-caption {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--text-mid);
  text-align: center;
  line-height: 1.5;
  margin-top: 4px;
}

/* --- Scene 5: Chat bubble block --- */
.chat-bubble {
  background: var(--blush-light);
  border-radius: 4px 20px 20px 20px;
  padding: 20px 22px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.97rem;
  line-height: 1.7;
  color: var(--text-dark);
  margin-bottom: 20px;
  position: relative;
  box-shadow: 0 2px 12px rgba(192, 65, 90, 0.08);
}

.chat-bubble::before {
  content: '';
  position: absolute;
  top: 0; left: -10px;
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 0 14px 10px;
  border-color: transparent transparent var(--blush-light) transparent;
}

.closing-line {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--rose-dark);
  text-align: center;
}

/* --- Scene 7: Finale --- */
#scene-7 .card {
  background: linear-gradient(160deg, #F0F9FC 0%, var(--white) 60%);
}

#scene-7 .card::before {
  background: linear-gradient(90deg, var(--sea-light), var(--sea), var(--sea-dark));
}

.finale-reveal {
  display: none;
  animation: sceneIn 0.7s ease forwards;
  text-align: center;
  padding-top: 20px;
}

.finale-reveal.visible {
  display: block;
}

.finale-main-text {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: clamp(1.2rem, 5vw, 1.5rem);
  color: var(--sea-dark);
  line-height: 1.55;
  margin-bottom: 16px;
}

.finale-closer {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: 8px;
}

/* --- WhatsApp-green nod accent --- */
.wa-nod {
  display: inline-block;
  background: rgba(37, 211, 102, 0.12);
  color: #1A9E4F;
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 0.85em;
  font-weight: 600;
}

/* --- Spacing utilities --- */
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.tc    { text-align: center; }
.w100  { width: 100%; }

/* --- Scene heading row decoration --- */
.scene-num {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.scene-num::before,
.scene-num::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--blush-mid);
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  .heart { animation: none !important; opacity: 0 !important; }
  .landing-deco { animation: none; }
  .scene { animation: none !important; }
  .scene.active { opacity: 1 !important; transform: none !important; }
  .btn { transition: none; }
  input[type="range"] { transition: none; }
  .carousel-slide { transition: none; }
  .dot { transition: none; }
  .finale-reveal { animation: none; }
  .finale-reveal.visible .finale-main-text { animation: none; }
  .compliment-layer { display: none; }
  .btn-reveal { animation: none; }
  .btn-goodgirl { animation: none; }
  .btn-dodge { transition: none; }
}

/* --- Responsive fine-tuning --- */
@media (max-width: 390px) {
  .card { padding: 28px 20px 26px; }
  h1.display { font-size: 1.8rem; }
  h2.display { font-size: 1.4rem; }
  .chat-bubble { padding: 16px 16px; font-size: 0.93rem; }
}

@media (min-width: 600px) {
  .card { padding: 48px 44px 42px; }
}

/* --- Scene 5: love metaphors --- */
.love-metaphors {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin: 4px 0 22px;
  text-align: left;
}

.metaphor {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  background: var(--blush-light);
  border-radius: 18px;
  padding: 15px 17px;
}

.metaphor-icon {
  font-size: 1.5rem;
  line-height: 1.3;
  flex-shrink: 0;
}

.metaphor p {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-mid);
}

.metaphor em {
  font-style: italic;
  font-weight: 600;
  color: var(--rose-dark);
}

/* --- Finale: "Good girl" tappable button --- */
.btn-goodgirl {
  animation: goodgirlPulse 2s ease-in-out infinite;
}

@keyframes goodgirlPulse {
  0%, 100% { transform: scale(1);    box-shadow: 0 4px 20px rgba(74, 155, 184, 0.30); }
  50%      { transform: scale(1.03); box-shadow: 0 8px 28px rgba(74, 155, 184, 0.45); }
}

/* --- Scene 4: photo gate hint + button reveal --- */
.carousel-hint {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 14px;
  text-align: center;
}

.btn-reveal {
  animation: btnReveal 0.5s ease both;
}

@keyframes btnReveal {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}

/* --- Scene 5: "Sinds jou" lines --- */
.sinds-block {
  display: flex;
  flex-direction: column;
  gap: 11px;
  width: 100%;
  margin: 2px 0 20px;
  text-align: left;
}

.sinds-line {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--text-mid);
  padding-left: 14px;
  border-left: 3px solid var(--rose-pale);
}

.sinds-line span {
  color: var(--rose-dark);
  font-weight: 700;
}

/* --- Finale: floating compliments + love pop --- */
.compliment-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 60;
}

.compliment-bubble {
  position: absolute;
  bottom: -52px;
  padding: 9px 16px;
  border-radius: 999px;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  white-space: nowrap;
  color: var(--rose-dark);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 6px 22px rgba(192, 65, 90, 0.18);
  border: 1px solid rgba(192, 65, 90, 0.10);
  will-change: transform, opacity;
  opacity: 0;
}

.compliment-bubble.sea {
  color: var(--sea-dark);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 6px 22px rgba(74, 155, 184, 0.22);
  border-color: rgba(74, 155, 184, 0.12);
}

.compliment-bubble.rose {
  color: var(--white);
  background: linear-gradient(135deg, var(--rose), var(--rose-dark));
  box-shadow: 0 6px 22px rgba(192, 65, 90, 0.30);
  border-color: transparent;
}

@keyframes complimentFloat {
  0%   { transform: translate(0, 0) rotate(0deg) scale(0.5); opacity: 0; }
  14%  { opacity: 1; transform: translate(var(--dx-mid, 0), -14vh) rotate(var(--rot-mid, 0deg)) scale(1); }
  85%  { opacity: 1; }
  100% { transform: translate(var(--dx-end, 0), -112vh) rotate(var(--rot-end, 0deg)) scale(0.9); opacity: 0; }
}

/* the big "Ik hou van je" bounces in on Ja */
.finale-reveal.visible .finale-main-text {
  animation: lovePop 0.9s cubic-bezier(0.18, 0.89, 0.32, 1.28) both;
}

@keyframes lovePop {
  0%   { transform: scale(0.4); opacity: 0; }
  55%  { transform: scale(1.12); opacity: 1; }
  75%  { transform: scale(0.97); }
  100% { transform: scale(1); opacity: 1; }
}
