/*
 * /qr digital business card (QrLayout). Everything is scoped under .qr-page
 * or .qr-overlay: RouteStylesheets keeps sheets for the whole session.
 * Budget rules: no filter: blur(), no backdrop-filter, motion only on hover.
 */

.qr-page {
  --qr-ink: #15231d;
  --qr-paper: #fffef9;
  --qr-ground: #edf2e9;
  --qr-lime: #cdea81;
  --qr-cta: #e1493f;
  --qr-green: #4cae50;
  --qr-green-text: #2f7d33;
  --qr-muted: #4d5a53;
  --qr-line: #d5ddd4;

  min-height: 100vh;
  min-height: 100dvh;
  padding: 16px 16px 32px;
  background: var(--qr-ground);
  color: var(--qr-ink);
}

html[data-cookie-consent='visible'] .qr-page {
  padding-bottom: calc(var(--cookie-consent-height, 0px) + 1rem);
}

.qr-card {
  display: grid;
  gap: 1.75rem;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 1.5rem;
  border: 1px solid var(--qr-line);
  border-radius: 24px;
  background: var(--qr-paper);
  box-shadow: 0 18px 40px -28px rgba(21, 35, 29, 0.45);
}

@media (min-width: 520px) {
  .qr-page {
    padding-top: 40px;
  }

  .qr-card {
    padding: 2.25rem 2rem 2rem;
  }
}

/* ---- Profile ---- */

.qr-profile {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  text-align: center;
}

.qr-profile__avatar {
  position: relative;
  display: block;
  width: 112px;
  height: 112px;
  margin-bottom: 0.5rem;
  overflow: hidden;
  border: 3px solid var(--qr-lime);
  border-radius: 50%;
  background: #1b1b1b;
}

/* 832x1248 source drawn 190 px wide: the face (x≈445, y≈440 in the source)
   lands in the middle of the 106 px inner circle. */
.qr-profile__photo {
  position: absolute;
  top: -42px;
  left: -48px;
  width: 190px;
  max-width: none;
  height: auto;
}

.qr-profile__name {
  margin: 0;
  color: var(--qr-ink);
  font-size: clamp(1.6rem, 7vw, 2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.qr-profile__title {
  margin: 0;
  color: var(--qr-green-text);
  font-size: 0.95rem;
  font-weight: 700;
}

.qr-profile__lead {
  max-width: 34ch;
  margin: 0.35rem 0 0;
  color: var(--qr-muted);
  font-size: 1rem;
  line-height: 1.5;
}

.qr-profile__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  width: 100%;
  margin-top: 1rem;
}

.qr-profile__contacts {
  display: flex;
  gap: 0.75rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.qr-profile__contacts a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--qr-line);
  border-radius: 50%;
  color: var(--qr-ink);
  background: var(--qr-ground);
  transition: border-color 0.15s ease;
}

.qr-profile__contacts a:hover {
  border-color: var(--qr-ink);
}

.qr-profile__contacts svg {
  width: 20px;
  height: 20px;
}

/* ---- Buttons ---- */

.qr-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 52px;
  padding: 0.75rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.qr-button svg {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

.qr-button--primary {
  background: var(--qr-cta);
  color: #fff;
}

.qr-button--primary:hover {
  background: #c93c33;
}

.qr-button--ghost {
  border-color: var(--qr-ink);
  background: transparent;
  color: var(--qr-ink);
}

.qr-button--ghost:hover {
  background: var(--qr-ground);
}

.qr-button--dark {
  background: var(--qr-ink);
  color: #fff;
}

.qr-button--dark:hover {
  background: #0b140f;
}

.qr-page a:focus-visible,
.qr-page button:focus-visible,
.qr-overlay button:focus-visible {
  outline: 3px solid var(--qr-green, #4cae50);
  outline-offset: 3px;
}

/* ---- Sections ---- */

.qr-section {
  display: grid;
  gap: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--qr-line);
}

.qr-section__title {
  margin: 0;
  color: var(--qr-ink);
  font-size: 1.2rem;
  font-weight: 800;
}

.qr-eyebrow {
  margin: 0;
  color: var(--qr-green-text);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.qr-workshop {
  padding: 1.25rem;
  border: 0;
  border-radius: 18px;
  background: var(--qr-lime);
}

.qr-workshop__title {
  margin: 0;
  color: var(--qr-ink);
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.25;
}

.qr-workshop__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  margin: 0;
  font-weight: 600;
}

.qr-workshop__price {
  font-weight: 800;
}

.qr-workshop__price s {
  margin-left: 0.4rem;
  color: var(--qr-muted);
  font-weight: 500;
}

.qr-tools {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.qr-tools__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 56px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--qr-line);
  border-radius: 14px;
  color: var(--qr-ink);
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.qr-tools__link:hover {
  border-color: var(--qr-ink);
}

.qr-tools__link strong,
.qr-tools__link span span {
  display: block;
}

.qr-tools__link span span {
  color: var(--qr-muted);
  font-size: 0.875rem;
}

.qr-tools__link svg {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  color: var(--qr-muted);
}

.qr-proof__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  margin: 0;
  font-weight: 700;
}

.qr-proof__logos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  align-items: center;
  margin: 0.25rem 0 0;
  padding: 0;
  list-style: none;
}

.qr-proof__logos img {
  display: block;
  width: 100%;
  max-width: 88px;
  height: 28px;
  margin: 0 auto;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.8;
}

.qr-share {
  width: 100%;
}

.qr-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  padding-top: 0.5rem;
  font-size: 0.95rem;
}

.qr-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--qr-green-text);
  font-weight: 700;
  text-underline-offset: 3px;
}

/* ---- Full-screen QR ---- */

.qr-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 24px;
  background: #fff;
  color: #15231d;
}

.qr-overlay__code {
  width: min(80vw, 360px);
  height: auto;
}

.qr-overlay__caption {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
}

.qr-overlay .qr-button {
  min-width: 180px;
}

@media (prefers-reduced-motion: reduce) {
  .qr-page *,
  .qr-overlay * {
    transition: none !important;
  }
}
