/* ============================================================
   Encom Business Solutions — Shared Stylesheet
   encom.nl | encom.nl/en/ | encom.nl/de/
   ============================================================ */

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

:root {
  --ink:          #0f1117;
  --paper:        #f5f2ec;
  --accent:       #c8502a;
  --accent-light: #e8ddd4;
  --muted:        #6b6560;
  --border:       #ddd8d0;
  --nav-h:        68px;
}

/* ── BASE ── */
html {
  scroll-behavior: smooth;
  font-size: 16px;
  /* Prevent layout shift from scrollbar appearing */
  scrollbar-gutter: stable;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  line-height: 1.65;
  overflow-x: hidden;
  /* Improve text rendering — helps Core Web Vitals perception */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--paper);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 5vw, 72px);
  z-index: 100;
  transition: box-shadow .3s;
  /* Promote nav to own layer — avoids repaints on scroll */
  will-change: box-shadow;
}
nav.scrolled { box-shadow: 0 2px 24px rgba(15,17,23,.07); }

.logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem;
  letter-spacing: -.02em;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: clamp(16px, 3vw, 40px);
  list-style: none;
  align-items: center;
}
.nav-links a {
  font-size: .875rem;
  font-weight: 400;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: color .2s;
}
.nav-links a:hover { color: var(--ink); }

.lang-toggle {
  display: flex;
  gap: 6px;
  margin-left: 24px;
  border-left: 1px solid var(--border);
  padding-left: 24px;
}
.lang-toggle a {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-size: .8rem;
  font-weight: 400;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 3px 8px;
  border-radius: 3px;
  text-decoration: none;
  transition: all .2s;
}
.lang-toggle a.active { background: var(--ink); color: var(--paper); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--ink);
  transition: all .3s;
}

/* ── HERO ── */
#hero {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: calc(var(--nav-h) + 40px) clamp(24px, 8vw, 120px) 80px;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 40%, rgba(200,80,42,.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 10% 80%, rgba(200,80,42,.05) 0%, transparent 60%);
  pointer-events: none;
}

.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: .4;
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 760px;
  animation: fadeUp .9s ease both;
}

.hero-eyebrow {
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

/* ── TYPOGRAPHY ── */
h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  line-height: 1.1;
  letter-spacing: -.03em;
  color: var(--ink);
  margin-bottom: 28px;
}
h1 em { font-style: italic; color: var(--accent); }

h2 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -.02em;
  margin-bottom: 20px;
}

h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 44px;
}

/* ── BUTTONS ── */
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 4px;
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .03em;
  text-decoration: none;
  transition: all .2s;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); }
.btn-outline { border: 1px solid var(--border); color: var(--ink); background: transparent; }
.btn-outline:hover { border-color: var(--ink); }

/* ── SECTIONS ── */
section { padding: clamp(64px, 10vw, 120px) clamp(24px, 8vw, 120px); }

.section-label {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-intro {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 580px;
  margin-bottom: 56px;
}

/* ── SERVICES ── */
#services { background: var(--ink); color: var(--paper); }
#services h2 { color: var(--paper); }
#services .section-label { color: #c8836a; }
#services .section-intro { color: rgba(245,242,236,.6); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.1);
}

.service-card {
  padding: 36px 32px;
  background: var(--ink);
  transition: background .2s;
}
.service-card:hover { background: #1a1d26; }

.service-icon {
  width: 40px; height: 40px;
  margin-bottom: 20px;
  color: var(--accent);
}

.service-card h3 { color: var(--paper); }
.service-card p { font-size: .9rem; color: rgba(245,242,236,.55); line-height: 1.6; }

/* ── ABOUT ── */
#about { border-top: 1px solid var(--border); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-top: 40px;
}

.stat { background: var(--paper); padding: 28px 24px; }

.stat-num {
  font-family: 'DM Serif Display', serif;
  font-size: 2.8rem;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 6px;
}

.stat-label {
  font-size: .8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.about-right p { color: var(--muted); margin-bottom: 18px; font-size: 1rem; }

.expertise-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}
.expertise-list li {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: .8rem;
  letter-spacing: .04em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ── PRODUCTS ── */
#products { background: var(--accent-light); border-top: 1px solid var(--border); }

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--paper);
  border: 1px solid var(--border);
  padding: 36px 32px;
  border-radius: 4px;
  transition: transform .2s, box-shadow .2s;
  position: relative;
  overflow: hidden;
}
.product-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(15,17,23,.1); }

.product-tag {
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.product-card h3 { font-size: 1.6rem; margin-bottom: 12px; }
.product-card p { font-size: .925rem; color: var(--muted); margin-bottom: 24px; }

.product-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: .04em;
}
.product-link::after { content: '→'; transition: transform .2s; }
.product-link:hover::after { transform: translateX(4px); }

/* ── CONTACT ── */
#contact {
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  width: 100%;
}

.contact-item { display: flex; flex-direction: column; gap: 6px; }

.contact-label {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-value {
  font-family: 'DM Serif Display', serif;
  font-size: 1.4rem;
  color: var(--ink);
  text-decoration: none;
  transition: color .2s;
}
.contact-value:hover { color: var(--accent); }

.contact-note {
  margin-top: 48px;
  font-size: .85rem;
  color: var(--muted);
  max-width: 440px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ── FOOTER ── */
footer {
  padding: 28px clamp(24px, 8vw, 120px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-logo { font-family: 'DM Serif Display', serif; font-size: 1.1rem; color: var(--ink); }
.footer-logo span { color: var(--accent); }
footer p { font-size: .8rem; color: var(--muted); }

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

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--border);
    padding: 24px;
    gap: 20px;
  }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
  .lang-toggle { border-left: none; padding-left: 0; margin-left: 0; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

/* ── PHONE REVEAL ── */
.contact-reveal {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'DM Serif Display', serif;
  font-size: 1.4rem;
  color: var(--ink);
  padding: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  transition: color .2s;
  text-align: left;
}
.contact-reveal:hover { color: var(--accent); }

.phone-visible { letter-spacing: normal; }

.phone-blurred {
  filter: blur(4px);
  user-select: none;
  transition: filter .3s ease;
  letter-spacing: .05em;
}

/* ── PRINT ── */
@media print {
  nav, .hamburger { display: none; }
  #hero { min-height: auto; padding-top: 24px; }
  .hero-bg, .hero-grid { display: none; }
  section { padding: 32px 0; }
}