/* Keep navigation visible from the opening frame and in normal document flow. */
body.pum-home-page > header {
  position: sticky;
  top: 0;
  z-index: 50;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  background: rgba(17, 17, 17, .96);
  backdrop-filter: blur(12px);
}

/* Triple the existing whitespace around the SPACE title. */
@media (min-width: 701px) {
  body.pum-home-page > #main > .hero { padding-top: 42px; }
  body.pum-home-page > #main > .hero h1 {
    margin: 0 0 4px;
    font-size: clamp(3rem, 13vw, 11rem);
  }
  body.pum-home-page > #main > .hero .hero-subtitle { margin-bottom: 8px; }
  body.pum-home-page > #main > #work { padding-top: 0; }
  #project-track > .project-card:nth-child(n) { flex-basis: 27vw; }
  #project-track > .project-card:nth-child(n) .project-img { aspect-ratio: 3 / 4; }
}

.space-title-word {
  display: inline-block;
  color: var(--paper);
}
@supports (-webkit-background-clip: text) {
  .space-title-word {
    background-image: linear-gradient(110deg, var(--paper) 0%, var(--paper) 47.2%, rgba(91,24,45,.025) 48%, rgba(91,24,45,.08) 49%, rgba(91,24,45,.22) 50%, rgba(91,24,45,.08) 51%, rgba(91,24,45,.025) 52%, var(--paper) 52.8%, var(--paper) 100%);
    background-repeat: no-repeat;
    background-position: 0% 0;
    background-size: 250% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: pum-space-glint 3s linear infinite;
  }
}
.hero-subtitle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 20px auto 0;
  color: rgba(245, 245, 245, .82);
  font-size: clamp(12px, 1vw, 14px);
  font-weight: 500;
  letter-spacing: .015em;
  line-height: 1.6;
  text-align: center;
}
@keyframes pum-space-glint {
  0% { background-position: 100% 0; }
  14% { background-position: 0% 0; }
  100% { background-position: 0% 0; }
}
@media (min-width: 701px) and (max-width: 900px) {
  #project-track > .project-card:nth-child(n) { flex-basis: 40vw; }
}

/* Keep the expanded project list directly below the enlarged photo rail. */
body.pum-home-page > #main > #work > .archive-bar {
  justify-content: flex-end;
  text-align: right;
  padding: 18px 0 30px;
  padding-right: 0;
}
body.pum-home-page > #main > #work > .archive-bar .text-link {
  font-size: 13px;
  line-height: 1.4;
}

/* Keep the brief CTA beside a matching vertical stack of circular actions. */
body.pum-home-page > .floating {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 9px;
}
.floating-primary-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.floating-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.floating-primary-actions .hero-action {
  position: relative;
  isolation: isolate;
  display: grid;
  width: 60px;
  min-width: 60px;
  height: 60px;
  min-height: 60px;
  aspect-ratio: 1;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6px;
  border: 1px solid rgba(245, 245, 245, .85);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  text-align: center;
}
.floating-primary-actions > .faq-floating {
  position: static;
  right: auto;
  bottom: auto;
  display: grid;
  width: 60px;
  min-width: 60px;
  height: 60px;
  min-height: 60px;
  aspect-ratio: 1;
  align-items: center;
  justify-content: center;
  flex: 0 0 60px;
  padding: 6px;
  border: 1px solid rgba(245, 245, 245, .42);
  border-radius: 50%;
  background: #242424;
  color: var(--paper);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
}
.floating-primary-actions .hero-action-primary {
  background: var(--paper);
  color: var(--ink);
}
.floating-primary-actions .hero-action-secondary {
  background: var(--wine);
  color: var(--paper);
}
.floating-primary-actions .hero-action > span {
  display: inline;
}
.floating-primary-actions .hero-action::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: -35% auto -35% -48%;
  width: 42%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.08) 25%, rgba(255,255,255,.75) 50%, rgba(255,255,255,.08) 75%, transparent);
  transform: translateX(-100%) skewX(-24deg);
  pointer-events: none;
  animation: pum-action-glint 4.8s ease-in-out infinite;
}
.floating-primary-actions .hero-action-primary::after {
  background: linear-gradient(90deg, transparent, rgba(91,24,45,.08) 28%, rgba(255,255,255,.78) 50%, rgba(91,24,45,.08) 72%, transparent);
  animation-delay: .3s;
}
.floating-primary-actions .hero-action:hover { filter: brightness(1.06); }
.floating-primary-actions .hero-action-primary:hover { background: var(--wine); color: var(--paper); }
.floating-primary-actions .hero-action-secondary:hover { background: var(--paper); color: var(--ink); }
.floating-primary-actions .hero-action:focus-visible {
  outline: 3px solid var(--paper);
  outline-offset: 4px;
}

@media (max-width: 700px) {
  body.pum-home-page > #main > .hero { padding-top: 36px; }
  body.pum-home-page > #main > .hero h1 { margin-top: 0; margin-bottom: 6px; }
  body.pum-home-page > #main > .hero .hero-subtitle { margin-top: 16px; margin-bottom: 12px; font-size: 12px; }
  body.pum-home-page > #main > #work { padding-top: 24px; }
  .floating-tools { gap: 6px; }
  .floating-primary-actions .hero-action {
    width: 48px;
    min-width: 48px;
    height: 48px;
    min-height: 48px;
    padding: 5px;
    font-size: 11px;
  }
  .floating-primary-actions > .faq-floating {
    width: 48px;
    min-width: 48px;
    height: 48px;
    min-height: 48px;
    flex-basis: 48px;
    padding: 5px;
    font-size: 11px;
  }
  .floating-primary-actions { gap: 5px; }
  .floating-tools > button:not(.estimate-floating) { padding: 10px 10px; font-size: 9px; }
  .floating-tools > button:not(.estimate-floating) span { margin-left: 8px; }
  .floating-tools > a { width: 38px; height: 38px; flex: 0 0 38px; }
  body.pum-home-page > #main > #work > .archive-bar { justify-content: flex-end; padding: 16px 0 28px; }
  #project-track > .project-card:nth-child(n) { flex-basis: 90vw; }
  #project-track > .project-card:nth-child(n) .project-img { aspect-ratio: 125.5 / 168; }
  body.pum-home-page > #main > #work > .archive-bar {
    padding-right: 0;
    margin-right: calc(-6% + 8px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .floating-primary-actions .hero-action::after { animation: none; }
  .space-title-word { animation: none; }
}
