/* Administratiekantoor Tubex — shared stylesheet */

:root {
  /* Richer, more saturated navy — this is the brand color, spend it boldly */
  --navy-900: #0b1330;
  --navy-800: #132250;
  --navy-700: #1c3268;
  --navy-600: #2e4a8c;
  --navy-tint: #dbe2f2;
  /* Warm parchment paper, not gray-beige — kept light/white with just a whisper of warmth */
  --paper: #fdfbf6;
  --paper-raised: #f6f0df;
  --ink: #1c1710;
  --ink-soft: #423a28;
  --muted: #8a7c5c;
  --rule: #e6d9b8;
  --rule-strong: #cdb987;
  --focus: #2e4a8c;

  --font-display: "Source Serif 4", "PT Serif", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;

  --container: 1120px;
  --radius: 3px;

  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --navy-900: #070c1c;
    --navy-800: #14224a;
    --navy-700: #24397a;
    --navy-600: #5677c4;
    --navy-tint: #1c2a4d;
    --paper: #11151f;
    --paper-raised: #181c28;
    --ink: #eee7d6;
    --ink-soft: #cfc6ae;
    --muted: #9a9070;
    --rule: #2c3040;
    --rule-strong: #3d4356;
    --focus: #8ba7ec;
  }
}

:root[data-theme="dark"] {
  --navy-900: #070c1c;
  --navy-800: #14224a;
  --navy-700: #24397a;
  --navy-600: #5677c4;
  --navy-tint: #1c2a4d;
  --paper: #11151f;
  --paper-raised: #181c28;
  --ink: #eee7d6;
  --ink-soft: #cfc6ae;
  --muted: #9a9070;
  --rule: #2c3040;
  --rule-strong: #3d4356;
  --focus: #8ba7ec;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }
html { scrollbar-gutter: stable; scroll-behavior: auto; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body { padding-inline: 20px; overflow-x: clip; }

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

a { color: var(--navy-700); }
:root[data-theme="dark"] a, @media (prefers-color-scheme: dark) { }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy-900);
  text-wrap: balance;
  margin: 0;
}
:root[data-theme="dark"] h1, :root[data-theme="dark"] h2, :root[data-theme="dark"] h3, :root[data-theme="dark"] h4 {
  color: var(--ink);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) h1,
  :root:not([data-theme="light"]) h2,
  :root:not([data-theme="light"]) h3,
  :root:not([data-theme="light"]) h4 { color: var(--ink); }
}

h1 { font-size: clamp(2.6rem, 1.9rem + 3vw, 4.4rem); line-height: 1.05; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 1.35rem + 1.1vw, 2.3rem); line-height: 1.2; }
h3 { font-size: 1.25rem; line-height: 1.35; }

p { margin: 0; max-width: 62ch; }
p.wide { max-width: none; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.wrap {
  max-width: var(--container);
  margin-inline: auto;
}

.stack { display: flex; flex-direction: column; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.gap-4 { gap: 40px; }

/* Header / nav */
header.site {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  padding-inline: 44px;
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 18px;
  gap: 24px;
  flex-wrap: nowrap;
  position: relative;
}

.nav-panel {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  padding: 0;
  border: 1px solid var(--rule-strong);
  background: transparent;
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--navy-800);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
:root[data-theme="dark"] .nav-toggle-bar { background: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nav-toggle-bar { background: var(--ink); } }
header.site.nav-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
header.site.nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
header.site.nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--navy-900);
  text-decoration: none;
  letter-spacing: 0.01em;
}
:root[data-theme="dark"] .brand { color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand { color: var(--ink); } }

.brand span { color: var(--muted); font-family: var(--font-body); font-weight: 400; font-size: 0.95rem; display: block; }

nav.primary {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

nav.primary a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.96rem;
  font-weight: 600;
}
nav.primary a:hover { color: var(--navy-800); }
:root[data-theme="dark"] nav.primary a:hover { color: var(--navy-600); }

.has-dropdown { position: relative; }
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0;
  padding-top: 10px;
  background: var(--paper);
  border: 1px solid var(--rule);
  background-clip: padding-box;
  min-width: 240px;
  padding-inline: 8px;
  padding-bottom: 8px;
  box-shadow: 0 6px 18px rgba(19, 31, 56, 0.08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.15s ease 0.3s, transform 0.15s ease 0.3s, visibility 0s linear 0.45s;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown,
.has-dropdown.force-open .dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0s;
}
.has-dropdown.force-closed .dropdown {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(-4px) !important;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0s !important;
}
.dropdown a {
  display: block;
  padding: 9px 12px;
  font-weight: 400;
  color: var(--ink-soft);
}
.dropdown a:hover { background: var(--paper-raised); color: var(--navy-800); }

/* Mobile navigation — collapses into a hamburger-triggered panel */
@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }

  .nav-panel {
    position: absolute;
    top: 100%;
    left: calc(50% - 50vw);
    right: auto;
    width: 100vw;
    z-index: 2;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-top: 1px solid var(--rule);
    box-shadow: 0 14px 24px rgba(19, 31, 56, 0.1);
    padding-inline: 44px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav-scrim { display: none; }
  header.site.nav-open .nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(11, 19, 48, 0.45);
    z-index: 1;
  }
  header.site.nav-open .nav-panel {
    max-height: 85vh;
    overflow-y: auto;
    padding-block: 8px 24px;
  }

  nav.primary {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  nav.primary > a,
  .has-dropdown > a[aria-haspopup="true"] {
    padding: 14px 2px;
    border-bottom: 1px solid var(--rule);
    font-size: 1.02rem;
  }

  .has-dropdown { width: 100%; }
  .has-dropdown > a[aria-haspopup="true"] {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .dropdown {
    position: static;
    top: auto;
    left: auto;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    background: transparent;
    border: none;
    box-shadow: none;
    min-width: 0;
    padding: 0 0 0 14px;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .has-dropdown.force-open .dropdown {
    max-height: 480px;
    padding-top: 4px;
    padding-bottom: 10px;
  }
  .has-dropdown.force-closed .dropdown,
  .has-dropdown:not(.force-open) .dropdown {
    max-height: 0;
  }
  .dropdown a { padding: 10px 6px; }

  .nav-panel .btn-primary {
    justify-content: center;
    width: 100%;
    margin-top: 18px;
  }
}

@media (max-width: 520px) {
  header.site,
  footer.site {
    padding-inline: 20px;
  }
  .nav-panel { padding-inline: 20px; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--navy-800); color: #f6f3ec; }
.btn-primary:hover { background: var(--navy-900); }
.btn-outline { border-color: var(--rule-strong); color: var(--navy-800); background: transparent; }
:root[data-theme="dark"] .btn-outline { color: var(--ink); }
.btn-outline:hover { border-color: var(--navy-700); }
.btn-light { background: #fdfbf6; color: var(--navy-900); }
.btn-light:hover { background: #fff; }

/* Logo mark (full icon + wordmark lockup) */
.logo-mark {
  height: 40px;
  width: auto;
  flex-shrink: 0;
  display: block;
}
.brand-lockup { display: flex; align-items: center; gap: 12px; }

.footer-logo {
  height: 36px;
  width: auto;
  display: block;
  align-self: flex-start;
}

/* Logo is a fixed navy PNG — invert it to stay legible against a dark background */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-mark,
  :root:not([data-theme="light"]) .footer-logo {
    filter: brightness(0) saturate(100%) invert(1);
  }
}
:root[data-theme="dark"] .logo-mark,
:root[data-theme="dark"] .footer-logo {
  filter: brightness(0) saturate(100%) invert(1);
}

/* Hero — full-bleed */
.hero {
  position: relative;
  min-height: 92svh;
  display: flex;
  align-items: flex-end;
  color: #fdfbf6;
  background: linear-gradient(180deg, var(--navy-800) 0%, var(--navy-900) 100%);
  overflow: hidden;
  margin-top: -1px;
  width: 100vw;
  margin-inline: calc(50% - 50vw);
}
.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  mix-blend-mode: luminosity;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,19,48,0.35) 0%, rgba(11,19,48,0.55) 55%, rgba(11,19,48,0.94) 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-inline: 24px;
  padding-block: 48px 72px;
}
.hero-eyebrow { color: var(--navy-tint); }
.hero h1 { color: #fdfbf6; max-width: 16ch; }
.hero-lede { color: #e4dfce; font-size: 1.12rem; max-width: 52ch; }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.hero .btn-outline { border-color: rgba(253,251,246,0.5); color: #fdfbf6; }
.hero .btn-outline:hover { border-color: #fdfbf6; background: rgba(253,251,246,0.08); }

/* Sections */
section { padding-block: 56px; }
section.rule-top { border-top: 1px solid var(--rule); }
section.raised { background: var(--paper-raised); }
@media (max-width: 860px) {
  section.raised {
    width: 100vw;
    margin-inline: calc(50% - 50vw);
    padding-inline: 20px;
  }
}
@media (max-width: 520px) {
  .hero-inner { padding-inline: 20px; }
}

.section-head { max-width: 62ch; margin-bottom: 32px; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 780px) { .two-col { grid-template-columns: 1fr; } }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid-3 { grid-template-columns: 1fr; } }

.card {
  border: 1px solid var(--rule);
  padding: 26px 24px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card .index {
  font-family: var(--font-display);
  color: var(--rule-strong);
  font-size: 1.6rem;
  line-height: 1;
}

ul.plain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
ul.plain li { padding-left: 22px; position: relative; }
ul.plain li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 1px;
  background: var(--navy-700);
}

/* Service page layout */
.service-header {
  padding-block: 48px 32px;
  border-bottom: 1px solid var(--rule);
}
.service-photo {
  width: 100%;
  aspect-ratio: 21 / 8;
  object-fit: cover;
  border: 1px solid var(--rule);
  margin-top: 8px;
}
@media (max-width: 620px) { .service-photo { aspect-ratio: 4 / 3; } }

.contact-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--rule);
}
.service-body {
  padding-block: 44px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 56px;
}
@media (max-width: 860px) { .service-body { grid-template-columns: 1fr; } }

.contact-body { grid-template-columns: 1.3fr 1fr; }
@media (max-width: 860px) { .contact-body { grid-template-columns: 1fr; } }

.service-body article { display: flex; flex-direction: column; gap: 32px; max-width: 68ch; }
.service-body h2 { margin-top: 4px; }
.service-body p + p { margin-top: 0; }

aside.rail {
  border-left: 1px solid var(--rule);
  padding-left: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: fit-content;
}
@media (max-width: 860px) { aside.rail { border-left: none; border-top: 1px solid var(--rule); padding-left: 0; padding-top: 24px; } }

aside.rail .box {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  padding: 20px;
}

.breadcrumb {
  font-size: 0.86rem;
  color: var(--muted);
  display: flex;
  gap: 8px;
  align-items: center;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--navy-800); }

/* Contact form */
form.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 560px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
label { font-size: 0.88rem; font-weight: 600; color: var(--ink-soft); }
input, textarea, select {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 11px 13px;
  border: 1px solid var(--rule-strong);
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius);
}
textarea { min-height: 130px; resize: vertical; }

.contact-meta {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.contact-meta .item { display: flex; flex-direction: column; gap: 2px; }
.contact-meta .label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; }

/* Footer */
footer.site {
  border-top: 1px solid var(--rule);
  margin-top: 64px;
  padding-block: 40px;
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  padding-inline: 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 32px;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { font-size: 0.92rem; color: var(--ink-soft); font-family: var(--font-body); font-weight: 700; margin-bottom: 6px; }
.footer-grid a { color: var(--muted); text-decoration: none; font-size: 0.92rem; }
.footer-grid a:hover { color: var(--navy-800); }
.footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.links-list { display: flex; flex-direction: column; gap: 0; }
.links-list a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: var(--ink);
  gap: 16px;
}
.links-list a:hover { color: var(--navy-800); }
.links-list .desc { color: var(--muted); font-size: 0.9rem; text-align: right; }
@media (max-width: 560px) {
  .links-list a { flex-direction: column; align-items: flex-start; gap: 4px; padding-block: 16px; }
  .links-list .desc { text-align: left; }
}
