/* The Title Card: the owner's "Heartwood Title Card" (sha256 cbbad59c8807…), its variables and its card rules, used by
   js/titlecard.js on the title step (the whole card) and on the close (its sky, emblem, ship and Pause). The variables sit
   on the card and those parts rather than on the root, so the site's own variables of the same names are untouched; Cinzel
   and Fira Code are the site's own faces (css/showcase.css, fonts/). The rules after them are the artifact's, unchanged. */
.hw-card,.hw-stars,.hw-emblem,.hw-lane,.hw-pause{
  --void:#07080f; --navy:#141c35; --deep:#0b0f1d;
  --gold:#c9b87a; --gold-hi:#e6d8a6; --parch:#F6F1E4; --dim:#a39c86;
  --ring:#56c4de; --dome:#60c480; --engine:#e29652; --array:#a88aec;
  --display:Cinzel,"Trajan Pro",Georgia,serif;
  --mono:"Fira Code",ui-monospace,Menlo,monospace;
  color-scheme:dark;
}

.hw-card{position:relative;width:100%;max-width:72rem;margin:0 auto;aspect-ratio:16/9;max-height:100%;overflow:hidden;
  container-type:inline-size;border:1px solid rgba(201,184,122,.55);outline:1px solid rgba(201,184,122,.18);outline-offset:5px;
  background:radial-gradient(120% 90% at 50% 38%,#1c2648 0%,var(--navy) 30%,var(--deep) 62%,var(--void) 100%);isolation:isolate}

/* stars */
.hw-stars{position:absolute;inset:0;width:100%;height:100%;z-index:0}
.hw-stars > circle{fill:var(--parch);animation:hw-twinkle var(--t,5s) ease-in-out var(--d,0s) infinite}
@keyframes hw-twinkle{0%,100%{opacity:var(--o,.6)}50%{opacity:.12}}
/* a few brighter stars that flicker now and then */
.hw-stars .flare circle{fill:var(--parch)}
.hw-stars .flare .halo{fill:var(--gold-hi);opacity:.18}
.hw-stars .flare{transform-box:fill-box;transform-origin:center;opacity:.6;animation:hw-flare var(--t,9s) ease-in-out var(--d,0s) infinite}
@keyframes hw-flare{0%,62%,100%{opacity:.6;transform:scale(1)}65%{opacity:1;transform:scale(1.7)}68%{opacity:.3;transform:scale(1)}71%{opacity:1;transform:scale(1.45)}76%{opacity:.6;transform:scale(1)}}
/* shooting stars: brief streaks on long, uneven cycles */
.hw-stars .shoot{opacity:0}
.hw-stars .shoot-a{animation:hw-shoot-a 11s cubic-bezier(.3,.1,.6,1) -2s infinite}
.hw-stars .shoot-b{animation:hw-shoot-b 17s cubic-bezier(.3,.1,.6,1) -9s infinite}
@keyframes hw-shoot-a{0%{transform:translate(1300px,110px);opacity:0}1%{opacity:1}6%{opacity:.9}8%,100%{transform:translate(880px,262px);opacity:0}}
@keyframes hw-shoot-b{0%{transform:translate(760px,50px);opacity:0}1%{opacity:1}5%{opacity:.85}6.5%,100%{transform:translate(430px,170px);opacity:0}}

/* the emblem: a tree's growth rings around its heart, crossed by a habitat ring */
.hw-emblem{position:absolute;left:50%;top:27%;width:21cqw;height:21cqw;transform:translate(-50%,-50%);z-index:1;overflow:visible}
.hw-emblem .grow{fill:none;stroke:var(--gold);stroke-width:.9;stroke-linecap:round;stroke-dasharray:1;stroke-dashoffset:0;
  animation:hw-grow 12s cubic-bezier(.45,.05,.3,1) infinite;animation-delay:calc(-5s + var(--i) * .32s)}
.hw-emblem .grow:nth-child(odd){stroke:var(--gold-hi);stroke-width:.6;opacity:.9}
@keyframes hw-grow{0%,3%{stroke-dashoffset:1;opacity:0}6%{opacity:1}32%{stroke-dashoffset:0}86%{stroke-dashoffset:0;opacity:1}96%,100%{stroke-dashoffset:0;opacity:0}}
.hw-emblem .heart{fill:var(--gold-hi);transform-origin:50px 50px;animation:hw-pulse 3s ease-in-out infinite}
@keyframes hw-pulse{0%,100%{transform:scale(1);opacity:1}50%{transform:scale(1.35);opacity:.75}}
.hw-emblem .orbit{fill:none;stroke:var(--ring);stroke-width:.5;opacity:.35}
.hw-emblem .orbit-run{fill:none;stroke:var(--ring);stroke-width:1.3;stroke-linecap:round;stroke-dasharray:.16 .84;
  animation:hw-orbit 6s linear infinite}
@keyframes hw-orbit{to{stroke-dashoffset:-1}}

/* the wordmark */
.hw-words{position:absolute;left:0;right:0;top:46%;z-index:2;text-align:center;display:grid;justify-items:center;gap:1.2cqw}
.hw-eyebrow{font-family:var(--mono);font-size:1.55cqw;letter-spacing:.55em;text-indent:.55em;color:var(--gold);margin:0;text-transform:uppercase}
.hw-title{font-family:var(--display);font-weight:600;font-size:9cqw;line-height:1;letter-spacing:.12em;text-indent:.12em;margin:0;text-transform:uppercase;
  color:var(--gold);
  background:linear-gradient(100deg,var(--gold) 0%,var(--gold) 38%,var(--parch) 48%,var(--gold-hi) 54%,var(--gold) 64%,var(--gold) 100%);
  background-size:300% 100%;background-position:100% 0;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;
  filter:drop-shadow(0 0 1.4cqw rgba(201,184,122,.22));
  animation:hw-shine 12s ease-in-out -5s infinite}
@keyframes hw-shine{0%,40%{background-position:100% 0}70%,100%{background-position:0% 0}}
.hw-rule{display:flex;align-items:center;gap:1.1cqw;width:46cqw}
.hw-rule::before,.hw-rule::after{content:"";flex:1;height:1px;background:linear-gradient(90deg,transparent,var(--gold))}
.hw-rule::after{background:linear-gradient(90deg,var(--gold),transparent)}
.hw-rule span{width:.8cqw;height:.8cqw;transform:rotate(45deg);border:1px solid var(--gold-hi)}
.hw-sub{font-family:var(--mono);font-size:1.45cqw;letter-spacing:.42em;text-indent:.42em;color:var(--dim);margin:0;text-transform:uppercase}

/* the ship, crossing below the title */
.hw-lane{position:absolute;left:0;right:0;top:79%;height:12cqw;z-index:1}
.hw-ship{position:absolute;top:0;left:0;width:24cqw;height:auto;overflow:visible;
  animation:hw-cross 30s linear -13s infinite}
@keyframes hw-cross{from{transform:translateX(-28cqw)}to{transform:translateX(104cqw)}}
.hw-ship .body{animation:hw-bob 6s ease-in-out infinite}
@keyframes hw-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(2.2px)}}
.hw-ship .flame{transform-box:fill-box;transform-origin:100% 50%;animation:hw-flame .18s steps(2) infinite alternate}
@keyframes hw-flame{from{transform:scaleX(1);opacity:.95}to{transform:scaleX(.72);opacity:.7}}
.hw-ship .beacon{animation:hw-blink 2.4s steps(1) infinite}
@keyframes hw-blink{0%,60%{opacity:1}61%,100%{opacity:.15}}
.hw-ship .ringface{animation:hw-spin 4s ease-in-out infinite}
.hw-ship .ringface:nth-of-type(2){animation-delay:-1.3s}
.hw-ship .ringface:nth-of-type(3){animation-delay:-2.6s}
@keyframes hw-spin{0%,100%{opacity:.95}50%{opacity:.55}}

/* pause control, required for motion that runs longer than five seconds */
.hw-pause{position:absolute;right:calc(1.4cqw + 2px);bottom:calc(1.4cqw + 2px);z-index:3;min-width:44px;min-height:44px;padding:0 .9rem;
  font-family:var(--mono);font-size:.78rem;letter-spacing:.08em;color:var(--gold-hi);background:rgba(7,8,15,.72);
  border:1px solid rgba(201,184,122,.5);border-radius:6px;cursor:pointer;opacity:.55;transition:opacity .2s}
.hw-card:hover .hw-pause,.hw-pause:focus-visible{opacity:1}
.hw-pause:focus-visible{outline:2px solid var(--gold-hi);outline-offset:3px}
.hw-card.is-paused *,.hw-card.is-paused *::before,.hw-card.is-paused *::after{animation-play-state:paused!important}

@media (prefers-reduced-motion:reduce){
  .hw-card *{animation:none!important}
  .hw-ship{transform:translateX(38cqw)}
  .hw-pause{display:none}
}
