/* ============================================================================
   Ipic Media: supporting pages (loads AFTER scrollcraft.css and styles.css)
   Quiet semantic pages in the same system: paper ground, ink logo, text nav,
   running-text CTA, colophon. No engine. The only motion is a CSS scroll-driven
   fade on figures where the browser supports animation-timeline; elsewhere
   content simply sits there.
   ========================================================================== */

/* ---------------------------------------------------------------- reveal -- */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    /* the photograph fades in; its caption stays put so it is never sampled mid-fade */
    .in > :not(figcaption) { animation: pg-in linear both; animation-timeline: view(); animation-range: entry 0% entry 38%; }
    @keyframes pg-in { from { opacity: 0; transform: translate3d(0, 12px, 0); } to { opacity: 1; transform: none; } }
    /* An entrance that fades a CONTROL can hand keyboard focus an invisible
       control: the browser's scroll-into-view parks the element at entry 0%,
       which is opacity 0 (verify.md). The people grid's photographs are real
       buttons, so they rise into place without fading. */
    .in > .person__btn { animation-name: pg-rise; }
    @keyframes pg-rise { from { transform: translate3d(0, 12px, 0); } to { transform: none; } }
  }
}

/* ---------------------------------------------------------------- header -- */
.page-head { align-items: center; }
.page-head__cta { flex: none; }
@media (max-width: 700px) { .page-head { align-items: flex-start; } .page-head__cta { width: 100%; } }

/* --------------------------------------------------------------- opening -- */
.pg-open { padding-block: clamp(3rem, 8vw, 6.5rem) clamp(2rem, 5vw, 4rem); display: grid; row-gap: var(--sc-5); }
.pg-open .deck { max-width: 46ch; }

/* -------------------------------------------------------------- sections -- */
.sec { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2rem, 5vw, 4.5rem); border-top: 1px solid var(--sc-hairline); scroll-margin-top: var(--sc-5); }
.sec > .h-section, .sec > .h-item { margin-bottom: var(--sc-5); }
.sec .prose + .h-item, .sec .prose + .h-section { margin-top: var(--sc-7); }
.sec .h-item + .prose { margin-top: var(--sc-3); }
.stack { display: grid; row-gap: var(--sc-4); }
.list { display: grid; row-gap: var(--sc-2); max-width: var(--sc-measure); }
.list li { padding-left: 1.1em; text-indent: -1.1em; }
.list li::before { content: "\00B7"; display: inline-block; width: 1.1em; text-indent: 0; color: var(--sc-accent); font-weight: 700; }
/* On a 1440 screen the copy occupied the left third and the right two thirds
   were empty paper: a narrow strip pinned to the left edge rather than a
   spread. The section heading moves into its own rail and the measure sits
   beside it, which is the layout the landing page's chapters already use. */
@media (min-width: 1100px) {
  .sec--rail { display: grid; grid-template-columns: minmax(0, 24ch) minmax(0, 1fr); column-gap: clamp(2rem, 6vw, 6rem); align-items: start; }
  .sec--rail > * { grid-column: 2; }
  .sec--rail > .h-section, .sec--rail > .h-item { grid-column: 1; grid-row: 1; margin-bottom: 0; }
  .sec--rail > .people, .sec--rail > .bts { grid-column: 1 / -1; margin-top: var(--sc-6); }
}
.cta-line { margin-top: var(--sc-6); }
.close { padding-block: clamp(3rem, 7vw, 6rem); border-top: 1px solid var(--sc-hairline); }

/* demo annotation: a fact the client must confirm before launch */
.note {
  font-family: var(--sc-font-display); font-size: var(--sc-t-xs); line-height: 1.5; color: var(--sc-ink-soft);
  border-left: 1px solid var(--sc-hairline-strong); padding-left: var(--sc-3); max-width: 52ch;
}
.note b { color: var(--sc-ink); font-weight: 600; }

/* ---------------------------------------------------------- a row (work) -- */
.row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--sc-5); row-gap: var(--sc-6); align-items: start; }
.row > * { grid-row: 1; }
.row__copy { display: grid; row-gap: var(--sc-4); }
/* the six service rows step across the page: the photograph changes side,
   width and offset each time, so no two consecutive rows share a layout.
   The twelve-column placements are DESKTOP ONLY, for the same reason the
   .bts grid below scopes its own: a two-class span beats the one-class reset
   in the phone media query, forces implicit tracks in a one-column grid and
   squeezes the copy. It did: five of the six service rows were setting body
   copy at about 20 characters a line at 390, and "Digital Marketing &
   Content Creation" wrapped to four. */
@media (min-width: 861px) {
  .row__media { grid-column: 1 / span 5; }
  .row__copy { grid-column: 7 / span 6; }
  .row-2 .row__media { grid-column: 9 / span 4; }  .row-2 .row__copy { grid-column: 1 / span 6; }
  .row-3 .row__media { grid-column: 2 / span 4; }  .row-3 .row__copy { grid-column: 7 / span 5; }
  .row-4 .row__media { grid-column: 9 / span 4; }  .row-4 .row__copy { grid-column: 2 / span 6; }
  .row-5 .row__media { grid-column: 1 / span 5; }  .row-5 .row__copy { grid-column: 7 / span 5; }
  .row-6 .row__media { grid-column: 7 / span 5; }  .row-6 .row__copy { grid-column: 1 / span 5; }
}
/* two of the six break the zigzag: the photograph runs as a plate across the
   measure and the copy sets beneath it, so no more than two zigzags sit together */
@media (min-width: 861px) {
  .row { align-items: center; }
  .row--plate { row-gap: var(--sc-5); }
  .row--plate > * { grid-row: auto; }
  .row--plate .row__media, .row--plate.row-3 .row__media, .row--plate.row-6 .row__media { grid-column: 1 / span 8; }
  .row--plate .row__copy, .row--plate.row-3 .row__copy, .row--plate.row-6 .row__copy { grid-column: 1 / span 7; }
  .row--plate .row__media img { aspect-ratio: 16 / 7; object-fit: cover; }
}
@media (max-width: 860px) {
  .row { grid-template-columns: minmax(0, 1fr); }
  .row > * { grid-row: auto; grid-column: auto; }
  .row__media { max-width: 30rem; }
}

/* ------------------------------------------------------------ work grid -- */
.bts { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--sc-5); row-gap: var(--sc-8); align-items: end; }
/* the twelve-column placements are desktop only; below 861px the two-column
   rules further down own the grid (an unscoped 7-span forced implicit tracks) */
@media (min-width: 861px) {
  .bts > figure:nth-child(1) { grid-column: 1 / span 7; }
  .bts > figure:nth-child(2) { grid-column: 9 / span 4; }
  .bts > figure:nth-child(3) { grid-column: 1 / span 4; }
  .bts > figure:nth-child(4) { grid-column: 6 / span 7; }
  .bts > figure:nth-child(5) { grid-column: 1 / span 5; }
  .bts > figure:nth-child(6) { grid-column: 7 / span 6; }
  .bts > figure:nth-child(7) { grid-column: 2 / span 4; }
  .bts > figure:nth-child(8) { grid-column: 7 / span 6; }
}
@media (max-width: 860px) {
  .bts { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--sc-6); }
  .bts > figure { grid-column: auto / span 2; }
  /* only an adjacent, even set stays half width: 2+3 pair up, 5 and 7 would
     each have been stranded beside an empty half column */
  .bts > figure:nth-child(2), .bts > figure:nth-child(3) { grid-column: auto / span 1; }
}

/* ---------------------------------------------------------------- people -- */
.people { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--sc-7) var(--sc-5); }
/* seven people: three across, then four, so no cell is left empty */
.people > :nth-child(-n+3) { grid-column: span 4; }
.people > :nth-child(n+4) { grid-column: span 3; }
@media (max-width: 860px) {
  .people { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--sc-6) var(--sc-4); }
  .people > :nth-child(-n+3) { grid-column: span 2; }
  .people > :nth-child(n+4) { grid-column: span 3; }
}
@media (max-width: 480px) {
  .people { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sc-6) var(--sc-3); }
  .people > :nth-child(n) { grid-column: span 1; }
}
.person figcaption { margin-top: var(--sc-3); }
.person__name { display: block; font-family: var(--sc-font-display); font-weight: 600; font-size: var(--sc-t-base); letter-spacing: var(--sc-track-snug); line-height: 1.2; }
.person__role { display: block; font-style: italic; color: var(--sc-ink-soft); font-size: var(--sc-t-sm); margin-top: 2px; }
.person__btn {
  display: block; width: 100%; padding: 0; border: 0; background: #12131A; cursor: pointer;
  aspect-ratio: 4 / 5; position: relative; overflow: hidden; color: inherit;
}
.person__btn img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.person__btn img:last-child { opacity: 0; }
@media (prefers-reduced-motion: no-preference) { .person__btn img { transition: opacity 260ms var(--sc-ease-out); } }
.person__btn[aria-pressed="true"] img:last-child { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .person__btn:not([aria-pressed="true"]):hover img:last-child { opacity: 1; }
}
.person__btn:focus-visible { outline: 2px solid var(--sc-accent); outline-offset: 3px; }


/* --------------------------------------------------------------- contact -- */
.contact { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--sc-5); row-gap: var(--sc-8); }
.contact__form { grid-column: 1 / span 7; }
.contact__facts { grid-column: 9 / span 4; display: grid; row-gap: var(--sc-6); align-content: start; }
@media (max-width: 860px) { .contact { grid-template-columns: minmax(0, 1fr); } .contact__form, .contact__facts { grid-column: auto; } }

.brief { display: grid; gap: var(--sc-5) var(--sc-4); grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 40rem; }
.brief .f--wide { grid-column: 1 / -1; }
@media (max-width: 560px) { .brief { grid-template-columns: minmax(0, 1fr); } }
.f { display: grid; row-gap: var(--sc-2); }
.f label { font-family: var(--sc-font-display); font-size: var(--sc-t-sm); font-weight: 600; letter-spacing: var(--sc-track-snug); }
.f label small { font-weight: 500; color: var(--sc-ink-soft); }
.f input, .f select, .f textarea {
  width: 100%; box-sizing: border-box; font: inherit; font-size: var(--sc-t-base); line-height: 1.4; color: var(--sc-ink);
  background: #FBFBF9; border: 1px solid var(--sc-hairline-strong); border-radius: 0; padding: var(--sc-3) var(--sc-3); min-height: 44px;
}
.f textarea { min-height: 9rem; resize: vertical; }
.f input:focus-visible, .f select:focus-visible, .f textarea:focus-visible { outline: 2px solid var(--sc-accent); outline-offset: 1px; border-color: var(--sc-ink); }
.brief__send { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--sc-3); align-items: center; }
.btn--quiet { background: transparent; color: var(--sc-ink); box-shadow: inset 0 0 0 1px var(--sc-hairline-strong); }
.btn--quiet:hover { background: var(--sc-ink); color: var(--sc-canvas); }
.brief__how { grid-column: 1 / -1; font-size: var(--sc-t-sm); color: var(--sc-ink-soft); max-width: 48ch; }
.js .no-js-only { display: none; }
.no-js .js-only { display: none; }

.facts p + p { margin-top: var(--sc-2); }
.facts .h-item { margin-bottom: var(--sc-3); }
