/*
 * styles.css — page-level styles for Encore Media.
 * Consumes ONLY design-token variables from theme.css. No hardcoded colors/spacing.
 * Mobile-first; single breakpoint at the --breakpoint-md token value (1024px = 64rem).
 * House style: "Blueprint + Anton" — green-forward on light, technical grid + mono
 * details, Anton display headings (see theme.css header comment).
 */

.wrap {
  width: min(var(--wide-width), 100% - 2 * var(--space-md));
  margin-inline: auto;
}
.wrap--narrow {
  width: min(48rem, 100% - 2 * var(--space-md));
  margin-inline: auto;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: var(--space-2xs);
  top: -4rem;
  padding: var(--space-2xs) var(--space-sm);
  background: var(--color-primary);
  color: var(--color-primary-on);
  border-radius: var(--radius-sm);
  z-index: 10;
  transition: top 0.15s ease;
}
.skip-link:focus { top: var(--space-2xs); }

/* Header / nav */
.site-header { border-bottom: 1px solid var(--color-border); }
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  width: min(var(--wide-width), 100% - 2 * var(--space-md));
  margin-inline: auto;
  padding-block: var(--space-sm);
}
.site-nav__brand { display: inline-flex; align-items: center; gap: var(--space-2xs); text-decoration: none; }
.site-nav__logo { width: 2.5rem; height: 2.5rem; border-radius: var(--radius-sm); display: block; }
.site-nav__wordmark {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-regular); /* Anton is single-weight; avoid synthetic bold */
  font-size: var(--font-size-lg);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
}
/* Nav list — collapses behind the hamburger on mobile (see .nav-toggle + main.js) */
.site-nav__list {
  display: none;
  width: 100%;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-sm) 0 0;
  margin: 0;
  list-style: none;
}
.site-nav__list.is-open { display: flex; }
.site-nav__list a { text-decoration: none; color: var(--color-text); font-weight: var(--font-weight-medium); display: inline-block; padding-block: var(--space-2xs); }
.site-nav__list a:hover,
.site-nav__list a[aria-current="page"] { color: var(--color-primary); }

/* Hamburger toggle (mobile only) */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem; height: 2.75rem;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  cursor: pointer;
}
.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  content: "";
  display: block;
  width: 1.25rem; height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle__bar { position: relative; }
.nav-toggle__bar::before { position: absolute; left: 0; top: -6px; }
.nav-toggle__bar::after  { position: absolute; left: 0; top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after  { transform: translateY(-6px) rotate(-45deg); }

/* Screen-reader-only utility */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: var(--space-xs) var(--space-lg);
  border-radius: var(--radius-md);
  font-weight: var(--font-weight-bold);
  text-decoration: none;
  border: 2px solid transparent;
}
.btn--primary { background: var(--color-accent); color: var(--color-accent-on); }   /* green + dark text */
.btn--primary:hover { background: var(--color-primary); color: var(--color-primary-on); }
.btn--ghost { color: var(--color-primary); border-color: var(--color-border); background: transparent; }
.btn--ghost:hover { border-color: var(--color-primary); }

/* Hero — light mint→grey gradient (matches live page background) */
.hero {
  padding-block: var(--space-3xl);
  background: linear-gradient(110deg, var(--color-surface-alt) 0%, var(--color-surface-warm) 100%);
  border-bottom: 1px solid var(--color-border);
}
.hero h1 {
  font-size: var(--font-size-2xl);
  margin: 0 0 var(--space-md);
  max-width: 20ch;
}
.hero__intro {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  margin: 0 0 var(--space-lg);
  max-width: 52ch;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }

/* Generic section rhythm */
.section { padding-block: var(--space-2xl); }
.section--alt { background: var(--color-surface-alt); }
.section__lead { color: var(--color-text-muted); font-size: var(--font-size-lg); max-width: 60ch; margin: 0 0 var(--space-lg); }
.section h2 { font-size: var(--font-size-2xl); margin: 0 0 var(--space-sm); }
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin: 0 0 var(--space-2xs);
}

/* Card grid (services, cases) */
.grid { list-style: none; margin: var(--space-lg) 0 0; padding: 0; display: grid; gap: var(--space-md); grid-template-columns: 1fr; }
.card {
  position: relative;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
/* Blueprint-style corner marks — decorative, mirrors the technical-grid detailing */
.card::before,
.card::after {
  content: "+";
  position: absolute;
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  color: var(--color-primary);
  opacity: 0.5;
}
.card::before { top: -0.6rem; left: -0.5rem; }
.card::after { bottom: -0.6rem; right: -0.5rem; }
.card h3 { margin: 0 0 var(--space-2xs); font-size: var(--font-size-xl); }
.card p { margin: 0; color: var(--color-text-muted); }
/* Whole-card link (services overview) */
/* Equal-height cards per grid row: the <li> stretches, the link fills it, "Meer over" sits at the bottom */
.grid > li { display: flex; }
.grid > li > .card { flex: 1; }
.card--link { display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease; }
.card--link:hover { border-color: var(--color-accent); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card--link h3 { color: var(--color-text); }
.card__more { display: inline-block; margin-top: auto; padding-top: var(--space-sm); font-weight: var(--font-weight-bold); color: var(--color-primary); }
.card__tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-full);
  padding: 0.15rem 0.6rem;
  margin: 0 0 var(--space-2xs);
  align-self: flex-start;
}

/* Problem / value list */
.checks { list-style: none; margin: var(--space-lg) 0 0; padding: 0; display: grid; gap: var(--space-md); grid-template-columns: 1fr; }
.checks li { padding-left: var(--space-lg); position: relative; }
.checks li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.35em;
  width: 0.9rem; height: 0.9rem;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  box-shadow: 0 0 0 4px var(--color-surface-alt);
}
.checks strong { display: block; }
.checks span { color: var(--color-text-muted); }

/* Process steps */
.steps { list-style: none; counter-reset: step; margin: var(--space-lg) 0 0; padding: 0; display: grid; gap: var(--space-md); grid-template-columns: 1fr; }
.steps li { counter-increment: step; padding-left: var(--space-2xl); position: relative; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: var(--space-lg); height: var(--space-lg);
  display: grid; place-items: center;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: var(--color-primary-on);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
}
.steps strong { display: block; }
.steps span { color: var(--color-text-muted); }
/* Stacked variant — always one column, roomier (used on the Werkwijze page) */
.steps--stack li { padding-left: var(--space-2xl); margin-bottom: var(--space-md); }

/* CTA band — brand near-black */
.cta { background: var(--color-surface-dark); color: var(--color-surface-dark-on); padding-block: var(--space-2xl); text-align: center; }
.cta h2 { color: var(--color-surface-dark-on); }
.cta p { color: var(--color-primary-muted); max-width: 48ch; margin-inline: auto; }
.cta .btn--primary { margin-top: var(--space-md); }
.cta a:focus-visible { outline-color: var(--color-accent); }  /* bright green ring on dark */

/* Contact form */
.form { display: grid; gap: var(--space-md); max-width: 40rem; margin-top: var(--space-lg); }
.form__row { display: grid; gap: var(--space-3xs); }
.form label { font-weight: var(--font-weight-medium); }
.form label .req { color: var(--color-primary); }
.form input,
.form select,
.form textarea {
  font: inherit;
  color: var(--color-text);
  width: 100%;
  padding: var(--space-2xs) var(--space-xs);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}
.form textarea { min-height: 8rem; resize: vertical; }
.form__hint { color: var(--color-text-muted); font-size: var(--font-size-sm); }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }  /* honeypot; leave empty */
.form-alert {
  margin-top: var(--space-lg);
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-error);
  border-left-width: 4px;
  border-radius: var(--radius-md);
  color: var(--color-error);
  background: var(--color-surface);
}
.contact-aside { margin-top: var(--space-lg); color: var(--color-text-muted); }
.contact-aside a { color: var(--color-primary); }

/* Footer */
.site-footer { border-top: 1px solid var(--color-border); padding-block: var(--space-xl); color: var(--color-text-muted); font-size: var(--font-size-sm); }
.site-footer a { color: var(--color-text); }
.site-footer__cols { display: flex; flex-wrap: wrap; gap: var(--space-lg); justify-content: space-between; }
.site-footer__note { margin-top: var(--space-md); }

/* Breakpoint — mirrors --breakpoint-md (1024px). */
@media (min-width: 64rem) {
  .nav-toggle { display: none; }
  .site-nav__list {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: auto;
    gap: var(--space-md);
    padding-top: 0;
  }
  .hero { padding-block: 7rem; }
  .hero h1 { font-size: var(--font-size-3xl); }
  .section h2 { font-size: var(--font-size-3xl); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; }
  .grid--cases { grid-template-columns: repeat(2, 1fr); }
  .checks { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(5, 1fr); }
  .steps--stack { grid-template-columns: 1fr; max-width: 40rem; }
}
