@import url('camila-instagram-meeting-v3.css');

/* Version 4: every .a4-page is a physical A4 sheet, on screen and when printed. */
:root {
  --a4-width: 210mm;
  --a4-height: 297mm;
}

html,
body {
  background: #677078;
}

.a4-document {
  width: var(--a4-width);
  margin: 0 auto;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.a4-page {
  position: relative;
  display: flex;
  flex-direction: column;
  width: var(--a4-width);
  height: var(--a4-height);
  margin: 0 0 8mm;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 2mm 5mm rgba(12, 25, 20, .28);
  break-after: page;
  page-break-after: always;
}

.a4-page:last-child {
  margin-bottom: 0;
  break-after: auto;
  page-break-after: auto;
}

.a4-page > .section,
.a4-page > .hero {
  width: 100%;
  min-height: 0 !important;
  margin: 0;
  border: 0;
}

.a4-page > .section {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 14mm 16mm 12mm;
}

.page-cover .hero {
  position: relative;
  flex: none;
  height: 100%;
  padding: 25mm 18mm;
  color: var(--ink);
  isolation: isolate;
  background: #d79c58;
}

.page-cover .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url('cover-background.jpg') center / cover no-repeat;
  opacity: .9;
}

.page-cover .hero::after {
  content: none !important;
  display: none !important;
}

.page-cover .hero > * {
  position: relative;
  z-index: 2;
}

.page-cover .hero .eyebrow {
  color: var(--clay);
}

.page-cover .hero .intro {
  color: var(--muted);
}

.page-cover .hero-meta span {
  border-color: rgba(23, 43, 36, .35);
  color: var(--ink);
}

.page-cover .hero h1 {
  max-width: 170mm;
  font-size: 18mm;
  line-height: .98;
}

.page-cover .hero .intro {
  max-width: 150mm;
  margin-top: 6mm;
  font-size: 5mm;
}

.page-cover .hero-profile {
  right: auto;
  top: auto;
  bottom: calc(38mm - 180px);
  left: 20mm;
  width: 65mm;
  min-width: 0;
  transform: translate(-30px, 30px) rotate(2deg);
}

.cover-footer,
.section-footer,
.page-final > footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 6mm;
  font: 400 3.25mm/1.35 "DM Sans", Arial, sans-serif;
  letter-spacing: 0;
}

.cover-footer {
  right: 18mm;
  bottom: 6mm;
  left: 18mm;
  color: var(--ink);
  border-top: 1px solid rgba(23, 43, 36, .25);
}

.page-cover .cover-footer {
  display: grid;
  position: absolute;
  right: 18mm;
  bottom: 6mm;
  left: 18mm;
}

.cover-footer .footer-handle,
.cover-footer .footer-handle:visited {
  color: #000;
}

.page-final > footer {
  border-top: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 7mm;
}

.section-heading h2,
.profile-section .section-heading h2,
.impression-section .section-heading h2 {
  max-width: none;
  font-size: 10mm;
}

.profile-grid,
.two-columns,
.profile-actions {
  gap: 5mm;
}

.profile-grid .card,
.two-columns .card,
.font-card {
  padding: 4.5mm;
}

.profile-name {
  font-size: 6.4mm;
}

.profile-grid .handle {
  font-size: calc(1.08rem + 2px);
  letter-spacing: -.03em;
}

.profile-grid .handle-list {
  font-family: "DM Sans", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
}

.bio-block {
  gap: 7mm;
  margin-top: 5mm;
  padding: 6mm;
}

.bio-copy {
  font-size: 1.06rem;
}

.profile-actions {
  align-items: stretch;
}

.callout-stack {
  gap: 5mm;
}

.callout {
  display: grid;
  grid-template-columns: 11mm 1fr;
  column-gap: 2mm;
  align-content: center;
  padding: 5mm 6mm;
}

.callout > span {
  grid-column: 1;
  grid-row: 1;
}

.callout h3 {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  min-height: 31px;
  margin: 0;
  position: relative;
  top: calc(-6mm + 21px);
}

.callout p {
  grid-column: 1 / -1;
  grid-row: 2;
  margin-top: .3mm;
}

.font-card {
  aspect-ratio: auto;
  min-height: 100%;
  padding: 3.5mm;
}

.font-card-reference {
  height: 25mm;
}

.font-suggestions {
  margin-top: auto;
  padding-top: 4mm;
}

.font-suggestions strong {
  font-size: 1.08em;
}

.font-card > p:not(.card-kicker) {
  font-size: .86em;
  line-height: 1.48;
}

.font-suggestions li {
  font-size: .70em;
}

.font-suggestions ul {
  grid-template-columns: 1fr 1fr;
  gap: 3mm;
}

.font-suggestions li {
  padding-bottom: 0;
  border-bottom: 0;
}

.font-suggestions li:first-child {
  padding-right: 3mm;
  border-right: 1px solid rgba(23, 43, 36, .12);
}

.two-columns .accent > .card-kicker {
  font-size: .74rem;
  line-height: normal;
}

.page-lead .section-heading {
  margin-bottom: 6mm;
}

.page-lead .split {
  display: block;
}

.page-lead .split > div,
.page-lead .side-copy {
  max-width: none;
}

.page-lead .side-copy {
  margin: 4mm 0 0;
}

.page-lead .journey {
  padding: 5mm 4mm;
}

.page-lead .two-columns {
  margin-top: 5mm;
}

.page-lead .two-columns .card {
  min-height: 0;
}

.lead-aim {
  margin-top: 4mm;
  padding: 4mm;
}

.page-impression .principle {
  min-height: 46mm !important;
  padding: 6mm !important;
}

.page-impression .questions {
  margin-top: 6mm;
  padding: 6mm 7mm;
}

.page-impression .questions ol {
  gap: 4mm;
  margin-top: 5mm;
}

.page-pillars .section-heading {
  margin-bottom: 5mm;
}

.page-pillars > .section {
  padding-top: 12mm;
  padding-bottom: 10mm;
}

.page-pillars .pillars > div > * {
  padding: 3.3mm;
  font-size: 3.3mm;
}

.page-pillars .content-ideas {
  margin-top: 5mm;
  padding: 5mm;
}

.content-ideas-heading {
  margin-bottom: 4mm;
}

.content-ideas h3 {
  font-family: "DM Sans", Arial, sans-serif !important;
  font-size: 3.4mm;
  white-space: nowrap;
}

.content-ideas h3::before {
  font-family: "DM Sans", Arial, sans-serif !important;
  font-style: normal;
}

.page-pillars .content-ideas ol {
  gap: 3mm 4mm;
}

.page-pillars .content-ideas li {
  grid-template-columns: 6mm 1fr;
  padding: 3mm;
  font-size: calc(3.1mm + 2px);
}

.section-footer {
  margin-top: auto;
  padding-top: 4mm;
}

.section-footer span:last-child,
.page-final > footer span:last-child {
  text-align: right;
}

.section-footer .footer-handle,
.section-footer .footer-handle:visited,
.page-final > footer .footer-handle,
.page-final > footer .footer-handle:visited {
  color: #000;
  text-decoration: none;
}

.a4-page .footer-handle:hover {
  text-decoration: none;
}

.page-final .final-section {
  padding: 16mm;
  background: #f5f0e7;
  color: var(--ink);
}

.page-final {
  background: #f5f0e7;
}

.page-final .final-section .section-label {
  color: var(--clay);
}

.page-final .format-grid .card {
  min-height: 0;
  padding: 6mm;
}

.page-final .format-grid h3 {
  font-size: 5.8mm;
}

.page-final .format-grid p:last-child {
  font-size: .89em;
}

.page-final blockquote {
  margin-top: 9mm;
  font-size: 6.3mm;
  color: var(--forest);
}

.page-final > footer {
  margin: auto 16mm 12mm;
  min-height: 0;
  padding: 4mm 0 0;
  background: transparent;
}

@media print {
  @page {
    size: A4;
    margin: 0;
  }

  html,
  body {
    width: var(--a4-width);
    background: #fff;
  }

  .a4-document {
    width: var(--a4-width);
    margin: 0;
  }

  .a4-page {
    width: var(--a4-width);
    height: var(--a4-height);
    margin: 0;
    box-shadow: none;
    break-after: page !important;
    page-break-after: always !important;
  }

  .a4-page:last-child {
    break-after: auto !important;
    page-break-after: auto !important;
  }

  .a4-page > .section,
  .a4-page > .hero {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .a4-page .footer-handle {
    display: block !important;
    opacity: .48 !important;
  }

  /* Avoid browser PDF rasterisation artifacts behind the rotated profile card. */
  .page-cover .hero-profile {
    background: #fffdfa !important;
    box-shadow: none !important;
    filter: drop-shadow(0 4mm 6mm rgba(8, 30, 23, .24));
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

@media screen and (max-width: 210mm) {
  .a4-document,
  .a4-page {
    width: 100%;
  }

  .a4-page {
    height: auto;
    min-height: 100vh;
    margin-bottom: 4vw;
  }

  .a4-page > .section,
  .page-cover .hero {
    padding: 14vw 7vw;
  }

  .page-cover .hero h1,
  .section-heading h2 {
    font-size: clamp(2.7rem, 12vw, 5.5rem);
  }
}

/* Keep the A4 canvas fixed in the browser as well; smaller windows scroll instead of reflowing pages. */
@media screen and (max-width: 210mm) {
  .a4-document,
  .a4-page {
    width: var(--a4-width);
  }

  .a4-page {
    height: var(--a4-height);
    min-height: 0;
  }

  .a4-page > .section {
    padding: 14mm 16mm 12mm;
  }

  .page-cover .hero {
    padding: 25mm 18mm;
  }

  .page-cover .hero h1 {
    font-size: 18mm;
  }

  .page-cover .hero-profile {
    position: absolute;
    top: auto;
    bottom: calc(38mm - 180px);
    left: 20mm;
    width: 65mm;
    margin: 0;
  }
}
