/* Base */
:root {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: #181b20;
  background: #e5e7eb;
  font-synthesis: none;
  line-height: 1.6;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 0; }
.startup-logo {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #c4c9ce;
  z-index: 10;
}
.is-starting .startup-logo { display: block; }
.is-starting { overflow: hidden; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
a:focus-visible, button:focus-visible { outline: 3px solid #2563eb; outline-offset: 5px; }
/* Fill the viewport with tiles; fit the background logo without cropping. */
.mosaic {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: grid;
  gap: 4px;
  overflow: hidden;
  background: #c4c9ce url("assets/hm_logo_noBorderOrange.png") center / contain no-repeat;
}
.mosaic::after { content: ""; position: absolute; inset: 0; background: rgba(236, 239, 242, .55); }
.mosaicTile { width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: cover; }
.page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 5vw, 72px);
}
.center-card {
  width: min(100%, 880px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 244px;
  background: #fff;
  border: 1px solid rgba(24, 27, 32, .13);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(17, 24, 39, .22), 0 2px 8px rgba(17, 24, 39, .08);
}
.card-main { min-width: 0; padding: clamp(24px, 4vw, 42px); }
.card-header { display: flex; align-items: center; gap: 22px; }
.card-header > div { min-width: 0; }
.cardAvatar { display: block; width: 112px; height: 112px; flex-shrink: 0; border-radius: 50%; background: url("assets/me.jpg") center / cover no-repeat; }
/* The image and download link always reference the baby; the portrait is the background. */
.cardAvatarImage { display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; object-position: left center; opacity: 0; }
.cardAvatar[aria-pressed="true"] .cardAvatarImage { opacity: 1; }
.brand { margin: 0 0 3px; font-size: .875rem; font-weight: 650; letter-spacing: .07em; }
h1 { margin: 0; font-size: clamp(1.75rem, 4vw, 2.25rem); line-height: 1.15; letter-spacing: -.035em; }
.cardText { margin-top: 30px; }
.cardText h2 { font-size: 1.25rem; line-height: 1.4; letter-spacing: -.015em; margin: 0 0 16px; }
.cardText p { font-size: 1rem; color: #454c55; margin: 0 0 14px; }
.contact { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 26px; }
.cardMail { font-size: .875rem; overflow-wrap: anywhere; text-underline-offset: 4px; }
.contact .cardMail { display: inline-flex; align-items: center; min-height: 44px; font-size: 1rem; }
.cardMail:hover { color: #8b4600; }
.card-qr {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 26px 20px; border-left: 1px solid #e4e7eb; border-radius: 0 16px 16px 0;
  background: #f7f8fa; text-align: center;
}
.card-qr h2 { font-size: 1rem; margin: 0 0 14px; }
.qr-link { display: block; width: 196px; max-width: 100%; border-radius: 4px; background: #fff; }
.qr-link img { display: block; width: 100%; height: auto; }
.footer { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0 8px; margin-top: 22px; padding: 0 12px; border-radius: 5px; background: rgba(255, 255, 255, .9); font-size: .8125rem; color: #454c55; text-align: center; }
.footer-link { border: 0; background: none; padding: 10px 2px; min-height: 44px; text-decoration: underline; text-underline-offset: 4px; }
.center-card.is-imprint { grid-template-columns: minmax(0, 1fr); }
.page.is-imprint-open {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  padding: clamp(12px, 3vh, 32px) clamp(16px, 5vw, 72px);
}
.page.is-imprint-open .center-card {
  flex: 1 1 auto;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}
.page.is-imprint-open .footer { flex-shrink: 0; margin-top: 12px; }
.center-card .imprint-view {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: clamp(16px, 3vh, 32px) clamp(20px, 4vw, 42px);
  overflow: hidden;
  overflow-wrap: anywhere;
}
.imprint-header, .imprint-view > h1 { flex-shrink: 0; }
.imprint-content {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
  padding-right: 12px;
  margin-top: 24px;
}
.imprint-content:focus-visible { outline: 2px solid #2563eb; outline-offset: -2px; }
.imprint-section + .imprint-section { margin-top: 28px; }
.imprint-section h2 { margin-bottom: 10px; }
.imprint-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.imprint-header .back-button { margin-bottom: 0; }
.imprint-logo { display: block; width: clamp(48px, 8vw, 72px); height: auto; flex-shrink: 0; }
.back-button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 20px; padding: 8px 14px; border: 1px solid #d4d8de; border-radius: 7px; background: #f7f8fa; }
.back-button:hover { background: #e9ecf0; }
a.back-button { text-decoration: none; }
.fallback-links { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); margin: 0; width: max-content; max-width: calc(100% - 32px); }
@media (max-height: 500px) {
  .imprint-header { margin-bottom: 8px; }
  .imprint-logo { width: 32px; }
  .imprint-view > h1 { font-size: 1.5rem; }
  .imprint-content { margin-top: 12px; }
}
@media (max-width: 700px) {
  .page { padding: 24px 16px; }
  .center-card { grid-template-columns: minmax(0, 1fr); max-width: 480px; }
  .card-main { padding: 26px 24px; }
  .card-header { gap: 16px; }
  .cardAvatar { width: 80px; height: 80px; }
  .card-qr { border-left: 0; border-top: 1px solid #e4e7eb; border-radius: 0 0 16px 16px; padding: 24px; }
}
@media (max-width: 360px) {
  .card-main { padding: 24px 20px; }
  .card-header { flex-direction: column; align-items: flex-start; }
  .contact { align-items: stretch; flex-direction: column; }
}
