/* ==========================================================================
   home-another-me.css — homepage only (2026-10-16)
   Announcement bar + pinned Another Me card, approved by Orr from the
   mockup screenshots (prototypes/renders/homepage-another-me-*.png), plus
   the phone fix for the hero frame. Loaded by site/index.html after
   tokens.css + style.css; style.css itself is not touched (it hits every
   page). Logical properties only. Site tokens, plus two accents taken from
   the Another Me page: magenta #dd005f (used once, the bar's dot) and the
   teal of the hero artwork.
   ========================================================================== */

:root {
  --hm-magenta: #dd005f;
  --hm-teal: #00909e;
}

/* --------------------------------------------------------------------------
   1. Announcement bar — above the sticky header, scrolls away with the page
   -------------------------------------------------------------------------- */

.hm-announce {
  position: relative;
  background: var(--primary);
  color: var(--on-primary);
  border-block-end: 2px solid var(--hm-teal);
}

.hm-announce[hidden] { display: none; }

.hm-announce-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-block-size: 38px;          /* + 2px teal line = 40px */
  padding-inline: 48px;          /* room for the close button */
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: var(--on-primary);
  text-decoration: none;
  text-align: center;
}

.hm-announce-link:hover .hm-announce-text,
.hm-announce-link:focus-visible .hm-announce-text {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hm-announce-link:focus-visible {
  outline: 2px solid var(--on-primary);
  outline-offset: -4px;
}

/* The one magenta touch: a small printed dot, as in the hero circles. */
.hm-announce-dot {
  flex: none;
  inline-size: 8px;
  block-size: 8px;
  border-radius: 50%;
  background: var(--hm-magenta);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
}

.hm-announce-text-mobile { display: none; }

.hm-announce-close {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 8px;
  inline-size: 40px;
  border: 0;
  background: transparent;
  color: var(--on-primary);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
}

.hm-announce-close:hover,
.hm-announce-close:focus-visible {
  opacity: 1;
}

.hm-announce-close:focus-visible {
  outline: 2px solid var(--on-primary);
  outline-offset: -6px;
}

@media (max-width: 767px) {
  .hm-announce-link {
    min-block-size: 34px;        /* + 2px teal line = 36px */
    padding-inline: 40px;
    font-size: 13px;
    gap: 8px;
  }
  .hm-announce-text-desktop { display: none; }
  .hm-announce-text-mobile { display: inline; white-space: nowrap; }
  .hm-announce-close { inline-size: 36px; inset-inline-end: 2px; }
}

/* --------------------------------------------------------------------------
   2. Pinned Another Me card — above the event grid, full content width
   -------------------------------------------------------------------------- */

.hm-pinned {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  margin-block-end: var(--space-5);
  background: var(--surface-container-lowest);
  border: 1px solid var(--outline-variant);
  border-inline-start: 4px solid var(--primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--elevation-1);
  overflow: hidden;
}

.hm-pinned-art {
  margin: 0;
  min-block-size: 100%;
  background: #e7d9ce; /* the artwork's own paper colour, behind the crop */
}

.hm-pinned-art img {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: 55% 45%;
}

.hm-pinned-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
  padding: var(--space-5) var(--space-6);
}

.hm-pinned-tag {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-fixed);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  margin-block-end: var(--space-1);
}

.hm-pinned-title {
  font-family: var(--font-serif);
  font-size: var(--headline-lg-size);
  font-weight: 600;
  line-height: 1.15;
  color: var(--on-surface);
  margin: 0;
}

.hm-pinned-subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 21px;
  line-height: 1.35;
  color: var(--primary);
  margin: 0 0 var(--space-1);
}

.hm-pinned-text {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--on-surface-variant);
  max-width: 56ch;
  margin: 0;
}

.hm-pinned-details {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--on-surface);
  margin: var(--space-1) 0 var(--space-2);
}

@media (max-width: 899px) {
  .hm-pinned {
    grid-template-columns: 1fr;
    border-inline-start-width: 1px;
    border-block-start: 4px solid var(--primary);
  }
  .hm-pinned-art { aspect-ratio: 2.4 / 1; min-block-size: 0; }
  .hm-pinned-body { padding: var(--space-3); }
  .hm-pinned-subtitle { font-size: 19px; }
  .hm-pinned-text { font-size: 15px; }
  .hm-pinned .btn { display: block; inline-size: 100%; text-align: center; }
}

/* Keep lines sleek: no lone word on a last line; the details line breaks
   evenly so the date stays together. */
.hm-pinned p { text-wrap: pretty; }
.hm-pinned .hm-pinned-details, .hm-pinned .hm-pinned-subtitle { text-wrap: balance; }

/* --------------------------------------------------------------------------
   Hero frame on phones (audit item 4)
   The decorative frame behind the portrait is offset 24px to the right. On a
   phone the photo ends 20px from the screen edge, so the frame stuck out 4px
   and let the page scroll sideways. 16px keeps it inside the margin; desktop
   and tablet (24px gutter) are unchanged.
   -------------------------------------------------------------------------- */

@media (max-width: 767px) {
  .hero-image-card::before {
    inset-inline-end: calc(-1 * var(--space-2));
  }
}
