.window-hero {
  /* Height left for the 3:2 photo; the reserve grows with the vw-scaled title. */
  --window-width: min(66vw, max(460px, calc((100svh - 250px - 8.5vw) * 1.5)));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  gap: 28px;
  padding: 32px 24px 36px;
  overflow: hidden;
  background: var(--navy);
}
.window-heading { position: relative; z-index: 2; text-align: center; }
.window-title {
  margin: 0 0 26px;
  color: var(--gold);
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: clamp(60px, 5.8vw, 144px);
  font-weight: 450;
  line-height: 1.16;
  letter-spacing: -.025em;
  text-wrap: balance;
}
/* Reveal each word in reading order.
   Negative clip insets leave room for italic overhangs and descenders. */
.window-title span {
  display: inline-block;
  animation: title-write .85s linear .15s both;
}
.window-title span + span { animation-duration: 1s; animation-delay: 1s; }
@keyframes title-write {
  from { clip-path: inset(-.25em calc(100% + .2em) -.3em -.2em); }
  to { clip-path: inset(-.25em -.2em -.3em -.2em); }
}
.window-subtitle {
  color: #c1c5d0;
  text-transform: uppercase;
  font-size: clamp(13px, 1vw, 24px);
  letter-spacing: .2em;
  animation: subtitle-arrive 1.4s cubic-bezier(.22, 1, .36, 1) 1.9s both;
}
@keyframes subtitle-arrive {
  from { opacity: 0; transform: translateY(10px); filter: blur(3px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.window-subtitle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.6em;
}
.window-subtitle strong { color: var(--gold); font-weight: 700; }
/* Cancel the trailing letter-spacing so both rules sit equally far from the text. */
.window-subtitle > span:not(.gilded-rule) { margin-inline-end: -.2em; }

/* Temporary book-launch announcement above the title (see launch.js). */
.launch-pill {
  display: flex;
  align-items: center;
  gap: .75em;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 30px;
  padding: .72em 1.2em .72em 1.05em;
  border: 1px solid #d5b35466;
  border-radius: 999px;
  background: #d5b35412;
  color: #e9ebf0;
  font-size: clamp(13px, .78vw, 18px);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition: background .2s, border-color .2s;
  animation: subtitle-arrive 1.2s cubic-bezier(.22, 1, .36, 1) .35s both;
}
.launch-pill[hidden] { display: none; }
.launch-pill-dot { position: relative; flex: none; width: .5em; height: .5em; border-radius: 50%; background: var(--gold); }
.launch-pill-dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--gold); animation: launch-ping 2.2s cubic-bezier(0, 0, .2, 1) infinite; }
@keyframes launch-ping { from { opacity: .7; } 70%, to { opacity: 0; transform: scale(2.8); } }
.launch-pill-label { color: var(--gold); font-size: .78em; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.launch-pill-text { padding-left: .75em; border-left: 1px solid #d5b35459; }
.launch-pill-arrow { flex: none; width: 1em; height: 1em; color: var(--gold); transition: transform .2s; }
@media (hover: hover) and (pointer: fine) {
  .launch-pill:hover { border-color: var(--gold); background: #d5b35426; }
  .launch-pill:hover .launch-pill-arrow { transform: translateX(3px); }
}
.launch-pill:active { opacity: .78; }
.launch-pill:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

/* Reusable gold hairline: fades in from the outside, ends in a small diamond
   next to the content. Mirror it with --end. Shares the diamond motif with
   .heritage-rule. */
.gilded-rule {
  --rule-color: var(--gold);
  --rule-delay: 2.5s;
  position: relative;
  flex: none;
  width: clamp(48px, 4.2vw, 120px);
  height: 7px;
}
.gilded-rule--end { transform: scaleX(-1); }
.gilded-rule::before {
  content: '';
  position: absolute;
  inset: 3px 9px 3px 0;
  background: linear-gradient(to right, transparent, color-mix(in srgb, var(--rule-color) 70%, transparent));
  transform-origin: right;
  animation: gilded-rule-draw 1.3s cubic-bezier(.22, 1, .36, 1) var(--rule-delay) both;
}
.gilded-rule::after {
  content: '';
  position: absolute;
  right: 1px;
  top: 1px;
  width: 5px;
  height: 5px;
  background: var(--rule-color);
  box-shadow: 0 0 8px color-mix(in srgb, var(--rule-color) 55%, transparent);
  transform: rotate(45deg);
  animation: gilded-rule-diamond .9s cubic-bezier(.22, 1, .36, 1) calc(var(--rule-delay) - .2s) both;
}
@keyframes gilded-rule-draw {
  from { transform: scaleX(0); opacity: 0; }
  to { transform: scaleX(1); opacity: 1; }
}
@keyframes gilded-rule-diamond {
  from { transform: rotate(-45deg) scale(0); opacity: 0; }
  to { transform: rotate(45deg) scale(1); opacity: 1; }
}
.window-composition { display: grid; grid-template-columns: minmax(0, 1fr) var(--window-width) minmax(0, 1fr); align-items: center; width: 100%; }
.window-visual { transform: translate3d(0, var(--window-offset, 0px), 0); }
.window-frame { overflow: hidden; border-radius: 45% 45% 8px 8px / 16% 16% 8px 8px; background: #132742; box-shadow: 0 0 0 1px #ffffff1f; }
.window-image { display: block; width: 100%; height: auto; }
.window-note { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 8px; color: var(--gold); }
.window-note .heritage-symbol { width: clamp(32px, 2.2vw, 54px); height: clamp(32px, 2.2vw, 54px); margin-bottom: 20px; }
.window-note .heritage-year { font-family: 'Playfair Display', Georgia, serif; font-size: clamp(40px, 3.7vw, 110px); line-height: 1; font-weight: 450; letter-spacing: -.05em; font-variant-numeric: lining-nums; }
.window-note .heritage-rule { position: relative; width: 40px; height: 1px; margin: 24px 0 20px; background: #d5b3545c; }
.window-note .heritage-rule::after { content: ''; position: absolute; width: 5px; height: 5px; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(45deg); background: var(--gold); box-shadow: 0 0 0 5px var(--navy); }
.window-note .heritage-caption { color: #d6d9e2; font-size: clamp(14px, .95vw, 18px); font-weight: 500; line-height: 1.8; letter-spacing: .015em; white-space: nowrap; }
/* Milestone intro: both notes glide in from the outer edges as the subtitle
   settles, then their parts appear top to bottom. The line icon draws itself;
   the 3D variants (wrapper) just fade in. Right side trails slightly. */
.window-note {
  --note-delay: 2.2s;
  --note-from: -36px;
  --note-ease: cubic-bezier(.22, 1, .36, 1);
  animation: note-glide 1.8s var(--note-ease) var(--note-delay) both;
}
.window-note-right { --note-delay: 2.35s; --note-from: 36px; }
.window-note > .heritage-symbol { animation: note-rise 1.1s var(--note-ease) var(--note-delay) both; }
.window-note svg.heritage-symbol :is(path, circle) {
  stroke-dasharray: 1;
  animation: note-draw 1.8s cubic-bezier(.65, 0, .35, 1) calc(var(--note-delay) + .1s) both;
}
.window-note .heritage-year { animation: note-rise 1.3s var(--note-ease) calc(var(--note-delay) + .35s) both; }
.window-note .heritage-rule {
  background: linear-gradient(#d5b3545c, #d5b3545c) center / 100% 100% no-repeat;
  animation: note-rule 1s var(--note-ease) calc(var(--note-delay) + .8s) both;
}
.window-note .heritage-rule::after { animation: note-diamond .8s var(--note-ease) calc(var(--note-delay) + .7s) both; }
.window-note .heritage-caption { animation: note-rise 1.1s var(--note-ease) calc(var(--note-delay) + .95s) both; }
@keyframes note-glide {
  from { transform: translateX(var(--note-from)); }
  to { transform: translateX(0); }
}
@keyframes note-rise {
  from { opacity: 0; transform: translateY(14px); filter: blur(5px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes note-draw {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes note-rule {
  from { background-size: 0% 100%; }
  to { background-size: 100% 100%; }
}
@keyframes note-diamond {
  from { opacity: 0; transform: translate(-50%, -50%) rotate(-45deg) scale(0); }
  to { opacity: 1; transform: translate(-50%, -50%) rotate(45deg) scale(1); }
}
.window-cta { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: var(--action-arrow-gap); border-radius: 999px; background: var(--gold); color: #020617; padding: 1.15em 2.35em; font-size: clamp(12px, .68vw, 17px); text-transform: uppercase; font-weight: 700; letter-spacing: .12em; transition: background .2s; }
.window-cta svg { width: var(--action-arrow-size); height: var(--action-arrow-size); }
/* Arrives with the milestone years, early enough not to hold anyone back. */
.window-cta { animation: note-rise 1.2s cubic-bezier(.22, 1, .36, 1) 2.6s both; }
@media (hover: hover) and (pointer: fine) { .window-cta:hover { background: var(--gold-hover); } }
.window-cta:focus-visible { outline: 2px solid #fff; outline-offset: 5px; }
@media (max-width: 1023px) {
  /* Tablets and phones: the hero takes its natural height. Stretching it to
     the full screen left a large empty band below the button. */
  .window-hero { min-height: 0; padding: calc(72px + env(safe-area-inset-top, 0px)) max(5vw, env(safe-area-inset-right, 0px)) 64px max(5vw, env(safe-area-inset-left, 0px)); gap: 32px; }
  .window-title { font-size: clamp(60px, 7.3vw, 90px); white-space: nowrap; }
  .window-composition { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }
  .window-visual { grid-column: 1 / -1; grid-row: 1; transform: none; }
  .window-note { grid-row: 2; }
  .window-note .heritage-symbol { width: 32px; height: 32px; margin-bottom: 12px; }
  .window-note .heritage-rule { margin: 16px 0 12px; }
}
@media (max-width: 767px) {
  .window-hero { padding-top: calc(28px + env(safe-area-inset-top, 0px)); gap: 28px; }
  .window-title { max-width: 90vw; margin: 0 auto 20px; font-size: clamp(24px, 8.2vw, 60px); line-height: 1.15; }
  .window-note { min-width: 0; padding-inline: 4px; }
  .window-note .heritage-caption { font-size: clamp(12px, 3.1vw, 13px); white-space: normal; text-wrap: balance; }
  .window-subtitle { font-size: clamp(11px, 2.6vw, 15px); letter-spacing: .12em; }
  .window-subtitle .gilded-rule { display: none; }
  .launch-pill { gap: .6em; margin-bottom: 20px; padding-inline: .95em 1em; font-size: 12.5px; }
  .launch-pill-text { padding-left: .6em; }
}
@media (max-width: 359px) {
  .launch-pill { gap: .5em; padding-inline: .8em .85em; font-size: 11px; }
  .launch-pill-label { letter-spacing: .12em; }
  .launch-pill-text { padding-left: .5em; }
}
@media (prefers-reduced-motion: reduce) {
  .window-visual { transform: none; }
  .window-cta { transition: none; }
  .window-title span, .window-subtitle,
  .gilded-rule::before, .gilded-rule::after,
  .window-note, .window-note *, .window-note .heritage-rule::after, .window-cta,
  .launch-pill, .launch-pill-dot::after { animation: none; }
}
