/* ============================================================
   Huiskamerconcerten Reeks I — Survey
   Design system overgenomen van josvanimmerseel.com
   ============================================================ */

:root {
  --teal: #1BA8B0;
  --teal-dark: #15868C;
  --teal-light: #E5F4F5;
  --orange: #F4A93C;
  --orange-dark: #D88E1E;
  --red: #B73229;
  --cream: #F7F2E9;
  --paper: #FBF8F2;
  --ink: #2A2A2A;
  --ink-soft: #555555;
  --border: #E0DACE;
  --shadow: 0 4px 24px rgba(0,0,0,.08);
  --shadow-deep: 0 8px 32px rgba(0,0,0,.12);
  --radius-pill: 28px;
  --radius-card: 12px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: linear-gradient(180deg, var(--cream) 0%, var(--paper) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 .4em 0;
  line-height: 1.25;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3.4vw, 1.9rem); }
h3 { font-size: clamp(1.15rem, 2.6vw, 1.35rem); }

p { margin: 0 0 1em 0; }
a { color: var(--teal-dark); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--teal); }

.italic-serif {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 400;
}

/* ===== Header ===== */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(8px);
  background-color: rgba(251, 248, 242, 0.92);
}
.site-header-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 14px 20px;
  display: flex; align-items: center; gap: 14px;
}
.btn-home {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--teal); color: #fff;
  border: none; padding: 9px 18px; border-radius: var(--radius-pill);
  font-family: 'Lato', sans-serif; font-weight: 700; font-size: 14px;
  text-decoration: none; transition: all .2s ease;
  min-height: 40px;
}
.btn-home:hover { background: var(--teal-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow); }
.site-nav { margin-left: auto; display: flex; gap: 18px; }
.site-nav a {
  color: var(--ink-soft); text-decoration: none; font-size: 14px;
  font-family: 'Playfair Display', serif; font-style: italic;
  padding: 6px 4px;
}
.site-nav a:hover { color: var(--teal-dark); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; min-width: 44px; min-height: 44px; }
.nav-toggle svg { width: 24px; height: 24px; stroke: var(--ink); }

@media (max-width: 640px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 12px 20px;
    background: var(--paper); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 4px; border-bottom: 1px solid var(--border); min-height: 44px; display: flex; align-items: center; }
  .site-nav a:last-child { border-bottom: none; }
}

/* ===== Hero ===== */
.hero {
  max-width: 760px; margin: 0 auto;
  padding: 48px 20px 24px 20px; text-align: center;
}
.badge {
  display: inline-block; padding: 6px 18px; border-radius: var(--radius-pill);
  font-family: 'Playfair Display', serif; font-style: italic;
  font-size: 14px; letter-spacing: .02em;
}
.badge-red { background: var(--red); color: #fff; }
.badge-orange { background: var(--orange); color: #fff; }
.badge-teal { background: var(--teal-light); color: var(--teal-dark); border: 1px solid var(--teal); }
.hero h1 { margin-top: 18px; }
.hero .subtitle {
  font-family: 'Playfair Display', serif; font-style: italic; font-weight: 400;
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  color: var(--ink-soft); max-width: 540px; margin: 8px auto 0;
}

/* ===== Progress bar ===== */
.progress-wrapper {
  position: sticky; top: 60px; z-index: 40;
  background: var(--paper); padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  background-color: rgba(251, 248, 242, 0.92);
}
.progress-inner {
  max-width: 760px; margin: 0 auto;
  display: flex; align-items: center; gap: 14px;
}
.progress-track {
  flex: 1; height: 8px; border-radius: 999px;
  background: var(--border); overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--teal) 0%, var(--orange) 100%);
  transition: width .35s cubic-bezier(.4,0,.2,1);
  border-radius: 999px;
}
.progress-label {
  font-size: 13px; color: var(--ink-soft); white-space: nowrap;
  font-family: 'Playfair Display', serif; font-style: italic;
}

/* ===== Container ===== */
.container { max-width: 760px; margin: 0 auto; padding: 0 20px 80px; }

/* ===== Cards ===== */
.intro-card {
  background: var(--cream); border: 1px solid var(--border);
  border-left: 4px solid var(--orange);
  border-radius: var(--radius-card);
  padding: 24px 28px 22px; margin: 24px 0;
  font-size: 16px; color: var(--ink-soft);
  line-height: 1.7;
  text-align: left;
  text-wrap: pretty;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.intro-card p { margin: 0 0 14px 0; max-width: 62ch; }
.intro-card p:last-child { margin-bottom: 0; }
.intro-card strong { color: var(--ink); font-weight: 700; }
@media (max-width: 640px) {
  .intro-card { padding: 20px 18px 18px; font-size: 15px; line-height: 1.65; }
}

.section-divider {
  margin: 48px 0 20px;
  border-top: 1px solid var(--border); padding-top: 20px;
}
.section-divider .badge { margin-bottom: 8px; }
.section-divider h2 {
  font-style: italic; font-weight: 600;
  color: var(--teal-dark);
}
.section-divider .sub {
  font-family: 'Playfair Display', serif; font-style: italic;
  color: var(--ink-soft); font-size: 1rem;
}

.q-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 22px 22px;
  margin: 16px 0; box-shadow: var(--shadow);
  transition: all .25s ease; position: relative;
}
.q-card:focus-within { border-color: var(--teal); box-shadow: var(--shadow-deep); }
.q-card.error {
  border-color: var(--red); box-shadow: 0 0 0 3px rgba(183,50,41,.15);
}
.q-card.error::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--red); border-radius: var(--radius-card) 0 0 var(--radius-card);
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%,60% { transform: translateX(-6px); }
  40%,80% { transform: translateX(6px); }
}
.q-card.shake { animation: shake .45s ease-in-out; }

.q-num {
  display: inline-block;
  font-family: 'Playfair Display', serif; font-style: italic;
  color: var(--orange-dark); font-size: 14px; margin-bottom: 4px;
}
.q-text { font-size: 17px; font-weight: 700; color: var(--ink); margin: 0 0 4px 0; line-height: 1.4; }
.q-required { color: var(--red); margin-left: 4px; }
.q-helper { font-size: 14px; color: var(--ink-soft); font-style: italic; margin: 0 0 14px 0; }
.q-error-msg {
  display: none; color: var(--red); font-size: 13px; margin-top: 8px;
  font-family: 'Playfair Display', serif; font-style: italic;
}
.q-card.error .q-error-msg { display: block; }

/* ===== Inputs ===== */
input[type="text"], input[type="email"], textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--paper); color: var(--ink);
  font-family: 'Lato', sans-serif; font-size: 16px; /* 16px voorkomt iOS zoom */
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
}
input[type="text"]:focus, input[type="email"]:focus, textarea:focus {
  outline: none; border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(27,168,176,.15);
}
textarea { min-height: 100px; resize: vertical; line-height: 1.5; }

/* ===== NPS scale 0-10 ===== */
.scale-row {
  display: flex; flex-wrap: wrap; gap: 6px;
  justify-content: space-between; margin: 8px 0 4px;
}
.scale-btn {
  flex: 1 1 auto; min-width: 36px; min-height: 44px;
  border: 1.5px solid var(--border); background: var(--paper);
  color: var(--ink); border-radius: 8px;
  font-family: 'Playfair Display', serif; font-weight: 600;
  font-size: 15px; cursor: pointer;
  transition: all .15s ease;
  padding: 8px 4px;
}
.scale-btn:hover { border-color: var(--teal); background: var(--teal-light); }
.scale-btn.selected {
  background: var(--teal); color: #fff; border-color: var(--teal-dark);
  transform: scale(1.04); box-shadow: var(--shadow);
}
.scale-labels {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--ink-soft);
  font-family: 'Playfair Display', serif; font-style: italic;
  margin-top: 6px;
}

/* ===== 1-5 scale ===== */
.scale5-row {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
}
.scale5-btn {
  flex: 1 1 0; min-width: 56px; min-height: 56px;
  border: 1.5px solid var(--border); background: var(--paper);
  border-radius: 10px; cursor: pointer;
  font-family: 'Playfair Display', serif; font-weight: 600;
  font-size: 22px; color: var(--ink);
  transition: all .15s ease;
}
.scale5-btn:hover { border-color: var(--teal); background: var(--teal-light); }
.scale5-btn.selected {
  background: var(--teal); color: #fff; border-color: var(--teal-dark);
  transform: scale(1.04); box-shadow: var(--shadow);
}

/* ===== Choice (radio pill) ===== */
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-btn {
  border: 1.5px solid var(--border); background: var(--paper);
  padding: 10px 22px; border-radius: var(--radius-pill);
  font-family: 'Lato', sans-serif; font-weight: 700;
  font-size: 15px; color: var(--ink-soft); cursor: pointer;
  min-height: 44px; transition: all .15s ease;
}
.choice-btn:hover { border-color: var(--teal); color: var(--teal-dark); }
.choice-btn.selected {
  background: var(--teal); color: #fff; border-color: var(--teal-dark);
  box-shadow: var(--shadow);
}

/* Honeypot — onzichtbaar voor mensen, bots vullen het in */
.honeypot {
  position: absolute !important;
  left: -10000px !important; top: -10000px !important;
  width: 1px !important; height: 1px !important;
  opacity: 0 !important; pointer-events: none !important;
}

/* ===== Submit ===== */
.submit-row {
  display: flex; flex-direction: column; align-items: center;
  margin: 48px 0 0; gap: 14px;
}
.btn-submit {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--teal); color: #fff; border: none;
  padding: 16px 36px; border-radius: var(--radius-pill);
  font-family: 'Lato', sans-serif; font-weight: 700; font-size: 17px;
  cursor: pointer; transition: all .2s ease;
  box-shadow: var(--shadow); min-height: 52px;
}
.btn-submit:hover { background: var(--teal-dark); transform: translateY(-2px); box-shadow: var(--shadow-deep); }
.btn-submit:disabled { background: var(--ink-soft); cursor: not-allowed; transform: none; }
.btn-submit .arrow { color: var(--orange); font-size: 22px; line-height: 1; }
.submit-note { font-size: 13px; color: var(--ink-soft); font-style: italic; }

/* ===== Footer ===== */
.site-footer {
  text-align: center; padding: 36px 20px 24px;
  font-size: 13px; color: var(--ink-soft);
  border-top: 1px solid var(--border); margin-top: 60px;
  background: var(--paper);
}
.site-footer a { color: var(--ink-soft); }

/* ===== Thank you screen ===== */
.thanks {
  max-width: 600px; margin: 0 auto;
  padding: 80px 20px; text-align: center;
}
.thanks .ornament {
  font-family: 'Playfair Display', serif; font-size: 48px;
  color: var(--orange); margin-bottom: 20px;
}
.thanks h1 { font-style: italic; }
.thanks p { color: var(--ink-soft); font-size: 1.1rem; }
.thanks .signature {
  font-family: 'Playfair Display', serif; font-style: italic;
  margin-top: 28px; color: var(--ink); font-size: 1rem;
}

/* ===== Mobile tweaks ===== */
@media (max-width: 640px) {
  .hero { padding: 32px 20px 18px; }
  .progress-wrapper { padding: 8px 14px; top: 56px; }
  .progress-label { font-size: 12px; }
  .container { padding: 0 14px 60px; }
  .q-card { padding: 18px 16px; }
  .scale-btn { min-width: 32px; font-size: 14px; padding: 8px 2px; }
  .scale5-btn { min-width: 48px; min-height: 48px; font-size: 18px; }
  .btn-submit { width: 100%; justify-content: center; padding: 16px 24px; }
}

/* ===== Admin styles ===== */
.admin-body {
  background: var(--paper);
  font-size: 15px;
}
.admin-header {
  background: var(--paper); border-bottom: 1px solid var(--border);
  padding: 14px 24px; display: flex; align-items: center; gap: 14px;
}
.admin-header h1 {
  font-size: 1.2rem; margin: 0; font-style: italic; color: var(--teal-dark);
}
.admin-header .spacer { flex: 1; }
.admin-header .btn { font-size: 13px; padding: 8px 16px; min-height: 36px; }

.admin-main { max-width: 1200px; margin: 0 auto; padding: 24px 20px 60px; }

.kpi-grid {
  display: grid; gap: 16px; margin-bottom: 32px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
.kpi-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 18px 20px;
  box-shadow: var(--shadow);
}
.kpi-label {
  font-family: 'Playfair Display', serif; font-style: italic;
  color: var(--ink-soft); font-size: 13px; margin-bottom: 6px;
  text-transform: lowercase;
}
.kpi-value {
  font-family: 'Playfair Display', serif; font-weight: 700;
  font-size: 2rem; color: var(--ink); line-height: 1.1;
}
.kpi-value.promoter { color: #2E7D32; }
.kpi-value.passive { color: var(--orange-dark); }
.kpi-value.detractor { color: var(--red); }
.kpi-sub { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }

.admin-section {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 24px;
  margin-bottom: 24px; box-shadow: var(--shadow);
}
.admin-section h2 {
  font-style: italic; color: var(--teal-dark);
  margin-top: 0; margin-bottom: 18px; font-size: 1.25rem;
  border-bottom: 1px solid var(--border); padding-bottom: 10px;
}

.bar-row {
  display: flex; align-items: center; gap: 12px;
  margin: 8px 0;
}
.bar-label {
  width: 220px; font-size: 14px; color: var(--ink); flex-shrink: 0;
}
.bar-track {
  flex: 1; height: 22px; background: var(--cream);
  border-radius: 999px; overflow: hidden;
  border: 1px solid var(--border);
}
.bar-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--teal) 0%, var(--orange) 100%);
  transition: width .5s ease;
}
.bar-value {
  width: 60px; text-align: right; font-weight: 700;
  font-family: 'Playfair Display', serif; color: var(--teal-dark);
  flex-shrink: 0;
}

.nps-bar {
  display: flex; align-items: flex-end; gap: 6px; height: 160px;
  padding: 8px 4px; border-bottom: 1px solid var(--border);
}
.nps-col {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end; gap: 4px;
  height: 100%;
}
.nps-col-bar {
  width: 100%; min-height: 4px;
  border-radius: 4px 4px 0 0;
  transition: height .5s ease;
}
.nps-col-bar.detractor { background: var(--red); }
.nps-col-bar.passive { background: var(--orange); }
.nps-col-bar.promoter { background: #2E7D32; }
.nps-col-num { font-size: 11px; color: var(--ink-soft); font-weight: 700; }
.nps-col-count { font-size: 12px; color: var(--ink); font-weight: 700; }

.tabs {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px;
  border-bottom: 1px solid var(--border); padding-bottom: 10px;
}
.tab {
  padding: 8px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-pill); background: var(--paper);
  font-size: 13px; cursor: pointer; min-height: 36px;
  font-family: 'Lato', sans-serif;
}
.tab.active {
  background: var(--teal); color: #fff; border-color: var(--teal-dark);
}
.tab-badge {
  background: rgba(0,0,0,.1); padding: 1px 8px; border-radius: 10px;
  font-size: 11px; margin-left: 6px;
}
.tab.active .tab-badge { background: rgba(255,255,255,.2); }

.search-input {
  width: 100%; max-width: 360px; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; margin-bottom: 16px;
}

.quote {
  background: var(--cream); border-left: 3px solid var(--orange);
  padding: 14px 18px; margin: 12px 0;
  border-radius: 0 8px 8px 0;
  font-family: 'Playfair Display', serif; font-style: italic;
  color: var(--ink); font-size: 1rem; line-height: 1.5;
}
.quote-meta {
  font-family: 'Lato', sans-serif; font-style: normal;
  font-size: 12px; color: var(--ink-soft); margin-top: 6px;
  display: block;
}
.empty {
  padding: 24px; text-align: center; color: var(--ink-soft);
  font-style: italic;
}

.data-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.data-table th, .data-table td {
  padding: 10px 8px; border-bottom: 1px solid var(--border);
  text-align: left;
}
.data-table th {
  font-family: 'Playfair Display', serif; font-style: italic;
  color: var(--ink-soft); font-weight: 600; cursor: pointer;
  white-space: nowrap;
}
.data-table tbody tr:hover { background: var(--cream); cursor: pointer; }
.data-table-wrap { overflow-x: auto; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--teal); color: #fff; border: none;
  padding: 10px 20px; border-radius: var(--radius-pill);
  font-family: 'Lato', sans-serif; font-weight: 700;
  font-size: 14px; cursor: pointer; transition: all .2s ease;
  text-decoration: none; min-height: 40px;
}
.btn:hover { background: var(--teal-dark); transform: translateY(-1px); color: #fff; }
.btn-orange { background: var(--orange); }
.btn-orange:hover { background: var(--orange-dark); }
.btn-red { background: var(--red); }
.btn-red:hover { background: #8E2820; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--cream); color: var(--ink); }

.export-bar {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px;
  padding: 16px; background: var(--cream);
  border-radius: var(--radius-card); border: 1px solid var(--border);
}
.export-bar .label {
  font-family: 'Playfair Display', serif; font-style: italic;
  color: var(--ink-soft); align-self: center; margin-right: 8px;
}

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  display: none; align-items: center; justify-content: center; z-index: 100;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: #fff; border-radius: var(--radius-card);
  max-width: 720px; width: 100%; max-height: 88vh; overflow-y: auto;
  padding: 28px; box-shadow: var(--shadow-deep);
}
.modal h2 { color: var(--teal-dark); font-style: italic; }
.modal-row {
  display: grid; grid-template-columns: 200px 1fr; gap: 12px;
  padding: 8px 0; border-bottom: 1px dashed var(--border);
}
.modal-row .k { color: var(--ink-soft); font-style: italic; font-family: 'Playfair Display', serif; }
.modal-row .v { color: var(--ink); }
.modal-close {
  float: right; background: var(--cream); border: 1px solid var(--border);
  border-radius: 50%; width: 36px; height: 36px;
  cursor: pointer; font-size: 20px; line-height: 1;
}
@media (max-width: 640px) {
  .modal-row { grid-template-columns: 1fr; gap: 4px; }
  .bar-label { width: 140px; font-size: 13px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi-value { font-size: 1.5rem; }
}

/* Login form */
.login-shell {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.login-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 36px 32px;
  max-width: 400px; width: 100%; box-shadow: var(--shadow);
}
.login-card h1 {
  font-size: 1.6rem; font-style: italic; color: var(--teal-dark);
  margin-bottom: 6px;
}
.login-card .sub {
  font-family: 'Playfair Display', serif; font-style: italic;
  color: var(--ink-soft); margin-bottom: 24px; font-size: 14px;
}
.login-card label {
  display: block; font-size: 13px; color: var(--ink-soft);
  font-family: 'Playfair Display', serif; font-style: italic;
  margin: 14px 0 4px;
}
.login-card .err {
  background: rgba(183,50,41,.08); border: 1px solid var(--red);
  color: var(--red); padding: 10px 14px; border-radius: 8px;
  margin-bottom: 16px; font-size: 14px;
}
.login-card .btn { width: 100%; justify-content: center; margin-top: 18px; }

/* Print */
@media print {
  .admin-header, .export-bar, .tabs, .search-input { display: none; }
  body { background: #fff; }
  .admin-section { box-shadow: none; border: 1px solid #ccc; page-break-inside: avoid; }
}
