/*
 * Durior — design system
 * "Durior" is Latijn voor 'harder/sterker': engineered durability.
 * Grafiet + staalblauw, monumentale typografie, technische mono-accenten.
 */

:root {
  --ink: #0b0e11;
  --ink-2: #10151a;
  --ink-3: #161d23;
  --paper: #e9edf0;
  --muted: #8a979f;
  --faint: #5a666d;
  --steel: #4a90a4;
  --steel-light: #7fb8cb;
  --steel-glow: rgba(74, 144, 164, 0.35);
  --rails: #cc0000;
  --rails-light: #e85d52;
  --line: rgba(233, 237, 240, 0.08);
  --line-strong: rgba(233, 237, 240, 0.16);
}

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  background: var(--ink);
  color: var(--paper);
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}

::selection {
  background: var(--steel);
  color: var(--ink);
}

/* ---------- Typography ---------- */

.font-display {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-optical-sizing: auto;
  letter-spacing: -0.02em;
}

.font-tech {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.text-outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--steel);
}

.text-steel { color: var(--steel-light); }
.text-muted { color: var(--muted); }
.text-faint { color: var(--faint); }

.text-gradient-steel {
  background: linear-gradient(110deg, var(--steel-light) 10%, var(--steel) 55%, #2f6678 95%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-rails {
  background: linear-gradient(120deg, var(--rails-light), var(--rails));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- Atmosfeer: grid, noise, glows ---------- */

.site-shell {
  position: relative;
  background:
    radial-gradient(1100px 600px at 80% -5%, rgba(74, 144, 164, 0.13), transparent 60%),
    radial-gradient(900px 700px at -10% 45%, rgba(74, 144, 164, 0.07), transparent 55%),
    var(--ink);
}

.blueprint-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), rgba(0,0,0,0.25) 40%, rgba(0,0,0,0.7));
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), rgba(0,0,0,0.25) 40%, rgba(0,0,0,0.7));
}

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

/* ---------- Navigatie ---------- */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: linear-gradient(to bottom, rgba(11, 14, 17, 0.85), rgba(11, 14, 17, 0.4));
  border-bottom: 1px solid var(--line);
}

.nav-mark {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
}

.nav-mark sup {
  color: var(--steel);
  font-size: 0.6em;
}

.nav-logo {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 18px rgba(74, 144, 164, 0.25);
}

.nav-link {
  position: relative;
  color: var(--muted);
  transition: color 0.3s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: var(--steel);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}

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

.nav-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ---------- Hero ---------- */

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero-headline {
  font-size: clamp(3.1rem, 10.5vw, 8.5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.headline-mask {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

.hero-rule {
  width: 64px;
  height: 2px;
  background: linear-gradient(90deg, var(--steel), transparent);
}

.scroll-hint-line {
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, var(--steel), transparent);
  position: relative;
  overflow: hidden;
}

.scroll-hint-line::after {
  content: "";
  position: absolute;
  top: -50%;
  left: 0;
  width: 100%;
  height: 50%;
  background: var(--paper);
  animation: scroll-drip 2.2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes scroll-drip {
  0% { top: -50%; }
  100% { top: 110%; }
}

/* ---------- Marquee ---------- */

.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  white-space: nowrap;
  background: var(--ink-2);
}

.marquee-track {
  display: inline-block;
  animation: marquee-scroll 28s linear infinite;
  will-change: transform;
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 1.75rem;
  padding-right: 1.75rem;
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  letter-spacing: 0.02em;
  color: var(--faint);
}

.marquee-item .dot {
  width: 7px;
  height: 7px;
  background: var(--steel);
  transform: rotate(45deg);
  flex-shrink: 0;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Secties ---------- */

.section-index {
  color: var(--steel);
}

.section-rule {
  flex: 1;
  height: 1px;
  background: var(--line-strong);
  transform-origin: left;
}

.section-title {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.025em;
}

/* ---------- Service cards ---------- */

.service-card {
  position: relative;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--ink-2), var(--ink));
  overflow: hidden;
  transition: border-color 0.4s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px 220px at var(--mx, 50%) var(--my, 0%), var(--steel-glow), transparent 70%);
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

.service-card:hover {
  border-color: rgba(74, 144, 164, 0.55);
  transform: translateY(-6px);
}

.service-card:hover::before {
  opacity: 0.22;
}

.service-card .card-index {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-weight: 800;
  font-size: 3.25rem;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-strong);
  transition: -webkit-text-stroke-color 0.4s ease;
  pointer-events: none;
}

.service-card:hover .card-index {
  -webkit-text-stroke-color: var(--steel);
}

.service-card--rails::before {
  background: radial-gradient(420px 220px at var(--mx, 50%) var(--my, 0%), rgba(204, 0, 0, 0.4), transparent 70%);
}

.service-card--rails:hover {
  border-color: rgba(204, 0, 0, 0.5);
}

.service-card--rails:hover .card-index {
  -webkit-text-stroke-color: var(--rails);
}

.card-icon {
  width: 3.25rem;
  height: 3.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  color: var(--steel-light);
  background: rgba(74, 144, 164, 0.07);
}

.service-card--rails .card-icon {
  color: var(--rails-light);
  background: rgba(204, 0, 0, 0.08);
}

.rails-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rails-light);
  border: 1px solid rgba(204, 0, 0, 0.35);
  background: rgba(204, 0, 0, 0.08);
}

/* ---------- Over / cijfers ---------- */

.giant-number {
  font-size: clamp(7rem, 22vw, 17rem);
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 2px var(--steel);
  text-shadow: 0 0 80px rgba(74, 144, 164, 0.25);
}

.stat-block {
  border-left: 1px solid var(--line-strong);
  padding-left: 1.25rem;
}

.stat-value {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  color: var(--steel-light);
  line-height: 1.1;
}

/* ---------- Principes ---------- */

.principle-row {
  border-top: 1px solid var(--line);
  transition: background 0.4s ease, padding-left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.principle-row:last-child {
  border-bottom: 1px solid var(--line);
}

.principle-row:hover {
  background: rgba(74, 144, 164, 0.05);
  padding-left: 1rem;
}

.principle-title {
  font-size: clamp(1.5rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ---------- Portfolio ---------- */

.project-row {
  border-top: 1px solid var(--line);
  transition: background 0.4s ease, padding-left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-row:last-child {
  border-bottom: 1px solid var(--line);
}

.project-row:hover {
  background: rgba(74, 144, 164, 0.05);
  padding-left: 1rem;
}

.project-name {
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.project-link {
  color: var(--paper);
  transition: color 0.3s ease;
}

.project-link:hover {
  color: var(--steel-light);
}

.project-arrow {
  display: inline-block;
  margin-left: 0.35em;
  font-size: 0.55em;
  vertical-align: 0.45em;
  color: var(--steel);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.project-link:hover .project-arrow {
  transform: translate(3px, -3px);
}

.project-badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line-strong);
}

.project-badge--own {
  color: var(--steel-light);
  border-color: rgba(74, 144, 164, 0.45);
  background: rgba(74, 144, 164, 0.08);
}

/* ---------- Contact CTA ---------- */

.cta-title {
  font-size: clamp(3rem, 11vw, 9rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.15rem 2.4rem;
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
  background: var(--steel-light);
  position: relative;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
}

.cta-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--paper);
  transform: translateY(101%);
  transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}

.cta-button > * {
  position: relative;
  z-index: 1;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 50px var(--steel-glow);
}

.cta-button:hover::before {
  transform: translateY(0);
}

.cta-button svg {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cta-button:hover svg {
  transform: translate(4px, -4px);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--ink-2);
}

.footer-link {
  color: var(--muted);
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--steel-light);
}

/* ---------- Reveal states (alleen met JS actief) ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(36px);
}

.js [data-reveal-line] .headline-inner {
  transform: translateY(110%);
  display: block;
}

.js [data-rule] {
  transform: scaleX(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .js [data-reveal],
  .js [data-rule] {
    opacity: 1;
    transform: none;
  }

  .js [data-reveal-line] .headline-inner {
    transform: none;
  }

  .marquee-track,
  .scroll-hint-line::after {
    animation: none;
  }
}

/* ---------- Scrollbar ---------- */

::-webkit-scrollbar {
  width: 9px;
}

::-webkit-scrollbar-track {
  background: var(--ink);
}

::-webkit-scrollbar-thumb {
  background: #2c3942;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--steel);
}
