/* ==========================================================================
   Energie Optimalisatie Friesland — design tokens
   Palette grounded in het Friese landschap: veen, wolkenlucht, riet, meterlicht.
   ========================================================================== */

:root {
  --veenzwart: #1B1D1B;        /* peat black — dashboard panels, footer */
  --veenzwart-80: #2A2D2B;
  --wolkengrijs: #EDEFEA;      /* cloud grey — page background */
  --wolkengrijs-dark: #E2E5DE;
  --rietgroen: #3F5A4C;        /* reed green — primary accent */
  --rietgroen-licht: #6C8874;  /* lighter reed green — hover/secondary */
  --meterlicht: #E8A33D;       /* smart-meter amber — data highlights */
  --inkt: #232623;             /* ink — body text */
  --inkt-zacht: #565B54;       /* softened ink — secondary text */
  --wit: #FFFFFF;
  --lijn: rgba(35, 38, 35, 0.14);
  --lijn-licht: rgba(255, 255, 255, 0.14);

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --maxw: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--wolkengrijs);
  color: var(--inkt);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 0.5em 0;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em 0; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--rietgroen);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--meterlicht);
  box-shadow: 0 0 0 3px rgba(232, 163, 61, 0.22);
  flex: none;
}

/* ---------------- Header / nav ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(237, 239, 234, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--lijn);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--inkt);
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo .mark {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--rietgroen);
  position: relative;
  flex: none;
}

/* black frame around the recess, like the square border on a real wandcontactdoos —
   clips and center screw intentionally excluded */
.logo .mark::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  transform: translate(-50%, -50%);
  border: 1.5px solid var(--inkt);
  border-radius: 4px;
}

/* two pin-holes, close together */
.logo .mark::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--meterlicht);
  transform: translate(calc(-50% - 3px), -50%);
  box-shadow: 6px 0 0 0 var(--meterlicht);
}

nav.main-nav {
  display: flex;
  gap: 32px;
  align-items: center;
}

nav.main-nav a {
  text-decoration: none;
  font-size: 0.94rem;
  color: var(--inkt-zacht);
  position: relative;
  padding: 4px 0;
}

nav.main-nav a:hover,
nav.main-nav a[aria-current="page"] {
  color: var(--inkt);
}

nav.main-nav a[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 2px;
  background: var(--meterlicht);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 12px 22px;
  border-radius: 8px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color .15s ease;
}

.btn-primary {
  background: var(--rietgroen);
  color: var(--wit);
}
.btn-primary:hover { background: var(--veenzwart); }

.btn-ghost {
  border-color: var(--lijn);
  color: var(--inkt);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--rietgroen); color: var(--rietgroen); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--inkt);
  margin: 5px 0;
}

/* ---------------- Hero ---------------- */

.hero {
  padding: 76px 0 88px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.3rem, 4vw, 3.35rem);
  color: var(--veenzwart);
}

.hero h1 em {
  font-style: normal;
  color: var(--rietgroen);
}

.hero .lede {
  font-size: 1.13rem;
  color: var(--inkt-zacht);
  max-width: 46ch;
  margin-bottom: 28px;
}

.hero .cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---- dashboard signature widget ---- */

.dash {
  background: var(--veenzwart);
  border-radius: 14px;
  padding: 22px 22px 18px;
  color: var(--wolkengrijs);
  font-family: var(--font-mono);
  box-shadow: 0 30px 60px -20px rgba(27, 29, 27, 0.45);
}

.dash-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(237,239,234,0.55);
  border-bottom: 1px solid var(--lijn-licht);
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.dash-head .dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--meterlicht);
}
.dash-head .dot::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--meterlicht);
}

.dash-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 11px 0;
  border-bottom: 1px dashed var(--lijn-licht);
}
.dash-row:last-of-type { border-bottom: none; }

.dash-label { font-size: 0.82rem; color: rgba(237,239,234,0.7); }

.dash-value { font-size: 1.05rem; font-weight: 600; color: var(--wit); }
.dash-value.amber { color: var(--meterlicht); }
.dash-value.green { color: var(--rietgroen-licht); }

.dash-foot {
  margin-top: 16px;
  font-size: 0.72rem;
  color: rgba(237,239,234,0.45);
  display: flex;
  justify-content: space-between;
}

/* ---------------- Sections ---------------- */

section { padding: 78px 0; }
section.tight { padding: 56px 0; }

.section-head {
  max-width: 640px;
  margin-bottom: 44px;
}

.section-head h2 {
  font-size: clamp(1.7rem, 2.6vw, 2.3rem);
  color: var(--veenzwart);
}

.section-head p {
  color: var(--inkt-zacht);
  font-size: 1.03rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.card {
  background: var(--wit);
  border: 1px solid var(--lijn);
  border-radius: 12px;
  padding: 28px 26px;
}

.card .tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rietgroen);
  margin-bottom: 12px;
  display: block;
}

.card h3 {
  font-size: 1.18rem;
  margin-bottom: 8px;
}

.card p {
  color: var(--inkt-zacht);
  font-size: 0.96rem;
  margin-bottom: 0;
}

.calc-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 11px 0;
  border-bottom: 1px dashed var(--lijn);
}
.calc-row:last-of-type { border-bottom: none; }
.calc-label { font-size: 0.86rem; color: var(--inkt-zacht); }
.calc-value { font-family: var(--font-mono); font-size: 1.02rem; font-weight: 600; color: var(--inkt); }
.calc-value.amber { color: var(--meterlicht); }
.calc-value.green { color: var(--rietgroen); }

/* proces / werkwijze — numbered, since it's a real sequence */
.proces {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--lijn);
  border-bottom: 1px solid var(--lijn);
}

.proces-stap {
  padding: 30px 22px;
  border-right: 1px solid var(--lijn);
}
.proces-stap:last-child { border-right: none; }

.proces-stap .nr {
  font-family: var(--font-mono);
  color: var(--meterlicht);
  font-size: 0.85rem;
  margin-bottom: 10px;
  display: block;
}

.proces-stap h4 {
  font-size: 1.02rem;
  margin-bottom: 6px;
}
.proces-stap p {
  font-size: 0.9rem;
  color: var(--inkt-zacht);
  margin-bottom: 0;
}

.band {
  background: var(--veenzwart);
  color: var(--wolkengrijs);
}
.band .section-head h2 { color: var(--wit); }
.band .section-head p { color: rgba(237,239,234,0.65); }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.stat .n {
  font-family: var(--font-mono);
  font-size: 2.1rem;
  color: var(--meterlicht);
  display: block;
}
.stat .l {
  font-size: 0.88rem;
  color: rgba(237,239,234,0.65);
}

/* ---------------- Forms ---------------- */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-grid .full { grid-column: 1 / -1; }

label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--veenzwart);
}

input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--lijn);
  background: var(--wit);
  font-family: var(--font-body);
  font-size: 0.96rem;
  color: var(--inkt);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--rietgroen);
  outline-offset: 1px;
}

textarea { resize: vertical; min-height: 120px; }

.form-note {
  font-size: 0.85rem;
  color: var(--inkt-zacht);
  margin-top: 14px;
}

/* ---------------- Footer ---------------- */

footer.site-footer {
  background: var(--veenzwart);
  color: rgba(237,239,234,0.7);
  padding: 48px 0 28px;
  font-size: 0.9rem;
}
footer.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
footer.site-footer a { text-decoration: none; }
footer.site-footer a:hover { color: var(--wit); }
.foot-cols {
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
}
.foot-col h5 {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: var(--meterlicht);
  margin-bottom: 12px;
}
.foot-col a, .foot-col p { display: block; margin-bottom: 8px; color: rgba(237,239,234,0.7); }
.foot-bottom {
  border-top: 1px solid var(--lijn-licht);
  margin-top: 36px;
  padding-top: 20px;
  font-size: 0.8rem;
  color: rgba(237,239,234,0.4);
}

/* ---------------- Page hero (subpages) ---------------- */

.page-hero {
  padding: 56px 0 20px;
}
.page-hero h1 {
  font-size: clamp(2rem, 3.4vw, 2.7rem);
  color: var(--veenzwart);
}
.page-hero .lede {
  max-width: 60ch;
  color: var(--inkt-zacht);
  font-size: 1.05rem;
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------------- Responsive ---------------- */

@media (max-width: 880px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .proces { grid-template-columns: 1fr 1fr; }
  .proces-stap { border-bottom: 1px solid var(--lijn); }
  .stats { grid-template-columns: 1fr; }
  nav.main-nav {
    position: absolute;
    top: 76px; left: 0; right: 0;
    background: var(--wolkengrijs);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 28px 26px;
    border-bottom: 1px solid var(--lijn);
    display: none;
  }
  nav.main-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .form-grid { grid-template-columns: 1fr; }
  .foot-cols { gap: 36px; }
}
