:root {
  --bg-1: #f4e8f0;
  --bg-2: #dfcedf;
  --card-1: #f8eff5;
  --card-2: #eadbea;
  --surface: #fbf7f1;
  --text: #342e39;
  --muted: #766b79;
  --border: rgba(94, 75, 105, 0.12);
  --font-brand: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-ui: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--bg-1);
}

body {
  min-height: 100svh;
  margin: 0;
  color: var(--text);
  font-family: var(--font-ui);
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.72) 0, rgba(255,255,255,.22) 34%, transparent 58%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
}

.card-stage {
  min-height: 100svh;
  padding: 18px;
  display: grid;
  place-items: center;
}

.exhibition-card {
  width: min(94vw, calc((100svh - 36px) * 148 / 210), 620px);
  aspect-ratio: 148 / 210;
  padding: clamp(24px, 4.6vw, 42px) clamp(22px, 4vw, 38px) clamp(22px, 4vw, 34px);
  display: flex;
  flex-direction: column;
  align-items: center;
  background:
    radial-gradient(circle at 50% 5%, rgba(255,255,255,.75) 0%, transparent 36%),
    linear-gradient(180deg, var(--card-1) 0%, var(--card-2) 100%);
  border: 1px solid rgba(94, 75, 105, 0.08);
  border-radius: 10px;
  box-shadow: 0 18px 52px rgba(65, 46, 71, 0.17);
  overflow: hidden;
}

.card-brand {
  width: 100%;
  text-align: center;
}

.card-brand__logo-wrap {
  width: 78%;
  margin: 0 auto clamp(8px, 1.4vw, 13px);
  overflow: hidden;
  border: 1px solid rgba(98, 78, 108, 0.10);
  border-radius: clamp(15px, 2.2vw, 22px);
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(73, 52, 78, 0.07);
}

.card-brand__logo {
  width: 100%;
  aspect-ratio: 995 / 695;
  object-fit: cover;
  object-position: center;
}

.card-brand__name {
  margin: 0;
  font-family: var(--font-brand);
  font-size: clamp(2.7rem, 7vw, 4.4rem);
  font-weight: 600;
  line-height: .96;
  letter-spacing: -.035em;
}

.card-brand__subtitle {
  margin: clamp(6px, 1vw, 10px) 0 0;
  color: var(--muted);
  font-size: clamp(.9rem, 1.65vw, 1.08rem);
  font-weight: 500;
  line-height: 1.3;
}

.card-qr {
  width: clamp(190px, 42%, 268px);
  margin: auto auto clamp(20px, 3vw, 30px);
}

.card-qr img {
  width: 100%;
  height: auto;
  background: #fff;
}

.card-socials {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 2vw, 22px);
  align-items: start;
}

.card-social {
  min-width: 0;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 4px;
}

.card-social img {
  width: clamp(42px, 7.5vw, 58px);
  height: clamp(42px, 7.5vw, 58px);
}

.card-social strong {
  margin-top: 3px;
  font-size: clamp(.82rem, 1.55vw, 1rem);
  font-weight: 600;
  line-height: 1.15;
}

.card-social span {
  max-width: 100%;
  color: var(--muted);
  font-size: clamp(.62rem, 1.12vw, .76rem);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

@media (max-width: 520px) {
  .card-stage {
    padding: 0;
  }

  .exhibition-card {
    width: 100%;
    min-height: 100svh;
    aspect-ratio: auto;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: max(24px, env(safe-area-inset-top)) 22px max(24px, env(safe-area-inset-bottom));
  }

  .card-brand__logo-wrap {
    width: min(78%, 330px);
  }

  .card-qr {
    width: min(58vw, 235px);
    margin: 28px auto;
  }
}

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

@media print {
  html,
  body {
    width: 148mm;
    height: 210mm;
    background: none;
  }

  .card-stage {
    width: 148mm;
    height: 210mm;
    min-height: 0;
    padding: 0;
    display: block;
  }

  .exhibition-card {
    width: 148mm;
    height: 210mm;
    aspect-ratio: auto;
    padding: 12mm 11mm 10mm;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .card-brand__logo-wrap {
    width: 78%;
    border-radius: 5mm;
  }

  .card-brand__name {
    font-size: 17mm;
  }

  .card-brand__subtitle {
    font-size: 4.4mm;
  }

  .card-qr {
    width: 48mm;
    margin-bottom: 7mm;
  }

  .card-social img {
    width: 14mm;
    height: 14mm;
  }

  .card-social strong {
    font-size: 4mm;
  }

  .card-social span {
    font-size: 2.8mm;
  }
}
