/* Angular layout layer for the case studies (Military OneSource, CIA.gov).
   Asymmetric columns, staggered and offset imagery, cut-corner crops.
   Remove this file's <link> from a page to return to the even layout. */
:root { --cut: clamp(26px, 4.6vw, 72px); }

/* ---- crops: every image gets a diagonal cut; alternate figures cut the opposite corner ---- */
main figure { --c: var(--cut); }
@media (hover: hover) { main figure:hover { --c: calc(var(--cut) * 1.8); } }
main figure > img,
main figure > .grayscale,
main figure > .pagecap,
main figure > .wipe-box,
main > figure.grayscale,
main figure.grayscale:not(:has(figcaption)) {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%);
  box-shadow: none !important;
  transition: clip-path .9s cubic-bezier(.2,.7,0,1);
}
main figure:nth-of-type(even) > img,
main figure:nth-of-type(even) > .grayscale,
main figure:nth-of-type(even) > .pagecap,
main figure:nth-of-type(even) > .wipe-box,
main > figure.grayscale:nth-of-type(even) {
  clip-path: polygon(var(--c) 0, 100% 0, 100% 100%, 0 100%, 0 var(--c));
}
/* a slanted band for wide, panoramic images */
main figure.ang-slant > img { clip-path: polygon(7% 0, 100% 0, 93% 100%, 0 100%); }
@media (hover: hover) { main figure.ang-slant:hover > img { clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%); } }

/* ---- dividers: shorter, alternating sides, with the red corner tick ---- */
main > [data-rule] { position: relative; }
main > [data-rule]::before { content: ""; position: absolute; left: 0; top: 0; width: 14px; height: 14px; background: var(--color-accent); clip-path: polygon(0 0, 100% 0, 0 100%); }

/* ---- section labels pick up the slash from the home page ---- */
.eyeb { display: flex; align-items: center; gap: 14px; }
.eyeb::after { content: ""; flex: 0 0 44px; height: 2px; background: currentColor; transform: skewX(-40deg); }

@media (min-width: 900px) {
  /* hero headline steps in on alternate lines */
  [data-screen-label="Hero"] h1 > span:nth-child(even) { padding-left: clamp(0px, 8vw, 140px); }

  /* text grids go 5 / 7 instead of even halves */
  .two,
  main section div[style*="340px"],
  main > section[style*="340px"] { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr) !important; }

  /* full-width images stop short of the edge and alternate sides, leaving open space */
  main > figure,
  main > section > figure { width: 86%; }
  main > figure:nth-of-type(even),
  main > section > figure:nth-of-type(even) { margin-left: auto !important; }
  main figure.ang-slant { width: 100%; margin-left: 0 !important; }

  /* images inside a grid hang lower than their neighbour */
  main section div > figure:nth-child(even):has(img, image-slot) { margin-top: clamp(32px, 6vw, 96px) !important; }

  main > [data-rule]:nth-of-type(odd) { width: 62%; }
  main > [data-rule]:nth-of-type(even) { width: 62%; margin-left: 38%; }
}
@media (prefers-reduced-motion: reduce) { main figure > *, main figure { transition: none !important; } }
