/* ------------------------------------------------------------------
   One Million Euro – Banknote trifft Galerie
   ------------------------------------------------------------------ */
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif/instrument-serif-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif/instrument-serif-latin-400-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Bricolage";
  src: url("/fonts/bricolage/bricolage-grotesque-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 800; font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("/fonts/dm-mono/dm-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("/fonts/dm-mono/dm-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-display: swap;
}

:root {
  --paper: #f1ece1;
  --paper-2: #e8e1d2;
  --canvas: #fbf9f4;
  --ink: #16140f;
  --ink-2: #4a463d;
  --muted: #7d7667;
  --line: #d6cdb9;
  --stamp: #e5432d;
  --stamp-ink: #fff8f0;
  --gold: #b8913a;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Bricolage", "Helvetica Neue", sans-serif;
  --mono: "DM Mono", ui-monospace, monospace;
  --r: 14px;
  --gutter: clamp(16px, 4vw, 48px);
  --shadow: 0 1px 0 rgba(22,20,15,.06), 0 18px 50px -18px rgba(22,20,15,.28);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* feines Papierkorn */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .27 0 0 0 0 .2 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
::selection { background: var(--stamp); color: var(--stamp-ink); }
:focus-visible { outline: 2px solid var(--stamp); outline-offset: 2px; }

/* ---------- Kopf ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--gutter);
  border-bottom: 1px solid var(--line);
}
.mark { display: inline-flex; align-items: baseline; gap: .35em; text-decoration: none; line-height: 1; }
.mark__one { font: 400 26px/1 var(--serif); letter-spacing: -.01em; }
.mark__eur {
  font: 500 11px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase;
  padding: 5px 7px 4px; border: 1px solid var(--ink); border-radius: 3px; transform: translateY(-3px);
}
.top__nav { display: flex; align-items: center; gap: clamp(12px, 2.5vw, 28px); font-size: 15px; }
.top__nav a { text-decoration: none; color: var(--ink-2); }
.top__nav a:hover { color: var(--ink); }
.top__cta { padding: 8px 14px; border-radius: 999px; background: var(--ink); color: var(--paper) !important; }
@media (max-width: 560px) { .top__nav a:not(.top__cta) { display: none; } }

/* ---------- Intro ---------- */
.intro {
  display: grid; grid-template-columns: 1fr minmax(260px, 360px); gap: clamp(24px, 5vw, 80px); align-items: end;
  padding: clamp(32px, 6vw, 72px) var(--gutter) clamp(24px, 4vw, 40px);
  position: relative;
}
.intro::after { /* Guilloche-Andeutung wie auf einer Banknote */
  content: ""; position: absolute; right: var(--gutter); top: 16px; width: 360px; height: 120px; opacity: .5; pointer-events: none;
  background:
    repeating-radial-gradient(ellipse at 0% 50%, transparent 0 9px, rgba(184,145,58,.35) 9px 10px),
    repeating-radial-gradient(ellipse at 100% 50%, transparent 0 9px, rgba(184,145,58,.25) 9px 10px);
  -webkit-mask: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent);
          mask: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent);
}
.intro__title {
  margin: 0; font: 400 clamp(44px, 8.4vw, 124px)/.92 var(--serif); letter-spacing: -.025em;
}
.intro__title > span { display: block; }
.intro__accent { font-style: italic; color: var(--stamp); }
@media (max-width: 820px) {
  .intro { grid-template-columns: 1fr; }
  .intro::after { display: none; }
}

.ledger {
  position: relative; z-index: 1;
  border: 1px solid var(--ink); border-radius: var(--r); padding: 18px 20px 14px;
  background: var(--canvas); box-shadow: var(--shadow);
}
.ledger__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ledger__label { font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.ledger__value { font: 400 40px/1.1 var(--serif); font-variant-numeric: tabular-nums; }
.ledger__bar { height: 6px; margin: 12px 0 10px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.ledger__bar span { display: block; height: 100%; width: 0; min-width: 2px; background: var(--stamp); transition: width .8s cubic-bezier(.2,.8,.2,1); }
.ledger__row--small { font: 400 13px/1.3 var(--mono); color: var(--ink-2); }
.ledger__row--small b { font-weight: 500; color: var(--ink); }
.ledger__serial {
  margin: 12px 0 0; padding-top: 10px; border-top: 1px dashed var(--line);
  font: 400 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--gold);
}

.reveal { opacity: 0; transform: translateY(14px); animation: rise .9s cubic-bezier(.2,.8,.2,1) forwards; }
.reveal[data-d="1"] { animation-delay: .08s; }
.reveal[data-d="2"] { animation-delay: .16s; }
.reveal[data-d="3"] { animation-delay: .28s; }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .reveal { animation: none; opacity: 1; transform: none; } }

/* ---------- Leinwand ---------- */
.stage { padding: 0 var(--gutter); }
.stage__frame {
  position: relative; height: min(78vh, 920px); min-height: 420px;
  border-radius: var(--r); overflow: hidden;
  background:
    linear-gradient(var(--paper-2) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--paper-2) 1px, transparent 1px) 0 0 / 24px 24px,
    #ece6d9;
  border: 1px solid var(--ink);
  box-shadow: var(--shadow);
  touch-action: none;
}
#canvas { display: block; width: 100%; height: 100%; cursor: grab; }
#canvas.is-dragging { cursor: grabbing; }
#canvas.is-paint, #canvas.is-erase, #canvas.is-image { cursor: crosshair; }
.stage__coords, .stage__hint, .demo-badge {
  position: absolute; font: 400 12px/1 var(--mono); padding: 7px 10px; border-radius: 999px;
  background: rgba(251,249,244,.92); border: 1px solid var(--line); pointer-events: none;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.stage__coords { left: 12px; top: 12px; font-variant-numeric: tabular-nums; }
.stage__hint { right: 12px; top: 12px; color: var(--muted); transition: opacity .6s; }
.stage__hint.is-gone { opacity: 0; }
.demo-badge { white-space: nowrap; left: 50%; bottom: 12px; transform: translateX(-50%); background: var(--ink); color: var(--paper); border-color: var(--ink); }
@media (max-width: 640px) { .stage__hint { display: none; } .stage__frame { height: 64vh; } }

.card {
  position: absolute; left: 12px; bottom: 12px; display: flex; gap: 12px; align-items: flex-start;
  max-width: min(340px, calc(100% - 24px)); padding: 12px 36px 12px 12px; border-radius: 12px;
  background: var(--canvas); border: 1px solid var(--ink); box-shadow: var(--shadow);
  animation: rise .25s ease-out both;
}
.card[hidden] { display: none; }
.card__swatch { flex: none; width: 36px; height: 36px; border-radius: 6px; border: 1px solid rgba(0,0,0,.15); }
.card__title { margin: 0; font: 400 22px/1.1 var(--serif); }
.card__meta { margin: 4px 0 0; font: 400 12px/1.35 var(--mono); color: var(--muted); white-space: pre-line; }
.card__link { display: inline-block; margin-top: 6px; font-size: 14px; color: var(--stamp); word-break: break-all; }
.card__link:empty { display: none; }
.card__close { position: absolute; right: 6px; top: 4px; border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); padding: 4px 6px; }

/* ---------- Werkzeugleiste ---------- */
.tools {
  position: sticky; bottom: 12px; z-index: 20;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  margin: 12px auto 0; padding: 10px; width: fit-content; max-width: 100%;
  background: var(--ink); color: var(--paper); border-radius: 18px;
  box-shadow: 0 18px 40px -16px rgba(22,20,15,.55);
}
.tools__group { display: flex; align-items: center; gap: 8px; }
.seg { background: rgba(255,255,255,.07); border-radius: 12px; padding: 3px; gap: 2px; }
.seg__btn {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; cursor: pointer;
  padding: 8px 11px; border-radius: 9px; color: rgba(241,236,225,.72); font-size: 14px;
}
.seg__btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.seg__btn:hover { color: var(--paper); }
.seg__btn.is-on { background: var(--paper); color: var(--ink); }
@media (max-width: 720px) { .seg__btn span { display: none; } .seg__btn { padding: 9px 10px; } }

.palette { gap: 4px; overflow-x: auto; scrollbar-width: none; max-width: 100%; padding: 2px; }
.swatch {
  flex: none; width: 22px; height: 22px; border-radius: 50%; border: 0; cursor: pointer; padding: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); transition: transform .12s;
}
.swatch:hover { transform: scale(1.15); }
.swatch.is-on { box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--paper); }
.picker { position: relative; flex: none; width: 30px; height: 30px; cursor: pointer; margin-right: 4px; }
.picker input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.picker__dot {
  display: block; width: 100%; height: 100%; border-radius: 50%;
  box-shadow: 0 0 0 2px var(--paper);
  background: conic-gradient(from 0deg, #f44, #fd3, #4e7, #3cf, #66f, #e4e, #f44);
  position: relative;
}
.picker__dot::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--current, #e5432d); box-shadow: 0 0 0 1.5px var(--ink); }

.sizer { display: flex; align-items: center; gap: 6px; font-size: 13px; color: rgba(241,236,225,.72); }
.sizer select {
  appearance: none; background: rgba(255,255,255,.08); border: 0; border-radius: 9px; padding: 7px 10px; color: var(--paper);
  font: 400 13px/1 var(--mono); cursor: pointer;
}
.sizer select option { color: var(--ink); }
.zoom { display: flex; background: rgba(255,255,255,.07); border-radius: 10px; }
.zoom button { width: 34px; height: 32px; border: 0; background: none; color: var(--paper); cursor: pointer; font-size: 17px; border-radius: 10px; }
.zoom button:hover { background: rgba(255,255,255,.1); }

.cart { display: flex; align-items: center; gap: 8px; padding-left: 14px; border-left: 1px solid rgba(255,255,255,.14); }
.cart__sum { display: flex; flex-direction: column; line-height: 1.1; margin-right: 4px; min-width: 70px; }
.cart__count { font: 400 11px/1.2 var(--mono); color: rgba(241,236,225,.62); letter-spacing: .04em; }
.cart__count b { color: var(--paper); font-weight: 500; }
.cart__price { font: 400 24px/1 var(--serif); font-variant-numeric: tabular-nums; }
@media (max-width: 720px) { .cart { border-left: 0; padding-left: 0; width: 100%; } .cart__sum { margin-right: auto; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
  border-radius: 11px; padding: 10px 16px; border: 1px solid transparent; font-size: 15px; font-weight: 500; white-space: nowrap;
  transition: transform .12s, background .15s, opacity .15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .35; cursor: not-allowed; }
.btn--stamp { background: var(--stamp); color: var(--stamp-ink); }
.btn--stamp:not(:disabled):hover { background: #cf3420; }
.btn--ghost { background: transparent; border-color: currentColor; color: inherit; opacity: .85; }
.btn--ghost:not(:disabled):hover { opacity: 1; }
.btn--file { position: relative; overflow: hidden; padding: 7px 12px; font-size: 13px; }
.btn--file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.imagebar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; justify-content: center;
  margin: 10px auto 0; padding: 10px 16px; width: fit-content; max-width: 100%;
  border: 1px solid var(--ink); border-radius: 14px; background: var(--canvas); font-size: 14px;
}
.imagebar[hidden] { display: none; }
.imagebar__label { font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.imagebar__value { font: 400 13px/1 var(--mono); min-width: 52px; }
.imagebar__tip { color: var(--muted); font-size: 13px; }
.imagebar input[type=range] { accent-color: var(--stamp); width: 160px; }

.plate {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; margin: 22px auto 0; text-align: center;
  font: 400 12px/1.4 var(--mono); color: var(--muted); letter-spacing: .04em;
}
.plate span:first-child { font: italic 400 16px/1.2 var(--serif); color: var(--ink); letter-spacing: 0; }

/* ---------- Inhalt ---------- */
.section-title {
  margin: 0 0 28px; font: 400 clamp(36px, 5vw, 64px)/1 var(--serif); letter-spacing: -.02em;
}
.steps, .faq { padding: clamp(64px, 9vw, 120px) var(--gutter) 0; max-width: 1240px; margin: 0 auto; }
.steps__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.steps__list li { padding: 22px 28px 8px 0; }
.steps__list li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.steps__num { font: 500 12px/1 var(--mono); color: var(--stamp); letter-spacing: .12em; }
.steps__list h3 { margin: 14px 0 8px; font: 400 30px/1.1 var(--serif); }
.steps__list p { margin: 0; color: var(--ink-2); max-width: 36ch; }
@media (max-width: 820px) {
  .steps__list { grid-template-columns: 1fr; }
  .steps__list li, .steps__list li + li { padding: 20px 0; border-left: 0; border-bottom: 1px solid var(--line); }
}

.faq { max-width: 880px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 40px 18px 0; position: relative;
  font: 400 24px/1.25 var(--serif);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font: 300 26px/1 var(--sans); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: -6px 0 20px; color: var(--ink-2); max-width: 64ch; }

.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center;
  margin-top: clamp(64px, 9vw, 120px); padding: 28px var(--gutter) 40px; border-top: 1px solid var(--ink);
  font-size: 14px;
}
.foot__mark { font: 400 22px/1 var(--serif); }
.foot nav { display: flex; flex-wrap: wrap; gap: 20px; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Dialoge ---------- */
.dialog {
  border: 1px solid var(--ink); border-radius: 18px; padding: 0; width: min(480px, calc(100vw - 32px));
  background: var(--canvas); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(22,20,15,.5);
}
.dialog::backdrop { background: rgba(22,20,15,.45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.dialog[open] { animation: rise .25s ease-out; }
.dialog__body { padding: 26px 26px 20px; display: flex; flex-direction: column; gap: 14px; }
.dialog__body--center { text-align: center; align-items: center; }
.dialog__eyebrow { margin: 0; font: 500 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.dialog__title { margin: 0 0 4px; font: 400 34px/1.05 var(--serif); letter-spacing: -.01em; }
.dialog__title span:last-child { color: var(--stamp); }
.dialog__error { margin: 0; color: var(--stamp); font-size: 14px; min-height: 0; }
.dialog__error:empty { display: none; }
.dialog__actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }
.dialog__body--center .dialog__actions { justify-content: center; }
.dialog__fine { margin: 0; font: 400 11px/1.4 var(--mono); color: var(--muted); text-align: right; }
.dialog .btn--ghost { color: var(--ink); }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; }
.field em { font-style: normal; font-weight: 400; color: var(--muted); }
.field input {
  padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 16px; font-weight: 400;
}
.field input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(229,67,45,.18); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.check input { margin-top: 3px; accent-color: var(--stamp); width: 16px; height: 16px; flex: none; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; top: 18px; z-index: 200; transform: translate(-50%, -150%);
  max-width: calc(100vw - 32px); padding: 11px 16px; border-radius: 12px;
  background: var(--ink); color: var(--paper); font-size: 14px; box-shadow: var(--shadow);
  visibility: hidden;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), visibility 0s .35s;
}
.toast.is-on { transform: translate(-50%, 0); visibility: visible; transition: transform .35s cubic-bezier(.2,.8,.2,1); }

/* ---------- Rechtsseiten ---------- */
.legal { max-width: 760px; margin: 0 auto; padding: clamp(40px, 7vw, 80px) var(--gutter) 0; }
.legal h1 { font: 400 clamp(40px, 6vw, 64px)/1 var(--serif); margin: 0 0 28px; letter-spacing: -.02em; }
.legal h2 { font: 400 28px/1.15 var(--serif); margin: 40px 0 10px; }
.legal h3 { font-size: 17px; margin: 24px 0 6px; }
.legal p, .legal li { color: var(--ink-2); }
.legal .todo { background: #fff3c4; padding: 0 4px; border-radius: 3px; color: var(--ink); }
.legal .note { border: 1px dashed var(--gold); border-radius: 10px; padding: 12px 16px; font-size: 14px; background: var(--canvas); }
