/* Override decorative & in Playfair Display with clean system sans-serif */
@font-face {
  font-family: 'Playfair Display';
  src: local('Inter'), local('Helvetica Neue'), local('Arial');
  unicode-range: U+0026;
  font-weight: 100 900;
  font-style: normal;
}
@font-face {
  font-family: 'Playfair Display';
  src: local('Inter'), local('Helvetica Neue'), local('Arial');
  unicode-range: U+0026;
  font-weight: 100 900;
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════
   Smits & Wouters — Shared Styles
   Everything in this file is loaded on every page.
   Page-specific styles live in an inline <style> in each HTML file.
   ═══════════════════════════════════════════════════════════════ */

/* ── Typography base ────────────────────────────────────────── */
body {
  font-family: 'Inter', system-ui, sans-serif;
  color: #0F1E40;
  animation: sw-page-in 0.55s cubic-bezier(.22,1,.36,1) both;
}

h1, h2, h3, .font-display {
  font-family: 'Playfair Display', Georgia, serif;
}

.font-display-sc {
  font-family: 'Playfair Display SC', Georgia, serif;
}

html {
  scroll-behavior: smooth;
}

/* ── Shadows ────────────────────────────────────────────────── */
.shadow-brand {
  box-shadow:
    0 1px 2px rgba(22,41,102,.06),
    0 4px 12px rgba(22,41,102,.12),
    0 16px 32px rgba(22,41,102,.09);
}

.shadow-brand-lg {
  box-shadow:
    0 2px 4px rgba(22,41,102,.08),
    0 8px 24px rgba(22,41,102,.16),
    0 32px 64px rgba(22,41,102,.12);
}

/* ── Grain overlay ──────────────────────────────────────────── */
.grain {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

/* ── Navigation ─────────────────────────────────────────────── */
.sw-lang-active {
  color: #8FBAF5 !important;
  font-weight: 600;
  border-bottom: 2px solid #8FBAF5;
}

nav a.nav-active {
  color: #8FBAF5;
  border-bottom: 2px solid #8FBAF5;
}

.nav-link {
  transition: color .2s ease;
}

.nav-link:hover {
  color: white;
}

.nav-link:focus-visible {
  outline: 2px solid #8FBAF5;
  outline-offset: 2px;
}

/* ── Header scroll effect ───────────────────────────────────── */
#site-header {
  transition: background-color .3s ease, backdrop-filter .3s ease, box-shadow .3s ease;
}
#site-header.scrolled {
  background-color: rgba(10,22,40,.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(90,138,232,.15);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  transition: transform .2s ease, opacity .2s ease, background-color .2s ease;
}

.btn:hover  { transform: translateY(-1px); opacity: .92; }
.btn:active { transform: translateY(0);    opacity: .85; }

.btn:focus-visible {
  outline: 2px solid #8FBAF5;
  outline-offset: 3px;
}

/* ── Service cards ──────────────────────────────────────────── */
.service-card {
  transition: transform .25s cubic-bezier(.4,0,.2,1), box-shadow .25s ease;
}

.service-card:hover {
  transform: translateY(-5px);
}

.service-card svg {
  transition: transform 0.25s cubic-bezier(.22,1,.36,1), color 0.2s ease;
}

.service-card:hover svg {
  transform: translateX(3px);
}

/* ── Page load fade-in ──────────────────────────────────────── */
@keyframes sw-page-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Entrance animations ────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes kenBurns {
  from { transform: scale(1) translateY(0); }
  to   { transform: scale(1.07) translateY(-1%); }
}

/* Hero animation helpers (shared delays used on inner pages) */
.hero-eyebrow {
  animation: fadeUp .8s cubic-bezier(.22,1,.36,1) both;
  animation-delay: .25s;
}

.hero-sub {
  animation: fadeUp .8s cubic-bezier(.22,1,.36,1) both;
  animation-delay: .50s;
}

.ken-burns {
  animation: kenBurns 14s ease-out both;
}

/* ── Scroll reveal ──────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-32px);
  transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1);
}

.reveal-right {
  opacity: 0;
  transform: translateX(32px);
  transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1);
}

.reveal-scale {
  opacity: 0;
  transform: scale(.96);
  transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1);
}

.is-visible {
  opacity: 1 !important;
  transform: none !important;
}

/* ── Scroll progress bar ────────────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--scroll-pct, 0%);
  height: 2px;
  background: linear-gradient(90deg, #5A8AE8 0%, #8FBAF5 60%, #C0D8F5 100%);
  z-index: 200;
  pointer-events: none;
  transition: width 80ms linear;
  transform-origin: left center;
}

/* ── Gradient text on hero headlines ────────────────────────── */
.hero-gradient-text {
  color: white !important;
  -webkit-text-fill-color: white !important;
  filter: drop-shadow(0 2px 16px rgba(10,22,40,0.55));
}

/* ── Ampersand override: clean sans-serif & in display font contexts ── */
.sw-amp {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
}

/* ── Hamburger → ✕ morph ────────────────────────────────────── */
#hamburger {
  position: relative;
  width: 28px;
  height: 20px;
  flex-shrink: 0;
  padding: 0 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 0 !important;
  border: 1.5px solid rgba(255,255,255,0.85) !important;
  border-radius: 5px;
  padding: 6px 8px !important;
}

#hamburger .bar {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: white;
  border-radius: 1px;
  transition:
    top    0.32s cubic-bezier(.22,1,.36,1),
    bottom 0.32s cubic-bezier(.22,1,.36,1),
    transform 0.32s cubic-bezier(.22,1,.36,1),
    opacity   0.20s ease;
  transform-origin: center;
}

#hamburger .bar:nth-child(1) { top: 0; }
#hamburger .bar:nth-child(2) { top: 50%; transform: translateY(-50%); }
#hamburger .bar:nth-child(3) { bottom: 0; }

#hamburger.is-open .bar:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}
#hamburger.is-open .bar:nth-child(2) {
  opacity: 0;
  transform: translateY(-50%) scaleX(0.2);
}
#hamburger.is-open .bar:nth-child(3) {
  top: 50%;
  bottom: auto;
  transform: translateY(-50%) rotate(-45deg);
}

/* ── Mobile menu: opacity-based visibility ──────────────────── */
#mobile-menu {
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

#mobile-menu.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* ── Mobile menu: staggered item entrance ───────────────────── */
#mobile-menu a,
#mobile-menu .lang-row {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity   0.42s cubic-bezier(.22,1,.36,1),
    transform 0.42s cubic-bezier(.22,1,.36,1);
}

#mobile-menu.is-open a:nth-child(1) { opacity: 1; transform: none; transition-delay: 0.06s; }
#mobile-menu.is-open a:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.11s; }
#mobile-menu.is-open a:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.16s; }
#mobile-menu.is-open a:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.21s; }
#mobile-menu.is-open a:nth-child(5) { opacity: 1; transform: none; transition-delay: 0.26s; }
#mobile-menu.is-open .lang-row      { opacity: 1; transform: none; transition-delay: 0.32s; }

/* ── Project card: image zoom on hover ──────────────────────── */
.project-card .relative img {
  transition: transform 0.65s cubic-bezier(.22,1,.36,1);
  will-change: transform;
}

.project-card:hover .relative img {
  transform: scale(1.05);
}

/* ── Page transition — fade out on navigate ─────────────────── */
body.sw-page-out {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.28s ease, transform 0.28s ease;
  pointer-events: none;
}

/* ── Custom cursor ──────────────────────────────────────────── */
.sw-cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  background: #8FBAF5;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: screen;
  will-change: transform;
  transition: width 0.3s cubic-bezier(.22,1,.36,1), height 0.3s cubic-bezier(.22,1,.36,1);
}

.sw-cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(143,186,245,0.35);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  will-change: transform;
  transition:
    width  0.4s cubic-bezier(.22,1,.36,1),
    height 0.4s cubic-bezier(.22,1,.36,1),
    border-color 0.3s ease;
}

/* Hover states driven by data-state attribute */
.sw-cursor-ring[data-state="link"] {
  width: 56px;
  height: 56px;
  border-color: rgba(143,186,245,0.6);
}

.sw-cursor-ring[data-state="card"] {
  width: 72px;
  height: 72px;
  border-color: rgba(90,138,232,0.45);
}

/* ── 3D card tilt — preserve-3d wrapper ─────────────────────── */
.tilt-card {
  transform-style: preserve-3d;
}

/* ── 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 { animation: none !important; opacity: 1 !important; transform: none !important; }
  .ken-burns { animation: none !important; }
  #scroll-progress { transition: none !important; }

  #mobile-menu a,
  #mobile-menu .lang-row { opacity: 1 !important; transform: none !important; }
}
