:root {
  color-scheme: light;
  --page: #f2f7f9;
  --surface: #ffffff;
  --surface-soft: #f5f9fb;
  --text: #052b49;
  --muted: #667a88;
  --line: #dce8ed;
  --accent: #08b6d5;
  --accent-dark: #0877b9;
  --accent-soft: #e5f8fb;
  --shadow: 0 24px 70px rgba(5, 43, 73, 0.12);
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--page); }
html::-webkit-scrollbar { display: none; }

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  color: var(--text);
  background: var(--page);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, a { -webkit-tap-highlight-color: transparent; }
body.intro-active { overflow: hidden; }

.intro {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #06131d;
  animation: intro-exit 320ms cubic-bezier(.7, 0, .8, 1) 1.12s forwards;
}

.intro[hidden] { display: none; }

.intro::before {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(8, 202, 209, 0.2), rgba(8, 119, 185, 0.06) 48%, transparent 70%);
  animation: intro-breathe 1.2s ease-out both;
}

.intro-geometry { position: absolute; width: 270px; height: 270px; }

.orbit {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(8, 202, 209, 0.24);
  border-radius: 50%;
  animation: orbit-in 700ms cubic-bezier(.2, .8, .2, 1) both, orbit-turn 8s linear infinite;
}

.orbit::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #08d5d5;
  box-shadow: 0 0 14px #08cad1;
}

.orbit-two { inset: 28px; border-style: dashed; animation-duration: 700ms, 12s; animation-direction: normal, reverse; }

.signal { position: absolute; background: linear-gradient(90deg, transparent, rgba(8, 202, 209, .75), transparent); }
.signal-one { top: 50%; left: -18px; width: 306px; height: 1px; animation: signal-x 900ms ease-out 120ms both; }
.signal-two { top: -18px; left: 50%; width: 1px; height: 306px; background: linear-gradient(transparent, rgba(8, 182, 213, .42), transparent); animation: signal-y 900ms ease-out 160ms both; }

.particle { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #08d5d5; box-shadow: 0 0 12px #08cad1; opacity: 0; animation: particle-in 500ms ease-out forwards; }
.particle-one { top: 18%; left: 7%; animation-delay: 260ms; }
.particle-two { right: 3%; bottom: 31%; animation-delay: 380ms; }
.particle-three { left: 18%; bottom: 2%; animation-delay: 470ms; }

.intro-identity { position: relative; z-index: 1; text-align: center; animation: identity-in 560ms cubic-bezier(.2, .8, .2, 1) both; }

.intro-logo-wrap {
  position: relative;
  width: 102px;
  height: 102px;
  margin: 0 auto 22px;
  overflow: hidden;
  border: 1px solid rgba(8, 202, 209, 0.3);
  border-radius: 27px;
  background: #06131d;
  box-shadow: 0 0 0 8px rgba(8, 202, 209, 0.04), 0 0 42px rgba(8, 182, 213, 0.24);
}

.intro-logo-wrap img { width: 100%; height: 100%; object-fit: cover; }

.intro-scan {
  position: absolute;
  inset: -20% 0 auto;
  z-index: 2;
  height: 30%;
  background: linear-gradient(transparent, rgba(8, 213, 213, 0.25), transparent);
  animation: logo-scan 900ms ease-in-out 160ms both;
}

.intro-identity p { margin: 0; color: #effffc; font-size: .84rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.intro-identity > span { display: block; margin-top: 8px; color: rgba(210, 240, 236, .54); font-size: .66rem; letter-spacing: .13em; text-transform: uppercase; }

.page-shell {
  min-height: 100vh;
  min-height: 100svh;
  padding: max(20px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translateY(8px);
  animation: card-enter 520ms cubic-bezier(.2, .8, .2, 1) 1.2s forwards;
}

.card {
  width: min(100%, 440px);
  padding: clamp(24px, 6vw, 34px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.identity { display: flex; align-items: center; gap: 18px; padding-bottom: 25px; }

.brand-mark {
  flex: 0 0 auto;
  display: block;
  width: 78px;
  height: 78px;
  overflow: hidden;
  border-radius: 23px;
  background: #06131d;
  box-shadow: 0 12px 28px rgba(5, 43, 73, .16);
}

.brand-mark img { display: block; width: 100%; height: 100%; object-fit: cover; }
.identity-copy { min-width: 0; }

.eyebrow { margin: 0 0 8px; color: var(--accent-dark); font-size: .66rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow span { display: inline-block; width: 5px; height: 5px; margin: 0 5px 1px 0; border-radius: 50%; background: #08cad1; box-shadow: 0 0 0 4px var(--accent-soft); }
h1 { margin: 0; color: #052b49; font-size: clamp(1.9rem, 8.2vw, 2.45rem); line-height: 1.02; letter-spacing: -.048em; }
.role { margin: 10px 0 0; color: var(--muted); font-size: .89rem; line-height: 1.45; }

.primary-button, .share-button {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  border-radius: 17px;
  font: inherit;
  font-size: .94rem;
  font-weight: 720;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.primary-button { padding: 7px 13px 7px 8px; gap: 12px; color: #fff; border: 1px solid var(--accent-dark); background: linear-gradient(135deg, #08b6d5, #0877b9); box-shadow: 0 11px 24px rgba(8, 119, 185, .2); }
.primary-button:hover { box-shadow: 0 13px 28px rgba(8, 119, 185, .28); }
.button-icon { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 12px; background: rgba(255, 255, 255, .13); }
.button-arrow { margin-left: auto; opacity: .7; }

svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }

.actions a {
  min-width: 0;
  min-height: 79px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfcfc;
  color: var(--text);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.actions a:hover { border-color: #8adbe4; background: var(--accent-soft); }
.action-icon { flex: 0 0 auto; width: 35px; height: 35px; display: grid; place-items: center; border-radius: 11px; background: var(--accent-soft); color: var(--accent-dark); }
.action-icon svg { width: 18px; height: 18px; }
.actions strong, .actions small { display: block; }
.actions strong { font-size: .8rem; }
.actions small { margin-top: 4px; overflow: hidden; color: var(--muted); font-size: .62rem; font-weight: 500; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }

.share-button { justify-content: center; gap: 10px; border: 1px solid var(--line); background: var(--surface); color: #052b49; }
.share-button:hover { border-color: #8adbe4; background: var(--surface-soft); }
.primary-button:active, .share-button:active, .actions a:active { transform: scale(.985); }
.primary-button:focus-visible, .share-button:focus-visible, .actions a:focus-visible, .brand-mark:focus-visible { outline: 3px solid rgba(8, 182, 213, .25); outline-offset: 3px; }

.qr-section { margin-top: 22px; padding: 18px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface-soft); }
.qr-copy { min-width: 0; }
.qr-kicker { color: var(--accent-dark); font-size: .6rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.qr-label { margin: 8px 0 5px; font-size: 1rem; font-weight: 750; letter-spacing: -.02em; }
.qr-url { margin: 0; color: var(--muted); font-size: .71rem; }
.qr-frame { flex: 0 0 auto; padding: 6px; border: 1px solid #dce8ed; border-radius: 15px; background: #fff; box-shadow: 0 8px 20px rgba(5, 43, 73, .08); }
.qr-frame img { display: block; width: 96px; height: 96px; }
.status { min-height: 1em; margin: 11px 0 -5px; color: var(--accent-dark); font-size: .74rem; text-align: center; }

@keyframes identity-in { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }
@keyframes orbit-in { from { opacity: 0; transform: scale(.6) rotate(-35deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes orbit-turn { to { rotate: 360deg; } }
@keyframes signal-x { from { opacity: 0; transform: scaleX(.1); } to { opacity: 1; transform: scaleX(1); } }
@keyframes signal-y { from { opacity: 0; transform: scaleY(.1); } to { opacity: 1; transform: scaleY(1); } }
@keyframes particle-in { from { opacity: 0; transform: scale(0); } to { opacity: .8; transform: scale(1); } }
@keyframes logo-scan { from { transform: translateY(-20%); } to { transform: translateY(480%); } }
@keyframes intro-breathe { from { opacity: 0; transform: scale(.65); } to { opacity: 1; transform: scale(1); } }
@keyframes intro-exit { to { opacity: 0; visibility: hidden; } }
@keyframes card-enter { to { opacity: 1; transform: translateY(0); } }

@media (max-width: 365px) {
  .card { padding-inline: 20px; border-radius: 25px; }
  .identity { gap: 14px; }
  .brand-mark { width: 69px; height: 69px; border-radius: 20px; }
  .actions { grid-template-columns: 1fr; }
  .actions a { min-height: 64px; }
  .qr-section { padding: 14px; }
  .qr-frame img { width: 84px; height: 84px; }
}

@media (min-width: 700px) {
  .page-shell { padding-block: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 1ms !important; animation-delay: 0ms !important; transition: none !important; }
  .intro { display: none; }
  .page-shell { opacity: 1; transform: none; }
}
