:root {
  --bg: #f2fafb;
  --ink: #1e2328;
  --ink-soft: #5a666c;
  --teal: #0cc0df;
  --teal-deep: #0a9cb6;
  --teal-bright: #5ce1e6;
  --mint: #d7f6fa;
  --line: rgba(12, 192, 223, 0.16);
  --white: #ffffff;
  --radius: 16px;
  --shadow: 0 24px 60px -28px rgba(30, 35, 40, 0.28);
  --shadow-focus: 0 0 0 4px rgba(12, 192, 223, 0.18);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Ambient background ---------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  will-change: transform;
}

.blob-1 {
  width: 46vmax; height: 46vmax;
  top: -16vmax; left: -10vmax;
  background: radial-gradient(circle at 30% 30%, #aeeaf3, transparent 70%);
  animation: drift-1 22s ease-in-out infinite;
}

.blob-2 {
  width: 38vmax; height: 38vmax;
  bottom: -14vmax; right: -8vmax;
  background: radial-gradient(circle at 60% 40%, #c5f1f7, transparent 70%);
  animation: drift-2 26s ease-in-out infinite;
}

.blob-3 {
  width: 30vmax; height: 30vmax;
  top: 40%; left: 55%;
  background: radial-gradient(circle at 50% 50%, #d7f6fa, transparent 70%);
  animation: drift-3 30s ease-in-out infinite;
}

@keyframes drift-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(6vmax, 4vmax) scale(1.08); }
}
@keyframes drift-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-5vmax, -5vmax) scale(1.05); }
}
@keyframes drift-3 {
  0%, 100% { transform: translate(-50%, 0) scale(1); }
  50%      { transform: translate(-46%, -6vmax) scale(1.1); }
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 30%, transparent 100%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 30%, transparent 100%);
  opacity: 0.6;
}

/* ---------- Floating 3D cross outlines ---------- */
.dance {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  perspective: 1100px;
}
.cross {
  position: absolute;
  height: auto;
  color: var(--teal);
  transform-style: preserve-3d;
  will-change: transform;
}
.cross path { vector-effect: non-scaling-stroke; }

.cross:nth-child(1) { top: 7%;  left: 5%;  width: 132px; opacity: 0.10; animation: tumble-a 34s ease-in-out infinite; }
.cross:nth-child(2) { top: 11%; right: 7%; width: 96px;  opacity: 0.08; animation: tumble-b 43s ease-in-out 2s infinite; }
.cross:nth-child(3) { bottom: 12%; left: 9%; width: 116px; opacity: 0.09; animation: tumble-c 38s ease-in-out 1s infinite; }
.cross:nth-child(4) { bottom: 8%; right: 8%; width: 154px; opacity: 0.07; animation: tumble-a 47s ease-in-out 5s infinite; }
.cross:nth-child(5) { top: 46%; left: 2%;  width: 74px;  opacity: 0.08; animation: tumble-b 30s ease-in-out infinite; }
.cross:nth-child(6) { top: 40%; right: 3%; width: 84px;  opacity: 0.09; animation: tumble-c 40s ease-in-out 3s infinite; }
/* extra crosses appear on desktop only */
.cross:nth-child(n + 7) { display: none; }

@keyframes tumble-a {
  0%, 100% { transform: rotateX(-20deg) rotateY(0deg)   rotateZ(0deg)  translate3d(0, 0, 0); }
  50%      { transform: rotateX(160deg) rotateY(180deg) rotateZ(15deg) translate3d(14px, -26px, 40px); }
}
@keyframes tumble-b {
  0%, 100% { transform: rotateX(15deg)   rotateY(30deg)   rotateZ(0deg)   translate3d(0, 0, 0); }
  50%      { transform: rotateX(-150deg) rotateY(-160deg) rotateZ(-20deg) translate3d(-18px, 22px, 30px); }
}
@keyframes tumble-c {
  0%, 100% { transform: rotateX(0deg)   rotateY(-40deg) rotateZ(10deg)  translate3d(0, 0, 0); }
  33%      { transform: rotateX(120deg) rotateY(80deg)  rotateZ(-15deg) translate3d(20px, -14px, 20px); }
  66%      { transform: rotateX(220deg) rotateY(200deg) rotateZ(20deg)  translate3d(-14px, 18px, 50px); }
}

/* ---------- Stage ---------- */
.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  gap: 26px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--teal-deep);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.pulse {
  position: relative;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--teal-bright);
}
.pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--teal-bright);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { transform: scale(1);   opacity: 0.7; }
  100% { transform: scale(3.4); opacity: 0; }
}

/* Logo mark (element) — subtle 3D */
.scene {
  perspective: 900px;
  perspective-origin: 50% 38%;
}
.mark3d {
  width: clamp(76px, 13vw, 108px);
  margin-inline: auto;
  transform-style: preserve-3d;
  will-change: transform;
  --rx: 0deg; --ry: 0deg;
  animation: markFloat 9s ease-in-out infinite;
}
.mark-svg {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 34px rgba(12, 192, 223, 0.3));
}
@keyframes markFloat {
  0%, 100% { transform: rotateX(7deg)  rotateY(-10deg) translateY(0); }
  50%      { transform: rotateX(-6deg) rotateY(10deg)  translateY(-9px); }
}
/* Pointer-driven tilt overrides the idle float */
.mark3d.is-tilt {
  animation: none;
  transition: transform 0.14s ease-out;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
}
/* Accent petal gets an independent shimmer for depth */
.petal-accent {
  transform-box: fill-box;
  transform-origin: center;
  animation: accentPulse 5.5s ease-in-out infinite;
}
@keyframes accentPulse {
  0%, 100% { opacity: 0.92; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.05); }
}

/* Wordmark image (schrift) */
.wordmark-img {
  width: min(440px, 82vw);
  height: auto;
  display: block;
}

/* Text wordmark (used on Danke page) */
.wordmark {
  margin: 0;
  font-weight: 400;
  font-size: clamp(2.8rem, 11vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
  color: var(--ink);
}

.wordmark .dot {
  color: var(--teal);
}

.subtext {
  margin: 0;
  max-width: 30ch;
  font-size: clamp(1.02rem, 2.6vw, 1.28rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* ---------- Form ---------- */
.notify {
  width: 100%;
  max-width: 460px;
  margin-top: 6px;
}

.field {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.field:focus-within {
  border-color: var(--teal-bright);
  box-shadow: var(--shadow), var(--shadow-focus);
}

.field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  padding: 12px 14px;
}

.field input::placeholder { color: #9aaaa8; }

.field button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--ink);
  padding: 12px 20px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--teal-bright) 0%, var(--teal) 100%);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.field button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -10px rgba(12, 192, 223, 0.7);
}

.field button:active { transform: translateY(0); }

.btn-arrow {
  transition: transform 0.25s ease;
}
.field button:hover .btn-arrow {
  transform: translateX(3px);
}

.hint {
  margin: 14px 2px 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
  opacity: 0.85;
}

.notify-status {
  margin: 12px 2px 0;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--teal-deep);
  min-height: 1.2em;
}
.notify-status:empty { margin: 0; min-height: 0; }
.notify-status.error { color: #b4452f; }

.hint a { color: var(--teal-deep); text-decoration: underline; text-underline-offset: 2px; }
.hint a:hover { color: var(--teal-bright); }

.hp { position: absolute; left: -9999px; }

/* ---------- Footer ---------- */
.foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 26px 24px 32px;
  font-size: 0.82rem;
  color: var(--ink-soft);
  opacity: 0.7;
}
.foot .sep { opacity: 0.5; }
.foot a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.foot a:hover { color: var(--teal-deep); border-color: var(--line); }

/* ---------- Legal pages ---------- */
.legal {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 24px 56px;
}
.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--teal-deep);
  text-decoration: none;
  margin-bottom: 28px;
}
.legal-back:hover { color: var(--teal-bright); }
.legal h1 {
  margin: 0 0 8px;
  font-weight: 400;
  font-size: clamp(2rem, 6vw, 3rem);
  letter-spacing: -0.045em;
  color: var(--ink);
}
.legal .lead {
  margin: 0 0 36px;
  color: var(--ink-soft);
  font-size: 1rem;
}
.legal h2 {
  margin: 34px 0 10px;
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.legal h3 {
  margin: 22px 0 6px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}
.legal p, .legal li {
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--ink-soft);
}
.legal p { margin: 0 0 12px; }
.legal ul { margin: 0 0 12px; padding-left: 20px; }
.legal li { margin-bottom: 5px; }
.legal a { color: var(--teal-deep); text-decoration: underline; text-underline-offset: 2px; }
.legal a:hover { color: var(--teal-bright); }
.legal .card {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 0 0 8px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.legal .card p:last-child { margin-bottom: 0; }
.legal .muted { font-size: 0.82rem; opacity: 0.8; margin-top: 28px; }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: reveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--d, 0ms);
}
@keyframes reveal {
  to { opacity: 1; transform: translateY(0); }
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .wordmark-img { width: min(300px, 64vw); }
}
@media (max-width: 480px) {
  .field { flex-wrap: wrap; }
  .field input { flex-basis: 100%; }
  .field button { width: 100%; justify-content: center; }
}

/* Desktop: more cross outlines, more visible */
@media (min-width: 900px) {
  .cross:nth-child(1) { opacity: 0.17; }
  .cross:nth-child(2) { opacity: 0.14; }
  .cross:nth-child(3) { opacity: 0.16; }
  .cross:nth-child(4) { opacity: 0.13; }
  .cross:nth-child(5) { opacity: 0.15; }
  .cross:nth-child(6) { opacity: 0.16; }
  .cross:nth-child(n + 7) { display: block; }
  .cross:nth-child(7)  { top: 19%;    left: 23%;  width: 82px;  opacity: 0.13; animation: tumble-b 36s ease-in-out 1s infinite; }
  .cross:nth-child(8)  { bottom: 17%; left: 19%;  width: 98px;  opacity: 0.14; animation: tumble-c 45s ease-in-out 4s infinite; }
  .cross:nth-child(9)  { top: 23%;    right: 21%; width: 74px;  opacity: 0.13; animation: tumble-a 39s ease-in-out 2s infinite; }
  .cross:nth-child(10) { bottom: 20%; right: 23%; width: 110px; opacity: 0.14; animation: tumble-b 51s ease-in-out 6s infinite; }
  .cross:nth-child(11) { top: 6%;     left: 44%;  width: 64px;  opacity: 0.11; animation: tumble-c 34s ease-in-out 3s infinite; }
  .cross:nth-child(12) { bottom: 6%;  left: 40%;  width: 70px;  opacity: 0.11; animation: tumble-a 42s ease-in-out 7s infinite; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
  .blob, .pulse::after, .petal-accent, .cross { animation: none; }
  .mark3d { animation: none; transform: rotateX(4deg) rotateY(-6deg); }
  .btn-arrow { transition: none; }
}
