:root {
  --bg: #fafafa;
  --bg-alt: #f4f4f5;
  --surface: #ffffff;
  --text: #18181b;
  --muted: #52525b;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;

  --accent-a: #f97316;
  --accent-b: #facc15;
  --accent-solid: #9a3412;
  --accent-solid-hover: #7c2d12;
  --accent-solid-text: #ffffff;
  --link: #9a3412;

  --font-display: 'Schibsted Grotesk', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-pill: 999px;
  --max-width: 1120px;
  --gap: 1.5rem;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-soft: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #09090b;
    --bg-alt: #131316;
    --surface: #18181b;
    --text: #fafafa;
    --muted: #a1a1aa;
    --border: #27272a;
    --border-strong: #3f3f46;
    --link: #fb923c;
  }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

img { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: var(--text);
}

.text-balance { text-wrap: balance; }

a {
  color: var(--link);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

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

/* Grain overlay */

.grain {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.section {
  padding: clamp(4rem, 8vw, 7rem) 1.5rem;
  position: relative;
}

.section--alt {
  background: var(--bg-alt);
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section h2 {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  margin-bottom: 2.5rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* Eyebrow pill */

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--accent-a) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent-a) 30%, var(--border));
  color: var(--accent-solid);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  font-weight: 500;
  margin-bottom: 1.25rem;
}

/* Floating pill nav */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  justify-content: center;
  padding-top: 1rem;
  pointer-events: none;
}

.site-nav-pill {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.5rem 0.6rem 0.5rem 1rem;
  box-shadow: 0 12px 30px -16px color-mix(in srgb, var(--text) 25%, transparent);
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}
.brand-mark:hover { text-decoration: none; }
.brand-mark img { border-radius: 6px; }

.nav-links {
  display: flex;
  gap: 0.25rem;
  font-weight: 500;
  font-size: 0.9rem;
}

.nav-links a {
  color: var(--text);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-pill);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.nav-links a:hover {
  background: var(--bg-alt);
  color: var(--link);
  text-decoration: none;
}

/* Hero */

.hero {
  padding: 6rem 1.5rem 5rem;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(2.5rem, 5.2vw, 3.85rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.hero-tagline {
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 46ch;
  margin: 0 0 2.25rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

.hero-glow {
  position: absolute;
  inset: -25%;
  background:
    radial-gradient(circle at 35% 30%, var(--accent-a) 0%, transparent 60%),
    radial-gradient(circle at 70% 70%, var(--accent-b) 0%, transparent 55%);
  opacity: 0.28;
  filter: blur(50px);
}

.hero-plate {
  position: relative;
  background: color-mix(in srgb, var(--text) 4%, transparent);
  border: 1px solid var(--border);
  border-radius: 2rem;
  padding: 0.5rem;
}

.hero-plate img {
  background: var(--surface);
  border-radius: 1.6rem;
  padding: 2.25rem;
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--text) 6%, transparent);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0.4rem 0.4rem 1.5rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: transform 0.4s var(--ease), background 0.3s ease, border-color 0.3s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent-solid);
  color: var(--accent-solid-text);
  padding-right: 0.4rem;
}
.btn-primary:hover { background: var(--accent-solid-hover); }

.btn-icon {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, white 22%, transparent);
  transition: transform 0.4s var(--ease);
}
.btn:hover .btn-icon { transform: translate(2px, -2px); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 0.72rem 1.5rem;
}
.btn-ghost:hover {
  border-color: var(--accent-solid);
  color: var(--link);
}

/* Project bento grid (double-bezel cards) */

.project-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--gap);
  align-items: stretch;
}

.project-card {
  grid-column: span 2;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.35rem;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease-soft), transform 0.7s var(--ease-soft), border-color 0.3s ease, box-shadow 0.3s ease;
}

.reveal.is-visible .project-card { opacity: 1; transform: none; }

.project-card:hover {
  border-color: color-mix(in srgb, var(--accent-a) 40%, var(--border));
  box-shadow: 0 16px 32px -20px color-mix(in srgb, var(--accent-a) 40%, transparent);
}

.project-card--featured { grid-column: span 4; }

.project-card:nth-child(1) { transition-delay: 0ms; }
.project-card:nth-child(2) { transition-delay: 60ms; }
.project-card:nth-child(3) { transition-delay: 120ms; }
.project-card:nth-child(4) { transition-delay: 180ms; }
.project-card:nth-child(5) { transition-delay: 240ms; }

.project-card--featured {
  background: color-mix(in srgb, var(--accent-a) 6%, var(--surface));
  border-color: color-mix(in srgb, var(--accent-a) 35%, var(--border));
}

.project-flag {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--accent-a) 16%, var(--surface));
  color: var(--accent-solid);
  border: 1px solid color-mix(in srgb, var(--accent-a) 30%, var(--border));
}

.project-card--featured h3 { font-size: 1.5rem; }

.project-card h3 {
  font-size: 1.15rem;
  margin: 0;
}

.project-card p {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
  flex-grow: 1;
}

.project-badges {
  display: flex;
  gap: 0.5rem;
}

.badge {
  width: 24px;
  height: 24px;
  object-fit: contain;
  background: #fff;
  border-radius: 7px;
  padding: 3px;
}

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

.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.2rem 0.6rem;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--link);
}
.card-link:hover { text-decoration: none; }

.btn-icon--sm {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent-a) 16%, transparent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: transform 0.4s var(--ease);
}
.card-link:hover .btn-icon--sm { transform: translate(2px, -2px); }

/* Diensten: divided rows with faint index numerals */

.service-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.service-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease-soft), transform 0.7s var(--ease-soft);
}
.service-rows .service-row:last-child {
  border-bottom: 1px solid var(--border);
}

.reveal.is-visible .service-row { opacity: 1; transform: none; }
.service-row:nth-child(1) { transition-delay: 0ms; }
.service-row:nth-child(2) { transition-delay: 80ms; }
.service-row:nth-child(3) { transition-delay: 160ms; }

.service-row h3 {
  font-size: 1.2rem;
}

.service-row p {
  color: var(--muted);
  margin: 0;
  max-width: 52ch;
}

/* Overige werkzaamheden: divided columns */

.overig-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.overig-col {
  padding: 0 2rem;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease-soft), transform 0.7s var(--ease-soft);
}
.overig-col:first-child { padding-left: 0; }
.overig-col:not(:first-child) { border-left: 1px solid var(--border); }

.reveal.is-visible .overig-col { opacity: 1; transform: none; }
.overig-col:nth-child(1) { transition-delay: 0ms; }
.overig-col:nth-child(2) { transition-delay: 80ms; }
.overig-col:nth-child(3) { transition-delay: 160ms; }

.overig-col h3 {
  font-size: 1.1rem;
}

.overig-col p {
  color: var(--muted);
  margin: 0;
}

/* Contact */

.contact-inner {
  text-align: center;
}

.contact-inner p {
  color: var(--muted);
}

.contact-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.75rem;
  flex-wrap: wrap;
}

/* Footer */

.site-footer {
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}

/* Mobile */

@media (max-width: 768px) {
  .site-nav { padding-top: 0.75rem; }
  .site-nav-pill { gap: 1rem; }

  .hero { padding: 5.5rem 1.25rem 3.5rem; }
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-copy .hero-tagline { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-visual { order: -1; min-height: 160px; margin-bottom: 1rem; }
  .hero-plate img { width: 120px; height: 120px; padding: 1.5rem; }

  .project-grid { grid-template-columns: 1fr; }
  .project-card,
  .project-card--featured {
    grid-column: span 1;
  }

  .service-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .overig-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .overig-col,
  .overig-col:not(:first-child) {
    padding: 0;
    border-left: none;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
  }
  .overig-col:first-child { border-top: none; padding-top: 0; }
}

@media (max-width: 600px) {
  .brand-mark span { display: none; }
  .section { padding: 3.5rem 1.25rem; }
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
