/* Home (pages/home.php): hero index, the five families, selected work, the Factory line, engineering, start. */

/* hero: the copy on the left, the figure fills the section; the index of the four works under the figure */
.hero--home { min-height: var(--shot-h, max(720px, 100svh)); }
.hero--home .hero__copy { max-width: 760px; }
.hero--home .hero__copy .mono b { color: var(--signal); font-weight: 500; }
.hero--home .lede { max-width: 34ch; }
.hero__index { right: var(--gutter); bottom: 44px; width: min(680px, 52vw); text-align: left; }
.hero__index ol { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hero__index li + li { border-left: 1px solid var(--line); }
.hero__index a { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 12px 12px 14px; color: var(--fg-2); text-decoration: none; transition: background .2s, color .2s; }
.hero__index a b { font: 500 10.5px/1.4 var(--mono); letter-spacing: .1em; color: var(--fg-3); }
.hero__index .hero__name { font: 620 16px/1.15 var(--sans); font-stretch: 106%; color: var(--fg); }
.hero__index .hero__line { font-size: 12.5px; line-height: 1.35; color: var(--fg-3); }
.hero__index .status { align-self: flex-start; margin-top: 6px; padding: 3px 7px; font-size: 9.5px; }
.hero__index a:hover, .hero__index a:focus-visible, .hero__index a.is-on { background: rgba(236, 239, 241, .045); color: var(--fg); }
.hero__index a:hover b, .hero__index a:focus-visible b, .hero__index a.is-on b { color: var(--signal); }

/* 02 the five families: a list on the left, the active family's real capture on the right (no-JS: every
   capture shows under its own family) */
.families { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-auto-rows: auto; column-gap: clamp(28px, 5vw, 88px); border-top: 1px solid var(--line); }
.family { grid-column: 1; padding: 22px 0 24px; border-bottom: 1px solid var(--line); }
.family h3 { margin: 0; font: 620 clamp(21px, 1.9vw, 30px)/1.1 var(--sans); font-stretch: 108%; letter-spacing: -.025em; }
.family h3 a { display: flex; gap: 18px; align-items: baseline; color: var(--fg-2); text-decoration: none; transition: color .2s; }
.family h3 b { flex: none; font: 500 11px/1 var(--mono); letter-spacing: .1em; color: var(--fg-3); transform: translateY(-3px); }
.family p { margin: 10px 0 0 38px; max-width: 46ch; color: var(--fg-3); font-size: 15px; }
.family__work { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 0 38px; padding: 0; list-style: none; font-size: 14px; }
.family__shot { margin: 18px 0 0 38px; }
.family__shot img { width: 100%; height: auto; border: 1px solid var(--line-2); border-radius: 4px; }
.family.is-on h3 a, .family h3 a:hover { color: var(--fg); }
.family.is-on h3 b { color: var(--signal); }
.family.is-on p { color: var(--fg-2); }
@media (min-width: 861px) {
  /* with scripts: one viewer on the right shows the active family's capture */
  .families.is-live { display: block; position: relative; min-height: 560px; }
  .families.is-live .family { width: 41%; }
  .families.is-live .family:not(.is-on) .family__work { display: none; }
  .families.is-live .family__shot { position: absolute; top: 22px; right: 0; width: 54%; margin: 0; display: none; }
  .families.is-live .family.is-on .family__shot { display: block; animation: phl-shot-in .28s var(--ease) both; }
  .families.is-live .family__shot img { aspect-ratio: 16 / 11; object-fit: cover; object-position: top left; box-shadow: 0 50px 90px -40px #000; }
}
.home-build__more { margin-top: clamp(28px, 4vw, 48px); }

/* 03 selected work: two wide rows and two half rows */
.showcase { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 5vw, 80px) clamp(24px, 3vw, 48px); }
.showcase__item { display: grid; gap: 22px; align-content: start; }
.showcase__item--wide { grid-column: 1 / -1; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; gap: clamp(24px, 4vw, 72px); }
.showcase__item--flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.showcase__item--flip .showcase__text { order: -1; }
.showcase__item .browser img, .showcase__item .frame img { width: 100%; height: auto; display: block; }
.showcase__item--wide .browser img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.showcase__item:not(.showcase__item--wide) img { aspect-ratio: 16 / 9; object-fit: cover; object-position: center; }
.frame { border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; background: var(--ink-2); box-shadow: 0 40px 80px -30px #000; }
.frame figcaption { margin: 0; padding: 12px 14px 14px; border-top: 1px solid var(--line); }
.showcase__text .mono { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.showcase__text h3 { margin: 0 0 12px; font-size: clamp(28px, 3vw, 44px); }
.showcase__text p { margin: 0 0 22px; max-width: 44ch; color: var(--fg-2); }

/* the Factory: one line and a link */
.factory-band { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px clamp(24px, 4vw, 72px); margin-top: clamp(56px, 7vw, 110px); padding-top: 32px; border-top: 1px solid var(--line); }
.factory-band__text .mono { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.factory-band__text h3 { margin: 0 0 12px; }
.factory-band__text p { margin: 0; color: var(--fg-2); max-width: 44ch; }
.factory-band > .btn { flex: none; }

/* 04 engineering: six links in a ruled grid */
.eng-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.eng-list li { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eng-list a { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 24px 26px 30px; color: var(--fg); text-decoration: none; transition: background .2s; }
.eng-list a:hover, .eng-list a:focus-visible { background: rgba(236, 239, 241, .035); }
.eng-list b { font: 620 21px/1.15 var(--sans); font-stretch: 106%; letter-spacing: -.015em; }
.eng-list span:last-child { color: var(--fg-2); font-size: 15px; max-width: 34ch; }
.eng-list a:hover .mono { color: var(--signal); }

/* 05 start: the closing invitation, with the section line drawn across */
.home-start { position: relative; overflow: hidden; padding-block: clamp(96px, 12vw, 200px); }
.home-start::after { content: ""; position: absolute; right: clamp(-40px, 6vw, 120px); top: 50%; width: 1px; height: 140%; background: linear-gradient(transparent, var(--signal) 30%, var(--signal) 70%, transparent); transform: translateY(-50%) rotate(26.6deg); opacity: .7; pointer-events: none; }
.home-start h2 { font-size: clamp(38px, 5.4vw, 88px); }

@media (max-width: 1100px) {
  .hero__index { width: min(560px, 60vw); }
  .eng-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .hero__index { position: static; order: 6; width: auto; margin: 0 var(--gutter) 28px; }
  .hero__index ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__index li:nth-child(3) { border-left: 0; }
  .hero__index li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .families { grid-template-columns: minmax(0, 1fr); }
  .family p, .family__work, .family__shot { margin-left: 0; }
  .showcase { grid-template-columns: minmax(0, 1fr); }
  .showcase__item--wide, .showcase__item--flip { grid-template-columns: minmax(0, 1fr); }
  .showcase__item--flip .showcase__text { order: 0; }
  .eng-list { grid-template-columns: minmax(0, 1fr); }
  .home-start::after { display: none; }
}

@keyframes phl-shot-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .families.is-live .family.is-on .family__shot { animation: none; } }
