/* HOMEPAGE HERO (2026-11-15). "CF DESIGNS" with a particle form behind it, opened by a business card, plus the drifting contour lines behind the page.
   Works with hero.js. Separate from styles.css and main.js: remove the hero section and the two hero tags in index.html to switch it off. */
.hero{position:relative;width:calc(100vw - var(--sbw,0px));margin-left:calc(50% - 50vw + var(--sbw,0px)/2);--col:calc((100% - min(var(--max), 100% - 2*var(--pad)))/2);height:calc(100vh - 78px);min-height:540px;margin-bottom:24px;--p:0;cursor:pointer}
/* The dots stay inside the title area and fade out softly towards its lower edge, so they never cross the first project. */
#hero-gl{position:absolute;left:0;top:-78px;width:100%;height:calc(100% + 78px);z-index:1;pointer-events:none;
  -webkit-mask-image:linear-gradient(180deg,#000 0,#000 72%,transparent 100%);mask-image:linear-gradient(180deg,#000 0,#000 72%,transparent 100%)}
#bg-lines{position:fixed;left:0;top:0;width:100vw;height:100vh;z-index:-1;pointer-events:none}
.hero-name{position:absolute;left:0;right:0;top:47%;margin:0;transform:translateY(-50%);text-align:center;white-space:nowrap;font-family:"Montserrat","Inter Display","Inter",sans-serif;font-weight:700;
  font-size:min(11.1vw,30vh);line-height:.9;letter-spacing:.025em;color:var(--ink);z-index:2;user-select:none}
.hero-name .ln{display:inline-block;clip-path:inset(-30% -8% -6% -8%);will-change:transform}
.hero-name .ln:nth-child(1){margin-right:.36em;transform:translateX(calc(var(--p)*-16vw))}
.hero-name .ln:nth-child(2){transform:translateX(calc(var(--p)*16vw))}
/* the letters wait below their line while the CF mark shows, and spring up when it opens into the globe (hero.js adds .show) */
.hero-name .ch{display:inline-block;transform:translateY(118%);transition:transform .4s cubic-bezier(.6,0,.85,.35);transition-delay:calc(var(--i)*.02s)}
.hero.show .hero-name .ch{transform:none;transition:transform .9s cubic-bezier(.3,1.45,.5,1);transition-delay:calc(var(--i)*.06s)}
.hero-name .ch b{display:inline-block;font-weight:inherit;transition:transform .5s cubic-bezier(.3,1.9,.5,1)}
.hero-name .ch:hover b{transform:translateY(-7%) rotate(var(--tilt,-3deg));transition-duration:.18s}
.hero-sub,.hero-hint{position:absolute;bottom:6%;z-index:4;margin:0;font-family:"Montserrat","Inter",sans-serif;font-weight:600;font-size:11.5px;letter-spacing:.2em;text-transform:uppercase;opacity:0;animation:heroFade .8s ease forwards}
.hero-sub{left:var(--col);display:flex;align-items:center;gap:14px;color:#555;animation-delay:4.6s}
.hero-hint{right:var(--col);color:#777;animation-delay:5.7s}
@keyframes heroFade{to{opacity:1}}
@media (max-width:760px){.hero{height:calc(86vh - 78px);min-height:420px}.hero-name{font-size:11.3vw}.hero-hint{display:none}.hero-sub{font-size:11px}}
@media (prefers-reduced-motion:reduce){.hero-name .ch{transition:none}.hero-sub,.hero-hint{animation:none;opacity:1}}

/* Business card opening: the card flips in, dissolves into the particles from its bottom-left corner upwards, and the
   particles then gather into the logo (hero.js). The timings here match CARD and WIPE in hero.js. */
.hero-card{position:absolute;z-index:5;perspective:1500px;pointer-events:none;transform:scale(var(--k,1));animation:cardGone 0s linear 2.2s forwards}
@keyframes cardGone{to{visibility:hidden}}
.hero-card .cd{position:absolute;inset:0;transform-style:preserve-3d;animation:cardIn 1.3s cubic-bezier(.2,.85,.25,1.06) both}
@keyframes cardIn{0%{transform:translate3d(-8vw,70vh,0) rotateX(55deg) rotateY(-205deg) rotateZ(-16deg) scale(.75)}100%{transform:none}}
.hero-card .sh{position:absolute;inset:0;box-shadow:0 2.2em 4em -1.4em rgba(0,0,0,.5);animation:cardShadow .7s ease 1.1s forwards}
@keyframes cardShadow{to{opacity:0}}
.hero-card .face{position:absolute;inset:0;backface-visibility:hidden;-webkit-backface-visibility:hidden;background:#1e1e1e center/100% 100% no-repeat;overflow:hidden}
.hero-card .front{background-image:url(media/card/cfdesigns_card_front.png)}
.hero-card .front{animation:cardWipe 1.05s linear 1.1s forwards}
@keyframes cardWipe{
  from{-webkit-mask:linear-gradient(45deg,transparent 0 40%,#000 60% 100%) 100% 0%/300% 300% no-repeat;mask:linear-gradient(45deg,transparent 0 40%,#000 60% 100%) 100% 0%/300% 300% no-repeat}
  to{-webkit-mask:linear-gradient(45deg,transparent 0 40%,#000 60% 100%) 0% 100%/300% 300% no-repeat;mask:linear-gradient(45deg,transparent 0 40%,#000 60% 100%) 0% 100%/300% 300% no-repeat}}
.hero-card .back{transform:rotateY(180deg);background-image:url(media/card/cfdesigns_card_back.png)}
@media (prefers-reduced-motion:reduce){.hero-card{display:none}}
/* later visits (hero.js QUICK): no card or logo, the title and globe simply fade in together */
html.hero-quick .hero-card{display:none}
html.hero-quick .hero-name .ch{transition:none}
html.hero-quick .hero-name,html.hero-quick #hero-gl{animation:heroQuickIn .9s ease both}
@keyframes heroQuickIn{from{opacity:0}}
html.hero-quick .hero-sub{animation-delay:.5s}
html.hero-quick .hero-hint{animation-delay:.8s}

/* Golden ratio layout (2026-11-15, Connor's pick): the form sits on the golden point (61.8% across, 38.2% down)
   and the title is set left on the 61.8% line, aligned with the header logo and the project column. Phones stay centred. */
@media (min-width:761px){
.hero{--orb-x:.618;--orb-y:.4;--orb-size:.86}
.hero-name{left:var(--col);right:auto;top:61.8%;transform:translateY(-50%);text-align:left;font-size:min(9.2vw,27vh)}
}

/* HEADER (2026-11-15, Connor's pick). Homepage only; works with header-name.js.
   The header stays at the top of the screen as you scroll. At the top it shows just the CF mark, because the big title
   already says CF Designs; once the big title has scrolled away, "CF Designs" slides in beside the mark.
   To undo: remove the header-name.js line in index.html and this block (then add .wordmark .wm-name{display:none} for mark only). */
.site-header{position:sticky;top:0;z-index:45;padding-bottom:14px;margin-bottom:-14px}
.site-header::before{content:"";position:absolute;top:0;bottom:0;left:calc(50% - 50vw);right:calc(50% - 50vw);z-index:-1;pointer-events:none;
  background:color-mix(in srgb,var(--ground) 82%,transparent);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
  box-shadow:0 1px 0 rgba(0,0,0,.06);opacity:0;transition:opacity .4s ease}
html.hdr-solid .site-header::before{opacity:1}
.wordmark .wm-name{display:inline-block;max-width:0;opacity:0;overflow:hidden;margin-left:-12px;transform:translateX(-8px);
  transition:max-width .7s cubic-bezier(.2,.7,.2,1),margin-left .7s cubic-bezier(.2,.7,.2,1),opacity .45s ease,transform .7s cubic-bezier(.2,.7,.2,1)}
html.wm-in .wordmark .wm-name{max-width:12em;opacity:1;margin-left:0;transform:none;transition-delay:0s,0s,.12s,0s}
@media (max-width:520px){.wordmark .wm-name{margin-left:-8px}html.wm-in .wordmark .wm-name{margin-left:0}}
