/* =========================================================
   Project: Sunny Digital – Print and PDF layout
   Author: Sunny Assist (Giada)
   Role: Print typography, content flow and page layout

   A4 layout with project images, readable website addresses
   and contact details. Interactive controls are omitted.
   ========================================================= */

@page {
  size: A4;
  margin: 15mm;
}

/* Page typography */
html { color-scheme: light; }

body {
  margin: 0;
  background: #fff;
  color: #142f3d;
  font: 10.5pt/1.42 Georgia, "Times New Roman", serif;
}

h1, h2, h3, h4, dt {
  margin: 0;
  color: #193478;
  font-family: Arial, sans-serif;
  line-height: 1.2;
  break-after: avoid-page;
}

h1 { font-size: 23pt; }
h2 { font-size: 17pt; }
h3 { font-size: 12.5pt; }
h4 { font-size: 11pt; }

p, dd { margin: 0 0 2mm; }

p, li, dd {
  orphans: 3;
  widows: 3;
}

a {
  color: inherit;
  text-decoration: underline;
  overflow-wrap: anywhere;
}

img {
  max-width: 100%;
  height: auto;
}

/* Masthead, introduction and print-only representations of display lettering */
.masthead {
  margin-bottom: 5mm;
  padding-bottom: 3mm;
  border-bottom: 1px solid #a1afc7;
}

.masthead .brand {
  display: flex;
  align-items: center;
  gap: 3mm;
}

.masthead .brand > svg {
  display: block;
  flex: none;
  width: 14mm;
  height: 14mm;
}

.brand-name {
  color: #193478;
  font: 700 17pt/1.1 Arial, sans-serif;
}

.brand-name::before,
#headline::before { content: attr(aria-label); }

.brand-note { font-style: italic; }
.brand-note em { font-weight: 700; }
.hero .intro { margin-top: 2mm; }

/* Project previews */
.project-previews { margin-top: 5mm; }

.gallery-intro { margin: 2mm 0 3mm; }
.preview-category { margin: 4mm 0 2mm; }
.preview-category-intro { margin: 0 0 3mm; }

.preview-category svg {
  width: 1em;
  height: 1em;
  vertical-align: -.12em;
}

.preview-card {
  min-height: 20mm;
  padding: 2mm 0;
  border-top: 1px solid #d4dce9;
  break-inside: avoid-page;
}

.preview-card::after {
  display: block;
  clear: both;
  content: "";
}

.preview-photo-slot {
  float: left;
  width: 32mm;
  margin-right: 4mm;
}

.preview-photo img {
  display: block;
  width: 32mm;
  height: 18mm;
  object-fit: contain;
}

.preview-post-header {
  display: flex;
  align-items: center;
  gap: 2mm;
  margin: 0 0 1mm 36mm;
}

.preview-post-header img {
  width: 5mm;
  height: 5mm;
  object-fit: contain;
}

.preview-caption { margin: 0 0 1mm 36mm; }

.preview-domain-label {
  display: block;
  margin-left: 36mm;
  font: 9pt/1.3 Arial, sans-serif;
}

/* Studio credits and contact details */
.instagram-bar,
.behind-posts {
  margin-top: 4mm;
  padding-top: 2.5mm;
  border-top: 1px solid #d4dce9;
}

.instagram-profile > svg,
.behind-role-logo {
  width: 4mm;
  height: 4mm;
  margin-right: 1mm;
  vertical-align: middle;
}

.behind-intro { margin-top: 2mm; }
.behind-roles { margin: 0; }
.behind-roles > div { break-inside: avoid-page; }
.behind-roles dt { font-weight: 700; }

.sunny-footer {
  margin-top: 5mm;
  padding-top: 3mm;
  border-top: 1px solid #a1afc7;
  font-size: 8.5pt;
}

.sunny-footer-brand {
  display: block;
  margin-bottom: 2mm;
  font: 700 10pt/1.2 Arial, sans-serif;
}

.sunny-footer-symbol,
.sunny-footer-link-icon {
  width: 3.5mm;
  height: 3.5mm;
  vertical-align: middle;
}

.sunny-footer-links { margin-bottom: 2mm; }
.sunny-footer-links > a { display: block; }

.sunny-footer a[href="mailto:info@sunnydigital.co.uk"]::after {
  content: " · info@sunnydigital.co.uk";
}

.sunny-footer-checks { margin-top: 3mm; }
.sunny-footer-check { break-inside: avoid-page; }
.sunny-footer-check h2 { font-size: 9pt; }
.sunny-footer-check img { width: auto; height: 3.5mm; vertical-align: middle; }

/* Controls and graphics that have no role on paper */
.skip,
.brand-name > *,
#headline > *,
.project-nav,
.daylight-ribbon,
.ribbon-controls,
.instagram-jump,
.preview-link-arrow,
.sunny-footer-access,
.footer-arrow,
.sunny-footer-links a[href="#top"] {
  display: none;
}
