/* The printable A5 poster, with tear-off tabs.
   Sizes are in cqi so the screen preview and the printed page share one layout. */

.flyer-page {
  display: grid;
  gap: 32px;
  padding-block: clamp(28px, 5vw, 64px) clamp(48px, 7vw, 96px);
}

.flyer-tools {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-soft);
}

.flyer-tools h1 {
  font-size: clamp(1.7rem, 5.4vw, 2.3rem);
}

.flyer-tools > p {
  color: var(--ink-2);
}

.flyer-tools .btn {
  justify-self: start;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-weight: 700;
}

.field label span {
  display: block;
  color: var(--ink-2);
  font-size: 0.9375rem;
  font-weight: 500;
}

.field input {
  width: 100%;
  min-height: 50px;
  padding: 10px 16px;
  border: 1.5px solid #858177;
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}

.field input:focus-visible {
  border-color: var(--ink);
}

.field input::placeholder {
  color: #77746c;
}

.flyer-url {
  font-size: 0.9875rem;
}

.flyer-url code {
  font-family: var(--font);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.flyer-warning {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--yellow);
  font-size: 0.9875rem;
  font-weight: 600;
}

.flyer {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  width: min(100%, 560px);
  aspect-ratio: 148 / 210;
  min-height: 0;
  justify-self: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink);
  box-shadow: var(--shadow-card);
}

.flyer__sheet {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2.4cqi;
  padding: 5.6cqi 7cqi 3cqi;
}

.flyer .i {
  width: 3.6cqi;
  height: 3.6cqi;
}

.flyer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2cqi;
  padding-bottom: 2.6cqi;
  border-bottom: 0.25cqi solid var(--line);
  color: var(--ink-2);
  font-size: 2.6cqi;
}

.flyer__brand {
  display: inline-flex;
  align-items: center;
  gap: 1.4cqi;
  color: var(--ink);
  font-size: 4.6cqi;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.flyer__brand svg {
  width: 5.2cqi;
  height: 5.2cqi;
  fill: var(--yellow);
}

.flyer__title {
  margin-top: 0.6cqi;
  font-size: 8.2cqi;
  font-weight: 760;
  line-height: 1.02;
  letter-spacing: -0.032em;
}

.flyer__sub {
  margin-top: -1.2cqi;
  color: var(--ink-2);
  font-size: 3.6cqi;
  line-height: 1.35;
}

.flyer__sub strong {
  color: var(--ink);
}

.flyer__list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5cqi 3cqi;
  font-size: 2.9cqi;
  font-weight: 650;
  line-height: 1.2;
}

.flyer__list li {
  display: flex;
  align-items: center;
  gap: 2cqi;
}

.mini {
  flex: none;
  display: grid;
  place-items: center;
  width: 7cqi;
  height: 7cqi;
}

.mini svg.shape {
  grid-area: 1 / 1;
  width: 7cqi;
  height: 7cqi;
}

.mini .i {
  grid-area: 1 / 1;
}

.mini .i--light {
  color: #fff;
}

.flyer__join {
  display: grid;
  grid-template-columns: 24cqi minmax(0, 1fr);
  gap: 4cqi;
  align-items: center;
  margin-top: auto;
  padding: 3cqi;
  border-radius: 3cqi;
  background: var(--bg-soft);
}

.flyer__qr {
  aspect-ratio: 1;
  background: #fff;
}

.flyer__scan {
  font-size: 4.3cqi;
  font-weight: 760;
  line-height: 1.12;
  letter-spacing: -0.015em;
}

.flyer__short {
  margin-top: 1.4cqi;
  font-size: 3.4cqi;
  font-weight: 720;
  overflow-wrap: break-word;
}

.flyer__assure {
  margin-top: 1.2cqi;
  color: var(--ink-2);
  font-size: 2.8cqi;
}

.flyer__fallback {
  color: var(--ink-2);
  font-size: 2.8cqi;
  text-align: center;
}

.flyer__tabs {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  height: 23cqi;
  flex: none;
  border-top: 0.4cqi dashed var(--ink-2);
  /* Sized here, not on the rotated tabs: vertical text resolves cqi against the wrong axis. */
  font-size: 2cqi;
}

.flyer__tabs li {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15em;
  padding: 0.8em 0;
  overflow: hidden;
  border-left: 0.15em dashed var(--ink-2);
  writing-mode: vertical-rl;
  rotate: 180deg;
  line-height: 1.2;
  text-align: center;
}

.flyer__tabs li:last-child {
  border-left: 0;
}

.flyer__tabs strong {
  font-weight: 800;
}

.flyer__tabs strong,
.flyer__tabs span:last-child {
  white-space: nowrap;
}

@media (min-width: 1000px) {
  .flyer-page {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: start;
    gap: 56px;
  }

  .flyer-tools {
    padding: 32px;
  }
}

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

@media print {
  .site-header,
  .flyer-tools {
    display: none !important;
  }

  .flyer-page {
    display: block;
    max-width: none;
    padding: 0;
  }

  .flyer {
    width: 148mm;
    height: 210mm;
    aspect-ratio: auto;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
