/* ---------- Video (video session): her intro, beside the headshot in About ----------
   The headshot and the intro frame sit side by side and share a top edge and a height (--mh).
   The frame is a .vp player (9:16). Until her video exists it's a soft "coming soon" panel that loads nothing
   (index.html: fill data-src, data-poster, data-vtt and data-dur on the .vp-intro line to swap in the real video). */

/* computers: the bio on the left, the two pictures on the right */
.about > .sheet { grid-template-columns: minmax(0, 1fr) auto; }
.about > .sheet > .about-media { grid-column: 2; grid-row: 1; --mh: clamp(300px, 27vw, 420px); display: flex; align-items: flex-start; gap: clamp(10px, 1vw, 16px); }
.about-media > .headshot { flex: none; width: auto; max-width: none; height: var(--mh); aspect-ratio: 4 / 5; }
.about-media > .headshot img { width: 100%; height: 100%; min-height: 0; aspect-ratio: auto; object-fit: cover; }
.about-media > .vp-intro { flex: none; width: auto; height: var(--mh); aspect-ratio: 9 / 16; }

/* phones and tablets: under the bio, still side by side, as big as the width allows */
@media (max-width: 860px) {
  .about > .sheet { grid-template-columns: 1fr; }
  .about > .sheet > .about-media { grid-column: 1; grid-row: auto; gap: 12px; --mh: min(340px, calc((100vw - 2 * var(--pad) - 12px) / 1.3625)); }
}

/* the "coming soon" frame: a soft tint, a quiet play mark and two words. No border (her rule), nothing to click. */
.vp-intro.is-soon { background: color-mix(in srgb, var(--acc) 12%, var(--sheet)); color: var(--ink); }
[data-theme="dark"] .vp-intro.is-soon { background: color-mix(in srgb, var(--acc) 7%, var(--sheet)); }
.vp-soon { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 16px; text-align: center; }
.vp-soon-play { position: relative; width: 48px; height: 48px; border-radius: 50%; background: color-mix(in srgb, var(--acc) 13%, transparent); }
.vp-soon-play::after { content: ""; position: absolute; left: 19px; top: 15px; border-left: 14px solid var(--acc); border-top: 9px solid transparent; border-bottom: 9px solid transparent; opacity: 0.85; }
.vp-soon-text { font-size: 12.5px; font-weight: 600; line-height: 1.45; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 640px) { .vp-soon-play { width: 40px; height: 40px; } .vp-soon-play::after { left: 16px; top: 12px; border-left-width: 12px; border-top-width: 8px; border-bottom-width: 8px; } .vp-soon-text { font-size: 12px; } }

/* it wipes in with the headshot, a beat later */
.motion .about .vp-intro { clip-path: inset(0 0 100% 0); transition: clip-path 1s cubic-bezier(0.7, 0, 0.2, 1) 0.15s; }
.motion .about.on .vp-intro { clip-path: inset(0 0 0 0); }

/* very narrow players (this tall frame, and on phones): a compact bar so every button fits */
@container (max-width: 270px) {
  .vp-time { display: none; }
  .vp-bar { gap: 0; padding: 4px 3px; }
  .vp-b { width: 30px; height: 32px; }
  .vp-b svg { width: 19px; height: 19px; }
  .vp-seek { min-width: 24px; margin: 0 4px; }
  .vp-cap { bottom: 46px; }
}
@container (max-width: 175px) {
  .vp-mu { display: none; } /* phones have their own volume buttons */
  .vp-cap { font-size: 12.5px; padding: 2px 7px 3px; }
}

/* the stand-in (her talking, silent) fills the frame: no tint, no words, nothing to press */
.vp-intro.is-soon:has(.vp-stand) { background: #c9b9ab; }
.vp-soon.vp-stand { padding: 0; gap: 0; overflow: hidden; }

/* ---------- TEDx in Civics: the map moment of her talk, in the player ----------
   Nov 30, her note: "tedx card is kinda too big rn it doesn't look too great". It's now the same size as every other
   Civics card: the video fills the card's photo slot (cropped around her while it rests, the whole frame in full
   screen), and the seven cards go back to the even grid with the last one centered. */
/* Dec 1: Rancho (video and photos, .mix) and Turtle Rock moved into Civics, so the same rule covers every video card there. */
.bento > .tile > .vp, .bento > .tile > .mix { flex: 0 0 38%; width: auto; aspect-ratio: auto; height: auto; min-height: 210px; align-self: stretch; }
.bento > .tile .vp video, .bento > .tile .vp .vp-cover img { object-fit: cover; object-position: 50% 40%; }
.bento > .tile .vp:fullscreen video { object-fit: contain; }
/* phones: the video across the top at 16:9, the words under it, like before */
@media (max-width: 640px) {
  .bento > .tile:has(> .vp, > .mix) { flex-direction: column; }
  .bento > .tile > .vp, .bento > .tile > .mix { flex: none; width: 100%; aspect-ratio: 16 / 9; min-height: 0; }
}

/* ---------- Her Instagram reel about Pantheon, framed like a post, at the right of the Pantheon card ----------
   Her ask (Nov 30): "it needs to seem like it was posted on socials". A round avatar and her handle on top, the tall
   video in the middle, then a heart, comment and share row with the views, and a one-line caption. No borders (her rule):
   it sits on the card's own white. Our own simple icons, not Instagram's logo or interface. */
.biz-card > .post { flex: none; width: clamp(190px, 14.6vw, 212px); margin: 0; padding: 14px clamp(14px, 1.4vw, 20px) 14px 0; align-self: flex-start; }
.biz-card:has(> .post) > .tile-text { min-width: 0; }
.post-head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.post-av { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 2px var(--sheet), 0 0 0 3.5px color-mix(in srgb, var(--acc) 55%, transparent); }
.post-handle { font-size: 14px; font-weight: 650; letter-spacing: 0.01em; color: var(--ink); }
.post > .vp-reel { width: 100%; height: auto; border-radius: 10px; }
/* shown 4:5, the way reels sit in a feed: the crop keeps her burned-in captions (near the top) and her face. Full screen shows the whole tall video. */
.post .vp video, .post .vp-cover img { object-fit: cover; object-position: 50% 30%; }
.post .vp:fullscreen video { object-fit: contain; }
.post-row { display: flex; align-items: center; gap: 2px; margin: 6px 0 2px -6px; }
.post-heart, .post-ic { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; background: none; color: var(--ink); }
.post-heart { cursor: pointer; border-radius: 50%; }
.post-heart svg, .post-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.post-heart[aria-pressed="true"] { color: var(--acc); }
.post-heart[aria-pressed="true"] svg { fill: currentColor; }
.post-heart.pop svg { animation: post-pop 0.42s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes post-pop { 0% { scale: 1; } 40% { scale: 1.32; } 100% { scale: 1; } }
.post-heart:focus-visible { outline: 2px solid var(--acc); outline-offset: 1px; }
.post-views { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.post-cap { margin: 0; overflow: hidden; font-size: 13.5px; line-height: 1.4; color: var(--ink); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.post-cap b { margin-right: 4px; font-weight: 650; }
@media (prefers-reduced-motion: reduce) { .post-heart.pop svg { animation: none; } }
/* tablets: the landing video across the top, then the words and the post side by side */
@media (min-width: 641px) and (max-width: 1000px) {
  .biz-card:has(> .post) { flex-direction: row; flex-wrap: wrap; }
  .biz-card:has(> .post) > .biz-video { flex: 0 0 100%; }
  .biz-card:has(> .post) > .tile-text { flex: 1 1 0; align-self: flex-start; }
  .biz-card > .post { width: 220px; padding: 18px 24px 18px 0; }
}
/* phones: under the words, lined up with them */
@media (max-width: 640px) {
  .biz-card > .post { width: min(260px, 70%); padding: 0 0 18px 24px; }
}

/* ---------- A video and photos in one set (.mix, features/video.js): the Rancho card ----------
   The player and the photo set sit on top of each other in one 16:9 slot and crossfade.
   Dots at the bottom center: the first is a small play mark for the video, then one per photo. */
.tile > .mix { position: relative; flex: none; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #0E0D0C; }
.mix > .vp, .mix > .mix-flow { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; transition: opacity 1.2s ease, visibility 1.2s; }
.mix.on-photo > .vp, .mix:not(.on-photo) > .mix-flow { opacity: 0; visibility: hidden; }
.mix-dots { position: absolute; left: 50%; bottom: 10px; z-index: 4; display: flex; align-items: center; gap: 2px; translate: -50% 0; transition: opacity 0.4s ease; }
.mix.playing .mix-dots { opacity: 0; pointer-events: none; }
.mix-dot { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; }
.mix-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.55); box-shadow: 0 0 3px rgba(0, 0, 0, 0.35); transition: background 0.3s, width 0.3s; }
.mix-dot.on::before { width: 16px; border-radius: 3px; background: #fff; }
.mix-dot.is-video::before { width: 0; height: 0; border-radius: 0; background: none; box-shadow: none; border-left: 7px solid rgba(255, 255, 255, 0.6); border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent; filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.4)); }
.mix-dot.is-video.on::before { border-left-color: #fff; }
.mix-dot:focus-visible { outline: 2px solid #fff; outline-offset: -3px; border-radius: 6px; }
/* the duration label moves up a little so it never sits on the dots */
.mix .vp-dur { bottom: 36px; }
@media (max-width: 640px) { .mix-dots { bottom: 6px; } }
@media (prefers-reduced-motion: reduce) { .mix > .vp, .mix > .mix-flow { transition: none; } }

/* ---------- Music: a second performance (Chopin) under the Rachmaninoff ----------
   Computers: the two videos stack in the first column at the same width and 16:9, the photo set beside them grows
   to their combined height (her piano photos are upright), and the words sit in the third column.
   Phones and tablets: Rachmaninoff, Chopin, the photos, the words. */
@media (min-width: 961px) {
  #music .music > .vp:not(.vp-2) { grid-column: 1; grid-row: 1; }
  #music .music > .vp-2 { grid-column: 1; grid-row: 2; }
  #music .music > .flow { grid-column: 2; grid-row: 1 / span 2; align-self: stretch; aspect-ratio: auto; height: auto; }
  #music .music > .tile-text { grid-column: 3; grid-row: 1 / span 2; align-self: start; }
}
