/* ============================================================
   SpijkerKlust — Motion Website
   ============================================================ */

/* ===================== PLACARD NEXT FONTS ===================== */
@font-face {
  font-family: 'PlacardNext';
  src: url('../placard-next/PlacardNextCnBold.TTF') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PlacardNext';
  src: url('../placard-next/PlacardNextCnMed.TTF') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'PlacardNext';
  src: url('../placard-next/PlacardNextRegular.TTF') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg:         #FFFFFF;
  --bg-soft:    #F8F5EF;
  --teal:       #7BA7B5;
  --teal-deep:  #4F7A88;
  --teal-ink:   #2C4A54;
  --ochre:      #B8894A;
  --espresso:   #41271f;
  --ink:        #1A1A1A;
  --ink-soft:   #3D3A34;
  --rule:       rgba(26, 26, 26, 0.1);

  --font-display: 'PlacardNext', 'Oswald', sans-serif;
  --font-body:    'Lora', Georgia, serif;
}

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

html {
  scroll-behavior: auto; /* Lenis handles smooth scroll */
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

.mobile-only {
  display: none;
}

/* ===================== LOADER ===================== */
#loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-inner {
  text-align: center;
  width: min(400px, 80vw);
}

.loader-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 8vw, 5rem);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: var(--teal);
  line-height: 1;
  margin-bottom: 2rem;
}

#loader-bar-wrap {
  width: 100%;
  height: 1px;
  background: var(--rule);
  margin-bottom: 1rem;
  overflow: hidden;
}

#loader-bar {
  height: 100%;
  width: 0%;
  background: var(--teal);
  transition: width 0.15s ease;
}

#loader-percent {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal-deep);
}

/* ===================== HEADER ===================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 3vw;
  mix-blend-mode: multiply;
  /* No background — floats over canvas/hero naturally */
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--espresso);
  transition: opacity 0.2s;
}

.header-logo:hover {
  opacity: 0.7;
}

.logo-mark {
  width: 40px;
  height: auto;
  flex-shrink: 0;
  mix-blend-mode: multiply;
}

.logo-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--espresso);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-link {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--espresso);
  position: relative;
  transition: color 0.2s;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--teal);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

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

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

.nav-link--cta {
  color: var(--teal-deep);
  border: 1px solid currentColor;
  padding: 0.4rem 1rem;
  letter-spacing: 0.14em;
  transition: background 0.2s, color 0.2s;
}

.nav-link--cta::after {
  display: none;
}

.nav-link--cta:hover {
  background: var(--teal-deep);
  color: #fff;
  border-color: var(--teal-deep);
}

/* ===================== HERO ===================== */
.hero-standalone {
  position: relative;
  height: 100vh;
  background: linear-gradient(to top, rgba(255,255,255,0.82) 0%, rgba(255,255,255,0.1) 55%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 7vw 8vh;
  overflow: hidden;
  z-index: 10;
}

.hero-eyebrow {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin-bottom: 1.5rem;
  opacity: 0; /* animated in by JS */
}

.hero-heading {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(4rem, 9vw, 10rem);
  line-height: 0.88;
  text-transform: uppercase;
  letter-spacing: -0.025em;
  color: var(--ochre);
  overflow: hidden;
}

.hero-word {
  display: block;
  will-change: transform;
}

.hero-tagline {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.4rem);
  color: var(--ink-soft);
  margin-top: 2rem;
  letter-spacing: 0.02em;
  opacity: 0; /* animated in by JS */
}

.hero-floater {
  position: absolute;
  right: 6vw;
  bottom: 8vh;
  width: clamp(160px, 18vw, 260px);
  height: auto;
  pointer-events: none;
  opacity: 0; /* animated in by JS */
  transform-origin: bottom right;
  mix-blend-mode: multiply;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  right: 7vw;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  opacity: 0; /* animated in by JS */
}

.scroll-label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal-deep);
}

.scroll-arrow {
  font-size: 1rem;
  color: var(--teal);
  animation: bounceArrow 1.8s ease-in-out infinite;
}

@keyframes bounceArrow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* ===================== CANVAS ===================== */
.canvas-wrap {
  position: fixed;
  inset: 0;
  z-index: 1;
  clip-path: circle(100% at 50% 50%);
  will-change: clip-path;
}

#canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ===================== DARK OVERLAY ===================== */
#dark-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44, 74, 84, 0.91);
  opacity: 0;
  z-index: 2;
  pointer-events: none;
  will-change: opacity;
}

/* ===================== MARQUEE ===================== */
.marquee-wrap {
  position: fixed;
  bottom: 7vh;
  left: 0;
  width: 100%;
  overflow: hidden;
  z-index: 4;
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
}

.marquee-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12vw;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: var(--teal);
  white-space: nowrap;
  line-height: 1;
  will-change: transform;
  /* mix-blend-mode: multiply so it layers subtly over canvas */
  mix-blend-mode: multiply;
}

/* ===================== SECTIONS (all fixed) ===================== */
.scroll-section {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  will-change: opacity;
}

/* Side-aligned text zones */
.align-left {
  padding-left: 6vw;
  padding-right: 54vw;
}

.align-right {
  padding-left: 54vw;
  padding-right: 6vw;
}

#section-catering {
  padding-left: 64vw;
  padding-right: 3vw;
}

#section-catering .section-inner {
  max-width: 30vw;
}

#section-kookboek {
  align-items: flex-start;
  padding-top: 13vh;
}

#section-kookboek .section-inner {
  max-width: 36vw;
}

#section-kookboek .section-body {
  font-size: clamp(0.82rem, 1.05vw, 0.95rem);
  line-height: 1.65;
  margin-bottom: 1.1rem;
}

#section-about .section-inner {
  max-width: 28vw;
}

.section-inner {
  max-width: 36vw;
  position: relative;
  z-index: 1;
  padding: 1.6rem 2rem;
}

.section-subheading {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(0.8rem, 1.1vw, 1rem);
  color: var(--ink-soft);
  margin-top: 0.6rem;
  margin-bottom: 1.4rem;
  line-height: 1.4;
}

/* ===================== SECTION TYPOGRAPHY ===================== */
.section-label {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin-bottom: 1.2rem;
}

/* Stats section inherits overlay, uses cream labels */
.section-stats .stat-label {
  color: rgba(240, 234, 221, 0.55);
}

.section-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 3.8vw, 5rem);
  line-height: 0.92;
  text-transform: uppercase;
  letter-spacing: -0.015em;
  color: var(--ochre);
  margin-bottom: 1.4rem;
}

.section-heading--large {
  font-size: clamp(4rem, 7vw, 8rem);
}

.section-body {
  font-family: var(--font-body);
  font-size: clamp(0.85rem, 1.1vw, 1rem);
  line-height: 1.7;
  color: var(--ink-soft);
  margin-bottom: 1.4rem;
}

.section-body--center {
  text-align: center;
  max-width: 48ch;
  margin-left: auto;
  margin-right: auto;
}

.section-note {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal-deep);
  opacity: 0.7;
  margin-top: 0.5rem;
}

.section-cta-link {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-deep);
  border-bottom: 1px solid var(--teal-deep);
  padding-bottom: 2px;
  margin-top: 0.5rem;
  transition: color 0.2s, border-color 0.2s;
}

.section-cta-link:hover {
  color: var(--teal);
  border-color: var(--teal);
}

/* ===================== STATS SECTION ===================== */
.section-stats {
  justify-content: center;
  text-align: center;
  padding: 0 5vw;
}

.stats-grid {
  display: flex;
  gap: 8vw;
  align-items: flex-start;
  justify-content: center;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-row {
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
}

.stat-number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(4rem, 7vw, 7rem);
  line-height: 1;
  color: var(--bg);
}

.stat-suffix {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 3.5vw, 3.5rem);
  color: var(--teal);
  line-height: 1;
}

.stat-label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(240, 234, 221, 0.55);
  margin-top: 0.6rem;
}

.stat--mid .stat-number {
  color: var(--teal);
}

/* ===================== FLOATER IMAGES ===================== */
.section-floater {
  position: absolute;
  pointer-events: none;
  object-fit: contain;
}

.section-floater--right {
  right: 3vw;
  top: 50%;
  transform: translateY(-50%);
  max-width: 36vw;
  max-height: 82vh;
}

.section-floater--left {
  left: 3vw;
  top: 50%;
  transform: translateY(-50%);
  max-width: 36vw;
  max-height: 82vh;
}

.section-floater--book {
  max-width: 30vw;
  max-height: 78vh;
  right: 5vw;
  filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.25));
}

.section-floater--poster {
  max-width: 32vw;
  max-height: 85vh;
  left: 5vw;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 10px 40px rgba(0, 0, 0, 0.2));
}

/* ===================== CTA / CONTACT SECTION ===================== */
.section-cta-final {
  align-items: center;
  justify-content: center;
}

.section-inner--center {
  max-width: 64vw;
  text-align: center;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0;
}

.section-inner--center .section-label {
  text-align: center;
  text-shadow: none;
}

/* CTA section: text over canvas last frame + fallback dark bg */
.section-cta-final {
  background: rgba(44, 74, 84, 0.82);
}

.section-cta-final .section-heading {
  color: var(--bg);
  font-size: clamp(4rem, 8vw, 10rem);
}

.section-cta-final .section-label {
  color: var(--teal);
}

.section-cta-final .section-body {
  color: rgba(240, 234, 221, 0.8);
}

.cta-group {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.cta-button {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  background: var(--teal-deep);
  padding: 0.9rem 2.4rem;
  transition: background 0.25s, color 0.25s, transform 0.2s;
  will-change: transform;
}

.cta-button:hover {
  background: var(--teal-ink);
  color: #fff;
  transform: translateY(-2px);
}

.cta-divider {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.45);
}

.cta-phone {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.65);
  transition: color 0.2s;
}

.cta-phone:hover {
  color: var(--teal);
}

.site-footer-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 4rem;
  opacity: 0.35;
}

.footer-logo-mark {
  width: 28px;
  height: auto;
  mix-blend-mode: multiply;
  opacity: 0.6;
}

.footer-copy {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

/* ===================== SCROLL CONTAINER ===================== */
#scroll-container {
  position: relative;
  height: 950vh;
  width: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  .hero-heading {
    font-size: clamp(5rem, 22vw, 9rem);
  }

  .hero-floater {
    width: clamp(100px, 22vw, 180px);
    right: 3vw;
    bottom: 6vh;
  }

  .header-nav {
    gap: 1.2rem;
  }

  .nav-link:not(.nav-link--cta) {
    display: none;
  }
}

@media (max-width: 768px) {
  /* ---- Scroll container shrink ---- */
  #scroll-container {
    height: 620vh;
  }

  /* ---- Sections: collapse side alignment ---- */
  .scroll-section {
    align-items: flex-end;
    padding-bottom: 5vh;
  }

  .align-left,
  .align-right {
    padding: 0 5vw 5vh;
    align-items: flex-end;
  }

  .scroll-section:not(.section-cta-final):not(.section-stats) .section-inner {
    max-width: 100%;
    padding: 1.4rem;
  }

  .section-cta-final {
    padding: 0 5vw;
  }

  .section-cta-final .section-inner--center {
    max-width: 100%;
    padding: 2rem;
    background: rgba(44, 74, 84, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .section-floater--right,
  .section-floater--left {
    opacity: 0.15;
    max-width: 55vw;
    top: 10vh;
    transform: none;
  }

  .section-floater--right {
    right: 2vw;
  }

  .section-floater--left {
    left: 2vw;
  }

  .section-heading {
    font-size: clamp(2.4rem, 8vw, 4rem);
  }

  .section-heading--large {
    font-size: clamp(2.8rem, 9vw, 5rem);
  }

  .stats-grid {
    flex-direction: column;
    gap: 2rem;
  }

  .stat-number {
    font-size: clamp(3.5rem, 12vw, 5.5rem);
  }

  .section-cta-final {
    align-items: center;
    padding: 0 5vw;
  }

  .section-inner--center {
    max-width: 100%;
  }

  .marquee-text {
    font-size: 18vw;
  }

  .header-logo .logo-wordmark {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-heading {
    font-size: clamp(4rem, 22vw, 7rem);
  }

  .hero-floater {
    width: 100px;
    right: 2vw;
    bottom: 5vh;
  }

  .site-header {
    padding: 1rem 4vw;
  }
}

/* ============================================================
   MOBILE CORRECTIONS — iPhone layout pass
   ============================================================ */
@media (max-width: 768px) {

  /* ---- Override ID-specific desktop rules that have no media query ---- */
  /* Without these, ID specificity beats the class-based 768px rules above */
  #section-catering {
    padding-left: 0;
    padding-right: 0;
  }

  #section-kookboek {
    padding-top: 0;
  }

  #section-about .section-inner,
  #section-catering .section-inner,
  #section-kookboek .section-inner {
    max-width: 100%;
  }

  /* ---- Remove wrapper padding so section-inner can fill the viewport ---- */
  .align-left,
  .align-right {
    padding: 0;
  }

  .scroll-section:not(.section-cta-final):not(.section-stats) {
    padding-bottom: 0;
  }

  /* ---- Split layout: section-inner spans the full fixed viewport ----
     position: absolute removes it from the flex flow, so the parent's
     align-items: flex-end no longer constrains it. justify-content: space-between
     pushes .section-top to the top and .section-bottom to the bottom,
     leaving the centre clear for the book canvas. */
  .scroll-section:not(.section-cta-final):not(.section-stats) .section-inner {
    position: absolute;
    inset: 0;
    max-width: 100%;
    max-height: none;
    overflow: visible;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: transparent;
    box-shadow: none;
    border-top: none;
    padding: 0;
  }

  /* ---- Top zone: label + heading sit above the book ---- */
  .section-top {
    padding: 86px 7vw 0;
  }

  /* ---- Bottom zone: body text and CTA sit below the book ---- */
  .section-bottom {
    padding: 0 7vw 3rem;
  }

  /* ---- Body text: readable on narrow screens ---- */
  .section-body {
    font-size: 0.875rem;
    line-height: 1.68;
    margin-bottom: 0.7rem;
  }

  /* ---- About: smaller type so full paragraph sits cleanly below the book ---- */
  #section-about .section-body {
    font-size: 0.73rem;
    line-height: 1.52;
    margin-bottom: 0.5rem;
  }

  /* ---- Kookboek: show only first body paragraph on mobile ---- */
  #section-kookboek .section-body + .section-body {
    display: none;
  }

  /* ---- Kookboek heading: single line on mobile ---- */
  #section-kookboek .section-heading {
    font-size: 5.8vw;
    line-height: 1.1;
    letter-spacing: -0.01em;
    white-space: nowrap;
  }

  /* ---- Kookboek subheading: no extra bottom margin inside section-top ---- */
  #section-kookboek .section-subheading {
    margin-bottom: 0;
  }


  /* ---- Stats: vertically centre in viewport ----
     The parent .scroll-section gets align-items: flex-end on mobile (768px block above),
     which would push stats to the bottom. ID selector beats class selector. */
  #section-stats {
    align-items: center;
    padding-bottom: 0;
  }

  .stats-grid {
    align-items: center;
  }

  /* ---- Kom aan tafel: remove double dark background ----
     The section already has background: rgba(44,74,84,0.82) covering the full viewport.
     The 768px block above adds a second dark bg to section-inner — remove it here. */
  .section-cta-final .section-inner--center {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 2rem 5vw;
  }
}
