/*!
 * jvdh — Joris van der Herten, composer
 * Modernized 2026. Dark editorial aesthetic.
 */

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

:root {
  --bg:        #0e0e0e;
  --bg-alt:    #141414;
  --bg-mid:    #1a1a1a;
  --text:      #f0ece4;
  --text-muted:#9c9189;  /* bumped from #8a857d — passes WCAG AA at all sizes */
  --accent:    #ff0000;
  --border:    rgba(240,236,228,0.08);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Merriweather', Georgia, serif;
  --ease:      cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html { scroll-behavior: smooth; }

/* ─── Accessibility utilities ─────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.6rem 1.2rem;
  border-radius: 0 0 4px 4px;
  text-decoration: none;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

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

/* ─── Reduced motion ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  text-wrap: balance;
}

a { color: inherit; text-decoration: none; }

/* ─── Utility ─────────────────────────────────────────── */
.accent { color: var(--accent); }

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.showcase-row.reveal { transition-delay: 0.05s; }
.feature-item:nth-child(2).reveal { transition-delay: 0.1s; }
.feature-item:nth-child(3).reveal { transition-delay: 0.18s; }
.feature-item:nth-child(4).reveal { transition-delay: 0.26s; }


/* ─── Navigation ──────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem 2rem;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease);
}
.site-nav.scrolled {
  background: rgba(14,14,14,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.85rem 2rem;
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}
.nav-brand {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  color: var(--text);
}
.nav-cta {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  border: 1px solid rgba(240,236,228,0.35);
  padding: 0.5rem 1.2rem;
  border-radius: 2px;
  transition: background 0.25s, border-color 0.25s, color 0.25s;
}
.nav-cta:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}


/* ─── Masthead ────────────────────────────────────────── */
.masthead {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #0e0e0e;
  background-image: url('../img/bg-masthead.jpg');
  background-image: image-set(
    url('../img/bg-masthead.webp') 1x,
    url('../img/bg-masthead@2x.webp') 2x
  );
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  padding: 8rem 2rem 6rem;
  text-align: center;
}
.masthead-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,10,10,0.55) 0%,
    rgba(10,10,10,0.70) 60%,
    rgba(14,14,14,1) 100%
  );
}
.masthead-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  animation: fadeUp 1s var(--ease) both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: none; }
}
.masthead-eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  animation-delay: 0.2s;
}
.masthead-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 900;
  font-optical-sizing: auto;
  font-variation-settings: 'opsz' 72;
  letter-spacing: -0.04em;
  color: var(--text);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.masthead-video {
  width: min(680px, 90vw);
  margin-top: 2.5rem;
  animation: fadeUp 1s var(--ease) 0.4s both;
}
.video-wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  overflow: hidden;
}
.video-wrapper iframe,
.video-wrapper .video-facade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Facade */
.video-facade {
  display: block;
  cursor: pointer;
  background: #000;
}
.video-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.85;
  transition: opacity 0.3s;
}
.video-facade:hover img { opacity: 0.65; }
.play-btn {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  width: 68px; height: 48px;
  transition: transform 0.25s var(--ease);
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.5));
}
.video-facade:hover .play-btn { transform: translate(-50%, -50%) scale(1.12); }

/* Scroll hint */
.masthead-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}
.masthead-scroll-hint span {
  display: block;
  width: 1px;
  height: 3rem;
  background: linear-gradient(to bottom, transparent, var(--text-muted));
  animation: scrollHint 2s ease infinite;
}
@keyframes scrollHint {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; }
  50%       { opacity: 1;   transform: scaleY(1);   transform-origin: top; }
}


/* ─── Features / Icons ────────────────────────────────── */
.features {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 6rem 2rem;
}
.features-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2px;
  max-width: 1100px;
  margin: 0 auto;
  border: 1px solid var(--border);
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 2rem;
  border-right: 1px solid var(--border);
  color: var(--text);
  transition: background 0.3s var(--ease);
  cursor: pointer;
}
.feature-item:last-child { border-right: none; }
.feature-item:hover { background: var(--bg-mid); }
.feature-icon {
  font-size: 2.5rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  transition: color 0.3s, transform 0.3s var(--ease);
}
.feature-item:hover .feature-icon {
  color: var(--accent);
  transform: translateY(-4px);
}
.feature-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.feature-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 300;
}

@media (max-width: 600px) {
  .features-inner {
    grid-template-columns: 1fr 1fr;
  }
  .feature-item { border-right: 1px solid var(--border); }
  .feature-item:nth-child(2n) { border-right: none; }
  .feature-item:nth-child(1),
  .feature-item:nth-child(2) { border-bottom: 1px solid var(--border); }
}


/* ─── Showcase ────────────────────────────────────────── */
.showcase { background: var(--bg); }

.showcase-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 500px;
}
.showcase-row--reverse .showcase-img { order: 2; }
.showcase-row--reverse .showcase-text { order: 1; }

.showcase-img {
  background-size: cover;
  background-position: center;
  min-height: 360px;
  position: relative;
}
.showcase-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.15);
}

.showcase-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 3.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  position: relative;
}
.showcase-num {
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 900;
  color: var(--border);
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  line-height: 1;
  user-select: none;
}
.showcase-text h2 {
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  margin-bottom: 1.25rem;
  color: var(--text);
}
.showcase-text p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.85;
  max-width: 42ch;
}

@media (max-width: 768px) {
  .showcase-row,
  .showcase-row--reverse {
    grid-template-columns: 1fr;
  }
  .showcase-row--reverse .showcase-img { order: 0; }
  .showcase-row--reverse .showcase-text { order: 0; }
  .showcase-text { padding: 3rem 2rem; }
  .showcase-num { font-size: 3.5rem; }
}


/* ─── Call to Action ──────────────────────────────────── */
.cta {
  position: relative;
  background-color: #0e0e0e;
  background-image: url('../img/bg-masthead.jpg');
  background-image: image-set(
    url('../img/bg-masthead.webp') 1x,
    url('../img/bg-masthead@2x.webp') 2x
  );
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  padding: 8rem 2rem;
  text-align: center;
}
.cta-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,10,10,0.72);
}
.cta-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}
.cta-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.cta-heading {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: var(--text);
  font-style: normal;
}
.cta-heading em {
  font-style: italic;
  color: var(--accent);
}
.cta-btn {
  display: inline-block;
  margin-top: 0.75rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.85rem 2.5rem;
  border-radius: 2px;
  transition: background 0.25s, color 0.25s;
}
.cta-btn:hover {
  background: transparent;
  color: var(--accent);
}

@media (max-width: 600px) {
  .cta { background-attachment: scroll; }
}


/* ─── Footer ──────────────────────────────────────────── */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-copy {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 300;
}
.footer-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}
.footer-links a {
  color: var(--text-muted);
  font-size: 1.2rem;
  transition: color 0.25s;
}
.footer-links a:hover { color: var(--accent); }

@media (max-width: 600px) {
  .footer-inner { justify-content: center; text-align: center; }
}

/* ─── CSS Scroll-driven animations ───────────────────────
   Progressive enhancement — Chrome 115+, Firefox 132+.
   JS IntersectionObserver handles older browsers (see HTML).
   @supports guard prevents any interference in unsupported
   browsers where the JS fallback will run instead.        */
@supports (animation-timeline: scroll()) {
  .feature-item, .showcase-row, .cta-inner {
    /* reset JS-applied classes — not needed here */
    opacity: 1 !important;
    transform: none !important;
  }

  .feature-item {
    animation: fadeUp linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 40%;
  }
  .feature-item:nth-child(2) { animation-delay: 0.08s; }
  .feature-item:nth-child(3) { animation-delay: 0.16s; }
  .feature-item:nth-child(4) { animation-delay: 0.24s; }

  .showcase-row {
    animation: fadeUp linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 35%;
  }

  .cta-inner {
    animation: fadeUp linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 40%;
  }
}
