/*
 * Ark Design huisstijl (afgeleid van arkdesign.nl): donker navy met mintgroen
 * accent, pill-vormige knoppen en een strakke, vette koptekst.
 */
:root {
  --navy: #082335;           /* hoofdkleur header/hero */
  --navy-2: #0b2e45;         /* pill/badge-achtergrond */
  --navy-3: #133a51;         /* lichtere navy */
  --mint: #7bc8be;           /* accentkleur */
  --on-navy: #ffffff;
  --on-navy-muted: #98b2c5;
  --font: "Inter", "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --bg: #f3f6f8;
  --surface: #ffffff;
  --text: #082335;
  --muted: #5d7385;
  --border: #dfe7ec;
  --bar-empty: #dfe7ec;

  --operational: #22a06b;
  --degraded: #e3b008;
  --partial: #f07b16;
  --major: #d92d20;
  --maintenance: #2f6fde;

  --radius: 20px;
  --shadow: 0 1px 2px rgba(8, 35, 53, .05), 0 8px 24px rgba(8, 35, 53, .07);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #061a28;
    --surface: #0b2638;
    --text: #e8f0f5;
    --muted: #98b2c5;
    --border: #173a50;
    --bar-empty: #1c4258;
    --shadow: none;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }

.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 16px; }
.stack { display: grid; gap: 16px; }
main.wrap { display: grid; gap: 40px; padding-bottom: 56px; }

/* Header */
.site-header { background: var(--navy); color: var(--on-navy); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand-logo { display: block; height: 32px; width: auto; }
.header-nav { display: flex; align-items: center; gap: 28px; font-size: 15px; letter-spacing: .06em; }
.header-nav a { text-decoration: none; color: var(--on-navy-muted); transition: color .15s; }
.header-nav a:hover { color: var(--on-navy); }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 20px; border-radius: 999px; font-weight: 500; letter-spacing: .04em;
  text-decoration: none; transition: background .15s, color .15s;
}
.header-nav .btn-outline { color: var(--on-navy); border: 1px solid rgba(255, 255, 255, .7); }
.header-nav .btn-outline:hover { background: var(--on-navy); color: var(--navy); }
@media (max-width: 560px) {
  .header-nav a:not(.btn) { display: none; }
  .brand-logo { height: 28px; }
}

/* Hero */
.hero {
  background: radial-gradient(120% 90% at 50% 0%, var(--navy) 55%, #143246 100%);
  color: var(--on-navy);
  padding: 56px 0 96px;
  text-align: center;
}
.hero-inner { display: grid; justify-items: center; gap: 18px; }
.pill {
  background: var(--navy-2); color: #b8cad8; border-radius: 999px;
  padding: 8px 20px; font-size: 14px; letter-spacing: .06em;
}
.hero-title {
  margin: 0; max-width: 760px;
  font-size: clamp(30px, 5.2vw, 52px); line-height: 1.1; font-weight: 800; letter-spacing: -.035em;
}
.hero-text { margin: 0; max-width: 640px; color: var(--on-navy-muted); font-size: 17px; line-height: 1.7; }
@media (max-width: 560px) {
  .hero { padding: 40px 0 84px; }
  .hero-text { font-size: 15px; }
}

/* Banner */
.banner {
  display: flex; align-items: center; gap: 16px;
  padding: 24px 28px; border-radius: var(--radius);
  background: var(--muted); color: #fff;
  box-shadow: 0 12px 32px rgba(8, 35, 53, .22);
  margin-top: -56px; position: relative;
}
.banner-title { margin: 0; font-size: 24px; line-height: 1.25; font-weight: 800; letter-spacing: -.02em; }
@media (max-width: 560px) { .banner { padding: 20px; gap: 14px; } .banner-title { font-size: 19px; } }
.banner-meta { margin: 2px 0 0; font-size: 13px; opacity: .9; }
.banner-icon {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255, 255, 255, .22) center / 22px no-repeat;
}
.banner.s-operational { background: var(--operational); }
.banner.s-degraded { background: var(--degraded); color: #1d1a05; }
.banner.s-partial { background: var(--partial); }
.banner.s-major { background: var(--major); }
.banner.s-maintenance { background: var(--maintenance); }
.banner.s-operational .banner-icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.banner:not(.s-operational) .banner-icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 6v8M12 18.5v.01'/%3E%3C/svg%3E"); }
.banner.s-degraded .banner-icon { background-color: rgba(0, 0, 0, .12); }

/* Kaarten */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.section-title { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }

/* Groepen */
.group-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 20px; border-bottom: 1px solid var(--border);
}
.group-head h2 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.group-head p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.group-summary { flex: none; font-size: 13px; font-weight: 600; white-space: nowrap; }

.component { padding: 16px 20px; border-top: 1px solid var(--border); }
.component:first-of-type { border-top: 0; }
.component-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.component-name { font-weight: 600; }

.status-label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; background: var(--muted); }
.s-operational { --c: var(--operational); }
.s-degraded { --c: var(--degraded); }
.s-partial { --c: var(--partial); }
.s-major { --c: var(--major); }
.s-maintenance { --c: var(--maintenance); }
.dot.s-operational, .dot.s-degraded, .dot.s-partial, .dot.s-major, .dot.s-maintenance { background: var(--c); }
.status-label.s-operational, .status-label.s-degraded, .status-label.s-partial,
.status-label.s-major, .status-label.s-maintenance { color: var(--c); }
.status-label.s-degraded { color: #a07a00; }
@media (prefers-color-scheme: dark) { .status-label.s-degraded { color: var(--degraded); } }

/* Serveroverzicht znProduction */
.server-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.server-tile {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px;
  background: var(--bg); text-decoration: none; min-width: 0;
}
.server-tile:hover { border-color: var(--c, var(--border)); }
.server-tile .dot { width: 12px; height: 12px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 18%, transparent); }
.server-tile-text { display: grid; min-width: 0; }
.server-tile-name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.server-tile-status { font-size: 12px; color: var(--muted); }
.server-tile:not(.s-operational) { border-color: var(--c); }
.server-tile:not(.s-operational) .server-tile-status { color: var(--c); font-weight: 600; }

@media (max-width: 720px) { .server-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) {
  .server-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 14px 16px; }
  .server-tile { padding: 10px; gap: 8px; }
  .server-tile-name { font-size: 13px; }
  .group-head { flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px; }
  .component, .incident, .empty { padding-left: 16px; padding-right: 16px; }
}

/* Secties binnen een groep (bijv. Shared 108 / Shared 452) */
.tile-section { border-bottom: 1px solid var(--border); }
.tile-section .server-grid { border-bottom: 0; padding-top: 10px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 0; }
.section-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.section-summary { font-size: 12px; }
.uptime-section {
  padding: 8px 20px; background: var(--bg); border-top: 1px solid var(--border);
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.uptime-section + .component { border-top: 0; }
@media (max-width: 520px) { .section-head { padding: 14px 16px 0; } .uptime-section { padding-left: 16px; } }

details.server-details > summary {
  cursor: pointer; list-style: none; padding: 12px 20px;
  font-size: 13px; font-weight: 600; color: var(--muted);
}
details.server-details > summary::-webkit-details-marker { display: none; }
details.server-details > summary::before { content: "▸ "; }
details.server-details[open] > summary::before { content: "▾ "; }
details.server-details[open] > summary { border-bottom: 1px solid var(--border); }

/* Uptime-balk */
.uptime { margin-top: 10px; }
.bars { display: flex; gap: 2px; height: 32px; }
.bar { flex: 1 1 0; min-width: 0; border-radius: 2px; background: var(--operational); }
.bar.d-none { background: var(--bar-empty); }
.bar.d-degraded { background: var(--degraded); }
.bar.d-partial { background: var(--partial); }
.bar.d-major { background: var(--major); }
.bar.d-maintenance { background: var(--maintenance); }
.bar:hover { opacity: .7; }
.uptime-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.uptime-foot .pct { font-weight: 600; color: var(--text); }
@media (max-width: 640px) {
  .bars .bar:nth-child(-n+60) { display: none; } /* mobiel: laatste 30 dagen */
  .range-90 { display: none; }
}
@media (min-width: 641px) { .range-30 { display: none; } }

/* Incidenten */
.incident { padding: 18px 20px; }
.incident + .incident { border-top: 1px solid var(--border); }
.incident-card { border-left: 5px solid var(--c, var(--border)); }
.incident-title { margin: 0; font-size: 16px; }
.incident-meta { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.incident-affects { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); }
.updates { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; }
.updates li { display: grid; grid-template-columns: 110px 1fr; gap: 12px; font-size: 14px; }
.updates time { font-size: 12px; color: var(--muted); }
.update-status { font-weight: 700; }
@media (max-width: 560px) { .updates li { grid-template-columns: 1fr; gap: 2px; } }

/* Aanmelden voor e-mail */
.subscribe { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--border); }
.btn-mint { background: var(--mint); color: var(--navy); font-weight: 600; border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.btn-sm { padding: 7px 16px; font-size: 14px; }
.btn:disabled { opacity: .6; cursor: default; }
.btn-link { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: 13px; justify-self: start; }
.subscribe-form { display: grid; gap: 10px; max-width: 560px; }
.subscribe-intro { margin: 0; font-size: 14px; }
.subscribe-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.subscribe-row input {
  font: inherit; font-size: 14px; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px; min-width: 0;
}
.subscribe-row input:focus { outline: 2px solid var(--mint); border-color: var(--mint); }
.subscribe-consent { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--muted); line-height: 1.5; cursor: pointer; }
.subscribe-consent input { margin-top: 3px; flex: none; }
.subscribe-error { margin: 0; color: var(--major); font-size: 13px; }
.subscribe-done { margin: 0; font-size: 14px; font-weight: 600; color: var(--operational); }
/* Algemene aanmelding in de hero */
.hero-subscribe { width: 100%; max-width: 560px; margin-top: 6px; }
.hero-subscribe .subscribe { margin: 0; padding: 0; border: 0; }
.hero-subscribe .subscribe-form { margin: 0 auto; text-align: left; background: var(--navy-2); border: 1px solid rgba(255, 255, 255, .08); border-radius: 18px; padding: 18px; }
.hero-subscribe .subscribe-intro { color: var(--on-navy); }
.hero-subscribe .subscribe-consent { color: var(--on-navy-muted); }
.hero-subscribe .subscribe-row input { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .18); color: var(--on-navy); }
.hero-subscribe .subscribe-row input::placeholder { color: var(--on-navy-muted); }
.hero-subscribe .btn-link { color: var(--on-navy-muted); }
.hero-subscribe .subscribe-error { color: #ff8a80; }
.hero-subscribe .subscribe-done { color: var(--mint); }
.hero-subscribe .subscribe-toggle { padding: 11px 22px; font-size: 15px; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 480px) { .subscribe-row { grid-template-columns: 1fr; } }

.empty { padding: 18px 20px; color: var(--muted); font-size: 14px; }

.history { display: grid; gap: 0; }
.history-day { padding: 14px 0; border-bottom: 1px solid var(--border); }
.history-day h3 { margin: 0 0 6px; font-size: 14px; }
.history-day .none { margin: 0; font-size: 14px; color: var(--muted); }
.history-item { margin: 8px 0 0; }
.history-item summary { cursor: pointer; font-weight: 600; }
.history-item .incident-meta { margin-left: 18px; }
.history-item .updates { margin-left: 18px; }

/* Legenda + footer */
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.site-footer { background: var(--navy); color: var(--on-navy-muted); padding: 24px 0 32px; font-size: 13px; }
.site-footer a { color: var(--mint); text-decoration: none; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* Tooltip */
.tooltip {
  position: fixed; z-index: 10; max-width: 260px; pointer-events: none;
  background: var(--navy); color: #fff; border-radius: 10px; box-shadow: 0 8px 24px rgba(8, 35, 53, .25);
  padding: 8px 10px; font-size: 12px; line-height: 1.4;
}
.tooltip strong { display: block; }

.error { padding: 18px 20px; color: var(--major); }
