:root {
  --bg: #07061a;
  --indigo: #443ccf;
  --indigo-bright: #6f68ff;
  --orange: #ff8a1e;
  --ember: #e8452c;
  --ink: #f5f5fb;
  --ink-soft: rgba(245, 245, 251, 0.66);
  --ink-faint: rgba(245, 245, 251, 0.42);
  --line: rgba(255, 255, 255, 0.16);
  --glass: rgba(255, 255, 255, 0.07);

  --card-h: min(560px, calc(100dvh - 196px));
  --rx: 0deg;
  --ry: 0deg;
  --gx: 30%;
  --gy: 12%;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

svg {
  width: 1em; height: 1em;
  fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
svg .fill { fill: currentColor; stroke: none; }

:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

/* ---------- ambient backdrop ---------- */
.backdrop { position: fixed; inset: 0; overflow: hidden; }

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  will-change: transform;
}
.orb-a {
  width: 78vmin; height: 78vmin; left: -22vmin; top: -14vmin;
  background: radial-gradient(circle, #5a50ff 0%, rgba(68, 60, 207, 0) 70%);
  animation: drift-a 16s ease-in-out infinite alternate;
}
.orb-b {
  width: 62vmin; height: 62vmin; right: -20vmin; bottom: 4vmin;
  background: radial-gradient(circle, rgba(255, 138, 30, 0.85) 0%, rgba(232, 69, 44, 0) 70%);
  animation: drift-b 19s ease-in-out infinite alternate;
}
.orb-c {
  width: 46vmin; height: 46vmin; left: 30vmin; top: 42%;
  background: radial-gradient(circle, rgba(140, 90, 255, 0.55) 0%, rgba(140, 90, 255, 0) 70%);
  animation: drift-a 23s ease-in-out infinite alternate-reverse;
}
.grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
}

@keyframes drift-a { to { transform: translate(9vmin, 7vmin) scale(1.08); } }
@keyframes drift-b { to { transform: translate(-8vmin, -9vmin) scale(1.1); } }

/* ---------- layout ---------- */
.layout {
  position: relative;
  height: 100dvh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 22px;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
}

.stage { perspective: 1100px; }

.float { position: relative; animation: bob 6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px); } }

.tilt {
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  will-change: transform;
}

.shadow {
  position: absolute; left: 12%; right: 12%; bottom: -26px; height: 30px;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.55), transparent 70%);
  filter: blur(8px);
  animation: shadow 6s ease-in-out infinite;
}
@keyframes shadow { 50% { transform: scale(0.9); opacity: 0.7; } }

/* ---------- the card ---------- */
.card {
  position: relative;
  height: var(--card-h);
  width: min(88vw, calc(var(--card-h) * 0.64));
  container-type: inline-size;
  border-radius: 26px;
  border: 1px solid var(--line);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.05) 38%, rgba(255, 255, 255, 0.02) 100%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06),
    0 32px 70px -24px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  animation: arrive 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes arrive {
  from { opacity: 0; transform: translateY(46px) rotateX(18deg) scale(0.94); }
}

/* moving reflection */
.glare {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background:
    radial-gradient(circle at var(--gx) var(--gy), rgba(255, 255, 255, 0.22), transparent 46%);
  mix-blend-mode: screen;
}
.card::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 2;
  background: linear-gradient(90deg, var(--indigo-bright), var(--orange));
  opacity: 0.9;
}

.face {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  padding: 7cqw 7cqw 8cqw;
}
.card[data-face="front"] .back,
.card[data-face="back"] .front { display: none; }

.card-top { display: flex; align-items: center; justify-content: space-between; }

/* logo: the fox keeps its colours, the wordmark is turned white */
.logo { position: relative; display: block; height: 8.4cqw; aspect-ratio: 2000 / 509; }
.logo span {
  position: absolute; inset: 0;
  background: url("assets/vzode-logo.webp") center / 100% 100% no-repeat;
}
.logo-mark { clip-path: inset(0 71% 0 0); }
.logo-word { clip-path: inset(0 0 0 29%); filter: brightness(0) invert(1); }

.eyebrow {
  font-size: 3.2cqw; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-soft);
}

.icon-btn {
  display: grid; place-items: center;
  width: 36px; height: 36px; padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--glass);
  font-size: 15px;
  transition: background 0.2s, transform 0.2s;
}
.icon-btn:active { transform: scale(0.92); }

/* front */
.identity {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  min-height: 0;
}
.photo-ring {
  width: 40cqw; aspect-ratio: 1; padding: 3px;
  border-radius: 50%;
  background: conic-gradient(from 210deg, var(--indigo-bright), var(--orange), var(--ember), var(--indigo-bright));
  box-shadow: 0 14px 34px -12px rgba(68, 60, 207, 0.9);
}
.photo {
  display: block; width: 100%; height: 100%;
  border-radius: 50%; object-fit: cover;
  border: 3px solid #0d0b2a;
  background: #0d0b2a;
}
.name {
  margin: 6cqw 0 0;
  font-family: "Sora", "Inter", sans-serif;
  font-weight: 600; font-size: 8cqw; line-height: 1.12; letter-spacing: -0.01em;
  text-wrap: balance;
}
.role {
  margin: 2.6cqw 0 0;
  font-size: 3.05cqw; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--orange);
}
.role span { display: block; }
.role span + span { margin-top: 1.6cqw; letter-spacing: 0.3em; color: var(--ink-soft); }
.tagline {
  margin: 3.4cqw 0 0; max-width: 30ch;
  font-size: 3.9cqw; line-height: 1.45; color: var(--ink-soft);
  text-wrap: balance;
}

.socials {
  display: flex; justify-content: space-between;
  padding-top: 5cqw;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.socials a {
  display: grid; place-items: center;
  width: 13.5cqw; aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--glass);
  font-size: 5.6cqw;
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}
.socials a:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.34); transform: translateY(-2px); }
.socials a:active { transform: scale(0.92); }

/* back */
.qr-wrap {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.qr {
  width: 52cqw; aspect-ratio: 1; padding: 4cqw;
  border-radius: 5cqw;
  background: #fff;
  box-shadow: 0 16px 36px -14px rgba(0, 0, 0, 0.7);
}
.qr svg { width: 100%; height: 100%; stroke: none; fill: #14104a; display: block; }
.qr-url { margin: 4cqw 0 0; font-size: 3.5cqw; letter-spacing: 0.06em; color: var(--ink-soft); }

.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.rows a {
  display: flex; align-items: center; gap: 4cqw;
  padding: 3.6cqw 0;
  font-size: 4cqw;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.rows li:last-child a { border-bottom: 0; padding-bottom: 0; }
.rows svg { font-size: 4.6cqw; color: var(--orange); flex: none; }
.rows span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- actions ---------- */
.actions {
  width: min(88vw, calc(var(--card-h) * 0.64));
  display: grid; gap: 10px;
  animation: rise 0.7s 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.actions-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 50px; padding: 0 18px;
  border-radius: 15px;
  border: 1px solid var(--line);
  font-size: 15px; font-weight: 600; letter-spacing: 0.01em;
  transition: transform 0.15s, filter 0.2s, background 0.2s;
}
.btn svg { font-size: 17px; }
.btn:active { transform: scale(0.97); }
.btn.primary {
  position: relative; overflow: hidden;
  border-color: rgba(255, 255, 255, 0.28);
  background: linear-gradient(135deg, #5b53ee 0%, var(--indigo) 55%, #3329b5 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 14px 30px -12px rgba(68, 60, 207, 0.95);
}
.btn.primary::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-18deg);
  animation: sheen 4.5s 1.4s ease-in-out infinite;
}
@keyframes sheen { 0% { left: -40%; } 28%, 100% { left: 130%; } }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost {
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.btn.ghost:hover { background: rgba(255, 255, 255, 0.12); }
.btn.square { width: 50px; padding: 0; }
.btn[disabled] { opacity: 0.6; pointer-events: none; }

/* ---------- exchange sheet ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 10; display: grid; align-items: end; justify-items: center; }
.sheet-wrap[hidden] { display: none; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(4, 3, 16, 0.6); animation: fade 0.25s both; }
@keyframes fade { from { opacity: 0; } }

.sheet {
  position: relative;
  width: min(100%, 440px); max-height: 92dvh; overflow-y: auto;
  display: grid; gap: 12px;
  padding: 26px 22px max(22px, env(safe-area-inset-bottom));
  border-radius: 26px 26px 0 0;
  border: 1px solid var(--line); border-bottom: 0;
  background: linear-gradient(160deg, rgba(40, 36, 96, 0.92), rgba(14, 12, 44, 0.94));
  -webkit-backdrop-filter: blur(26px); backdrop-filter: blur(26px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
  animation: sheet-up 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes sheet-up { from { transform: translateY(100%); } }
@media (min-width: 520px) {
  .sheet-wrap { align-items: center; }
  .sheet { border-radius: 26px; border-bottom: 1px solid var(--line); }
}
.sheet h2 { margin: 0; font-family: "Sora", sans-serif; font-weight: 600; font-size: 21px; }
.sheet-sub { margin: -6px 0 4px; font-size: 14px; line-height: 1.5; color: var(--ink-soft); }
.sheet-close { position: absolute; top: 18px; right: 18px; }
.sheet label { display: block; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.sheet label em { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--ink-faint); display: inline; }
.sheet input, .sheet textarea {
  display: block; width: 100%; margin-top: 6px; padding: 11px 14px;
  border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink); font: 16px "Inter", sans-serif;
  resize: none;
}
.sheet input:focus, .sheet textarea:focus { outline: none; border-color: var(--indigo-bright); background: rgba(255, 255, 255, 0.1); }
.form-error { margin: 0; font-size: 14px; color: #ffb39a; }
.form-error[hidden] { display: none; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 20;
  transform: translate(-50%, 20px);
  padding: 11px 18px; border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(20, 17, 60, 0.92);
  font-size: 14px; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  .float, .shadow, .orb, .card, .actions, .btn.primary::before { animation: none; }
}
