/* THE HOME HERO, "MADE WITH KYND" AND THE FILM VIEWER (Matt, 27 Oct 2026: "update main opening page with a more
   modern and professional homepage so we drop the large avatar and instead show what kynd can do using our best test
   footage and make it animated"; then "make it so tapping them shows the whole with sound", full screen).
   Markup: index.html #homeView. Behaviour: home-showcase.js.

   Wide screens: the reel is the hero and the headline sits on it, over a dark wash so it always reads.
   Phones (650px and under): the headline sits above the reel, and the gallery is two columns. */

/* ── The hero ─────────────────────────────────────────────────────────────── */
.home-hero{display:grid;max-width:1180px;margin:20px auto 24px;position:relative}
.home-hero>.hero-copy,.home-hero>.hero-reel{grid-area:1/1;min-width:0}

.hero-reel{position:relative;margin:0;height:clamp(340px,52vh,500px);border-radius:22px;overflow:hidden;isolation:isolate;cursor:pointer;
  background:#151925;border:1px solid #ffffff14;box-shadow:0 34px 80px #00000059,0 0 0 1px #c9b6ff08}
.hero-reel-poster,.hero-reel-video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 45%}
.hero-reel-poster{z-index:0}
.hero-reel-video{z-index:1;opacity:0;transition:opacity .7s ease}
.hero-reel-video.is-shown{opacity:1}
/* The wash that keeps the headline readable: dark on the left and along the bottom, clear where the film plays. */
.hero-reel::after{content:"";position:absolute;inset:0;z-index:2;pointer-events:none;
  background:linear-gradient(90deg,#0b0d15e0 0%,#0b0d158f 34%,#0b0d1500 64%),linear-gradient(0deg,#0b0d15c7 0%,#0b0d1500 46%),linear-gradient(180deg,#0b0d1573 0%,#0b0d1500 22%)}

/* The headline lies over the reel without catching its taps: a tap anywhere on the film plays it with sound. */
.hero-copy{position:relative;z-index:3;align-self:end;justify-self:start;max-width:560px;padding:0 0 44px 46px;pointer-events:none}
.hero-kicker{display:inline-flex;align-items:center;gap:9px;margin:0 0 18px;padding:6px 12px 6px 10px;border:1px solid #ffffff1f;border-radius:30px;
  background:#10121b80;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);font-size:11px;letter-spacing:.2px;color:#ddd6f1}
.hero-kicker i{width:7px;height:7px;border-radius:50%;background:var(--mint);box-shadow:0 0 0 0 #a6d5c480;animation:hero-live 2.4s ease-out infinite}
.hero-copy h1{margin:0;font-size:clamp(40px,4.3vw,62px);line-height:1.03;font-weight:450;letter-spacing:-.045em;color:#fff;text-shadow:0 2px 30px #0005}
.hero-copy h1>span{font-family:Georgia,"Times New Roman",serif;font-style:italic;font-weight:400;letter-spacing:-.035em;
  background:linear-gradient(100deg,#dcc6fb,#c6cdf7 55%,#a9dbd0);-webkit-background-clip:text;background-clip:text;color:transparent;padding-right:.08em}
.hero-lede{margin:18px 0 0;max-width:430px;font-size:14px;line-height:1.65;color:#d2d2e0;text-shadow:0 1px 16px #0007}

/* What is playing, bottom right, and under it the way to watch the whole film with sound. */
.hero-reel-caption{position:absolute;z-index:3;right:22px;bottom:68px;display:flex;align-items:center;gap:10px;max-width:46%;
  padding:7px 13px;border:1px solid #ffffff1c;border-radius:30px;background:#10121b8c;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);
  font-size:12px;color:#ece9f6;white-space:nowrap;pointer-events:none}
.hero-reel-tag{font-size:9px;font-weight:600;letter-spacing:1.4px;text-transform:uppercase;color:var(--lilac)}
.hero-reel-line{overflow:hidden;text-overflow:ellipsis}
.hero-reel-watch{position:absolute;z-index:4;right:22px;bottom:22px;display:inline-flex;align-items:center;gap:9px;padding:10px 16px 10px 13px;border-radius:30px;
  background:#f4f2fa;color:#17131f;font-size:12px;font-weight:600;box-shadow:0 10px 30px #0006;transition:transform .2s}
.hero-reel-watch .icon,.showcase-hint .icon{width:14px;height:14px;fill:currentColor;stroke-width:0}
.hero-reel:hover .hero-reel-watch{transform:translateY(-2px)}
/* "Tap to watch" on a touch screen, "Watch" with a mouse. */
.watch-mouse{display:none}
@media(hover:hover) and (pointer:fine){.watch-touch{display:none}.watch-mouse{display:inline}}

/* The films, as bars along the top: the one playing fills as it plays; any of them can be chosen. */
.hero-reel-steps{position:absolute;z-index:4;top:14px;left:22px;right:22px;display:flex;gap:6px}
.hero-reel-steps button{flex:1;height:24px;padding:0;background:none;display:flex;align-items:center}
.hero-reel-steps button:hover:not(:disabled){filter:none}
.hero-reel-steps i{position:relative;display:block;width:100%;height:3px;border-radius:3px;background:#ffffff33;overflow:hidden}
.hero-reel-steps i::after{content:"";position:absolute;inset:0;border-radius:inherit;background:#fff;transform-origin:left;transform:scaleX(var(--p,0))}
.hero-reel-steps button:hover i{background:#ffffff59}
.home-hero+.studio-shortcuts{margin-top:0}

/* ── Made with Kynd ───────────────────────────────────────────────────────── */
.showcase{max-width:1180px;margin:8px auto 56px}
.showcase .section-heading{align-items:flex-end;margin-bottom:22px}
.showcase .section-heading h2{font-size:29px;line-height:1.18;letter-spacing:-.8px;font-weight:450}
.showcase-intro{margin:0 0 3px;text-align:right;font-size:11px;line-height:1.8;color:#a0a3b9}
.showcase-try{display:inline-flex;gap:6px;align-items:center;padding:4px 0;background:none;font-size:11px;color:var(--mint)}
.showcase-try span{transition:transform .2s}
.showcase-try:hover span{transform:translate(2px,-2px)}
.showcase-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:26px 18px}
/* Eight films (27 Oct 2026, Matt dropped the soft 512 px one): the first spans two of three columns, so every row is full. */
.showcase-tile:first-child{grid-column:span 2}
.showcase-tile{margin:0;min-width:0}
.showcase-media{position:relative;display:block;width:100%;padding:0;aspect-ratio:16/9;border-radius:14px;overflow:hidden;background:#171b27;
  border:1px solid #ffffff12;box-shadow:0 18px 40px #00000040;text-align:left}
.showcase-media:hover:not(:disabled){filter:none}
.showcase-poster,.showcase-media video{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;transition:transform .9s ease}
.showcase-media video{opacity:0;transition:opacity .5s ease,transform .9s ease}
.showcase-media video.is-shown{opacity:1}
.showcase-media:hover .showcase-poster,.showcase-media:hover video{transform:scale(1.035)}
.showcase-hint{position:absolute;left:10px;bottom:10px;display:inline-flex;align-items:center;gap:7px;padding:6px 11px 6px 9px;border-radius:30px;
  background:#10121bb3;border:1px solid #ffffff24;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);font-size:10px;font-weight:500;color:#f1eef8;transition:background .2s}
.showcase-media:hover .showcase-hint{background:#f4f2fa;color:#17131f}
.hint-short{display:none}
.showcase-time{position:absolute;right:10px;bottom:10px;padding:3px 7px;border-radius:6px;background:#10121b99;font-size:10px;color:#e3e0ec;font-variant-numeric:tabular-nums}
.showcase-tile figcaption{display:grid;gap:5px;padding:13px 2px 0}
.showcase-tag{font-size:9px;font-weight:600;letter-spacing:1.5px;text-transform:uppercase;color:#b9a6e6}
.showcase-tile strong{font-size:14px;line-height:1.45;font-weight:500;letter-spacing:-.1px;color:#e7e4f2}

/* ── The viewer: the whole film with sound ────────────────────────────────── */
/* Full screen is asked for on the film itself; where the browser refuses, this full-window viewer is what shows. */
.showcase-viewer{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:56px 28px 28px;background:#07080dee;
  backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.showcase-viewer[hidden]{display:none}
.showcase-viewer-frame{margin:0;display:grid;gap:12px;justify-items:center;max-width:min(1400px,100%);max-height:100%}
.showcase-viewer-video{display:block;width:auto;height:auto;max-width:min(1400px,calc(100vw - 56px));max-height:calc(100vh - 140px);max-height:calc(100dvh - 140px);
  aspect-ratio:16/9;border-radius:12px;background:#000;box-shadow:0 30px 90px #000a}
.showcase-viewer.is-tall .showcase-viewer-video{aspect-ratio:9/16;height:calc(100vh - 140px);height:calc(100dvh - 140px)}
.showcase-viewer:not(.is-tall) .showcase-viewer-video{width:min(1400px,calc(100vw - 56px),calc((100vh - 140px) * 16 / 9))}
.showcase-viewer-video:fullscreen{max-width:none;max-height:none;width:100%;height:100%;border-radius:0;aspect-ratio:auto;object-fit:contain}
.showcase-viewer-title{margin:0;font-size:13px;color:#cfcbe0}
.showcase-viewer-close{position:absolute;top:14px;right:16px;display:grid;place-items:center;width:44px;height:44px;border-radius:50%;
  background:#ffffff14;border:1px solid #ffffff26;color:#fff}
.showcase-viewer-close .icon{width:20px;height:20px}
html.showcase-watching,html.showcase-watching body{overflow:hidden}

@keyframes hero-live{0%{box-shadow:0 0 0 0 #a6d5c480}70%{box-shadow:0 0 0 7px #a6d5c400}100%{box-shadow:0 0 0 0 #a6d5c400}}

@media(min-width:1550px){.home-hero{margin-top:26px}.hero-reel{height:clamp(380px,54vh,560px)}}
@media(max-width:1190px){.hero-copy{padding:0 0 38px 36px;max-width:500px}.showcase-grid{gap:22px 14px}}
@media(max-width:1000px){.showcase-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.showcase-tile:first-child{grid-column:1/-1}.showcase-tile:last-child:nth-child(even){grid-column:1/-1}.hero-reel-caption{display:none}
  /* The creation dock's eight mode tabs need ~760px in one line; from tablet width down they wrap rather than push the
     whole page sideways (found at 768px while building this page: the page scrolled 98px to the side). */
  .home-view .mode-tabs{flex-wrap:wrap}}
@media(max-width:900px){.hero-copy{padding:0 0 30px 28px;max-width:440px}.hero-lede{font-size:13px}.showcase .section-heading h2{font-size:24px}}

/* Phones: headline first, then the reel at the film's own shape; the gallery is two columns, the first film wide. */
@media(max-width:650px){
  .home-hero{display:block;margin:16px 0 20px}
  .hero-copy{max-width:none;padding:0 0 16px;pointer-events:auto}
  .hero-kicker{margin-bottom:14px;font-size:10px;padding:5px 11px 5px 9px}
  .hero-copy h1{font-size:38px;letter-spacing:-.04em;text-shadow:none}
  .hero-lede{margin-top:12px;font-size:13px;line-height:1.6;color:#b9bbcc;text-shadow:none}
  .hero-reel{height:auto;aspect-ratio:16/9;border-radius:16px;box-shadow:0 20px 50px #00000059}
  .hero-reel::after{background:linear-gradient(0deg,#0b0d15b3 0%,#0b0d1500 42%),linear-gradient(180deg,#0b0d1566 0%,#0b0d1500 26%)}
  .hero-reel-steps{top:8px;left:12px;right:12px;gap:4px}
  .hero-reel-steps button{height:20px}
  .hero-reel-caption{display:flex;left:12px;right:auto;bottom:10px;max-width:calc(100% - 150px);padding:5px 10px;gap:8px;font-size:11px}
  .hero-reel-caption .hero-reel-line{display:none}
  .hero-reel-tag{font-size:8px}
  .hero-reel-watch{right:10px;bottom:8px;padding:8px 13px 8px 11px;font-size:11px;gap:7px}
  .showcase{margin:4px 0 40px}
  .showcase .section-heading{display:block;margin-bottom:16px}
  .showcase .section-heading h2{font-size:24px}
  .showcase-intro{text-align:left;margin-top:8px}
  .showcase-intro br{display:none}
  .showcase-grid{gap:18px 10px}
  .showcase-media{border-radius:11px}
  .showcase-hint{left:7px;bottom:7px;padding:5px 8px 5px 7px;font-size:9px;gap:5px}
  .showcase-tile:not(:first-child) .hint-words{display:none}
  .showcase-tile:not(:first-child) .hint-short{display:inline}
  .showcase-time{right:7px;bottom:7px;font-size:9px}
  .showcase-tile figcaption{padding-top:9px;gap:3px}
  .showcase-tag{font-size:8px;letter-spacing:1.1px}
  .showcase-tile strong{font-size:12px;line-height:1.4}
  .showcase-viewer{padding:60px 0 16px}
  .showcase-viewer-video{max-width:100vw;border-radius:0}
  .showcase-viewer:not(.is-tall) .showcase-viewer-video{width:100vw}
  .showcase-viewer.is-tall .showcase-viewer-video{height:calc(100dvh - 110px);max-height:calc(100dvh - 110px);border-radius:10px}
  .showcase-viewer-close{top:10px;right:10px}
}

/* Less motion asked for: posters only (home-showcase.js loads no loop), nothing pulses or zooms. */
@media(prefers-reduced-motion:reduce){
  .hero-reel-video{display:none}
  .hero-kicker i{animation:none}
  .showcase-poster,.showcase-media video,.showcase-try span,.hero-reel-watch{transition:none}
  .showcase-media:hover .showcase-poster,.showcase-media:hover video{transform:none}
}
