:root {
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --paper: #ffffff;
  --paper-soft: #f8fafc;
  --line: #e2e8f0;
  --accent: #0e7490;      /* teal, matches EKObox mark */
  --accent-soft: #e0f2fe;
  --amber: #b45309;

  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --max: 1200px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ---- Header ---- */
.site {
  position: fixed; inset: 0 0 auto 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem var(--gutter);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
  z-index: 10;
}
.brand { display: inline-flex; align-items: center; height: 100%; }
/* Logo rendered via CSS mask so it tints with the current text color,
   stays retina-sharp from one PNG, and drops into any background
   (light header, dark hero) without a second asset. */
.brand-logo {
  display: block;
  width: 110px;
  height: 22px;
  background-color: currentColor;
  -webkit-mask: url(/img/ekobox-logo.png) no-repeat center / contain;
          mask: url(/img/ekobox-logo.png) no-repeat center / contain;
  color: var(--ink);
}
.brand:hover .brand-logo { color: var(--accent); }
.site-nav { display: flex; gap: 1.4rem; font-size: 0.92rem; color: var(--ink-soft); }
.site-nav a:hover { color: var(--accent); }
@media (max-width: 640px) {
  .site-nav { display: none; }
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: end;
  color: #fff;
  overflow: hidden;
}
.hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  z-index: 0;
}
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(2, 6, 23, 0.85) 0%, rgba(2, 6, 23, 0.3) 55%, rgba(2, 6, 23, 0.1) 100%),
    linear-gradient(to right, rgba(2, 6, 23, 0.55) 0%, rgba(2, 6, 23, 0.15) 60%, transparent 100%);
  z-index: 1;
}
.hero-copy {
  position: relative; z-index: 2;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 10vh var(--gutter) 10vh;
  width: 100%;
}
.hero-copy .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.35em;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.78);
  margin: 0 0 1.1rem;
}
.hero-copy h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.06;
  margin: 0 0 1.2rem;
  max-width: 18ch;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
}
.hero-copy .lede {
  font-size: clamp(1.02rem, 1.6vw, 1.22rem);
  max-width: 42rem;
  color: rgba(255, 255, 255, 0.92);
  margin: 0 0 2rem;
}
.hero-cta { display: flex; gap: 0.8rem; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.95rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn-primary { background: #fff; color: var(--ink); }
.btn-primary:hover { transform: translateY(-1px); background: var(--accent-soft); color: var(--accent); }
.btn-ghost { color: #fff; border: 1px solid rgba(255, 255, 255, 0.4); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

/* ---- Section skeleton ---- */
.section {
  padding: clamp(4rem, 9vw, 7rem) var(--gutter);
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
}
.section--muted {
  background: var(--paper-soft);
  max-width: none;
}
.section--muted > *,
.section--dark > * {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}
.section--dark {
  background: var(--ink);
  color: #fff;
  padding: clamp(4rem, 9vw, 7rem) var(--gutter);
}
.section-head { max-width: 46rem; margin: 0 auto 3rem; text-align: center; }
.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1.12;
  margin: 0.5rem 0 1rem;
}
.section-head .section-lede {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0;
}
.section--dark .section-head .section-lede { color: rgba(255,255,255,0.75); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.74rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
}
.eyebrow--dark { color: var(--accent); }

/* ---- Features grid ---- */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.feature {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -20px rgba(15, 23, 42, 0.15); }
.feature--wide { grid-column: 1 / -1; }
.feature--wide figure { aspect-ratio: 21/9; }
.feature figure { margin: 0; aspect-ratio: 4/3; overflow: hidden; background: #0f172a; }
.feature img { width: 100%; height: 100%; object-fit: cover; }
.feature-copy { padding: 1.4rem 1.6rem 1.8rem; }
.feature-copy h3 {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}
.feature-copy p { margin: 0; color: var(--ink-soft); }
@media (max-width: 720px) {
  .features { grid-template-columns: 1fr; }
  .feature--wide figure { aspect-ratio: 4/3; }
}

/* ---- Products ---- */
.products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.product {
  padding: 2rem 1.5rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1rem;
}
.product h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  margin: 0 0 0.6rem;
  font-weight: 600;
}
.product p { color: var(--ink-soft); margin: 0; font-size: 0.95rem; }
.product--accent {
  background: linear-gradient(180deg, rgba(14, 116, 144, 0.07) 0%, rgba(14, 116, 144, 0.02) 100%);
  border-color: rgba(14, 116, 144, 0.25);
}
.tag {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.65rem;
  padding: 0.15em 0.5em;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  vertical-align: middle;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-left: 0.3em;
}
@media (max-width: 960px) { .products { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .products { grid-template-columns: 1fr; } }

/* ---- Reach list ---- */
.reach-list {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: var(--max);
  margin: 0 auto;
}
.reach-list li {
  display: flex; flex-direction: column; gap: 0.3rem;
  padding: 1.3rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: #fff;
}
.reach-list .flag { font-size: 1.4rem; }
.reach-list strong {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
}
.reach-note { color: var(--muted); font-size: 0.88rem; }
.reach-next {
  background: linear-gradient(180deg, rgba(14, 116, 144, 0.08), rgba(14, 116, 144, 0.02));
  border-color: rgba(14, 116, 144, 0.3);
  position: relative;
}
.reach-next::after {
  content: "In gesprek";
  position: absolute;
  top: 1rem; right: 1rem;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
@media (max-width: 720px) { .reach-list { grid-template-columns: 1fr; } }

/* ---- Product gallery (finished containers, bento + bigger tiles) ---- */
.section--roomy { max-width: 1480px; }
.product-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 320px;
  gap: 1.1rem;
  max-width: 1400px;
  margin: 0 auto;
}
.product-gallery figure {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: 1.1rem;
  background: #0f172a;
  box-shadow: 0 10px 40px -18px rgba(15, 23, 42, 0.45);
}
.product-gallery img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.product-gallery figure:hover img { transform: scale(1.05); }
.product-gallery figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.1rem 1.4rem;
  color: #fff;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.1) 75%, transparent);
}
/* Bento emphasis: first image spans 2 cols and 2 rows (huge hero tile);
   one more goes 2 wide for a wide secondary. */
.product-gallery .pg-huge { grid-column: span 2; grid-row: span 2; }
.product-gallery .pg-wide { grid-column: span 2; }
.product-gallery .pg-tall { grid-row: span 2; }
.product-gallery .pg-huge figcaption {
  font-size: 1.6rem;
  padding: 1.5rem 1.8rem;
}
@media (max-width: 960px) {
  .product-gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 260px; }
  .product-gallery .pg-huge { grid-column: span 2; grid-row: span 2; }
  .product-gallery .pg-wide { grid-column: span 2; grid-row: auto; }
  .product-gallery .pg-tall { grid-row: auto; }
}
@media (max-width: 540px) {
  .product-gallery { grid-template-columns: 1fr; grid-auto-rows: 260px; }
  .product-gallery .pg-huge { grid-column: auto; grid-row: span 1; }
  .product-gallery .pg-wide { grid-column: auto; }
  .product-gallery .pg-huge figcaption { font-size: 1.3rem; }
}

/* Scroll-in reveal: each figure starts translated + invisible, flips on
   when IntersectionObserver adds .is-in. Honors reduced-motion. */
.pg-reveal {
  opacity: 0;
  transform: translateY(32px) scale(0.98);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2, .8, .2, 1);
  will-change: opacity, transform;
}
.pg-reveal.is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .pg-reveal { opacity: 1; transform: none; transition: none; }
}

/* ---- Gallery ---- */
.gallery {
  padding: 0 var(--gutter) clamp(4rem, 9vw, 7rem);
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 180px;
  gap: 0.8rem;
}
.gallery-grid figure {
  margin: 0;
  overflow: hidden;
  border-radius: 0.75rem;
  background: #0f172a;
}
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery-grid figure:hover img { transform: scale(1.04); }
.g-wide { grid-column: span 2; }
.g-tall { grid-row: span 2; }
@media (max-width: 960px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .g-wide { grid-column: span 2; }
  .g-tall { grid-row: span 2; }
}
@media (max-width: 500px) {
  .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 220px; }
  .g-wide, .g-tall { grid-column: auto; grid-row: auto; }
}

/* ---- Compliance list ---- */
.compliance {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  max-width: var(--max);
  margin: 0 auto;
}
.compliance li {
  padding: 1.4rem 1.6rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.9rem;
  display: flex; flex-direction: column; gap: 0.4rem;
}
.compliance strong {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
}
.compliance span { color: rgba(255, 255, 255, 0.72); font-size: 0.95rem; }
@media (max-width: 720px) { .compliance { grid-template-columns: 1fr; } }

/* ---- Contact ---- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: var(--max);
  margin: 0 auto;
}
.contact-card {
  padding: 1.5rem 1.6rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1rem;
  display: flex; flex-direction: column; gap: 0.3rem;
}
.contact-label {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  font-weight: 600;
}
.contact-value {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
}
.contact-value--muted { color: var(--muted); font-size: 1rem; font-weight: 500; }
@media (max-width: 720px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---- Footer ---- */
.site-footer {
  padding: 2rem var(--gutter);
  background: var(--ink);
  color: rgba(255, 255, 255, 0.65);
  text-align: center;
  font-size: 0.85rem;
}
.site-footer p { margin: 0.3rem 0; }
.footer-links a { margin: 0 0.6rem; color: rgba(255, 255, 255, 0.75); }
.footer-links a:hover { color: #fff; }

/* ---------------------------------------------------------------
   PRE-HERO (work-in-progress sticky layer)
   Sticky + full-viewport, stays pinned while the rest of the page
   scrolls up over it on an opaque sheet. Reads as a parallax reveal.
   --------------------------------------------------------------- */
/* Real parallax: hero is pinned to the viewport (position: fixed) and
   the page body is pushed down by 100vh so scrolling the page uncovers
   the content layer above the hero. A scroll listener translates the
   inner block at ~0.35x the scroll rate and fades it as the content
   takes over, which is the motion you actually feel as parallax. */
.pre-hero {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem var(--gutter);
  background:
    radial-gradient(1200px 600px at 50% 30%, rgba(14, 116, 144, 0.22), transparent 60%),
    linear-gradient(180deg, #0b1220 0%, #0f172a 100%);
  color: #fff;
  z-index: 0;
  overflow: hidden;
  will-change: transform;
}
.pre-hero::before,
.pre-hero::after {
  /* Subtle blueprint grid lines in the background. */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  mask-image: radial-gradient(circle at 50% 50%, black 40%, transparent 85%);
}
.pre-hero-inner {
  position: relative;
  max-width: 40rem;
  z-index: 1;
}
/* Pre-hero logo: real EKObox wordmark, masked so the tint follows
   currentColor. Gentle glow pulse underneath draws the eye without
   touching the logo itself. */
.pre-hero-logo {
  display: block;
  width: min(72vw, 540px);
  height: calc(min(72vw, 540px) * (303 / 1800));
  margin: 0 auto 2.4rem;
  background-color: #06b6d4;
  -webkit-mask: url(/img/ekobox-logo.png) no-repeat center / contain;
          mask: url(/img/ekobox-logo.png) no-repeat center / contain;
  filter: drop-shadow(0 0 32px rgba(6, 182, 212, 0.35));
  animation: pre-glow 3.2s ease-in-out infinite;
}
@keyframes pre-glow {
  0%, 100% { filter: drop-shadow(0 0 20px rgba(6, 182, 212, 0.25)); }
  50%      { filter: drop-shadow(0 0 40px rgba(6, 182, 212, 0.55)); }
}

/* Lottie animation sizing. The web component renders a canvas inside. */
.pre-hero-lottie {
  display: block;
  width: min(42vw, 280px);
  height: min(42vw, 280px);
  margin: 0 auto 1.6rem;
  pointer-events: none;
}

.pre-hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.4em;
  font-size: 0.78rem;
  color: #06b6d4;
  margin: 0 0 1rem;
  font-weight: 600;
}
.pre-hero-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.1;
  margin: 0 0 1.2rem;
}
.pre-hero-lede {
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  color: rgba(255, 255, 255, 0.78);
  margin: 0 auto 2rem;
  max-width: 34rem;
  line-height: 1.6;
}
.pre-hero-chevron {
  display: inline-flex;
  color: rgba(255, 255, 255, 0.7);
  animation: pre-bounce 2.4s ease-in-out infinite;
}
.pre-hero-chevron:hover { color: #fff; }
@keyframes pre-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50%      { transform: translateY(8px); opacity: 1; }
}

/* The page content sits above the fixed pre-hero. margin-top:100vh
   exposes the hero initially; as you scroll, this content layer slides
   up to cover it. Opaque background keeps the reveal clean. */
.page-over-hero {
  position: relative;
  z-index: 1;
  margin-top: 100vh;
  background: var(--paper);
  box-shadow: 0 -24px 48px -24px rgba(0, 0, 0, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  .pre-hero-logo,
  .pre-hero-chevron { animation: none; }
}

/* ---------------------------------------------------------------
   Language toggle pill (top-right of the header).
   --------------------------------------------------------------- */
.lang-toggle {
  display: inline-flex;
  gap: 0.15rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem;
  background: rgba(255, 255, 255, 0.7);
  margin-left: 1rem;
}
.lang-toggle button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.lang-toggle button:hover { color: var(--ink); }
.lang-toggle button.is-active {
  background: var(--ink);
  color: #fff;
}
@media (max-width: 480px) {
  .lang-toggle { margin-left: 0.5rem; }
  .lang-toggle button { padding: 0.3rem 0.55rem; font-size: 0.72rem; }
}
