/* ============================================================
   NoRisk — base styles, shared tokens, type, buttons, forms
   ============================================================ */

/* Schriften: selbst gehostet, eingebunden über fonts.css (assets/fonts/) */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* Smooth scroll for anchor nav */
html { scroll-behavior: smooth; }

/* ---------- Wordmark (real logo image, scales with var) ---------- */
.wordmark {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.wm-img {
  height: calc(34px * var(--wm-scale, 1));
  width: auto;
  display: block;
}
.wm-light { display: none; }
/* V1 dark mode -> light logo */
.v1-dark .wm-dark { display: none; }
.v1-dark .wm-light { display: block; }

/* V2 dark mode -> light logo; V2 footer is always dark -> light logo */
.v2-dark .wm-dark { display: none; }
.v2-dark .wm-light { display: block; }
.v2-footer .wm-dark { display: none; }
.v2-footer .wm-light { display: block; }

/* V3 is dark by default -> light logo; V3 light mode -> dark logo */
.v3 .wm-dark { display: none; }
.v3 .wm-light { display: block; }
.v3-light .wm-dark { display: block; }
.v3-light .wm-light { display: none; }

/* ---------- Reveal animations ----------
   Opacity flips instantly (never time-dependent, so content is ALWAYS
   visible once revealed, even if the document timeline is frozen).
   Only the subtle slide is transitioned. */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Image placeholders ---------- */
.img-slot {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.04);
}
.img-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.img-stripes {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(0, 0, 0, 0.06) 0,
    rgba(0, 0, 0, 0.06) 1px,
    transparent 1px,
    transparent 14px
  );
}
.img-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(0, 0, 0, 0.4);
  white-space: nowrap;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(4px);
}

/* ---------- Buttons (each variant restyles via wrapper) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border-radius: 0;
  transition: transform 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-arrow {
  display: inline-block;
  transition: transform 0.25s;
}
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ---------- Forms (default; variants override) ---------- */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
.field > span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.6;
}
.field input,
.field select,
.field textarea {
  font: inherit;
  background: transparent;
  border: 0;
  border-bottom: 1px solid currentColor;
  padding: 8px 0;
  color: inherit;
  border-radius: 0;
  outline: none;
  transition: border-color 0.2s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-bottom-color: currentColor;
  filter: brightness(1.05);
}
.field textarea { resize: vertical; min-height: 80px; }

.form-confirm {
  font-family: "Newsreader", serif;
  font-size: 22px;
  line-height: 1.4;
  padding: 32px 0;
}

/* Consent checkbox + required note */
.field-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 4px 0 20px;
  cursor: pointer;
}
.field-consent input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  border: 1px solid currentColor;
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: background 0.15s, border-color 0.15s;
  opacity: 0.6;
}
.field-consent input[type="checkbox"]:checked {
  opacity: 1;
}
.field-consent input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 13px;
  line-height: 1;
}
.field-consent span {
  font-size: 13px;
  line-height: 1.5;
  opacity: 0.78;
}
.field-consent span a { text-decoration: underline; opacity: 1; }
.field-consent span a:hover { color: var(--accent); }
.form-required-note {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  opacity: 0.55;
  margin-top: 14px;
}
.form-error {
  margin-top: 14px;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.5;
  color: #b4231f;
  background: rgba(180, 35, 31, 0.08);
  border: 1px solid rgba(180, 35, 31, 0.3);
  border-radius: 4px;
}
.btn[disabled] { opacity: 0.55; cursor: default; }

/* ---------- Shared eyebrow (used in V1) ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.eyebrow-n {
  font-feature-settings: "tnum";
  opacity: 0.55;
}

.label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.7;
}

/* ---------- Variant toolbar (top-right floating selector) ---------- */
.variant-toolbar {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 200;
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(20, 20, 20, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #f4f1ea;
}
.variant-toolbar button {
  background: transparent;
  border: 0;
  color: inherit;
  padding: 8px 14px;
  border-radius: 999px;
  text-transform: uppercase;
  transition: background 0.2s, color 0.2s;
}
.variant-toolbar button:hover {
  background: rgba(255, 255, 255, 0.08);
}
.variant-toolbar button.is-active {
  background: #f4f1ea;
  color: #0a0c10;
}

/* ---------- Mini lang/theme toggle in nav ---------- */
.toggle-group {
  display: inline-flex;
  align-items: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  gap: 0;
}
.toggle-group button {
  background: transparent;
  border: 0;
  color: inherit;
  padding: 6px 10px;
  opacity: 0.45;
  transition: opacity 0.2s;
}
.toggle-group button.is-on { opacity: 1; }
.toggle-group .sep { opacity: 0.3; }

/* ---------- Loading splash ---------- */
.boot {
  position: fixed;
  inset: 0;
  background: #faf8f3;
  display: grid;
  place-items: center;
  z-index: 999;
  transition: opacity 0.4s;
}
.boot.is-gone { opacity: 0; pointer-events: none; }
.boot-mark {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.3em;
  opacity: 0.5;
}

.field select{appearance:none;-webkit-appearance:none;padding-right:24px;cursor:pointer;background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%);background-position:calc(100% - 9px) calc(50% + 1px),calc(100% - 4px) calc(50% + 1px);background-size:5px 5px,5px 5px;background-repeat:no-repeat}
.field select option{color:#111;background:#fff}
