:root{
  --bg: #0b1116;
  --panel: rgba(248, 252, 255, 0.92);
  --panel-border: rgba(255,255,255,0.35);
  --text: #0f172a;
  --muted: #475569;
  --brand: #006989;
  --brand-hover: #005b78;
  --on-brand: #ffffff;
  --shadow: 0 18px 45px rgba(0,0,0,0.35);
  --focus: 0 0 0 3px rgba(0,105,137,0.28);
}

*{ box-sizing: border-box; }
html, body{
  height: 100%;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* Background video */
.bg{
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--bg);
}
.bg video{
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
}

/* Readability overlay */
.bg::after{
  content:"";
  position:absolute;
  inset:0;
  background: radial-gradient(1200px 800px at 20% 25%, rgba(0,0,0,0.14), rgba(0,0,0,0.55));
  pointer-events:none;
}

/* --- Consent gate (start page is dimmed until cookie preferences are chosen) --- */
.consentVeil{
  display: none;
  position: fixed;
  inset: 0;
  z-index: 5;
  /* Keep page clearly visible while still indicating it's locked until consent */
  background: rgba(0,0,0,0.20);
  pointer-events: none;
}

html.consent-pending .consentVeil{ display: block; }
html.consent-pending .bg,
html.consent-pending .container{
  /* Less aggressive dimming on mobile/desktop: content stays readable */
  filter: blur(2px);
  opacity: 0.5;
  pointer-events: none;
  user-select: none;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce){
  .bg video{ display:none; }
}

.container{
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 48px 20px;
}

.card{
  width: min(980px, 100%);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.header{
  display:flex;
  align-items:center;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
.logo{
  width: 150px;
  height: auto;
  display:block;
}
.header-title{
  display:flex;
  flex-direction:column;
  gap: 2px;
}
.header-title h1{
  font-size: 20px;
  margin: 0;
  letter-spacing: 0.2px;
}
.header-title p{
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.content{
  padding: 22px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}
@media (max-width: 860px){
  .content{ grid-template-columns: 1fr; }
}

h2{ margin: 0 0 10px 0; font-size: 18px; }
h3{ margin: 16px 0 8px 0; font-size: 15px; }
p{ margin: 0 0 12px 0; line-height: 1.55; color: #0f172a; }
.muted{ color: var(--muted); font-size: 14px; }
ul{ margin: 0 0 12px 18px; padding: 0; line-height: 1.5; }
code{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.95em; }

.actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 14px;
}

.btn{
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition: transform 0.04s ease, background 0.18s ease, opacity 0.18s ease;
}
.btn:active{ transform: translateY(1px); }
.btn:focus-visible{ outline: none; box-shadow: var(--focus); }

.btn-primary{
  background: var(--brand);
  color: var(--on-brand);
}
.btn-primary:hover{ background: var(--brand-hover); }
.btn-secondary{
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}
.btn-secondary:hover{ background: rgba(15, 23, 42, 0.12); }

.btn[disabled]{
  opacity: 0.55;
  cursor: not-allowed;
}

.box{
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  padding: 14px;
}

.divider{
  height: 1px;
  background: rgba(15, 23, 42, 0.08);
  margin: 14px 0;
}

.footer{
  padding: 14px 22px 20px 22px;
  color: rgba(248,252,255,0.85);
  font-size: 12px;
  text-align: center;
}

.confirm{
  display:flex;
  gap:10px;
  align-items:flex-start;
  margin-top: 10px;
}
.confirm input{
  margin-top: 4px;
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.confirmMsg{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(180, 35, 24, 0.08);
  border: 1px solid rgba(180, 35, 24, 0.22);
  color: #7a1b14;
  font-size: 13px;
}

.tiny{
  font-size: 12px;
  color: #64748b;
}

/* --- Modal --- */
.modal{
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 26px 14px;
}
.modal.isOpen{ display: flex; }

.modalBackdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.28);
}

.modalPanel{
  position: relative;
  width: min(1040px, 100%);
  max-height: min(86vh, 860px);
  overflow: hidden;
  border-radius: 18px;
  background: rgba(248, 252, 255, 0.98);
  border: 1px solid rgba(255,255,255,0.4);
  box-shadow: 0 18px 55px rgba(0,0,0,0.45);
  display: grid;
  grid-template-rows: auto 1fr;
}

.modalHeader{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(15,23,42,0.08);
}
.modalHeader h2{
  margin: 0;
  font-size: 16px;
}
.modalClose{
  border: 0;
  background: rgba(15,23,42,0.06);
  width: 38px;
  height: 38px;
  border-radius: 999px;
  cursor: pointer;
  display:grid;
  place-items:center;
}
.modalClose:hover{ background: rgba(15,23,42,0.10); }
.modalClose:focus-visible{ outline: none; box-shadow: var(--focus); }

.modalBody{
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
  overflow: hidden;
}
@media (max-width: 880px){
  .modalBody{ grid-template-columns: 1fr; }
  .modalNav{ border-right: 0 !important; border-bottom: 1px solid rgba(15,23,42,0.08); }
}

.modalNav{
  padding: 12px;
  border-right: 1px solid rgba(15,23,42,0.08);
  background: rgba(15, 23, 42, 0.02);
}
.modalNav a{
  display:block;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: #0f172a;
  font-weight: 650;
  font-size: 13px;
  margin-bottom: 8px;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(15,23,42,0.06);
}
.modalNav a:hover{ background: rgba(255,255,255,0.95); }

.modalContent{
  padding: 16px 18px;
  overflow: auto;
}
.modalContent h3{ margin-top: 18px; }
.modalContent .small{
  font-size: 12px;
  color: #64748b;
  margin-top: 6px;
}
.modalContent hr{
  border: 0;
  height: 1px;
  background: rgba(15,23,42,0.08);
  margin: 16px 0;
}

.modalContent details{
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 14px;
  padding: 10px 12px;
  margin: 0 0 10px 0;
}
.modalContent details summary{
  cursor: pointer;
  font-weight: 650;
  font-size: 13px;
  color: #0f172a;
}
.modalContent details .detailsBody{
  margin-top: 10px;
}


/* Legal documents (Imprint / Disclaimer) */
.legalDoc{
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.55;
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: 14px;
  padding: 12px;
}

/* ---------------- Cookie consent banner (start page) ---------------- */
.cookieBanner{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  padding: 12px;
}
.cookiePanel{
  width: min(1100px, 96vw);
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.38);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
@media (min-width: 820px){
  .cookiePanel{ flex-direction: row; align-items: center; justify-content: space-between; }
}
.cookieTitle{ font-weight: 750; font-size: 15px; }
.cookieMsg{ color: var(--muted); font-size: 13px; line-height: 1.35; margin-top: 2px; }
.cookieActions{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.cookieLink{
  border: 0;
  background: transparent;
  color: var(--brand);
  font-weight: 650;
  font-size: 13px;
  padding: 8px 10px;
  cursor: pointer;
}
.cookieLink:hover{ text-decoration: underline; }
.cookieLink:focus-visible{ outline: none; box-shadow: var(--focus); border-radius: 999px; }

.cookieCard{
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 0 0 12px 0;
}
.cookieCardTitle{ font-weight: 750; font-size: 13px; }
.cookieCardText{ color: var(--muted); font-size: 13px; line-height: 1.45; margin-top: 6px; }
.cookieRow{ display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }

.cookieModalActions{ display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* Minimal toggle switch */
.cookieToggle{ display: inline-flex; align-items: center; }
.cookieToggle input{ display:none; }
.cookieToggle span{
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: rgba(15,23,42,0.20);
  position: relative;
  cursor: pointer;
  border: 1px solid rgba(15,23,42,0.14);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.08);
}
.cookieToggle span::after{
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #fff;
  position: absolute;
  top: 1px;
  left: 1px;
  transition: transform 0.15s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.18);
}
.cookieToggle input:checked + span{
  background: var(--brand);
  border-color: rgba(0,0,0,0.0);
}
.cookieToggle input:checked + span::after{ transform: translateX(18px); }
