/* The AI automations page (plan.md, "AI automations"). #hero: the navy chapter, its words at the left, at the right
   a tall rounded frame with the kit's rotate (the tech at the rooftop unit by day, then at sunset) and callbook in glass
   at its left side, clear of his face. #night: night-sky (light) as a full-width band on the designed ground. #changes:
   the same 6:42 PM call missed and answered, two framed photos with their stacks in step. #signature: answered-dial in
   its panel on the designed ground. #see: the owner at his van, his alerts landing in glass over the van's door. #faq.
   #close: the dinner at the right of the navy frame, fading into it, the panel at its left. Tokens only. */

/* ---------- #hero: the navy chapter ---------- */
/* `overflow-x: clip`: the open ring round the frame (112% of it) ran 3 px past a 768 px screen's sides */
.aih { position: relative; z-index: 1; margin-top: clamp(28px, 4.4vw, 64px); padding-block: 0; overflow-x: clip; }
.aih__in { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; gap: clamp(2rem, 4.5vw, 4.5rem); min-height: clamp(640px, calc(100svh - 150px), 760px); padding-block: clamp(2.5rem, 4.5vw, 3.75rem); }
.aih__words { max-width: 31rem; }
.aih__title { margin: 0 0 1rem; font-size: clamp(2.4rem, 1.4rem + 2.5vw, 3.6rem); line-height: 1.06; }
.aih__line { margin: 0 0 1.75rem; }
.aih__cta { display: grid; justify-items: start; }
.aih__art { position: relative; height: 620px; }
/* the logo's open O, thin, round the frame: it shows at the frame's sides, its gap at the upper right */
.aih__ring { position: absolute; top: 50%; left: 50%; z-index: 0; width: 118%; height: auto; max-width: none; aspect-ratio: 1; translate: -50% -50%; pointer-events: none; }
.aih__ring path { fill: none; stroke: var(--c-brand-on-ink); stroke-width: 1.5px; stroke-linecap: round; vector-effect: non-scaling-stroke; opacity: .4; }
.aih__frame { position: absolute; inset: 0; z-index: 1; overflow: hidden; border-radius: var(--radius-l); background: var(--c-ink); box-shadow: var(--shadow-l); }

/* the kit's rotate, as kit.md gives it */
[data-kit-scene="rotate"] [data-kit-slide] { position: absolute; inset: 0; margin: 0; visibility: hidden; overflow: hidden; }
[data-kit-scene="rotate"] [data-kit-slide][data-kit-on] { visibility: visible; z-index: 2; opacity: var(--kit-move, 1); transform: translateX(var(--kit-glide, calc((1 - var(--kit-move, 1)) * 4%))); }
[data-kit-scene="rotate"]:not(:has([data-kit-slide][data-prev])) [data-kit-slide][data-kit-on] { transform: none; opacity: 1; }
[data-kit-scene="rotate"] [data-kit-slide][data-prev] { visibility: visible; z-index: 1; }
[data-kit-scene="rotate"] [data-kit-slide] video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); }
[data-kit-scene="rotate"]:not(:has([data-kit-slide][data-kit-on])) [data-kit-slide]:not([data-kit-slide] ~ [data-kit-slide]) { visibility: visible; }
[data-kit-scene="rotate"] [data-kit-slide] video { inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; clip-path: inset(2px); }
[data-kit-scene="rotate"] [data-kit-slide] video[data-kit-shown] { clip-path: none; }
[data-kit-scene="rotate"] [data-kit-slide][data-prev] { opacity: clamp(0, (1 - var(--kit-move, 0)) * 1000, 1); }
@media (scripting: none) { [data-kit-scene="rotate"] [data-kit-slide] video { display: none; } }
/* each slide keeps its person at the frame's right, away from the cards */
.aih__slide--1 { --pos: 100% 50%; }
.aih__slide--2 { --pos: 25% 50%; }

/* callbook in glass over the frame's left side: the call card on top, the week at the foot */
.scene.aih__call { position: absolute; inset: 0; z-index: 2; border-radius: var(--radius-l); }
.aih__stop { top: 1rem; right: 1rem; }

@media (max-width: 1199px) {
  .aih__in { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 2.5rem; min-height: 0; padding-block: 2.5rem 3.5rem; text-align: center; }
  .aih__words { max-width: 40rem; }
  .aih__cta { justify-items: center; }
  .aih__art { width: min(720px, 100%); height: 600px; }
  .aih__ring { width: 112%; }
}
/* on the phone: the frame on top, the call card over its foot */
@media (max-width: 759px) {
  .aih__in { justify-items: stretch; gap: 2rem; padding-block: 1.75rem 2.5rem; text-align: left; }
  .aih__cta { justify-items: start; }
  .aih__title { font-size: clamp(2.15rem, 1.5rem + 3vw, 2.6rem); }
  .aih__art { width: 100%; height: auto; padding-bottom: 8.5rem; }
  .aih__ring { display: none; }
  .aih__frame { position: relative; inset: auto; height: 520px; }
  .aih__slide--2 { --pos: 58% 50%; }
  .scene.aih__call { inset: auto 0 0; height: 20rem; border-radius: 0; }
}

/* ---------- #night: night-sky, a full-width band at the foot of the part ---------- */
.ain { padding-bottom: 0; }
.ain__band { position: relative; height: 420px; }
.scene.ain__scene { position: absolute; inset: 0; }
.ain__stop { top: 1rem; right: 1rem; }
@media (max-width: 599px) { .ain__band { height: 500px; } }

/* ---------- #changes: the same call, missed and answered ---------- */
.aic__head { max-width: 46rem; margin: 0 auto var(--space-4); text-align: center; }
.aic__head .lede { margin-inline: auto; }
.aic__pair { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.5rem); }
.aic__item { position: relative; height: clamp(460px, 38vw, 540px); margin: 0; }
.aic__pic { position: absolute; inset: 0; overflow: hidden; border-radius: var(--radius-l); background: var(--c-ink); box-shadow: var(--shadow-l); }
.aic__pic img { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: var(--pos, 50% 50%); }
.aic__item--missed { --pos: 30% 50%; }
.aic__item--answered { --pos: 60% 40%; }
.aic__seq--missed { top: 22%; right: 1.25rem; width: min(18rem, 48%); }
.aic__seq--answered { bottom: 1.25rem; left: 1.25rem; width: min(17rem, 44%); }
.aic__stop { top: 1rem; right: 1rem; }
@media (max-width: 1023px) {
  .aic__pair { grid-template-columns: minmax(0, 1fr); }
  .aic__item { height: 460px; }
  .aic__item--missed { --pos: 50% 60%; }
}
/* on the phone: the missed call's cards over the pegboard at the top, the answered call's over her photo's foot */
@media (max-width: 759px) {
  .aic__pair { gap: 1.25rem; }
  .aic__item { height: 440px; }
  .aic__item--missed { --pos: 12% 50%; }
  .aic__seq--missed { top: .75rem; left: .75rem; right: 3.75rem; width: auto; }
  .aic__item--answered { --pos: 73% 40%; height: auto; padding-top: 440px; }
  .aic__item--answered .aic__pic { bottom: auto; height: 440px; }
  .aic__seq--answered { position: relative; inset: auto; width: auto; margin: -7.5rem .75rem 0; }
  .aic__stop { top: .75rem; right: .75rem; }
}

/* ---------- #signature: the dial in its panel on the designed ground ---------- */
.ais__panel { height: 540px; }
.scene.ais__scene { position: absolute; inset: 0; border-radius: inherit; }
/* under 390 px each call's line keeps whole in the latest calls list (15 px cut its longest lines with "…") */
@media (max-width: 389px) {
  .scene.ais__scene .andial-row { gap: 9px; }
  .scene.ais__scene .andial-row b { font-size: 14px; }
}
.ais__stop { top: 1rem; right: 1rem; }
@media (max-width: 1023px) { .ais__panel { height: 700px; } }

/* ---------- #see: the owner's alerts over his van's door ---------- */
.aiv__in { display: grid; grid-template-columns: minmax(0, .62fr) minmax(0, 1.38fr); align-items: center; gap: clamp(1.75rem, 4vw, 3.5rem); }
.aiv__words { max-width: 26rem; }
.aiv__frame { position: relative; height: clamp(520px, 42vw, 600px); margin: 0; }
.aiv__pic { position: absolute; inset: 0; overflow: hidden; border-radius: var(--radius-l); background: var(--c-ink); box-shadow: var(--shadow-l); }
.aiv__pic img { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: 62% 40%; }
.aiv__seq { top: 1.25rem; left: 1.25rem; width: min(20rem, 46%); }
.aiv__stop { top: 1rem; right: 1rem; }
@media (max-width: 1023px) {
  .aiv__in { grid-template-columns: minmax(0, 1fr); }
  .aiv__words { max-width: 40rem; }
  .aiv__frame { height: 560px; }
}
/* on the phone: four alerts over the photo's foot, below his phone */
@media (max-width: 759px) {
  .aiv__frame { height: auto; padding-top: 580px; }
  .aiv__pic { bottom: auto; height: 580px; }
  .aiv__pic img { object-position: 90% 40%; }
  .aiv__seq { position: relative; inset: auto; width: auto; margin: -10rem .75rem 0; }
  .aiv__more { display: none; }
  .aiv__stop { top: .75rem; right: .75rem; }
}

/* ---------- #close: the dinner at the right of the navy frame, the panel on the navy at its left ---------- */
.aiclose { --close-pos: 72% 40%; --close-pos-m: 100% 30%; }
.aiclose .close__media { left: 34%; -webkit-mask-image: linear-gradient(90deg, transparent, var(--c-ink) 22%); mask-image: linear-gradient(90deg, transparent, var(--c-ink) 22%); }
.aiclose::after { display: none; }
.aiclose__seq { top: 1.5rem; left: 52%; width: min(16.5rem, 24%); }
@media (max-width: 1199px) {
  .aiclose { align-items: end; justify-items: center; padding: 25rem 1.5rem 1.5rem; }
  .aiclose .close__media { left: 0; bottom: auto; height: 28rem; -webkit-mask-image: linear-gradient(180deg, var(--c-ink) 72%, transparent); mask-image: linear-gradient(180deg, var(--c-ink) 72%, transparent); }
  .aiclose .close__media img { object-position: 70% 40%; }
  .aiclose__seq { top: 1.25rem; left: 34%; width: min(16.5rem, 40%); }
}
@media (max-width: 759px) {
  .aiclose { padding: 20rem .75rem .75rem; justify-items: stretch; }
  .aiclose .close__media { height: 22rem; }
  .aiclose .close__media img { object-position: var(--close-pos-m); }
  .aiclose__seq { top: .75rem; left: .75rem; right: 3.75rem; width: auto; }
  .aiclose__seq > :first-child { display: none; }
}
