@page { size: A5; margin: 0; }

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--paper-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  padding: 32px 16px 48px;
  font-family: var(--font-display);
}

/* ── Toolbar (hidden when printing) ─────────────────── */
.toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  align-items: center;
}
.toolbar button {
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--r-2);
  border: none;
  cursor: pointer;
  transition: opacity var(--dur-fast) var(--ease-standard);
}
.btn-print {
  background: var(--brand-gradient);
  color: var(--paper-0);
}
.btn-photo {
  background: var(--paper-0);
  color: var(--ink-1);
  border: 1.5px solid var(--paper-3);
}
.toolbar button:hover { opacity: .85; }
.toolbar-note {
  font-size: var(--fs-micro);
  color: var(--ink-3);
}

/* ── Flyer card ──────────────────────────────────────── */
.flyer {
  width: 148mm;
  height: 210mm;
  background: var(--paper-0);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 9mm 10mm 8mm;
  box-shadow: var(--shadow-3-light);
}

/* Gradient top bar */
.flyer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--brand-gradient);
}

/* Subtle brand accent bottom-right corner */
.corner-accent {
  position: absolute;
  bottom: -40px; right: -40px;
  width: 120px; height: 120px;
  border-radius: var(--r-pill);
  background: var(--brand-gradient);
  opacity: .06;
  pointer-events: none;
}

/* ── Logo ────────────────────────────────────────────── */
.logo-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 7mm;
}
.logo-row svg { display: block; }

/* ── Intro: photo + headline ─────────────────────────── */
.intro {
  display: flex;
  align-items: center;
  gap: 5.5mm;
  margin-bottom: 7mm;
}

.photo-wrap {
  position: relative;
  width: 26mm;
  height: 26mm;
  flex-shrink: 0;
  cursor: pointer;
}
.photo-wrap img {
  width: 26mm;
  height: 26mm;
  border-radius: var(--r-pill);
  object-fit: cover;
  object-position: center top;
  display: block;
}
.photo-placeholder {
  width: 26mm;
  height: 26mm;
  border-radius: var(--r-pill);
  background: var(--brand-gradient-soft);
  border: 2px dashed var(--brand-violet-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.photo-placeholder svg { opacity: .5; }
.photo-placeholder span {
  font-size: 7px;
  color: var(--brand-violet);
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  opacity: .8;
}

.headline {
  font-size: 26pt;
  font-weight: 800;
  color: var(--ink-1);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
}
.headline .name {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Body text ───────────────────────────────────────── */
.body-text {
  font-size: 10.5pt;
  line-height: var(--lh-loose);
  color: var(--ink-2);
  flex-grow: 1;
}
.body-text p + p { margin-top: 4mm; }

/* ── CTA ─────────────────────────────────────────────── */
.cta {
  margin-top: 6mm;
  margin-bottom: 6mm;
  font-size: 14pt;
  font-weight: 800;
  color: var(--ink-1);
  letter-spacing: var(--tracking-snug);
}

/* ── Contact section ─────────────────────────────────── */
.contact-section {
  display: flex;
  align-items: center;
  gap: 6mm;
  padding-top: 5mm;
  border-top: 1.5px solid var(--paper-2);
}

#qrcode {
  width: 22mm;
  height: 22mm;
  flex-shrink: 0;
}
#qrcode img, #qrcode canvas {
  width: 22mm !important;
  height: 22mm !important;
}

.contact-details { display: flex; flex-direction: column; gap: 3mm; }

.contact-item { display: flex; flex-direction: column; gap: 0.5mm; }
.contact-label {
  font-size: 6.5pt;
  font-weight: 700;
  color: var(--ink-4);
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow);
}
.contact-value {
  font-size: 9.5pt;
  font-weight: 600;
  color: var(--ink-1);
}

/* ── Print styles ────────────────────────────────────── */
@media print {
  body {
    background: none;
    padding: 0;
    margin: 0;
    display: block;
  }
  .toolbar { display: none !important; }
  .flyer {
    box-shadow: none;
    width: 148mm;
    height: 210mm;
    margin: 0;
    page-break-after: avoid;
  }
  .photo-placeholder span { display: none; }
}
