/* Extra styles for work/ordwell-brand.html only. A brand case study is led by its images, so this adds:
   a full-bleed opener, a key work strip sized to each image, full-bleed and wide figures that enlarge on select,
   two and three up grids, the principles and decision rows, the social grid, the email and motion pair with a
   live CSS version of the logo animation, and the rollout steps. Shared header, footer, type and tokens are untouched. */

/* every brand image is a button that opens the shared enlarge dialog (js/case.js) */
.ob-art { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; text-align: start; }
.ob-art img { display: block; width: 100%; height: auto; }
.ob-art:focus-visible { outline-offset: 4px; }
[data-theme="dark"] .ob-art img { filter: brightness(.94); }
.ob-art { transition: transform .2s var(--ease); }
@media (hover: hover) { .ob-art:hover { transform: translateY(-2px); } }

/* framed images sit on a thin edge, so light boards do not melt into the paper */
.ob-fig:not(.ob-bleed) .ob-art img, .ob-keys .ob-art img { border-radius: 8px; box-shadow: 0 0 0 1px var(--plate-edge), 0 20px 44px -30px rgba(0, 0, 0, .45); }

/* opener: edge to edge under the facts strip */
.ob-hero { margin: clamp(36px, 5vw, 64px) calc(var(--m) * -1) 0; }

/* key work: each column sized to its image's shape so the three line up at the top and read as one row */
.keys-row.ob-keys { grid-template-columns: minmax(0, 1.38fr) minmax(0, 1.46fr) minmax(0, 1fr); align-items: start; row-gap: 32px; }
.ob-keys > li { display: block; }
.ob-keys .key-v { max-width: none; }
.ob-keys .key-c { margin-top: 16px; padding-bottom: 0; max-width: 30em; }

/* summary */
.prose .ob-nda { font-size: 15px; line-height: 1.55; color: var(--ink-2); padding-inline-start: 14px; border-inline-start: 2px solid var(--data); }
.prose .ob-nda b { color: var(--ink); font-weight: 540; }
.phases.ob-phases { grid-column: 8 / 13; }
.ob-phases .ph-bar { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.ob-phases .ph-bar span { font-size: 10.5px; }

/* figures: full width of the text column by default; ob-bleed runs to the screen edges */
.ob-fig { margin: 0; min-width: 0; }
.cs-head + .ob-fig, .cs-cols + .ob-fig { margin-top: clamp(40px, 4.4vw, 64px); }
.ob-fig > .fig-cap { margin-top: 14px; margin-inline-start: calc((100% + var(--g)) / 12); }
.ob-bleed { position: relative; z-index: 2; margin-inline: calc(var(--m) * -1); }
@media (min-width: 1280px) {
  /* the contents rail sits to the left of the text; a bleed covers it while it passes, then the rail returns */
  .ob-bleed { margin-inline-start: calc(-1 * (var(--m) + 176px + clamp(28px, 3vw, 56px))); }
}

.ob-grid { display: grid; gap: var(--g); align-items: start; }
.ob-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ob-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* principles */
.ob-principles { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--g); row-gap: 28px;
  margin-inline-start: calc((100% + var(--g)) / 12); }
.ob-principles li { padding-top: 14px; border-top: 1px solid var(--ink); }
.ob-principles .mono { color: var(--data-ink); font-size: 12px; }
.ob-principles h4 { margin-top: 8px; font-weight: 500; font-size: clamp(18px, 1.5vw, 21px); line-height: 1.25; letter-spacing: -.008em; text-wrap: balance; }
.ob-principles p { margin-top: 8px; font-size: 15px; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }

/* decisions */
.ob-why { margin-top: 36px; margin-inline-start: calc((100% + var(--g)) / 12); max-width: 46em; }
.ob-why p:last-child { font-size: 17px; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
.ob-decs { list-style: none; margin-top: 8px; }
.ob-dec { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); row-gap: 28px; align-items: start;
  padding: clamp(28px, 3.4vw, 48px) 0; border-bottom: 1px solid var(--rule); }
.ob-dec-t { grid-column: 2 / 6; }
.ob-dec-v { grid-column: 6 / 13; margin: 0; min-width: 0; }
.ob-dec-n { font-size: 11.5px; color: var(--data-ink); }
.ob-dec h4 { margin-top: 8px; font-weight: 480; font-size: clamp(22px, 2vw, 28px); line-height: 1.18; letter-spacing: -.012em; text-wrap: pretty; }
.ob-dec .pair-r:first-of-type { margin-top: 16px; }

/* final work: each part is a short heading block, then its image */
.ob-part { margin-top: clamp(64px, 7vw, 112px); scroll-margin-top: 16px; }
.cs-head + .ob-part { margin-top: clamp(40px, 4.4vw, 64px); }
.ob-part-t { margin-inline-start: calc((100% + var(--g)) / 12); max-width: 44em; }
.ob-part-k { font-size: 12px; color: var(--data-ink); }
.ob-part-t h3 { margin-top: 8px; font-weight: 460; font-size: clamp(24px, 2.2vw, 32px); line-height: 1.14; letter-spacing: -.016em; text-wrap: balance; }
.ob-part-t p:last-child { margin-top: 10px; font-size: 16.5px; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }
.ob-part > .ob-fig { margin-top: 28px; }
.ob-sub { margin-top: clamp(80px, 9vw, 140px); }

/* social: six posts, three across, edge to edge */
.ob-social { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ob-social .ob-art:hover { transform: none; }

/* email and motion side by side */
.ob-pair { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); row-gap: 56px; align-items: start; }
.ob-pair-a { grid-column: 1 / 6; display: grid; gap: 28px; }
.ob-pair-b { grid-column: 6 / 13; display: grid; gap: 20px; }
.ob-pair .ob-part-t { margin-inline-start: 0; }
.ob-pair-a .ob-part-t { margin-inline-start: calc((100% + var(--g)) / 5); }

/* the live logo animation: the disc sweeps open, the block lands, the wordmark fades up. Loops slowly. */
.ob-anim { display: flex; align-items: center; justify-content: center; gap: 16px; aspect-ratio: 16 / 7; border-radius: 8px; background: #0f1d2a;
  background-image: linear-gradient(rgba(79, 179, 200, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(79, 179, 200, .07) 1px, transparent 1px);
  background-size: 32px 32px; overflow: hidden; }
.ob-anim svg { width: clamp(64px, 9vw, 112px); height: auto; overflow: visible; }
.ob-anim-guide { fill: none; stroke: #4fb3c8; stroke-opacity: .28; stroke-width: .15; stroke-dasharray: .4 .4; animation: ob-guide 4.8s linear infinite; }
.ob-anim-disc { fill: none; stroke: #4fb3c8; stroke-width: 6.5; stroke-dasharray: 15.32 20.42; animation: ob-sweep 4.8s cubic-bezier(.2, .7, .2, 1) infinite; }
.ob-anim-block { fill: #d7f26b; animation: ob-block 4.8s cubic-bezier(.2, .7, .2, 1) infinite; }
.ob-anim-wm { font-weight: 640; font-size: clamp(30px, 4.2vw, 54px); letter-spacing: -.03em; line-height: 1.25; color: #fff; animation: ob-wm 4.8s cubic-bezier(.2, .7, .2, 1) infinite; }
@keyframes ob-sweep {
  0%, 6% { stroke-dasharray: 0 20.42; opacity: 1; }
  24% { stroke-dasharray: 15.32 20.42; }
  88% { stroke-dasharray: 15.32 20.42; opacity: 1; }
  96%, 100% { stroke-dasharray: 15.32 20.42; opacity: 0; }
}
@keyframes ob-block {
  0%, 6% { transform: translate(3.2px, -3.2px); fill: #d7f26b; opacity: 1; }
  24% { transform: translate(-.35px, .35px); }
  30% { transform: translate(0, 0); fill: #d7f26b; }
  40% { fill: #4fb3c8; }
  88% { transform: translate(0, 0); fill: #4fb3c8; opacity: 1; }
  96%, 100% { transform: translate(0, 0); fill: #4fb3c8; opacity: 0; }
}
@keyframes ob-guide { 0%, 20% { opacity: 1; } 28%, 100% { opacity: 0; } }
@keyframes ob-wm {
  0%, 28% { opacity: 0; transform: translateY(8px); }
  40%, 88% { opacity: 1; transform: none; }
  96%, 100% { opacity: 0; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ob-anim-guide { animation: none; opacity: 0; }
  .ob-anim-disc, .ob-anim-block, .ob-anim-wm { animation: none; }
  .ob-anim-block { fill: #4fb3c8; }
  .ob-art { transition: none; }
  .ob-art:hover { transform: none; }
}

/* next: rollout steps and the plain result */
.ob-steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--g); row-gap: 24px;
  margin: 40px 0 clamp(48px, 5vw, 72px); margin-inline-start: calc((100% + var(--g)) / 12); }
.ob-steps li { padding-top: 14px; border-top: 1px solid var(--ink); }
.ob-steps .mono { color: var(--data-ink); font-size: 12px; }
.ob-steps h4 { margin-top: 8px; font-weight: 500; font-size: 18px; line-height: 1.3; }
.ob-steps p { margin-top: 6px; font-size: 15px; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.exp-big .ob-exp-word { font-family: var(--sans); font-weight: 420; letter-spacing: -.02em; }

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  .keys-row.ob-keys { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ob-keys > li:nth-child(2) { grid-column: 1 / -1; grid-row: 1; }
  .phases.ob-phases { grid-column: 2 / 11; }
  .ob-principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ob-dec-t { grid-column: 1 / 13; max-width: 44em; }
  .ob-dec-v { grid-column: 1 / 13; }
  .ob-pair-a { grid-column: 1 / 13; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--g); align-items: start; }
  .ob-pair-a .ob-part-t { margin-inline-start: 0; }
  .ob-pair-b { grid-column: 1 / 13; }
}

/* ---------- phone ---------- */
@media (max-width: 720px) {
  .keys-row.ob-keys { grid-template-columns: 1fr; row-gap: 32px; }
  .ob-keys > li, .ob-keys > li:nth-child(2) { grid-column: auto; grid-row: auto; }
  .ob-keys .key-c { margin-top: 12px; }
  .ob-phases .ph-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 12px; }
  .ob-phases .ph-bar span { font-size: 11px; }
  .ob-fig > .fig-cap, .ob-principles, .ob-why, .ob-part-t, .ob-steps { margin-inline-start: 0; }
  .ob-principles { grid-template-columns: 1fr; row-gap: 20px; }
  .ob-grid--3 { grid-template-columns: 1fr; gap: 14px; }
  .ob-dec .ob-grid--2 { grid-template-columns: 1fr; gap: 14px; }
  .ob-dec { display: block; padding: 28px 0 32px; }
  .ob-dec-v { margin-top: 24px; }
  .ob-social { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .ob-pair { display: block; }
  .ob-pair-a { display: grid; grid-template-columns: 1fr; gap: 20px; }
  .ob-pair-b { margin-top: 56px; }
  .ob-steps { grid-template-columns: 1fr; }
  .ob-fig:not(.ob-bleed) .ob-art img, .ob-keys .ob-art img { border-radius: 6px; }
}

/* phones: dense sheets open at a readable size inside a sideways scroller (the page itself never scrolls sideways),
   and the three illustrations become a swipe row */
@media (max-width: 720px) {
  .ob-pan { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin;
    margin-inline: calc(var(--m) * -1); padding: 0 var(--m) 10px; }
  .ob-pan::before { content: "Swipe sideways to see the whole sheet"; display: block; position: sticky; inset-inline-start: 0; width: max-content;
    margin-bottom: 8px; font-family: var(--mono); font-size: 11px; line-height: 1.45; color: var(--ink-3); }
  .ob-pan > .ob-art { width: 900px; max-width: none; }
  .ob-bleed.ob-pan > .ob-art { width: 1040px; }
  .ob-pan > .fig-cap { position: sticky; inset-inline-start: 0; max-width: calc(100vw - 2 * var(--m)); }
  .ob-pan .ob-art:hover { transform: none; }
  .ob-dec-v.ob-pan { margin-top: 24px; }
  .ob-swipe { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: thin;
    margin-inline: calc(var(--m) * -1); padding: 0 var(--m) 10px; scroll-padding-inline: var(--m); }
  .ob-swipe > .ob-art { flex: 0 0 78%; scroll-snap-align: start; }
}
