:root {
  --ink: #0b1c2c;
  --ink-soft: #243447;
  --paper: #f3efe6;
  --paper-2: #e7e0d2;
  --accent: #c45c26;
  --accent-deep: #9a3f12;
  --line: rgba(11, 28, 44, 0.12);
  --ok: #1f6b4a;
  --warn: #8a5a12;
  --shadow: 0 24px 60px rgba(11, 28, 44, 0.18);
  --radius: 22px;
  --font: "Manrope", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #d8e3ef 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #f0d7c4 0%, transparent 50%),
    linear-gradient(165deg, #f7f4ee 0%, #e9e2d4 45%, #dfe8ef 100%);
}

body {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px 40px;
  position: relative;
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
  animation: drift 12s ease-in-out infinite alternate;
}
.bg-orb-a { background: #9eb6c9; top: 8%; left: -80px; }
.bg-orb-b { background: #e0b089; bottom: 5%; right: -60px; animation-delay: -4s; }

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(18px, -24px, 0) scale(1.08); }
}

.shell {
  width: min(440px, 100%);
  position: relative;
  z-index: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  animation: rise 0.7s ease both;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  color: #fff;
  background: linear-gradient(145deg, var(--ink) 0%, #1d3a55 100%);
  box-shadow: 0 10px 24px rgba(11, 28, 44, 0.28);
}

.brand-name {
  margin: 0;
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-tag {
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.panel {
  background: color-mix(in srgb, var(--paper) 88%, white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 22px 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  animation: rise 0.75s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

h1 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: clamp(1.7rem, 5vw, 2.05rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.lead {
  margin: 0 0 22px;
  color: var(--ink-soft);
  line-height: 1.55;
  font-size: 0.98rem;
}

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-deep);
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 14px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  box-shadow: 0 12px 28px rgba(154, 63, 18, 0.28);
}

.btn-primary:hover { filter: brightness(1.05); }

.btn-secondary {
  margin-top: 8px;
  background: var(--ink);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  margin-top: 8px;
}

.btn-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.85);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,0.25);
}

.status {
  min-height: 1.4em;
  margin-top: 14px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.status.is-error { color: #8b1e1e; }
.status.is-ok { color: var(--ok); }

.callout {
  margin-top: 18px;
  padding: 14px 14px 12px;
  border-radius: 14px;
  background: #fff7ea;
  border: 1px solid #efd7ae;
  color: var(--warn);
  font-size: 0.9rem;
  line-height: 1.45;
}

.callout strong { display: block; margin-bottom: 6px; color: var(--ink); }
.callout p { margin: 0 0 8px; }
.callout p:last-child { margin-bottom: 0; }

.demo {
  margin-top: 16px;
  border-radius: 14px;
  border: 1px dashed var(--line);
  padding: 10px 12px;
  background: rgba(255,255,255,0.45);
}

.demo summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink-soft);
}

.demo-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.demo-form label {
  display: grid;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 600;
}

.demo-form input {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 12px;
  font: inherit;
  background: #fff;
}

.scan {
  text-align: center;
  min-height: 320px;
  display: grid;
  align-content: center;
  justify-items: center;
}

.pulse {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  margin-bottom: 18px;
  background: radial-gradient(circle at 40% 35%, #f6d3b5, var(--accent));
  box-shadow: 0 0 0 0 rgba(196, 92, 38, 0.45);
  animation: pulse 1.6s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(196, 92, 38, 0.45); }
  70% { box-shadow: 0 0 0 28px rgba(196, 92, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(196, 92, 38, 0); }
}

.id-card {
  margin: 18px 0 8px;
  padding: 16px;
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.75), rgba(243,239,230,0.9)),
    repeating-linear-gradient(-18deg, transparent, transparent 10px, rgba(11,28,44,0.03) 10px, rgba(11,28,44,0.03) 11px);
  border: 1px solid var(--line);
}

.id-card > div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.id-card > div:last-child { border-bottom: 0; }

.id-card dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.id-card dd {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

#fld-tckn {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.meta {
  margin: 0 0 14px;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

[hidden] { display: none !important; }
