/* Home: the headline, the film as the one picture on the page, two ways to start,
   what the assistant can do; jesse at the bottom right as the way into the chat.
   Loaded only by index.html (its .cb overrides must not reach the other pages). */

.hf-page { padding-top: clamp(20px, 6.5vh, 76px); padding-bottom: 0; }
.hf { display: flex; flex-direction: column; align-items: center; width: min(100% - 40px, 1080px); margin-inline: auto; }
.hf > * { animation: rise .9s var(--ease) backwards; }
.hf > :nth-child(2) { animation-delay: .08s; }
.hf > :nth-child(3) { animation-delay: .16s; }
.hf-title {
  max-width: 15em;
  font-size: var(--t-display); font-weight: var(--w-display, 650); line-height: 1.05; letter-spacing: -.03em;
  color: var(--ink); text-align: center; text-wrap: balance;
}

/* the thumbnail: a real frame of the film, a frosted play button, its length.
   Sized so the two buttons under it are always on the first screen */
.hf-thumb {
  position: relative; display: block; margin-top: clamp(24px, 4.2vh, 40px);
  width: clamp(min(100%, 320px), (100svh - 340px) * 16 / 9, min(100%, 640px)); aspect-ratio: 16 / 9;
  border-radius: var(--r-lg); isolation: isolate; cursor: pointer;
  box-shadow: 0 0 0 1px var(--hair), 0 2px 6px rgb(60 44 24 / .06), 0 26px 60px -24px rgb(60 44 24 / .42);
  transition: transform .6s var(--ease), box-shadow .6s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
/* ambient light: the film's own colours, blurred, spilling onto the paper around it */
.hf-thumb::before {
  content: ""; position: absolute; inset: 14% 5% -7%; z-index: -1; border-radius: 48px; pointer-events: none;
  background: url(../animation/assets/poster.webp) center 75% / cover no-repeat;
  filter: blur(44px) saturate(1.35); opacity: var(--glow, .42);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.hf-thumb-media { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; background: #f3ead7; }
/* a crisp inner edge and a sliver of light along the top, like glass over a print */
.hf-thumb::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgb(40 30 18 / .07), inset 0 1px 0 rgb(255 255 255 / .4);
}
.hf-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; filter: brightness(var(--thumb-dim)); transition: transform 1.4s var(--ease-out); }
@media (hover: hover) {
  .hf-thumb:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--hair), 0 4px 10px rgb(60 44 24 / .07), 0 38px 80px -28px rgb(60 44 24 / .5); }
  .hf-thumb:hover::before { opacity: calc(var(--glow, .42) + .12); transform: translateY(8px) scale(1.02); }
  .hf-thumb:hover img { transform: scale(1.035); }
  .hf-thumb:hover .hf-thumb-play { transform: scale(1.07); }
}
.hf-thumb:active { transform: scale(.985); transition-duration: .2s; }
.hf-thumb:focus-visible { outline-offset: 5px; }
.hf-thumb.is-lifted { visibility: hidden; }
:root[data-theme="dark"] .hf-thumb { --glow: .26; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hf-thumb { --glow: .26; } }
.hf-thumb-play {
  position: absolute; left: 50%; top: 41%; width: 72px; height: 72px; margin: -36px 0 0 -36px;
  display: grid; place-items: center; border-radius: 50%;
  background: rgb(251 248 242 / .74); color: #26221d;
  -webkit-backdrop-filter: blur(16px) saturate(1.7); backdrop-filter: blur(16px) saturate(1.7);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .65), 0 14px 34px -12px rgb(20 12 4 / .5), 0 1px 3px rgb(20 12 4 / .12);
  transition: transform .6s var(--spring);
}
.hf-thumb-play svg { width: 26px; height: 26px; margin-left: 4px; }
.hf-thumb-time {
  position: absolute; right: 12px; bottom: 12px; padding: 4px 9px; border-radius: 99px;
  background: rgb(24 20 14 / .55); color: #f8f4ec;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-size: 12px; font-weight: 600; letter-spacing: .02em; font-variant-numeric: tabular-nums;
}

/* opened, the film grows from the thumbnail to this size, the page blurred behind */
.film-frame { width: min(900px, 92vw, calc((100svh - 190px) * 16 / 9)); }

.hf-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: clamp(24px, 4.2vh, 36px); }
.hf-actions .pill { min-width: 236px; }

/* what the assistant can do: a short list with ticks, hairlines between */
.hf-more { display: flex; flex-direction: column; align-items: center; width: min(100% - 40px, 1080px); margin-inline: auto; padding: clamp(80px, 13vh, 132px) 0 clamp(104px, 15vh, 150px); }
.agent-more { font-size: clamp(22px, 1rem + 1vw, 28px); font-weight: var(--w-title, 700); line-height: 1.2; letter-spacing: -.026em; text-align: center; text-wrap: balance; }
.agent-can { width: min(100%, 540px); }
.agent-can ul { display: grid; margin-top: 22px; text-align: left; }
.agent-can li {
  position: relative; display: grid; grid-template-columns: 26px 1fr; column-gap: 14px; align-items: start;
  padding: 14px 0; font-size: 16.5px; line-height: 1.45; letter-spacing: -.014em; color: var(--ink-2);
}
.agent-can li + li::before { content: ""; position: absolute; top: 0; left: 40px; right: 0; border-top: 1px solid var(--hair); }
.agent-can li .icon {
  width: 26px; height: 26px; margin-top: -2px; padding: 6px; border-radius: 50%;
  color: var(--ink); background: var(--panel-hi); stroke-width: 2.4;
  box-shadow: 0 0 0 1px var(--hair), var(--sh-1);
}
/* the list arrives as it scrolls into view */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .agent-more, .agent-can li { animation: rise linear both; animation-timeline: view(); animation-range: entry 5% entry 55%; }
    .agent-can li:nth-child(2) { animation-range: entry 10% entry 60%; }
    .agent-can li:nth-child(3) { animation-range: entry 15% entry 65%; }
    .agent-can li:nth-child(4) { animation-range: entry 20% entry 70%; }
    .agent-can li:nth-child(5) { animation-range: entry 25% entry 75%; }
  }
}

@media (max-width: 600px) {
  .hf-actions { flex-direction: column; align-items: stretch; width: min(100%, 360px); }
  .hf-actions .pill { min-width: 0; }
  .hf-thumb { width: 100%; border-radius: 18px; }
  .hf-thumb-play { width: 62px; height: 62px; margin: -31px 0 0 -31px; }
  .hf-thumb-play svg { width: 22px; height: 22px; }
  .agent-can li { font-size: 16px; }
}
/* big screens: the film grows with the room */
@media (min-width: 1800px) and (min-height: 1000px) {
  .hf-thumb { width: min(100%, 760px); }
  .hf-title { font-size: 3.75rem; }
}
/* tablets upright: the first screen is the headline, the film and the two buttons, centred; the list waits below */
@media (min-width: 601px) and (max-width: 1100px) and (orientation: portrait) {
  .hf-page { padding-top: 16px; }
  .hf { min-height: calc(100svh - var(--bar-h) - 40px); justify-content: center; padding-bottom: 72px; }
}
/* phones turned sideways: everything smaller, so both buttons still show */
@media (orientation: landscape) and (max-height: 500px) {
  .hf-page { padding-top: 10px; }
  .hf-title { font-size: 28px; }
  .hf-thumb { margin-top: 14px; width: clamp(240px, (100svh - 206px) * 16 / 9, 560px); border-radius: 16px; }
  .hf-thumb-play { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
  .hf-thumb-play svg { width: 20px; height: 20px; }
  .hf-actions { margin-top: 14px; }
  .hf-actions .pill { height: 44px; min-width: 210px; }
}
@media (max-width: 760px) {
  .hf-page { padding-top: 26px; }
  /* the first screen is the headline, the film and the two buttons; the list starts below it */
  .hf { min-height: calc(100svh - 134px); }
}
