/* ==========================================================================
   holo.css – Themen-Effekte: Hologramm-Folie, Guilloche, Mikroschrift,
   Seriennummern, Sicherheits-Pass, Siegel, Scroll-Einblendung
   Laufzeit-Variablen --hx / --hy (0…1) kommen aus holo.js
   (Zeiger, Neigungssensor oder sanfter Auto-Schimmer).
   ========================================================================== */

/* ---------- Holografischer Text ---------- */
.holo-text {
  background: var(--holo);
  background-size: 320% 100%;
  background-position: calc(var(--hx) * 100%) 50%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  /* Fallback, falls background-clip fehlt */
  text-shadow: none;
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .holo-text { color: var(--h-mint); -webkit-text-fill-color: currentColor; }
}

/* ---------- Guilloche (SVG, von guilloche.js erzeugt) ---------- */
.guilloche path {
  fill: none;
  stroke-width: 0.8;
  stroke-linecap: round;
}
.guilloche--draw path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 2.8s var(--ease);
}
.guilloche--draw.is-drawn path { stroke-dashoffset: 0; }

.hero-guilloche {
  position: absolute;
  z-index: -1;
  top: 50%;
  right: -12%;
  width: min(1100px, 120vw);
  aspect-ratio: 1;
  transform: translateY(-50%);
  opacity: 0.55;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent);
  mask-image: radial-gradient(closest-side, #000 55%, transparent);
}
.hero-guilloche svg { width: 100%; height: 100%; animation: slow-turn 180s linear infinite; }
@keyframes slow-turn { to { transform: rotate(360deg); } }

.band-guilloche { display: block; width: 100%; height: 120px; opacity: 0.5; }

/* ---------- Mikroschrift ---------- */
.microline {
  font-family: var(--font-mono);
  font-size: 5.5px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  color: rgba(201, 209, 228, 0.55);
}

.micro-rail {
  position: relative;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgba(5, 6, 11, 0.7);
}
.micro-rail__track {
  display: flex;
  width: max-content;
  animation: rail 48s linear infinite;
}
.micro-rail__track span {
  padding: 14px 0;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--silver);
  white-space: nowrap;
}
.micro-rail__track span i {
  font-style: normal;
  display: inline-block;
  margin: 0 22px;
  background: var(--holo) calc(var(--hx) * 100%) 0 / 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@keyframes rail { to { transform: translateX(-50%); } }

/* ---------- Seriennummer ---------- */
.serial {
  display: inline-flex;
  gap: 0.15em;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
}
.serial b { font-weight: 600; color: var(--gold); }

/* ---------- Holografische Folie (wiederverwendbar) ---------- */
.foil {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at calc(var(--hx) * 100%) calc(var(--hy) * 100%), rgba(255, 255, 255, 0.85), transparent 38%),
    repeating-linear-gradient(calc(60deg + var(--hx) * 60deg), rgba(255, 255, 255, 0.22) 0 2px, transparent 2px 7px),
    conic-gradient(from calc(var(--hx) * 300deg + var(--hy) * 60deg) at 50% 50%, var(--h-mint), var(--h-sky), var(--h-violet), var(--h-orchid), var(--h-gold), var(--h-lime), var(--h-mint));
}

/* ---------- Sicherheits-Pass (Digitale Vignette als Karte) ---------- */
.pass-stage {
  position: relative;
  perspective: 1200px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
}
.pass-stage::before {
  /* farbiger Schein unter der Karte */
  content: '';
  position: absolute;
  inset: 18% 10% 6%;
  border-radius: 40px;
  background: var(--holo) calc(var(--hx) * 100%) 0 / 300% 100%;
  filter: blur(60px);
  opacity: 0.38;
  z-index: -1;
}

.pass {
  --tilt-x: calc((0.5 - var(--hy)) * 16deg);
  --tilt-y: calc((var(--hx) - 0.5) * 22deg);
  position: relative;
  width: min(100%, 470px);
  aspect-ratio: 1.586;
  border-radius: 22px;
  transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transform-style: preserve-3d;
  transition: transform 0.12s linear;
  color: var(--text);
}
.pass__body {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  background:
    radial-gradient(120% 90% at 100% 0%, #26304d 0%, transparent 55%),
    linear-gradient(150deg, #151a2c 0%, #0b0e19 55%, #121628 100%);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9), inset 0 0 0 1px rgba(255, 255, 255, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.pass__guilloche { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.85; }
.pass__foil {
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: 58%;
  width: 22%;
  transform: rotate(14deg);
  opacity: 0.55;
  mix-blend-mode: color-dodge;
}
.pass__sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(calc(100deg + var(--hx) * 40deg), transparent 35%, rgba(255, 255, 255, 0.16) 48%, rgba(255, 255, 255, 0.02) 56%, transparent 66%);
  background-size: 220% 100%;
  background-position: calc(100% - var(--hx) * 100%) 0;
  mix-blend-mode: screen;
  pointer-events: none;
}
.pass__watermark {
  position: absolute;
  right: 6%;
  bottom: 22%;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(2.2rem, 7vw, 3.6rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.05);
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.12);
  transform: rotate(-8deg);
  pointer-events: none;
}
.pass__content {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: minmax(0, 1fr);
  padding: 6% 7% 5%;
  transform: translateZ(30px);
}
.pass__head { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pass__brand { font-family: var(--font-display); font-weight: 600; font-size: clamp(1rem, 2.6vw, 1.2rem); }
.pass__brand span { font-style: italic; color: var(--silver); font-weight: 500; }
.pass__serial { font-size: clamp(0.56rem, 1.5vw, 0.68rem); color: var(--gold); letter-spacing: 0.14em; }
.pass__main { align-self: center; max-width: 64%; }
.pass__kind { margin: 0 0 4px; font-family: var(--font-mono); font-size: clamp(0.54rem, 1.5vw, 0.66rem); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.pass__title { margin: 0 0 10px; font-family: var(--font-display); font-size: clamp(1.2rem, 3.6vw, 1.62rem); font-weight: 600; line-height: 1.05; }
.pass__data { display: grid; grid-template-columns: repeat(2, auto); justify-content: start; gap: 6px 22px; margin: 0; }
.pass__data div { min-width: 0; }
.pass__data dt { font-family: var(--font-mono); font-size: clamp(0.5rem, 1.3vw, 0.58rem); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.pass__data dd { margin: 0; font-family: var(--font-mono); font-size: clamp(0.66rem, 1.8vw, 0.8rem); font-weight: 600; white-space: nowrap; color: var(--text); }
.pass__foot { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.pass__foot .microline { flex: 1; min-width: 0; }
.pass__price { font-family: var(--font-display); font-size: clamp(1.3rem, 4vw, 1.8rem); font-weight: 600; line-height: 1; white-space: nowrap; }

.pass__kinegram {
  position: absolute;
  right: 5%;
  top: 31%;
  width: 23%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translateZ(50px);
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}
.pass__kinegram svg { position: absolute; inset: 0; width: 100%; height: 100%; mix-blend-mode: multiply; }

/* Chip: kleines Kontaktfeld, rein dekorativ */
.pass__chip {
  width: 38px; height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, #e9d3a1, #9c8356 60%, #e3c88f);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.3);
  position: relative;
}
.pass__chip::before { content: ''; position: absolute; inset: 6px 10px; border: 1px solid rgba(0, 0, 0, 0.35); border-radius: 3px; }

/* ---------- Siegel (Rosette + Ring-Mikroschrift) ---------- */
.seal { position: relative; width: 120px; aspect-ratio: 1; }
.seal svg { width: 100%; height: 100%; }
.seal .guilloche path { stroke-width: 1.1; }
.pass__kinegram .guilloche path { stroke-width: 0.9; }
.seal text { font-family: var(--font-mono); font-size: 7.4px; letter-spacing: 1.6px; fill: rgba(201, 209, 228, 0.7); text-transform: uppercase; }
.seal__num {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-style: italic;
  font-weight: 600;
  color: #fff;
}

/* ---------- Karte mit Holo-Rand, der dem Zeiger folgt ---------- */
.holo-card {
  --mx: 50%;
  --my: 50%;
  position: relative;
  isolation: isolate;
  padding: clamp(24px, 3vw, 34px);
  border-radius: var(--radius-l);
  background: linear-gradient(170deg, rgba(32, 38, 59, 0.6), rgba(15, 18, 32, 0.85));
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.3s;
}
.holo-card::before {
  /* leuchtender Holo-Rand an Zeigerposition */
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.7), transparent 45%), var(--holo) calc(var(--hx) * 100%) 0 / 300% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0.35;
  transition: opacity 0.3s;
}
.holo-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(360px circle at var(--mx) var(--my), rgba(143, 180, 255, 0.10), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}
.holo-card:hover::before { opacity: 1; }
.holo-card:hover::after { opacity: 1; }
.holo-card:hover { transform: translateY(-4px); }

/* ---------- Icon-Plakette ---------- */
.icon-plate {
  display: grid;
  place-items: center;
  width: 58px; height: 58px;
  margin-bottom: 22px;
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4), 0 10px 24px -10px rgba(143, 180, 255, 0.6);
}
.icon-plate svg { width: 28px; height: 28px; color: #0b0e18; position: relative; z-index: 1; }

/* ---------- Scroll-Einblendung ----------
   Nur aktiv, wenn JS läuft (html.js-reveal) und keine reduzierte Bewegung gewünscht ist. */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
.js-reveal [data-reveal].is-in { opacity: 1; transform: none; }

/* Hologramm-Neigungs-Schalter (nur Touch-Geräte mit Berechtigungsabfrage) */
.tilt-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font: 600 0.82rem/1.2 var(--font-body);
  cursor: pointer;
}
.tilt-toggle svg { width: 16px; height: 16px; }
.tilt-toggle.is-available { display: inline-flex; }
.tilt-toggle[aria-pressed='true'] { color: #fff; border-color: var(--h-mint); }

/* ---------- Reduzierte Bewegung ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
    scroll-behavior: auto !important;
  }
  .pass { transform: none; }
  .hero-guilloche svg { animation: none; }
  .micro-rail__track { animation: none; }
  .guilloche--draw path { stroke-dashoffset: 0; }
  .js-reveal [data-reveal] { opacity: 1; transform: none; }
}
