/* ---------------------------------------------------------------
   Front-page scanner
   --------------------------------------------------------------- */

.hero {
  padding: 34px 0 6px;
  text-align: center;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 6vw, 3.1rem);
  letter-spacing: -0.02em;
}
.nowrap { white-space: nowrap; }
.hero__sub {
  margin: 0 auto 22px;
  max-width: 34em;
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: var(--ink-2);
}
.hero__trust {
  margin: 14px 0 0;
  font-size: 0.87rem;
  color: var(--ink-3);
}
.dropzone__micro {
  margin: 12px 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--amber-dark);
  letter-spacing: 0.01em;
}

/* ---------- scanner shell ---------- */

.scanner {
  max-width: 560px;
  margin: 0 auto;
}
.scanner__panel { display: none; }
.scanner__panel.is-active { display: block; }

/* ---------- upload ---------- */

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 26px 22px 22px;
  background: #fff;
  border: 2px dashed var(--line);
  border-radius: 20px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  text-align: center;
}
.dropzone:hover,
.dropzone.is-dragover {
  border-color: var(--amber);
  background: #fffdf8;
}
.dropzone:hover .dropzone__btn { background: var(--amber-dark); }
.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.dropzone__icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--amber-soft);
  color: var(--amber-dark);
}
.dropzone__icon svg { width: 23px; height: 23px; }
.dropzone__title {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
}
/* A span, not a button: the whole card is one label wired to the file input, and
   a nested button would fight it for the click. */
.dropzone__btn {
  margin-top: 2px;
  padding: 12px 30px;
  pointer-events: none;
}
.dropzone__dnd {
  font-size: 0.86rem;
  color: var(--ink-3);
}
.dropzone__hint {
  font-size: 0.86rem;
  color: var(--ink-3);
  margin: 4px 0 0;
  max-width: 30em;
}

/* ---------- scanning ---------- */

.scanning {
  background: var(--espresso);
  border-radius: 20px;
  padding: 22px;
  text-align: center;
}
.scanning__frame {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 4 / 3;
  background: #000;
}
.scanning__frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.75;
}
.scanning__line {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #F0C46B, transparent);
  box-shadow: 0 0 18px 4px rgba(240, 196, 107, 0.55);
  animation: awc-sweep 1.6s ease-in-out infinite;
}
@keyframes awc-sweep {
  0%   { top: 4%;  opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { top: 96%; opacity: 0; }
}
.scanning__frame::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(240,196,107,0.14), transparent 65%);
  pointer-events: none;
}
.scanning__status {
  margin: 18px 0 0;
  color: #F0E3CB;
  font-size: 0.98rem;
  min-height: 1.5em;
}

/* ---------- result card ---------- */

.result {
  background: var(--espresso);
  color: #F5EDE0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 18px 40px -24px rgba(30, 23, 18, 0.6);
}
.result__top {
  display: flex;
  gap: 16px;
  padding: 22px;
  border-bottom: 1px solid rgba(240, 196, 107, 0.18);
}
.result__thumb {
  flex: 0 0 84px;
  width: 84px; height: 84px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(240, 196, 107, 0.3);
}
.result__ident { min-width: 0; }
.result__name {
  font-family: var(--serif);
  font-size: 1.22rem;
  line-height: 1.3;
  margin: 0 0 8px;
  color: #FFF8EC;
}
.result__pills {
  display: flex; flex-wrap: wrap; gap: 7px;
  list-style: none; margin: 0; padding: 0;
}
.result__pills li {
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(240, 196, 107, 0.13);
  color: #F0C46B;
  border: 1px solid rgba(240, 196, 107, 0.22);
}

.result__body { padding: 20px 22px 22px; }

.condition__row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 0.85rem;
  color: #C9B79C;
  margin-bottom: 7px;
}
.condition__bar {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}
.condition__fill {
  display: block; /* a bare span is inline — width/height would be ignored */
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #C08A2E, #F0C46B);
  width: 0;
  transition: width 0.8s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.result__story {
  margin: 18px 0 0;
  font-size: 0.97rem;
  line-height: 1.65;
  color: #DCCDB6;
}

/* locked value */
.locked {
  margin-top: 20px;
  padding: 20px;
  border-radius: 14px;
  background: rgba(240, 196, 107, 0.07);
  border: 1px solid rgba(240, 196, 107, 0.2);
  text-align: center;
}
.locked__label {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #C9B79C;
  margin: 0 0 8px;
}
.locked__value {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 6vw, 2.3rem);
  font-weight: 600;
  color: #F0C46B;
  letter-spacing: 0.01em;
  line-height: 1.2;
}
.locked__caveat {
  margin: 8px 0 0;
  font-size: 0.88rem;
  color: #A8967D;
}
.locked__headline {
  margin: 18px 0 0;
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.4;
  color: #F5EDE0;
}
.locked__cta { margin-top: 14px; }
.locked__cta .btn { width: 100%; }
.locked__micro {
  margin: 10px 0 0;
  font-size: 0.85rem;
  color: #C9B79C;
}

/* macOS desktop: the app is on their phone, so hand them a QR instead of a link. */
.qr {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
}
.qr__code {
  width: 132px; height: 132px;
  border-radius: 10px;
  background: #fff;
  padding: 8px;
}
.qr__label {
  margin: 0;
  font-size: 0.92rem;
  color: #DCCDB6;
  max-width: 22em;
}
.qr--light .qr__label { color: var(--ink-2); }
.qr--light .qr__code { border: 1px solid var(--line); }
.qr__fallback {
  margin: 2px 0 0;
  font-size: 0.87rem;
}
.qr__fallback a {
  color: #C9B79C;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.qr__fallback a:hover { color: #F0C46B; }
.qr--light .qr__fallback a { color: var(--ink-3); }
.qr--light .qr__fallback a:hover { color: var(--amber-dark); }
.locked__note {
  margin: 12px 0 0;
  font-size: 0.8rem;
  color: #A8967D;
}

.result__again {
  margin-top: 14px;
  text-align: center;
  font-size: 0.88rem;
}
.result__again button {
  background: none; border: 0; padding: 0;
  color: var(--ink-3);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* ---------- blocked / error ---------- */

.notice {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 30px 26px;
  text-align: center;
}
.notice__icon {
  width: 48px; height: 48px;
  margin: 0 auto 14px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--amber-soft);
  color: var(--amber-dark);
}
.notice__icon svg { width: 22px; height: 22px; }
.notice h2 {
  font-size: 1.25rem;
  margin: 0 0 8px;
}
.notice p {
  color: var(--ink-2);
  margin: 0 0 20px;
  font-size: 0.97rem;
}
.notice .btn { width: 100%; max-width: 340px; }

/* ---------- below-fold sections ---------- */

.steps {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(3, 1fr);
  margin: 46px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 30px; height: 30px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--amber-soft);
  color: var(--amber-dark);
  font-weight: 600;
  font-size: 0.9rem;
}
.steps h3 { margin: 0 0 4px; font-size: 1.02rem; }
.steps p { margin: 0; font-size: 0.92rem; color: var(--ink-2); }

.faq { margin-top: 60px; }
.faq h2 { text-align: center; margin-bottom: 22px; }
.faq dl { margin: 0; }
.faq dt {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.06rem;
  margin-top: 22px;
}
.faq dd {
  margin: 6px 0 0;
  color: var(--ink-2);
  font-size: 0.97rem;
}

.topics { margin-top: 56px; }
.topics h2 { text-align: center; margin-bottom: 20px; }
.topics ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  list-style: none; margin: 0; padding: 0;
}
.topics a {
  display: block;
  padding: 13px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.95rem;
}
.topics a:hover { border-color: var(--amber); color: var(--amber-dark); }

@media (max-width: 700px) {
  .steps { grid-template-columns: 1fr; gap: 18px; margin-top: 48px; }
  .hero { padding-top: 30px; }
  .result__top { flex-direction: column; align-items: flex-start; }
  .result__thumb { width: 72px; height: 72px; flex-basis: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .scanning__line { animation: none; top: 50%; }
  .condition__fill { transition: none; }
}
