/* =========================================================
   ZSE · Digitálna vizitka — POC
   Brandové farby menit v config.js (sekcia brand.web).
   ========================================================= */

:root {
  --navy: #10346e;
  --navy-light: #2b5ca8;
  --accent: #d6083b;
  --accent-light: #ff7a8e;

  --bg: #050e1e;
  --bg-soft: #0b1a33;
  --text: #eaf1f9;
  --text-dim: #9db0c6;
  --line: rgba(255, 255, 255, 0.1);

  --radius-card: 22px;
  --shadow-card: 0 30px 70px -20px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.07);
  --font: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; }

/* CSS `display` by inak prebil atribut hidden */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(120% 80% at 50% 0%, #0d2b4d 0%, transparent 60%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- pozadie: jemné svetelné škvrny ---------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  animation: drift 22s ease-in-out infinite alternate;
}

.blob--a { width: 46vmax; height: 46vmax; top: -16vmax; left: -12vmax; background: var(--navy-light); }
.blob--b { width: 34vmax; height: 34vmax; top: 22vmax; right: -12vmax; background: var(--accent); opacity: 0.22; animation-delay: -7s; }
.blob--c { width: 30vmax; height: 30vmax; bottom: -14vmax; left: 24vmax; background: #2b5ca8; opacity: 0.35; animation-delay: -13s; }

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(4vmax, -5vmax, 0) scale(1.12); }
}

/* ---------- layout ---------- */
.page {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  padding: 48px 16px calc(48px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ---------- hero ---------- */
.hero { text-align: center; }

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse { 50% { opacity: 0.35; } }

.hero__title {
  margin: 18px 0 10px;
  font-size: clamp(28px, 7vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #fff 30%, #a9c3e0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lead {
  margin: 0 auto;
  max-width: 420px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-dim);
}

.hero__lead strong { color: var(--text); font-weight: 600; }

/* ---------- pass ---------- */
.stage { display: flex; justify-content: center; perspective: 1400px; }

.pass-scene { width: min(340px, 100%); }

.pass {
  position: relative;
  width: 100%;
  min-height: 560px;
  /* bez toho karta pri dotyku "chyti" gesto a stranka sa neposunie */
  touch-action: pan-y;
  transform-style: preserve-3d;
  transition: transform 0.75s cubic-bezier(0.4, 0.05, 0.2, 1);
  cursor: pointer;
  outline: none;
}

.pass.is-flipped { transform: rotateY(180deg); }

.pass:focus-visible { box-shadow: 0 0 0 3px var(--accent-light); border-radius: var(--radius-card); }

.pass__face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(165deg, #1e4d96 0%, var(--navy) 48%, #08204a 100%);
}

.pass__face--back { transform: rotateY(180deg); padding-bottom: 30px; }

/* lesklý prechod cez roh, aby karta pôsobila fyzicky */
.pass__glow {
  position: absolute;
  top: -40%;
  left: -30%;
  width: 120%;
  height: 90%;
  background: radial-gradient(60% 60% at 30% 40%, rgba(214, 8, 59, 0.28), transparent 70%);
  pointer-events: none;
}

.pass__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  position: relative;
}

.brandmark { display: flex; align-items: center; gap: 8px; }
.brandmark__zse { font-size: 26px; font-weight: 800; letter-spacing: 0.02em; }
.brandmark__rule { width: 3px; height: 22px; background: var(--accent); border-radius: 2px; }
.brandmark__sub { font-size: 11px; letter-spacing: 0.2em; color: rgba(255, 255, 255, 0.75); }

/* polia pass-u */
.field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.field--right { text-align: right; align-items: flex-end; }
.field--header { text-align: right; align-items: flex-end; }

.field__label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent-light);
  text-transform: uppercase;
}

.field__value {
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.field__value--small { font-size: 12.5px; }

.pass__primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 26px 0 22px;
  position: relative;
}

.field--primary .field__value {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.avatar {
  flex: 0 0 auto;
  width: 62px;
  height: 62px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(140deg, var(--accent) 0%, var(--navy) 100%);
  box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

/* fotka zamestnanca (assets/photo.jpg) */
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pass__row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.pass__row > .field { flex: 1 1 0; }

.pass__barcode {
  margin-top: auto;
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.pass__barcode img {
  border-radius: 10px;
  background: #fff;
  padding: 8px;
  width: 150px;
  height: 150px;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.8);
}

.pass__barcode-alt { font-size: 10.5px; color: rgba(255, 255, 255, 0.55); margin-bottom: 12px; }

.pass__flip-hint {
  position: absolute;
  bottom: 7px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.35);
}

/* zadná strana */
.pass__back-title {
  margin: 2px 0 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent-light);
}

.backfields { margin: 0; display: flex; flex-direction: column; gap: 9px; }

.backfields dt {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.backfields dd {
  margin: 1px 0 0;
  font-size: 13px;
  color: #fff;
  word-break: break-word;
  white-space: pre-line;
}

/* ---------- akcie ---------- */
.actions { display: flex; flex-direction: column; align-items: center; gap: 12px; }

.wallet-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 13px 26px;
  border-radius: 14px;
  background: #000;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 14px 34px -12px rgba(0, 0, 0, 0.9);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.wallet-btn:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -14px rgba(0, 0, 0, 1); }
.wallet-btn:active { transform: translateY(0); }
.wallet-btn.is-busy { opacity: 0.6; pointer-events: none; }

.wallet-btn__glyph { width: 26px; height: 26px; fill: #fff; }
.wallet-btn__text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.wallet-btn__text small { font-size: 11px; opacity: 0.75; }
.wallet-btn__text strong { font-size: 17px; font-weight: 600; }

.actions__secondary { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.ghost-btn:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.25); }
.ghost-btn--solid { background: var(--accent); color: #fff; border-color: transparent; font-weight: 600; }

.actions__hint {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-dim);
  text-align: center;
  max-width: 380px;
}

/* ---------- poznámka ---------- */
.note {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.note__icon { font-size: 22px; line-height: 1; }
.note__title { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.note__text { margin: 0; font-size: 13px; line-height: 1.6; color: var(--text-dim); }

code {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 122, 142, 0.14);
  color: var(--accent-light);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  word-break: break-all;
}

/* ---------- footer ---------- */
.footer { text-align: center; font-size: 12px; color: rgba(157, 176, 198, 0.6); }
.footer a { color: inherit; }

/* ---------- modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 8, 18, 0.72);
  backdrop-filter: blur(6px);
}

.modal__box {
  width: min(440px, 100%);
  padding: 26px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  box-shadow: var(--shadow-card);
}

.modal__title { margin: 0 0 10px; font-size: 19px; }
.modal__text { margin: 0 0 12px; font-size: 14px; line-height: 1.6; color: var(--text-dim); }
.modal__text--muted { font-size: 12.5px; }
.modal__list { margin: 0 0 16px; padding-left: 18px; font-size: 12.5px; color: var(--text-dim); }
.modal__list li { margin-bottom: 4px; }

@media (prefers-reduced-motion: reduce) {
  .blob, .dot { animation: none; }
  .pass { transition: none; }
}
