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

/* ── Variables ──────────────────────────────────────────────── */
:root {
  --bg:        #0A0A11;
  --bg-card:   #101019;
  --border:    #1D1D2B;
  --border-2:  #262638;
  --accent-1:  #6B21E8;
  --accent-2:  #A855F7;
  --blue:      #3B82F6;
  --fg:        #F1F0FF;
  --muted:     #8786A0;
  --muted-2:   #5C5C74;
}

/* ── Base ───────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration:  0.01ms !important;
  }
}

body {
  background:  var(--bg);
  color:       var(--fg);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size:   16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; }

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

/* ── Layout ─────────────────────────────────────────────────── */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

section { padding: 8rem 0; }

@media (max-width: 768px) {
  section { padding: 5rem 0; }
  .container { padding: 0 1.25rem; }
}

/* ── Shared typography ──────────────────────────────────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 1.4rem;
}

.eyebrow::before {
  content: '';
  display: block;
  width: 1.75rem;
  height: 1px;
  flex-shrink: 0;
  background: var(--accent-2);
}

h2 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.section-header { margin-bottom: 3.5rem; }

/* ── Navigation ─────────────────────────────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 200;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

.nav.is-scrolled { border-bottom-color: var(--border); }

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  white-space: nowrap;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.015em;
  color: var(--fg);
}

.nav-brand svg { flex-shrink: 0; }

.nav-left {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-projects {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: 1.25rem;
  padding-left: 1.25rem;
  border-left: 1px solid var(--border-2);
}

.nav-project-link {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted-2);
  transition: color 0.2s;
  letter-spacing: 0.01em;
}

.nav-project-link:hover { color: var(--muted); }

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.25rem;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--fg); }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.45rem 0.55rem;
  cursor: pointer;
  color: var(--fg);
}

.nav-drawer {
  display: none;
  position: fixed;
  inset: 64px 0 auto;
  z-index: 199;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 1.25rem;
}

.nav-drawer.is-open { display: block; }

.nav-drawer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.nav-drawer a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}

.nav-drawer a:hover { color: var(--fg); }

@media (max-width: 768px) {
  .nav-links  { display: none; }
  .nav-toggle { display: flex; }
}

/* ── Hero ───────────────────────────────────────────────────── */
#hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 64px;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 620px;
  background: radial-gradient(
    ellipse 50% 50% at 50% 28%,
    rgba(124, 58, 237, 0.18) 0%,
    rgba(124, 58, 237, 0.07) 42%,
    transparent 68%
  );
  pointer-events: none;
  user-select: none;
}

.hero-matrix {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  background-image: radial-gradient(circle, rgba(168, 85, 247, 0.13) 1.1px, transparent 1.6px);
  background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(ellipse 62% 70% at 88% 30%, #000 0%, transparent 68%);
  mask-image: radial-gradient(ellipse 62% 70% at 88% 30%, #000 0%, transparent 68%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 840px;
}

.hero-pre {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 1.75rem;
  letter-spacing: 0.01em;
}

.hero-headline {
  font-size: clamp(2.75rem, 7vw, 4.75rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.04;
  color: var(--fg);
  margin-bottom: 1.75rem;
}

.hero-subline {
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  color: var(--muted);
  line-height: 1.7;
  max-width: 540px;
  margin-bottom: 2.75rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 7px;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s, transform 0.15s, border-color 0.2s, color 0.2s;
}

.btn:hover  { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent-1);
  color: #fff;
}

.btn-primary:hover { background: #7C3AED; }

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border-2);
}

.btn-ghost:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
}

.btn-secondary {
  position: relative;
  background: rgba(124, 58, 237, 0.08);
  color: var(--fg);
  border: 1px solid var(--accent-1);
  padding: 0.85rem 1.9rem;
  overflow: hidden;
  isolation: isolate;
  animation: btn-attn 3.6s ease-in-out infinite;
}

.btn-secondary::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(168, 85, 247, 0.22) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: btn-sheen 3.6s ease-in-out infinite;
}

.btn-secondary:hover {
  background: var(--accent-1);
  border-color: var(--accent-1);
  animation-play-state: paused;
}

.btn-secondary:hover::before { animation-play-state: paused; opacity: 0; }

.btn-secondary svg { transition: transform 0.25s ease; }

.btn-secondary:hover svg { transform: translateX(4px); }

@keyframes btn-attn {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.0); }
  50%       { box-shadow: 0 0 22px 1px rgba(124, 58, 237, 0.32); }
}

@keyframes btn-sheen {
  0%, 55%   { transform: translateX(-120%); }
  80%, 100% { transform: translateX(120%); }
}

@media (prefers-reduced-motion: reduce) {
  .btn-secondary, .btn-secondary::before { animation: none; }
}

/* ── Card base ──────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.875rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  transition: border-color 0.25s;
}

.card:hover { border-color: var(--border-2); }

/* ── About ──────────────────────────────────────────────────── */
#about {
  border-top: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 1.1rem;
}

.about-text p:last-child { margin-bottom: 0; }

.about-text strong {
  color: var(--fg);
  font-weight: 600;
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ── Diensten ───────────────────────────────────────────────── */
#diensten {
  border-top: 1px solid var(--border);
}

.diensten-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.dienst-icon {
  width: 28px;
  height: 28px;
  color: var(--accent-2);
  margin-bottom: 1.4rem;
}

.dienst-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.02em;
  margin-bottom: 0.7rem;
}

.dienst-card p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 900px) {
  .diensten-grid { grid-template-columns: 1fr; }
}

/* ── Werk / Cases ───────────────────────────────────────────── */
#werk {
  border-top: 1px solid var(--border);
}

.werk-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.case-card {
  display: flex;
  flex-direction: column;
}

.case-label {
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 0.6rem;
}

.case-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 0.8rem;
}

.case-card p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 1.25rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0.22rem 0.6rem;
  border-radius: 5px;
  background: #15151F;
  border: 1px solid var(--border);
  color: var(--muted);
}

.case-card:hover .tag { border-color: var(--border-2); }

@media (max-width: 900px) {
  .werk-grid { grid-template-columns: 1fr; }
}

/* ── Stack ──────────────────────────────────────────────────── */
#stack {
  border-top: 1px solid var(--border);
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.stack-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.4rem 1.5rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.stack-item:nth-child(3n) { border-right: none; }
.stack-item:nth-last-child(-n+3) { border-bottom: none; }

.stack-item:hover { background: #14141E; }

.stack-slot {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-2);
  border-radius: 9px;
  background: #14141E;
}

.stack-item svg {
  width: 20px;
  height: 20px;
  color: var(--accent-2);
}

.stack-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

@media (max-width: 768px) {
  .stack-grid { grid-template-columns: repeat(2, 1fr); }
  .stack-item:nth-child(3n) { border-right: 1px solid var(--border); }
  .stack-item:nth-child(2n) { border-right: none; }
  .stack-item:nth-last-child(-n+3) { border-bottom: 1px solid var(--border); }
  .stack-item:nth-last-child(-n+1) { border-bottom: none; }
}

@media (max-width: 460px) {
  .stack-grid { grid-template-columns: 1fr; }
  .stack-item { border-right: none !important; }
}

/* ── Contact ────────────────────────────────────────────────── */
#contact {
  border-top: 1px solid var(--border);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.contact-sub {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.65;
  margin-top: 0.75rem;
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.contact-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--accent-2);
}

.contact-link:hover { color: var(--fg); }

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* ── Form ───────────────────────────────────────────────────── */
.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-field label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.form-field input,
.form-field textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.7rem 0.875rem;
  color: var(--fg);
  font-family: inherit;
  font-size: 0.875rem;
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--accent-2);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--muted);
  opacity: 0.5;
}

.form-field textarea {
  resize: vertical;
  min-height: 130px;
}

.form-success {
  display: none;
  font-size: 0.875rem;
  color: #4ade80;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(74, 222, 128, 0.2);
  border-radius: 6px;
  background: rgba(74, 222, 128, 0.06);
}

.form-success.visible { display: block; }

.form-error {
  display: none;
  font-size: 0.875rem;
  color: #f87171;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(248, 113, 113, 0.2);
  border-radius: 6px;
  background: rgba(248, 113, 113, 0.06);
}

.form-error.visible { display: block; }

@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
}

/* ── Puzzel ─────────────────────────────────────────────────── */
#puzzel {
  border-top: 1px solid var(--border);
}

@keyframes pipe-pop {
  0%   { transform: scale(0.96); }
  60%  { transform: scale(1.03); }
  100% { transform: scale(1); }
}

@keyframes pipe-flow {
  to { background-position: -28px 0; }
}

.puzzle-cell:hover {
  box-shadow: inset 0 0 0 1px var(--accent-2) !important;
}

.puzzle-size-btn:hover {
  border-color: var(--accent-2) !important;
  color: var(--accent-2) !important;
}

.puzzle-new-btn:hover {
  background: #7C3AED !important;
}

/* ── Footer ─────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 0;
}

footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

footer p {
  font-size: 0.78rem;
  color: var(--muted);
}
