/* Flatten — custom styles beyond Tailwind */

:root {
  --bg: #f9f9f9;
  --bg-alt: #f3f1ec;
  --panel: #ffffff;
  --panel-2: #f5f3ee;
  --text: #183c40;
  --secondary: #20494d;
  --muted: #5d7679;
  --border: #e3e0d8;
  --border-strong: #cfd6d6;
  --sky: #a6daea; /* accent 3 */
  --mint: #b0d5cd; /* accent 2 */
  --peach: #fce5cd; /* accent 4 */
  --slate: #799da7; /* accent 1 */
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-optical-sizing: auto;
  color: var(--text);
}

.font-display {
  font-family: "Newsreader", Georgia, serif;
  letter-spacing: -0.015em;
  font-weight: 600;
}

/* ==== Hero backdrop: lowkey graphs being drawn ==== */
.hero {
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(
    ellipse 90% 75% at 50% 40%,
    black 40%,
    transparent 90%
  );
  -webkit-mask-image: radial-gradient(
    ellipse 90% 75% at 50% 40%,
    black 40%,
    transparent 90%
  );
}
.hero > *:not(.hero-bg) {
  position: relative;
  z-index: 1;
}
.hero-bg path {
  fill: none;
  stroke: var(--slate);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.3;
  stroke-dasharray: 2400;
  stroke-dashoffset: 2400;
  animation: draw-graph 18s ease-in-out infinite;
}
.hero-bg path.g2 {
  stroke: var(--mint);
  opacity: 0.4;
  animation-duration: 24s;
  animation-delay: -6s;
}
.hero-bg path.g3 {
  stroke: var(--sky);
  opacity: 0.45;
  animation-duration: 30s;
  animation-delay: -12s;
}
.hero-bg path.g4 {
  stroke: var(--peach);
  opacity: 0.5;
  animation-duration: 22s;
  animation-delay: -3s;
}

@keyframes draw-graph {
  0% {
    stroke-dashoffset: 2400;
  }
  45% {
    stroke-dashoffset: 0;
  }
  55% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: -2400;
  }
}

.hero-title {
  font-family: "Newsreader", Georgia, serif;
  color: var(--text);
  margin: 0;
  display: block;
}
.hero-title .hero-brand {
  display: block;
  font-size: clamp(4rem, 12vw, 11rem);
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.hero-title .hero-tagline {
  display: block;
  font-size: clamp(1.25rem, 2.4vw, 2rem);
  line-height: 1.25;
  font-weight: 500;
  color: var(--secondary);
  margin-top: 1rem;
  letter-spacing: -0.005em;
}

.hero-subtitle {
  max-width: 720px;
  font-size: 1.2rem;
  color: var(--secondary);
  line-height: 1.6;
  font-weight: 400;
}

/* ==== Tool blocks ==== */
.tool-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  width: 80%;
  margin: 6rem auto;
  padding: 2.5rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  position: relative;
  transition:
    transform 0.4s ease,
    border-color 0.4s ease,
    box-shadow 0.4s ease;
  box-shadow: 0 1px 2px rgba(24, 60, 64, 0.04);
}
.tool-block:hover {
  transform: translateY(-4px);
  border-color: var(--accent, var(--slate));
  box-shadow: 0 18px 40px -20px rgba(24, 60, 64, 0.18);
}
.tool-block.reverse {
  direction: rtl;
}
.tool-block.reverse > * {
  direction: ltr;
}

.tool-block::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  /* default: text on left → tint blooms from the left */
  background: linear-gradient(
    to right,
    var(--accent-tint, var(--mint)) 0%,
    transparent 55%
  );
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}
.tool-block.reverse::before {
  /* text on right → tint blooms from the right */
  background: linear-gradient(
    to left,
    var(--accent-tint, var(--mint)) 0%,
    transparent 55%
  );
}
.tool-block > * {
  position: relative;
  z-index: 1;
}

.tool-block .tool-illustration {
  display: flex;
  align-items: center;
  justify-content: center;
}
.tool-block .tool-illustration svg {
  width: 100%;
  max-width: 420px;
  height: auto;
  filter: drop-shadow(0 8px 24px rgba(24, 60, 64, 0.1));
  overflow: visible;
}

/* ==== Hover interactions per illustration ==== */

/* vastdynamisch: dynamic line redraws + markers pulse on hover */
.illus-vd .vd-dynamic {
  stroke-dasharray: 1200;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.6s ease;
}
.tool-block:hover .illus-vd .vd-dynamic {
  stroke-dashoffset: 1200;
  animation: vd-redraw 2.4s ease 0.05s forwards;
}
@keyframes vd-redraw {
  0% {
    stroke-dashoffset: 1200;
  }
  100% {
    stroke-dashoffset: 0;
  }
}
.illus-vd .vd-marker {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.4s ease;
}
.tool-block:hover .illus-vd .vd-marker {
  animation: vd-pulse 1.4s ease-in-out infinite;
}
.illus-vd .vd-marker.m2 {
  animation-delay: 0.4s !important;
}
@keyframes vd-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.6);
  }
}

/* electric-van: van rolls slightly forward, lightning + plug pulse */
.illus-van .van-shift {
  transition: transform 0.6s ease;
}
.illus-van .van-wheel {
  transform-box: fill-box;
  transform-origin: center;
}
.tool-block:hover .illus-van .van-shift {
  transform: translateX(8px);
}
.tool-block:hover .illus-van .van-wheel {
  animation: van-spin 1.2s linear infinite;
}
@keyframes van-spin {
  to {
    transform: rotate(360deg);
  }
}
.illus-van .van-bolt {
  transform-box: fill-box;
  transform-origin: center;
}
.tool-block:hover .illus-van .van-bolt {
  animation: bolt-flash 0.9s ease-in-out infinite;
}
.tool-block:hover .illus-van .van-plug {
  animation: bolt-flash 0.9s ease-in-out 0.2s infinite;
}
@keyframes bolt-flash {
  0%,
  100% {
    opacity: 1;
    filter: drop-shadow(0 0 0 transparent);
  }
  50% {
    opacity: 0.5;
    filter: drop-shadow(0 0 6px var(--text));
  }
}

/* installer: bars rise sequentially, battery cells light up */
.illus-installer .bar {
  transform-box: fill-box;
  transform-origin: bottom;
  transform: scaleY(1);
  transition: transform 0.5s ease;
}
.tool-block:hover .illus-installer .bar.b1 {
  animation: bar-grow 1.4s ease 0.05s infinite;
}
.tool-block:hover .illus-installer .bar.b2 {
  animation: bar-grow 1.4s ease 0.2s infinite;
}
.tool-block:hover .illus-installer .bar.b3 {
  animation: bar-grow 1.4s ease 0.35s infinite;
}
@keyframes bar-grow {
  0%,
  60%,
  100% {
    transform: scaleY(1);
  }
  30% {
    transform: scaleY(0.4);
  }
}
.illus-installer .battery-cell {
  transition: opacity 0.3s ease;
}
.tool-block:hover .illus-installer .battery-cell.c1 {
  animation: cell-on 1.8s ease 0s infinite;
}
.tool-block:hover .illus-installer .battery-cell.c2 {
  animation: cell-on 1.8s ease 0.3s infinite;
}
.tool-block:hover .illus-installer .battery-cell.c3 {
  animation: cell-on 1.8s ease 0.6s infinite;
}
@keyframes cell-on {
  0%,
  100% {
    opacity: 1;
    filter: none;
  }
  50% {
    opacity: 1;
    filter: drop-shadow(0 0 4px var(--mint));
  }
}

/* verduurzaming: leaf wiggles, bars grow */
.illus-verd .verd-leaf {
  transform-box: fill-box;
  transform-origin: bottom left;
  transition: transform 0.4s ease;
}
.tool-block:hover .illus-verd .verd-leaf {
  animation: leaf-wiggle 1.6s ease-in-out infinite;
}
@keyframes leaf-wiggle {
  0%,
  100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(14deg);
  }
}
.illus-verd .verd-bar {
  transform-box: fill-box;
  transform-origin: bottom;
}
.tool-block:hover .illus-verd .verd-bar.vb1 {
  animation: bar-grow 1.6s ease 0s infinite;
}
.tool-block:hover .illus-verd .verd-bar.vb2 {
  animation: bar-grow 1.6s ease 0.15s infinite;
}
.tool-block:hover .illus-verd .verd-bar.vb3 {
  animation: bar-grow 1.6s ease 0.3s infinite;
}
.tool-block:hover .illus-verd .verd-bar.vb4 {
  animation: bar-grow 1.6s ease 0.45s infinite;
}

/* respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .hero-bg path,
  .tool-block:hover * {
    animation: none !important;
    transition: none !important;
  }
}

.tool-block h3 {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.7rem, 2.8vw, 2.5rem);
  font-weight: 600;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -0.015em;
}
.tool-block .tool-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 0.85rem;
  font-family: "Newsreader", Georgia, serif;
}
.tool-block p {
  color: var(--secondary);
  line-height: 1.7;
  margin-bottom: 1.75rem;
  font-size: 1.02rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  background: var(--text);
  color: #ffffff;
  border: none;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  text-decoration: none;
  font-family: inherit;
}
.btn:hover {
  transform: translateY(-1px);
  background: var(--secondary);
  box-shadow: 0 10px 24px -10px rgba(24, 60, 64, 0.35);
}
.btn:active {
  transform: translateY(0);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover {
  background: var(--panel-2);
  box-shadow: none;
}

/* Accent button variant — uses the block's accent tint */
.tool-block .btn {
  background: var(--accent, var(--text));
  color: var(--text);
}
.tool-block .btn:hover {
  background: var(--accent-strong, var(--secondary));
  color: #ffffff;
  box-shadow: 0 10px 24px -10px var(--accent-strong, rgba(24, 60, 64, 0.4));
}

/* per-block accent colors */
.tool-block.tone-sky {
  --accent: var(--sky);
  --accent-tint: var(--sky);
  --accent-strong: #6ec3df;
}
.tool-block.tone-peach {
  --accent: var(--peach);
  --accent-tint: var(--peach);
  --accent-strong: #f4c897;
}
.tool-block.tone-mint {
  --accent: var(--mint);
  --accent-tint: var(--mint);
  --accent-strong: #87bdb1;
}
.tool-block.tone-slate {
  --accent: var(--slate);
  --accent-tint: var(--slate);
  --accent-strong: #5d7e88;
}

@media (max-width: 800px) {
  .tool-block,
  .tool-block.reverse {
    width: 92%;
    margin: 3rem auto !important;
    grid-template-columns: 1fr;
    direction: ltr;
    padding: 1.5rem;
    gap: 1.5rem;
  }
  .tool-block .tool-illustration svg {
    max-width: 280px;
  }
}

/* ==== Section headings ==== */
.section-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  margin-bottom: 0.75rem;
  font-family: "Newsreader", Georgia, serif;
}
.section-title {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(2.2rem, 4.2vw, 3.2rem);
  font-weight: 600;
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* ==== Team cards ==== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 920px;
  margin: 0 auto;
}
.team-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
  box-shadow: 0 1px 2px rgba(24, 60, 64, 0.04);
}
.team-card:hover {
  transform: translateY(-4px);
  border-color: var(--slate);
  box-shadow: 0 14px 30px -18px rgba(24, 60, 64, 0.2);
}
.team-card .photo {
  aspect-ratio: 1;
  width: 100%;
  background: var(--panel-2);
}
.team-card .photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.team-card .info {
  padding: 1.25rem;
}
.team-card h3 {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 0;
}
.team-card .role {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.15rem;
}
.team-card a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--secondary);
  font-size: 0.9rem;
  margin-top: 0.75rem;
  text-decoration: none;
  font-weight: 500;
}
.team-card a:hover {
  color: var(--text);
  text-decoration: underline;
}
@media (max-width: 720px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
}

/* ==== Forms ==== */
.form-card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 1px 2px rgba(24, 60, 64, 0.04);
}
.form-card label {
  display: block;
  font-size: 0.78rem;
  color: var(--secondary);
  margin-bottom: 0.4rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.form-card input,
.form-card textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 0.75rem 0.95rem;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  margin-bottom: 1rem;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}
.form-card input:focus,
.form-card textarea:focus {
  outline: none;
  border-color: var(--text);
  background: #ffffff;
}
.form-card textarea {
  min-height: 120px;
  resize: vertical;
}
.form-status {
  font-size: 0.9rem;
  margin-top: 0.75rem;
  min-height: 1.2em;
}
.form-status.ok {
  color: var(--secondary);
}
.form-status.err {
  color: #c0573b;
}

/* ==== Modal (interest) ==== */
dialog.interest-modal {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  max-width: 460px;
  width: 92%;
  box-shadow: 0 30px 60px -20px rgba(24, 60, 64, 0.3);
}
dialog.interest-modal::backdrop {
  background: rgba(24, 60, 64, 0.35);
  backdrop-filter: blur(4px);
}
dialog.interest-modal h3 {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}
dialog.interest-modal h3 .modal-title-lead {
  display: block;
}
dialog.interest-modal h3 .modal-title-tool {
  display: block;
  margin-top: 0.15rem;
  font-size: 1.25rem;
  color: var(--secondary);
  font-style: italic;
}
dialog.interest-modal p {
  color: var(--secondary);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}
dialog.interest-modal .modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}
dialog.interest-modal .modal-close:hover {
  color: var(--text);
}
dialog.interest-modal label {
  display: block;
  font-size: 0.78rem;
  color: var(--secondary);
  margin-bottom: 0.4rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
dialog.interest-modal input[type="text"],
dialog.interest-modal input[type="email"] {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 0.75rem 0.95rem;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s ease;
}
dialog.interest-modal input:focus {
  outline: none;
  border-color: var(--text);
}
dialog.interest-modal input::placeholder {
  color: var(--muted);
}

/* ==== Nav ==== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  background: rgba(249, 249, 249, 0.85);
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.55rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.015em;
}
.nav-brand svg {
  color: var(--secondary);
  width: 28px;
  height: 28px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.nav-links a {
  color: var(--secondary);
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.2s;
  font-family: "Newsreader", Georgia, serif;
}
.nav-links a:hover {
  color: var(--text);
}
.lang-toggle {
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text) !important;
}
.lang-toggle:hover {
  background: var(--panel);
}
@media (max-width: 640px) {
  .nav-links a:not(.lang-toggle) {
    display: none;
  }
}

/* ==== Footer ==== */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem;
  margin-top: 6rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer a {
  color: var(--secondary);
}

/* ==== Reveal-on-scroll ==== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}
.reveal.in {
  opacity: 1;
  transform: none;
}
