/* ===========================================
   Custom interaction CSS — niet verwerkt door Tailwind
   Gelinkt via <link> in BaseLayout.astro
   =========================================== */

/* Scroll-reveal */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  [data-reveal="fade-up"] { transform: translateY(28px); }
  [data-reveal="fade-left"] { transform: translateX(28px); }
  [data-reveal="fade-right"] { transform: translateX(-28px); }
  [data-reveal="scale-in"] { transform: scale(0.97); }

  [data-reveal].is-revealed {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
  }
}

/* Header theme — dark hero (default): white text, scrolled: dark text */
[data-header-theme="dark"] .header-text { color: #ffffff; }
[data-header-theme="dark"] .header-link { color: rgba(255,255,255,0.75); }
[data-header-theme="dark"] .header-link:hover { color: #ffffff; }
[data-header-theme="dark"] .header-bar { background: #ffffff; }

/* Header theme — light hero (not used here, keep for fallback) */
[data-header-theme="light"] .header-text { color: #FAF8F4; }
[data-header-theme="light"] .header-link { color: rgba(250,248,244,0.78); }
[data-header-theme="light"] .header-link:hover { color: #5C8560; }
[data-header-theme="light"] .header-bar { background: #FAF8F4; }

/* Scrolled state — dark charcoal panel with white text + lime hover */
.header-scrolled .header-text { color: #FAF8F4; }
.header-scrolled .header-link { color: rgba(250,248,244,0.78); }
.header-scrolled .header-link:hover { color: #5C8560; }
.header-scrolled .header-bar { background: #FAF8F4; }

/* Sticky header background — warm dark charcoal */
.header-scrolled,
.nav-is-open {
  background: rgba(24, 20, 16, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  border-bottom: 1px solid rgba(92, 133, 96, 0.10);
}

/* Nav open — keep dark */
.nav-is-open .header-text { color: #FAF8F4; }
.nav-is-open .header-bar { background: #FAF8F4; }

/* Mobile nav */
.nav-menu {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}
.nav-menu.is-open {
  grid-template-rows: 1fr;
}
.nav-menu > div {
  overflow: hidden;
}

.nav-toggle .bar-top    { transition: transform 0.3s ease; }
.nav-toggle .bar-mid    { transition: opacity 0.3s ease; }
.nav-toggle .bar-bottom { transition: transform 0.3s ease; }

.nav-toggle[aria-expanded="true"] .bar-top {
  transform: translateY(8px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .bar-mid {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .bar-bottom {
  transform: translateY(-8px) rotate(-45deg);
}

/* FAQ accordion */
.faq-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.faq-panel.is-open {
  max-height: 500px;
}
.faq-chevron {
  transition: transform 0.3s ease;
}
.faq-trigger[aria-expanded="true"] .faq-chevron {
  transform: rotate(180deg);
}

/* Sticky mobile CTA */
#sticky-cta {
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
#sticky-cta.is-visible {
  transform: translateY(0);
}
@media (max-width: 1023px) {
  body { padding-bottom: 5rem; }
}

/* Button hover/active */
.btn {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn:active {
  transform: scale(0.98);
}

/* Card hover — lift + shadow */
.card-hover {
  will-change: transform;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out;
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.1);
}

/* Pricing card hover */
.pricing-hover {
  will-change: transform;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out;
}
.pricing-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.1);
}

/* FAQ item wrapper hover — subtle lift on dark background */
.faq-item {
  transition: background 0.18s ease-out, border-color 0.18s ease-out;
}
.faq-item:hover {
  background: rgba(28, 25, 22, 1);
  border-color: rgba(92, 133, 96, 0.35);
}

/* Card hover variant for dark theme */
.card-dark {
  background: #29241B;
  border: 1px solid rgba(122, 112, 96, 0.18);
  transition: transform 0.18s ease-out, border-color 0.18s ease-out;
}
.card-dark:hover {
  transform: translateY(-3px);
  border-color: rgba(92, 133, 96, 0.45);
}

/* Lime tag — eyebrow + chips */
.tag-lime {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: #5C8560;
}
.tag-lime::before {
  content: '';
  display: inline-block;
  width: 1.5rem;
  height: 1px;
  background: #5C8560;
}

/* Diagonal stripe — used as section accent strip */
.stripe-lime {
  background: linear-gradient(135deg, transparent 0%, transparent 48%, #5C8560 48%, #5C8560 52%, transparent 52%);
}

/* Subtle dot grid — background polish */
.dot-grid {
  background-image: radial-gradient(circle, rgba(92, 133, 96,0.08) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Number badge — for "how it works" steps */
.step-num {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 700;
  font-style: italic;
  font-size: 4rem;
  line-height: 0.9;
  color: rgba(92, 133, 96, 0.18);
  letter-spacing: -0.03em;
}

/* Number badge variant op lichte achtergrond */
.step-num-light {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 700;
  font-style: italic;
  font-size: 4rem;
  line-height: 0.9;
  color: rgba(46, 74, 52, 0.20);
  letter-spacing: -0.03em;
}

/* Stats counter */
.counter {
  display: inline-block;
}

/* Link underline animation */
.link-underline {
  position: relative;
}
.link-underline::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1.5px;
  background: currentColor;
  transition: width 0.3s ease;
}
.link-underline:hover::after {
  width: 100%;
}

/* ===========================================
   Visual polish — zie .claude/rules/visual-polish.md
   =========================================== */

/* Section curve dividers */
.section-curve-top {
  position: relative;
}
.section-curve-top::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 48px;
  background: inherit;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 1440 48' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 48h1440V0C1200 32 960 48 720 48S240 32 0 0v48z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 1440 48' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 48h1440V0C1200 32 960 48 720 48S240 32 0 0v48z'/%3E%3C/svg%3E");
  mask-size: 100% 100%;
  -webkit-mask-size: 100% 100%;
  z-index: 1;
}

.section-curve-bottom {
  position: relative;
}
.section-curve-bottom::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 48px;
  background: inherit;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 1440 48' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h1440v48C1200 16 960 0 720 0S240 16 0 48V0z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 1440 48' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h1440v48C1200 16 960 0 720 0S240 16 0 48V0z'/%3E%3C/svg%3E");
  mask-size: 100% 100%;
  -webkit-mask-size: 100% 100%;
  z-index: 1;
}

/* Hero entrance animation */
@media (prefers-reduced-motion: no-preference) {
  [data-hero] .hero-entrance {
    opacity: 0;
    transform: translateY(16px);
    animation: heroIn 0.6s ease forwards;
  }
  [data-hero] .hero-entrance:nth-child(2) { animation-delay: 0.12s; }
  [data-hero] .hero-entrance:nth-child(3) { animation-delay: 0.24s; }
  [data-hero] .hero-entrance:nth-child(4) { animation-delay: 0.36s; }

  [data-hero] .hero-image-entrance {
    opacity: 0;
    transform: scale(0.95) translateY(12px);
    animation: heroImageIn 0.7s ease forwards;
    animation-delay: 0.2s;
  }

  @keyframes heroIn {
    to { opacity: 1; transform: translateY(0); }
  }
  @keyframes heroImageIn {
    to { opacity: 1; transform: scale(1) translateY(0); }
  }
}

/* Accent glow — alleen op expliciete instructie */
.accent-glow {
  position: relative;
}
.accent-glow::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  height: 80%;
  background: radial-gradient(ellipse, var(--accent-glow-color, rgba(212,132,124,0.04)) 0%, transparent 70%);
  pointer-events: none;
}

/* ===========================================
   Warm-light section variants (volle afwisseling)
   Accent als TEKST op licht = accent-700 (#2E4A34) voor WCAG AA;
   accent-500 (#5C8560) alleen als knop-achtergrond met donkere tekst.
   =========================================== */

/* Unificerende foto-grade — harmoniseert de smartphone-snapshots tot één set.
   Globaal op alle content-foto's (inline SVG-iconen zijn geen <img>, blijven ongemoeid). */
main img {
  filter: grayscale(0.16) contrast(1.05) saturate(0.9) brightness(0.99);
}

/* Light card — voor secties op neutral-50/white achtergrond */
.card-light {
  background: #ffffff;
  border: 1px solid #DDD5C8; /* neutral-200 */
  transition: transform 0.18s ease-out, border-color 0.18s ease-out, box-shadow 0.18s ease-out;
}
.card-light:hover {
  transform: translateY(-3px);
  border-color: rgba(92, 133, 96, 0.55);
  box-shadow: 0 12px 28px -12px rgba(31, 27, 22, 0.18);
}

/* FAQ item hover op lichte achtergrond */
.faq-item-light {
  transition: background 0.18s ease-out, border-color 0.18s ease-out;
}
.faq-item-light:hover {
  background: #FAF8F4; /* neutral-50 */
  border-color: rgba(46, 74, 52, 0.45); /* accent-700 */
}

/* Actieve nav-link (desktop) — overrulet de theme-kleur via source order */
.header-link[aria-current="page"] { color: #5C8560; }

/* Lime eyebrow op lichte achtergrond — donkerder accent voor contrast */
.tag-lime-dark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: #2E4A34; /* accent-700 */
}
.tag-lime-dark::before {
  content: '';
  display: inline-block;
  width: 1.5rem;
  height: 1px;
  background: #2E4A34;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  .nav-menu,
  .nav-toggle .bar-top,
  .nav-toggle .bar-mid,
  .nav-toggle .bar-bottom,
  .faq-panel,
  .faq-chevron,
  #sticky-cta,
  .btn,
  [data-hero] .hero-entrance,
  [data-hero] .hero-image-entrance {
    transition: none !important;
    animation: none !important;
  }
  [data-reveal],
  [data-hero] .hero-entrance,
  [data-hero] .hero-image-entrance {
    opacity: 1 !important;
    transform: none !important;
  }
}
