/* ------------------------------------------------------------
   Bouwbedrijf Rietveld – "Website in aanbouw"
   ------------------------------------------------------------ */

/* Geanimeerde gradient: de rode band beweegt langzaam op en neer */
@property --red-y {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 30%;
}
@property --red-glow {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 0%;
}

:root {
  --dark: #2b2b2b;
  --white: #fff;
  --font: Verdana, "DejaVu Sans", Geneva, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  min-height: 100vh;
  font-family: var(--font);
  color: var(--white);
  background-color: var(--dark);
  overflow-x: hidden;
}

/* Gradient staat vast achter de pagina, dus schaalt altijd mee met het scherm */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(
    180deg,
    #3a2b2a 0%,
    #7a2420 calc(var(--red-y) - 12%),
    #9b201d var(--red-y),
    #5a2523 calc(var(--red-y) + 22% + var(--red-glow)),
    var(--dark) calc(var(--red-y) + 42% + var(--red-glow))
  );
  animation: gradientShift 9s ease-in-out infinite alternate;
}

@keyframes gradientShift {
  0%   { --red-y: 24%; --red-glow: 0%; }
  50%  { --red-y: 33%; --red-glow: 4%; }
  100% { --red-y: 40%; --red-glow: 8%; }
}

/* ------------------------------------------------------------
   Achtergrondlijnen
   ------------------------------------------------------------ */
.c-lines {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}
.c-lines path {
  fill: none;
  stroke-width: 4;
  stroke-linejoin: miter;
}

/* Basislijn: tekent zichzelf en ademt daarna zacht */
.lines__base path {
  stroke: #b0231f;
  stroke-opacity: .42;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation:
    drawLine 2.6s cubic-bezier(.65, 0, .35, 1) .2s forwards,
    breathe 5s ease-in-out 3s infinite;
}
.lines__base path:nth-child(2) { animation-delay: .6s, 3.5s; }

@keyframes drawLine { to { stroke-dashoffset: 0; } }
@keyframes breathe  { 50% { stroke-opacity: .7; } }

.c-brand {
  padding: 52px 24px 0;
  text-align: center;
}
.c-brand img {
  display: inline-block;
  height: auto;
  max-width: 60vw;
}

.c-content {
  padding: 100px 24px 80px;
  text-align: center;
}

.header__column {
  max-width: 780px;
  margin: 0 auto;
}

.header__heading-title {
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 4.5rem);
  line-height: .98;
  font-weight: 700;
  letter-spacing: -.005em;
  text-wrap: balance;
}
.header__heading-title i {
  font-weight: 400;
  display: inline-block;
}

.header__heading-title span {
  display: inline-block;
}

.header__heading-body p {
  margin: 46px 0 0;
  font-size: 1.1rem;
  line-height: 1.6;
}

.header__heading-body p + p { margin-top: 74px; }

.header__buttons {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px 30px;
}

.c-button {
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
}

.button--primary {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--white);
  color: var(--dark);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s;
}
.button--primary:hover,
.button--primary:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35);
  background: #ffe9e7;
  outline: none;
}

.button--simple {
  position: relative;
  color: var(--white);
  padding-bottom: 2px;
}
.button--simple::after {
  content: "";
  position: absolute;
  left: 50%; 
  width: 100%;
  bottom: 0;
  height: 2px;
  transform: translate3d(-50%, 0, 0);
  background: currentColor;
  transform-origin: left;
  transition: width .4s var(--ease);
}
.button--simple:hover::after,
.button--simple:focus-visible::after {
  width: 50%;
}
.button--simple:focus-visible { outline: none; }

/* ------------------------------------------------------------
   Binnenkomst-animaties
   ------------------------------------------------------------ */
.c-brand img,
.header__heading-title span,
.header__heading-body p,
.header__buttons .c-button {
  animation: rise .9s var(--ease) backwards;
}

.c-brand img                              { animation-name: drop; animation-delay: .1s; }
.header__heading-title                    { animation: rise .9s var(--ease) .25s backwards; }
.header__heading-title span:nth-of-type(1)   { animation-delay: .45s; }
.header__heading-title span:nth-of-type(2)   { animation-delay: .6s; }
.header__heading-title span:nth-of-type(3)   { animation-delay: .75s; }
.header__heading-body p:nth-child(1)      { animation-delay: .9s; }
.header__heading-body p:nth-child(2)      { animation-delay: 1.1s; }
.header__buttons .button--primary         { animation-delay: 1.3s; }
.header__buttons .button--simple          { animation-delay: 1.45s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(26px); filter: blur(6px); }
  to   { opacity: 1; transform: none;             filter: blur(0); }
}
@keyframes drop {
  from { opacity: 0; transform: translateY(-24px); }
  to   { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 600px) {
  .c-brand { padding-top: 36px; }
  .c-content { padding-top: 64px; }
  .header__heading-body p { margin-top: 32px; font-size: 1rem; }
  .header__heading-body p + p { margin-top: 52px; }
  .c-button { font-size: 1rem; }
  .button--primary { padding: 13px 22px; }
}

/* Minder beweging voor wie dat prefereert */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .01ms !important;
  }
  .c-lines__base path { stroke-dashoffset: 0; }
}
