@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&family=Caveat:wght@400;500;600;700&display=swap');

:root {
  --color-bg: #FFFBF5;
  --color-surface: #FFF0E6;
  --color-surface-alt: #FFE8D6;
  --color-primary: #FF6B6B;
  --color-primary-hover: #FF5252;
  --color-secondary: #FFD93D;
  --color-secondary-hover: #FFD000;
  --color-success: #4ECDC4;
  --color-text: #1A0E1F;
  --color-text-secondary: #4A3F52;
  --color-muted: #B8B0C8;
  --color-border: #E8DFD8;
  --color-coral-light: #FF8A65;
  --color-highlight: rgba(255, 217, 61, 0.4);
  --color-highlight-pink: rgba(255, 107, 107, 0.2);

  --font-display: 'Fredoka', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-handwriting: 'Caveat', cursive;

  --nav-height: 72px;

  --shadow-card: 0 4px 24px rgba(26, 14, 31, 0.08);
  --shadow-card-hover: 0 8px 40px rgba(26, 14, 31, 0.12);
  --shadow-sticky: 0 8px 32px rgba(26, 14, 31, 0.15);

  --radius-card: 20px;
  --radius-button: 14px;
}

.dark {
  --color-bg: #1A0E1F;
  --color-surface: #2D1B35;
  --color-surface-alt: #382340;
  --color-primary: #FF6B6B;
  --color-primary-hover: #FF5252;
  --color-secondary: #FFD93D;
  --color-secondary-hover: #FFD000;
  --color-success: #4ECDC4;
  --color-text: #F8F5F0;
  --color-text-secondary: #B8B0C8;
  --color-muted: #7A7090;
  --color-border: #3D2A48;
  --color-coral-light: #FF8A65;
  --color-highlight: rgba(255, 217, 61, 0.25);
  --color-highlight-pink: rgba(255, 107, 107, 0.15);

  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-card-hover: 0 8px 40px rgba(0, 0, 0, 0.4);
  --shadow-sticky: 0 8px 32px rgba(0, 0, 0, 0.4);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.font-display { font-family: var(--font-display); }
.font-handwriting { font-family: var(--font-handwriting); }

::selection {
  background: var(--color-secondary);
  color: var(--color-text);
}

.dark ::selection {
  background: rgba(255, 217, 61, 0.4);
  color: var(--color-text);
}

/* ============================================
   Navigatie
   ============================================ */
.nav-blur {
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
}

/* Doodle-style nav underline */
.nav-link {
  position: relative;
  text-decoration: none;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.3s ease;
  border-radius: 2px;
}
.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
  transform-origin: left center;
}

/* Hamburger */
.hamburger {
  width: 28px;
  height: 20px;
  position: relative;
  cursor: pointer;
}
.hamburger span {
  display: block;
  position: absolute;
  height: 3px;
  width: 100%;
  background: currentColor;
  border-radius: 3px;
  transition: all 0.3s ease;
}
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 8px; }
.hamburger span:nth-child(3) { top: 16px; }
.hamburger.open span:nth-child(1) { top: 8px; transform: rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { top: 8px; transform: rotate(-45deg); }

/* ============================================
   Hero Section
   ============================================ */
.hero-headline {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
}

.highlighter {
  background: linear-gradient(180deg, transparent 60%, var(--color-highlight) 60%);
  display: inline;
  padding: 0 4px;
}

.highlighter-pink {
  background: linear-gradient(180deg, transparent 60%, var(--color-highlight-pink) 60%);
  display: inline;
  padding: 0 4px;
}

/* Doodle underline for headings */
.doodle-underline {
  position: relative;
  display: inline-block;
}
.doodle-underline::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: -4px;
  right: -4px;
  height: 8px;
  background: url("data:image/svg+xml,%3Csvg width='100' height='10' viewBox='0 0 100 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 8 C20 2, 40 12, 60 5 C70 2, 85 10, 98 6' stroke='%23FF6B6B' stroke-width='2.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x bottom;
  background-size: 100px 10px;
  opacity: 0.8;
}
.dark .doodle-underline::after {
  background: url("data:image/svg+xml,%3Csvg width='100' height='10' viewBox='0 0 100 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 8 C20 2, 40 12, 60 5 C70 2, 85 10, 98 6' stroke='%23FF8A65' stroke-width='2.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x bottom;
  background-size: 100px 10px;
}

/* ============================================
   Speech Bubbles
   ============================================ */
.speech-bubble {
  position: relative;
  border-radius: var(--radius-card);
}
.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -16px;
  left: 40px;
  width: 0;
  height: 0;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-top: 16px solid var(--color-surface);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05));
}
.dark .speech-bubble::after {
  border-top-color: var(--color-surface);
}

.speech-bubble-right::after {
  left: auto;
  right: 40px;
}

/* ============================================
   Sticky Notes / Torn Paper
   ============================================ */
.sticky-note {
  position: relative;
  background: var(--color-surface);
  border-radius: 4px;
  box-shadow: var(--shadow-card);
  transform: rotate(var(--rotate, -0.5deg));
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.sticky-note:hover {
  transform: rotate(0deg) scale(1.02);
  box-shadow: var(--shadow-card-hover);
}

.sticky-note::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  margin-left: -6px;
  width: 12px;
  height: 20px;
  background: rgba(255, 107, 107, 0.3);
  border-radius: 2px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.torn-paper {
  position: relative;
  clip-path: polygon(
    0% 0%, 95% 0%, 100% 5%,
    100% 90%, 97% 100%, 90% 95%,
    80% 100%, 70% 96%, 60% 100%,
    50% 95%, 40% 100%, 30% 97%,
    20% 100%, 10% 96%, 0% 100%
  );
  padding: 2rem;
}

.warning-banner {
  position: relative;
  border-left: 6px solid var(--color-primary);
  border-radius: 0 12px 12px 0;
  background: var(--color-surface);
  padding: 1.5rem;
}

.warning-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 20px,
    rgba(255, 107, 107, 0.03) 20px,
    rgba(255, 107, 107, 0.03) 40px
  );
  border-radius: 0 12px 12px 0;
  pointer-events: none;
}

/* ============================================
   Roast Stack Effect
   ============================================ */
.roast-container {
  position: relative;
}
.roast-card {
  position: sticky;
  z-index: 1;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.roast-card:nth-child(1) { top: calc(var(--nav-height) + 16px); }
.roast-card:nth-child(2) { top: calc(var(--nav-height) + 56px); }
.roast-card:nth-child(3) { top: calc(var(--nav-height) + 96px); }
.roast-card:nth-child(4) { top: calc(var(--nav-height) + 136px); }
.roast-card:nth-child(5) { top: calc(var(--nav-height) + 176px); }

/* ============================================
   Bar Chart (Hero)
   ============================================ */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  height: 240px;
  padding: 16px 0;
}
.bar {
  border-radius: 12px 12px 0 0;
  transition: height 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  flex: 1;
  max-width: 160px;
}
.bar-label {
  position: absolute;
  bottom: -32px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 500;
}
.bar-value {
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 1rem;
}

/* ============================================
   Testimonial Chat Bubble
   ============================================ */
.chat-bubble {
  position: relative;
  padding: 1.5rem;
  border-radius: 16px 16px 16px 4px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.chat-bubble:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}
.chat-bubble::before {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 24px;
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 12px solid var(--color-surface);
}
.dark .chat-bubble::before {
  border-top-color: var(--color-surface);
}

/* ============================================
   Accordion (Features)
   ============================================ */
.accordion-item {
  border-bottom: 2px dashed var(--color-border);
  transition: border-color 0.3s ease;
}
.accordion-item:last-child {
  border-bottom: none;
}
.accordion-trigger {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.accordion-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  font-size: 1.2rem;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.accordion-icon.open {
  transform: rotate(45deg);
  background: var(--color-secondary);
  color: var(--color-text);
}
.accordion-content {
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.4s ease;
  max-height: 0;
  opacity: 0;
}
.accordion-content.open {
  max-height: 800px;
  opacity: 1;
}

/* ============================================
   Pricing Toggle
   ============================================ */
.toggle-switch {
  position: relative;
  width: 56px;
  height: 30px;
  border-radius: 15px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.toggle-switch.active::after {
  transform: translateX(26px);
}

/* ============================================
   CTA Section
   ============================================ */
.cta-section {
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(255, 107, 107, 0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 50%, rgba(255, 217, 61, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

/* ============================================
   Animations
   ============================================ */
@keyframes bounceIn {
  0% { opacity: 0; transform: translateY(30px) scale(0.96); }
  60% { opacity: 1; transform: translateY(-6px) scale(1.02); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes wobble {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-2deg); }
  75% { transform: rotate(2deg); }
}
@keyframes squiggle {
  0% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
  100% { transform: translateX(0); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(255, 107, 107, 0); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes drawLine {
  from { stroke-dashoffset: 1000; }
  to { stroke-dashoffset: 0; }
}

.animate-bounce-in {
  animation: bounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.animate-float {
  animation: float 3s ease-in-out infinite;
}
.animate-wobble {
  animation: wobble 4s ease-in-out infinite;
}
.animate-pulse-glow {
  animation: pulseGlow 2s ease-in-out infinite;
}
.animate-slide-up {
  animation: slideUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Delay classes */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }

/* ============================================
   Form Styles
   ============================================ */
.form-input {
  width: 100%;
  padding: 0.875rem 1.25rem;
  border: 2px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  outline: none;
}
.form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.1);
}
.dark .form-input:focus {
  box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.15);
}
.form-input::placeholder {
  color: var(--color-muted);
}
.form-input.error {
  border-color: var(--color-primary);
}
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23B8B0C8' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}
textarea.form-input {
  min-height: 140px;
  resize: vertical;
}

/* ============================================
   Doodle Decorative Elements
   ============================================ */
.doodle-star {
  display: inline-block;
  width: 32px;
  height: 32px;
}
.doodle-squiggle {
  width: 100%;
  height: 20px;
}

/* Hand-drawn style divider */
.doodle-divider {
  width: 100%;
  height: 24px;
  opacity: 0.3;
}

/* ============================================
   Section transitions (torn paper edges)
   ============================================ */
.section-torn-top {
  position: relative;
  margin-top: -40px;
  padding-top: 60px;
}
.section-torn-top::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  height: 40px;
  background: var(--color-bg);
  clip-path: polygon(
    0% 100%,
    3% 40%,
    7% 70%,
    12% 30%,
    16% 80%,
    20% 20%,
    24% 60%,
    28% 10%,
    32% 90%,
    36% 40%,
    40% 70%,
    44% 20%,
    48% 85%,
    52% 35%,
    56% 65%,
    60% 15%,
    64% 75%,
    68% 25%,
    72% 95%,
    76% 45%,
    80% 55%,
    84% 10%,
    88% 80%,
    92% 30%,
    96% 60%,
    100% 100%
  );
}

/* ============================================
   FAQ Accordion (Pricing page)
   ============================================ */
.faq-item {
  border-bottom: 1px dashed var(--color-border);
  padding: 1.25rem 0;
}
.faq-item:last-child {
  border-bottom: none;
}

/* ============================================
   Price Tag (Hero visual)
   ============================================ */
.price-tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--color-primary);
  color: white;
  font-family: var(--font-display);
  border-radius: 8px 8px 8px 0;
  box-shadow: 2px 4px 12px rgba(0,0,0,0.15);
}
.price-tag::before {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 12px solid var(--color-primary);
}
.price-tag-airbnb {
  background: #FF385C;
}
.price-tag-airbnb::before {
  border-top-color: #FF385C;
}
.price-tag-you {
  background: var(--color-success);
}
.price-tag-you::before {
  border-top-color: var(--color-success);
}

/* ============================================
   Image overlays
   ============================================ */
.img-overlay {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-card);
}
.img-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(255, 217, 61, 0.1));
  pointer-events: none;
}

/* ============================================
   Mobile adjustments
   ============================================ */
@media (max-width: 768px) {
  .roast-card:nth-child(1) { top: calc(var(--nav-height) + 8px); }
  .roast-card:nth-child(2) { top: calc(var(--nav-height) + 40px); }
  .roast-card:nth-child(3) { top: calc(var(--nav-height) + 72px); }
  .roast-card:nth-child(4) { top: calc(var(--nav-height) + 104px); }
  .roast-card:nth-child(5) { top: calc(var(--nav-height) + 136px); }
}

/* ============================================
   Chat bubble variations (different colors per person)
   ============================================ */
.chat-marco {
  background: linear-gradient(135deg, #FFF0E6, #FFE8D6);
}
.dark .chat-marco {
  background: linear-gradient(135deg, #2D1B35, #382340);
}
.chat-emma {
  background: linear-gradient(135deg, #E8F8F5, #D0F0EC);
}
.dark .chat-emma {
  background: linear-gradient(135deg, #1A2D2D, #243838);
}
.chat-lars {
  background: linear-gradient(135deg, #FFF8E1, #FFE082);
}
.dark .chat-lars {
  background: linear-gradient(135deg, #2D2818, #3D3020);
}

/* ============================================
   Feature card illustration areas
   ============================================ */
.feature-illustration {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   Scrollbar
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--color-muted);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-secondary);
}

/* ============================================
   Utility: doodle border
   ============================================ */
.doodle-border {
  border: 3px solid var(--color-border);
  border-radius: 20px 20px 20px 4px;
  transition: border-color 0.3s ease;
}
.doodle-border:hover {
  border-color: var(--color-primary);
}

/* ============================================
   Pricing card
   ============================================ */
.pricing-card {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
}
.pricing-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 107, 107, 0.06) 0%, transparent 60%);
  pointer-events: none;
}
