/* product-home.css: the product home page pattern (js/product-home.js).
 *
 * Film, two doors, the clip rows, try it as a member. App-shell tokens only,
 * everything scoped under .phm so the pattern can sit inside any route. Mobile
 * first (390px is the phone we check); the wider layout is at the end.
 */

.phm { display: flex; flex-direction: column; gap: 34px; max-width: 980px; margin: 0 auto; min-width: 0; }
.phm [hidden] { display: none !important; }

/* 1. The film */
.phm-film-wrap { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.phm-film {
  width: 100%; max-width: 760px; aspect-ratio: 16 / 9; border-radius: var(--radius-xl, 18px);
  overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); position: relative;
}
.phm-film-wait {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: linear-gradient(135deg, var(--accent-softer), var(--surface-2));
}
.phm-film-wait-t { color: var(--text-2); font-size: 15px; line-height: 1.5; text-align: center; max-width: 34ch; }
.phm-poster {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; cursor: pointer;
  background: var(--accent-grad, var(--accent)); color: var(--surface); font: inherit;
  display: flex; align-items: center; justify-content: center;
}
.phm-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.phm-play {
  position: relative; width: 68px; height: 68px; border-radius: 50%; background: var(--surface);
  color: var(--accent); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .18);
}
.phm-play svg { margin-left: 3px; width: 28px; height: 28px; }
.phm-play-sm { width: 46px; height: 46px; }
.phm-play-sm svg { width: 20px; height: 20px; }
.phm-len {
  position: absolute; bottom: 10px; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px;
  background: rgba(0, 0, 0, .55); color: white;
}
.phm-len { right: 8px; bottom: 8px; }
.phm-film-title {
  position: absolute; left: 12px; top: 12px; font-weight: 700; font-size: 14px;
  background: rgba(0, 0, 0, .45); color: white; padding: 3px 10px; border-radius: 999px;
}
.phm-video, .phm-clip-video { width: 100%; height: 100%; display: block; background: black; object-fit: contain; }
.phm-line {
  margin: 0; text-align: center; font-family: "Bricolage Grotesque", sans-serif; font-weight: 700;
  font-size: 24px; line-height: 1.2; color: var(--text); text-wrap: balance;
}

/* 2. The two doors */
.phm-doors { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.phm .btn.phm-maya {
  min-height: 52px; font-size: 17px; padding: 0 26px; display: inline-flex; align-items: center; gap: 10px;
  width: 100%; max-width: 360px; justify-content: center;
}
.phm-av {
  width: 28px; height: 28px; border-radius: 50%; background: var(--surface); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px;
}
.phm-maya-line { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.5; max-width: 46ch; }
.phm-self {
  color: var(--text-2); font-size: 14.5px; text-decoration: underline; text-underline-offset: 3px;
  min-height: 36px; display: inline-flex; align-items: center;
}
.phm-self:hover { color: var(--accent); }
.phm-maya-slot { width: 100%; text-align: left; scroll-margin-top: 80px; }
/* The Claude door: secondary to Maya, the same width so the two read as a pair. */
.phm .btn.phm-claude {
  min-height: 48px; font-size: 16px; padding: 0 22px; display: inline-flex; align-items: center; gap: 10px;
  width: 100%; max-width: 360px; justify-content: center;
}
.phm-av-claude { background: var(--accent-soft); color: var(--accent); width: 24px; height: 24px; font-size: 12.5px; }
.phm-claude-line { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.5; max-width: 46ch; }

/* Section heads */
.phm-sec { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.phm-h { margin: 0; font-family: "Bricolage Grotesque", sans-serif; font-size: 22px; font-weight: 700; }
.phm-sub { margin: -6px 0 0; color: var(--text-2); font-size: 15px; line-height: 1.5; }

/* TK-40: one quiet line under the rows while clips are still being made. */
.phm-soon-line { margin: 4px 0 0; color: var(--text-2); font-size: 14.5px; line-height: 1.5; }

/* 3. The clip rows */
.phm-row {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; margin-bottom: 14px;
}
.phm-row-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.phm-row-t { margin: 0; font-size: 17px; font-weight: 700; }
/* The demos' "See all five" (the clip rows slide instead). */
.phm-seeall {
  background: none; border: 0; padding: 6px 0; min-height: 36px; font: inherit; font-size: 14px; font-weight: 600;
  color: var(--accent); cursor: pointer; white-space: nowrap;
}
/* Each row is a slider (Alex, 3 Oct 2026, in place of "See all N"): one track of every clip in the row, snapping
   to a clip, swiped on touch, with an arrow either side while there is more that way. On a phone one clip and a
   peek of the next; from 700px, three. The track scrolls inside the row, so the page itself never scrolls sideways. */
.phm-slider { position: relative; min-width: 0; }
.phm-clips {
  display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 12px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; min-width: 0;
  scrollbar-width: none; padding: 2px 2px 4px; margin: -2px -2px 0;
}
.phm-clips::-webkit-scrollbar { display: none; }
.phm-clips:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: var(--radius); }
.phm-arrow {
  position: absolute; top: 25%; z-index: 2; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%; padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .16);
}
.phm-arrow:hover { color: var(--accent); border-color: var(--accent); }
.phm-arrow:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.phm-arrow-prev { left: 6px; }
.phm-arrow-next { right: 6px; }
.phm-thumb-btn:focus-visible, .phm-ask:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.phm-clip { scroll-snap-align: start; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.phm-thumb {
  aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; position: relative;
  background: var(--surface-2); border: 1px solid var(--border-soft);
}
.phm-thumb-btn {
  position: absolute; inset: 0; border: 0; padding: 0; cursor: pointer; font: inherit;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent-softer));
  display: flex; align-items: center; justify-content: center;
}
.phm-thumb-btn img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.phm-thumb-wait {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 10px;
  background: repeating-linear-gradient(135deg, var(--surface-2) 0 12px, var(--surface-3) 12px 24px);
}
.phm-thumb-wait span {
  background: var(--surface); color: var(--text-2); font-size: 12.5px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border);
}
.phm-clip-body { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.phm-clip-t { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.35; }
.phm-clip-c { margin: 0; font-size: 13.5px; color: var(--text-2); line-height: 1.45; }
.phm-ask {
  margin-top: 2px; background: none; border: 0; padding: 4px 0; min-height: 36px; font: inherit;
  font-size: 13.5px; font-weight: 600; color: var(--accent); cursor: pointer; text-align: left;
}
.phm-ask::before { content: "M"; display: inline-flex; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-size: 10.5px; font-weight: 800;
  align-items: center; justify-content: center; margin-right: 6px; vertical-align: -3px; }
.phm-rowdoor {
  display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
  border-top: 1px solid var(--border-soft); padding-top: 12px; font-size: 14px; color: var(--text-2);
}
.phm .btn.phm-rowdoor-btn { min-height: 44px; }
.phm-rowdoor-btns { display: flex; flex-wrap: wrap; gap: 8px; }

/* 4. Try it as a member */
.phm-demos { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.phm-demo {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; min-width: 0;
}
.phm-demo-t { margin: 0; font-family: "Bricolage Grotesque", sans-serif; font-size: 18px; font-weight: 700; }
.phm-demo-what { margin: 0; font-weight: 600; color: var(--text); font-size: 14.5px; }
.phm-demo-does { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.phm .btn.phm-join { margin-top: 6px; min-height: 44px; display: inline-flex; align-items: center; }
.phm-soon {
  margin: 6px 0 0; font-size: 13.5px; color: var(--text-2); background: var(--surface-2);
  border-radius: 999px; padding: 5px 12px;
}
.phm-seeall-demos { align-self: flex-start; }

@media (min-width: 700px) {
  .phm { gap: 42px; }
  .phm-line { font-size: 30px; }
  .phm-clips { grid-auto-columns: calc((100% - 24px) / 3); }
  .phm-arrow-prev { left: -14px; }
  .phm-arrow-next { right: -14px; }
  .phm-row { padding: 20px 22px; }
  .phm-rowdoor { flex-direction: row; align-items: center; justify-content: space-between; }
  .phm-demos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Design polish (3 Oct 2026): a demo card with its picture on top. */
.phm-demo-pic { padding-top: 0; overflow: hidden; }
.phm-demo-img { margin: 0 -18px 8px; width: calc(100% + 36px); aspect-ratio: 16 / 7; background: var(--surface-2); overflow: hidden; }
.phm-demo-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* The page for an account the area is not open to yet (cfg.beta, js/product-home.js):
   the "in beta" intro above the film, and the join button in place of the doors. */
.phm-beta-intro { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.phm-beta-tag {
  font-weight: 700; letter-spacing: .04em; font-size: 12px; padding: 3px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-deep);
}
.phm-beta-h {
  margin: 0; font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: 26px; line-height: 1.2;
  color: var(--text); text-wrap: balance; max-width: 30ch;
}
.phm-beta-blurb { margin: 0; font-size: 17px; line-height: 1.6; color: var(--text-2); max-width: 56ch; }
.phm-beta-note { margin: 0 0 4px; font-size: 16px; line-height: 1.6; color: var(--text-2); max-width: 52ch; }
@media (min-width: 700px) { .phm-beta-h { font-size: 32px; } }

/* Two films behind one player (cfg.films, R12-SPACES-FUNNEL, Alex 4 Oct 2026): a segmented
   control, "for you" and "for your clients". Big targets, plain words, the chosen one filled. */
.phm-film-tabs {
  display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; max-width: 100%;
  background: var(--surface-2); border: 1px solid var(--border);
}
.phm-film-tab {
  min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent;
  font: inherit; font-size: 15px; font-weight: 600; color: var(--text-2); cursor: pointer; white-space: nowrap;
}
.phm-film-tab.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.phm-film-tab:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (max-width: 480px) {
  .phm-film-tabs { display: flex; width: 100%; }
  .phm-film-tab { flex: 1 1 0; padding: 0 8px; font-size: 14px; white-space: normal; line-height: 1.2; }
}
/* "Try it as a member" slides like the clip rows (the same .phm-slider / .phm-clips track). */
.phm-demo-track { grid-auto-columns: 86%; }
.phm-demo-track .phm-demo { height: 100%; scroll-snap-align: start; }
@media (min-width: 700px) { .phm-demo-track { grid-auto-columns: calc((100% - 12px) / 2); } }
@media (min-width: 1100px) { .phm-demo-track { grid-auto-columns: calc((100% - 24px) / 3); } }
