/* ===========================================
   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: dark text */
[data-header-theme="light"] .header-text { color: #2C2824; }
[data-header-theme="light"] .header-link { color: #7A7169; }
[data-header-theme="light"] .header-link:hover { color: #2C2824; }
[data-header-theme="light"] .header-bar { background: #2C2824; }

/* Scrolled state — always dark text on light bg */
.header-scrolled .header-text { color: #2C2824; }
.header-scrolled .header-link { color: #7A7169; }
.header-scrolled .header-link:hover { color: #1A1714; }
.header-scrolled .header-bar { background: #2C2824; }

/* Sticky header background — dark variant for Lopes */
.header-scrolled,
.nav-is-open {
  background: rgba(22, 20, 19, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(229, 21, 42, 0.18), 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Scrolled — keep text white on dark scrolled bar */
.header-scrolled .header-text { color: #ffffff; }
.header-scrolled .header-link { color: rgba(255,255,255,0.78); }
.header-scrolled .header-link:hover { color: #ffffff; }
.header-scrolled .header-bar { background: #ffffff; }

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

/* 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 + Lopes-rood glow */
.card-hover {
  will-change: transform;
  transition: transform 0.18s ease-out, box-shadow 0.18s ease-out, border-color 0.18s ease-out;
}
.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(229, 21, 42, 0.3);
}

/* Pricing card hover */
.pricing-hover {
  will-change: transform;
  transition: transform 0.18s ease-out, box-shadow 0.18s ease-out;
}
.pricing-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px -8px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(229, 21, 42, 0.4);
}

/* FAQ item wrapper hover — donker thema */
.faq-item {
  transition: background 0.18s ease-out, border-color 0.18s ease-out;
  border: 1px solid rgba(255,255,255,0.08);
}
.faq-item:hover {
  background: rgba(255,255,255,0.03);
  border-color: rgba(229, 21, 42, 0.4);
}

/* 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;
}

/* ===========================================
   Lopes signature visuals — donker thema
   =========================================== */

/* Body background — warme charcoal met subtiele texture */
body {
  background-color: #161413;
  background-image:
    radial-gradient(at 20% 0%, rgba(229, 21, 42, 0.08) 0px, transparent 50%),
    radial-gradient(at 80% 100%, rgba(229, 21, 42, 0.04) 0px, transparent 50%);
  background-attachment: fixed;
}

/* Section: lichter (off-charcoal) */
.bg-section-light {
  background: #1F1D1B;
}

/* Section: donkerder dan body */
.bg-section-dark {
  background: #0E0D0C;
}

/* Red horizontal slash — signature marker */
.slash-marker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.slash-marker::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 2px;
  background: #E5152A;
  flex-shrink: 0;
}

/* Boxing-tape diagonal stripe — herhaalbaar achtergrond-pattern */
.tape-stripe {
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(229, 21, 42, 0.08) 0px,
    rgba(229, 21, 42, 0.08) 2px,
    transparent 2px,
    transparent 12px
  );
}

/* Red corner accent — voor cards */
.corner-accent {
  position: relative;
  overflow: hidden;
}
.corner-accent::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  background: linear-gradient(225deg, rgba(229, 21, 42, 0.18) 0%, transparent 60%);
  pointer-events: none;
}

/* Eyebrow label — Oswald uppercase */
.eyebrow {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #E5152A;
}

/* Hero overlay — image darkening */
.hero-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.20) 0%, rgba(22,20,19,0.0) 35%, rgba(22,20,19,0.92) 100%);
  pointer-events: none;
}

/* Number badge — voor methode pijlers */
.pillar-number {
  font-family: 'Oswald', sans-serif;
  font-weight: 500;
  font-size: 4rem;
  line-height: 1;
  color: rgba(229, 21, 42, 0.32);
  letter-spacing: -0.04em;
}

/* Stats counter — Oswald display */
.stat-number {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1;
  color: #ffffff;
  letter-spacing: -0.02em;
}

/* Star rating */
.star-row {
  color: #FFC93C;
  letter-spacing: 0.12em;
}

/* 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;
  }
}

/* Mobile dropdown panel */
.mobile-dropdown-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease-out;
}
.mobile-dropdown-panel.is-open {
  max-height: 320px;
}

@media (prefers-reduced-motion: reduce) {
  .mobile-dropdown-panel {
    transition: none !important;
  }
}
