/* =========================================================
   Main page · Figma "Main page — v4 · after review" (1411:15659)
   ========================================================= */

/* ---------- Hero ---------- */
.hero-wrap { border-bottom: 1px solid var(--stroke); }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 500px;
  align-items: center;
  gap: 96px;
  padding: 96px var(--page-pad);
}
.hero__text { display: grid; gap: 32px; }
.hero__role { margin-top: 16px; color: var(--accent); font-weight: 500; }
.hero__bottom { display: grid; gap: 24px; }
.hero__intro { max-width: 456px; color: var(--dark-grey); }

.hero__media {
  aspect-ratio: 500 / 520;
  overflow: hidden;
  border-radius: 16px;
  background: var(--grey-white);
}
/* the video frame is landscape: Figma crops it from the left edge */
.hero__media video,
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: left center; }

/* ---------- Section heads: Level 2 (44 title + 14 description, gap 16) ---------- */
/* heading → its content 48 (no extra body inset); above a line: 32 */
.box__head + .box__body { padding-top: 0; }
.box__desc { font-size: 14px; line-height: 20px; color: var(--dark-grey); }

/* ---------- Case cards ---------- */
.case-list { display: grid; gap: 24px; }
.case-halves { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }

.case-card {
  display: grid;
  height: 100%;
  padding: 12px;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: var(--white);
  transition: border-color 250ms var(--ease);
}
.case-card--wide { grid-template-columns: 440px minmax(0, 1fr); gap: 32px; }
.case-card--half { grid-template-rows: auto 1fr; gap: 20px; }

.case-card__cover {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: var(--grey-white);
}
.case-card--wide .case-card__cover { aspect-ratio: 440 / 280; }
.case-card--half .case-card__cover { aspect-ratio: 428 / 240; }
.case-card__cover > img { transition: transform 400ms var(--ease); }
.case-card__cover > img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.case-card__text {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}
.case-card--wide .case-card__text { padding: 12px 0; }
.case-card--half .case-card__text { padding: 0 12px 12px; }
.case-card__top { display: grid; gap: 16px; }
.case-card__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--grey-white);
  color: var(--dark-grey);
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
}
.case-card__title { font-size: 24px; line-height: 32px; font-weight: 700; }
.case-card__bottom { display: grid; justify-items: start; gap: 16px; }
.case-card__metric { color: var(--dark-grey); }
.case-card__metric b { margin-right: 8px; color: #178c54; font-weight: 700; white-space: nowrap; }
.case-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-weight: 700;
}
.case-card__cta .icon { transition: transform 250ms var(--ease); }
/* Figma "Link" component: Size=16 → 24px arrow, Size=14 → 20px arrow, gap 4.
   The arrow sits below the line centre, on the lowercase letters (16: 1.5px, 14: 1px).
   translate, not transform, so the hover nudge still works */
.icon-24 { width: 24px; height: 24px; }
.case-card__cta .icon { translate: 0 1.5px; }
.text-cta .icon, .other-col__cta .icon { translate: 0 1px; }

.case-card:hover,
.case-card:focus-visible { border-color: var(--stroke-hover); }
.case-card:hover .case-card__cover > *,
.case-card:focus-visible .case-card__cover > * { transform: scale(1.02); }
.case-card:hover .case-card__cta .icon,
.case-card:focus-visible .case-card__cta .icon { transform: translateX(4px); }
.case-card:focus-visible { outline-offset: 4px; }

/* ---------- Earlier work: rows ---------- */
/* rows read as cells: heading 32 | line | row 32 | line | row 32 (same as Initiatives) */
.box__head:has(+ .earlier-list) { padding-bottom: 32px; border-bottom: 1px solid var(--stroke); }
.earlier-list.box__body { display: grid; gap: 0; padding: 0; }
.earlier-row {
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
  align-items: center; /* name + company sit in the middle of the row */
  gap: 24px;
  padding: 32px var(--section-pad);
}
.earlier-row + .earlier-row { border-top: 1px solid var(--stroke); }
.earlier-row__name { display: grid; align-content: start; gap: 4px; }
.earlier-row__title { font-size: 20px; line-height: 28px; font-weight: 700; }
.earlier-row__company { font-size: 14px; line-height: 20px; color: var(--dark-grey); }
.earlier-row__details { display: grid; justify-items: start; gap: 12px; }

.text-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  color: var(--accent);
}
.text-cta .icon { transition: transform 250ms var(--ease); }
.text-cta:hover .icon,
.text-cta:focus-visible .icon { transform: translateX(4px); }

/* ---------- 3-column grid with dividers (Initiatives) ---------- */
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0 8px; }
.cols-3 .col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding: 32px 24px 48px;
}
.cols-3 .col + .col { border-left: 1px solid var(--stroke); }

.other-col__tile {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 8px;
  background: var(--accent-light);
  color: var(--accent);
}
.other-col__title { font-size: 20px; line-height: 28px; font-weight: 700; }
.other-col__desc { margin-top: 8px; font-size: 14px; line-height: 20px; color: var(--light-grey); }
.other-col__cta {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: auto;
  font-size: 14px; line-height: 20px; font-weight: 700;
  color: var(--accent); opacity: .4; cursor: default;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1279px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 42%); gap: 64px; }
  .case-card--wide { grid-template-columns: 46% minmax(0, 1fr); gap: 24px; }
  .earlier-row { grid-template-columns: 200px minmax(0, 1fr); }
}

@media (max-width: 1023px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 48px; padding-top: 64px; padding-bottom: 64px; }
  .hero__media { max-width: 500px; }

  .cols-3 { grid-template-columns: minmax(0, 1fr); padding: 0; }
  .cols-3 .col { padding: 32px var(--section-pad); }
  .cols-3 .col + .col { border-left: 0; border-top: 1px solid var(--stroke); }
}

@media (max-width: 767px) {
  .hero { padding-top: 32px; padding-bottom: 48px; gap: 32px; }
  .hero__title { font-size: 44px; line-height: 56px; }
  .hero__role { font-size: 20px; line-height: 28px; }

  .case-card--wide { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .case-card--wide .case-card__cover { aspect-ratio: 428 / 240; }
  .case-card--wide .case-card__text { padding: 0 4px 4px; }
  .case-card--half .case-card__text { padding: 0 4px 4px; }
  .case-halves { grid-template-columns: minmax(0, 1fr); }
  .case-card__cta { min-height: 44px; }

  .earlier-row { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .text-cta { min-height: 44px; }
}

/* live initiative link + document viewer */
button.other-col__cta { padding: 0; border: 0; background: none; font: inherit; font-size: 14px; line-height: 20px; font-weight: 700; }
.other-col__cta.is-live { opacity: 1; cursor: pointer; }
.other-col__cta.is-live .icon { transition: transform 250ms var(--ease); }
.other-col__cta.is-live:hover .icon, .other-col__cta.is-live:focus-visible .icon { transform: translateX(4px); }


/* checklist: the page as a white card on a light backdrop */
.doc-viewer .modal__body { padding: 24px; background: var(--grey-white); }
.doc-viewer .modal__body img { display: block; width: 100%; height: auto; border-radius: 12px; outline: 1px solid #eaeaea; outline-offset: -1px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 12px 32px rgba(0, 0, 0, .08); }

/* long documents: the doc page in an iframe */
.doc-frame { --modal-w: 1180px; --modal-h: 2000px; }
.doc-frame iframe { display: block; width: 100%; height: 100%; border: 0; }

@media (max-width: 767px) {
  .modal { width: calc(100vw - 16px); height: calc(100dvh - 32px); }
  .modal__head { height: 56px; padding: 0 8px 0 16px; }
  .modal__close { width: 44px; height: 44px; }
  .doc-viewer .modal__body { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { .modal[open] { animation: none; } }

/* thin, quiet scrollbars (macOS "always show scrollbars" draws a wide grey bar otherwise):
   a 4px thumb inside a 10px track, 6px and darker on hover. Firefox: scrollbar-width thin */
.modal__body::-webkit-scrollbar { width: 10px; height: 10px; }
.modal__body::-webkit-scrollbar-track { background: transparent; }
.modal__body::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 999px; background: rgba(16, 16, 16, .16) padding-box; }
.modal__body::-webkit-scrollbar-thumb:hover { border-width: 2px; background-color: rgba(16, 16, 16, .32); }
.modal__body::-webkit-scrollbar-corner { background: transparent; }
@supports not selector(::-webkit-scrollbar) { .modal__body { scrollbar-width: thin; scrollbar-color: rgba(16, 16, 16, .2) transparent; } }

/* Focus areas: one statement above the case list (Figma "Main page — v4", CaseStudiesSection → Body) */
.focus { display: grid; gap: 32px; padding: 64px var(--section-pad); border-bottom: 1px solid var(--stroke); }
.focus__label { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--dark-grey); }
.focus__text { font-size: 24px; line-height: 32px; font-weight: 700; text-wrap: pretty; }
.focus__text .hl { color: var(--accent); }
@media (max-width: 767px) { .focus { gap: 16px; padding: 48px var(--section-pad); } .focus__text { font-size: 20px; line-height: 28px; } }

/* the first screen is always one screen high (under the sticky header) */
.hero { min-height: calc(100svh - var(--header-h)); padding-top: 48px; padding-bottom: 48px; }
.hero__media { width: auto; height: clamp(440px, calc(100svh - var(--header-h) - 160px), 680px); aspect-ratio: 500 / 520; justify-self: end; }
.hero { grid-template-columns: minmax(0, 1fr) auto; }
@media (max-width: 1023px) {
  .hero { min-height: 0; grid-template-columns: minmax(0, 1fr); }
  .hero__media { height: auto; width: 100%; max-width: 500px; justify-self: start; }
}

/* wide case covers (Figma "Case study card", Cover slot): a screen card inset 32 from the left and top,
   running off the right and bottom edges, with its own hairline and shadow so it never melts into the grey */
.cover-screen { position: absolute; inset: 0; }
.cover-screen__card {
  position: absolute; left: 7.27%; top: 11.43%; right: 0; bottom: 0;
  overflow: hidden; border: 1px solid #eaeaea; border-top-left-radius: 8px;
  background: #f7f8f9;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 12px 32px rgba(0, 0, 0, .08);
}
.cover-screen__img { position: absolute; left: var(--l); top: var(--t); width: var(--w); height: var(--h); max-width: none; object-fit: cover; object-position: right top; }
.case-card__cover > .cover-screen { transition: transform 400ms var(--ease); }

/* ---------- First screen v5 (Figma "First screen · F · 3:2 video, larger", 1537:26918) ----------
   page side lines run down from the header, content inset 32 from them, video 648×432 (3:2),
   the first screen is 90% of the window */
.hero-wrap { border-bottom: 1px solid var(--stroke); }
.hero-frame { padding: 0 var(--page-pad); }
.hero {
  grid-template-columns: minmax(0, 432px) minmax(0, 648px);
  justify-content: space-between;
  align-items: center;
  gap: 48px;
  min-height: calc(90svh - var(--header-h));
  padding: 64px var(--section-pad);
  border-left: 1px solid var(--stroke);
  border-right: 1px solid var(--stroke);
}
.hero__text { gap: 32px; }
.hero__role { margin-top: 8px; }
.hero__intro { max-width: 432px; }
.hero__media { width: 100%; height: auto; aspect-ratio: 3 / 2; border-radius: 16px; justify-self: end; }
.hero .chip { padding: 6px 12px; border-radius: 4px; background: var(--grey-white); color: var(--black); font-size: 14px; line-height: 20px; font-weight: 400; }
/* header content lines up with the hero content on the main page */
.page-home .site-header { padding-left: calc(var(--page-pad) + var(--section-pad)); padding-right: calc(var(--page-pad) + var(--section-pad)); }
@media (max-width: 1023px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 40px; padding: 48px var(--section-pad); }
  .hero__media { justify-self: stretch; max-width: 648px; }
}
@media (max-width: 767px) {
  .hero { padding: 32px var(--section-pad) 40px; }
}

/* Focus areas (Figma "Main page — v4", 1411:15659): label 14 Medium, the statement 32/40 Bold, padding 64/32/48, gap 16 */
.focus { gap: 16px; padding: 64px var(--section-pad) 48px; }
.focus__text { font-size: 32px; line-height: 40px; }
@media (max-width: 767px) { .focus { padding: 48px var(--section-pad) 40px; } .focus__text { font-size: 24px; line-height: 32px; } }

/* trial: the same hairline as the case screenshots around the hero video (no shadow for now) */
.hero__media { outline: 1px solid #eaeaea; outline-offset: -1px; }

/* case card hover, clearer: the card turns light grey, the frame darkens a step;
   inside the cover only the screenshot zooms, the screen card and its hairline stay put */
.case-card { transition: border-color 250ms var(--ease), background-color 250ms var(--ease); }
.case-card:hover, .case-card:focus-visible { background: #fafafa; border-color: #e6e6e6; }
.case-card:hover .case-card__cover > .cover-screen,
.case-card:focus-visible .case-card__cover > .cover-screen { transform: none; }
.cover-screen__img { transition: transform 500ms var(--ease); transform-origin: right top; }
.case-card:hover .cover-screen__img, .case-card:focus-visible .cover-screen__img { transform: scale(1.04); }

/* tags: a translucent tint instead of a solid grey, so they stay visible on the hovered (grey) card */
.case-card .tag { background: rgba(16, 16, 16, .05); }
/* wide covers: the whole screen card grows to the right and down, its top-left corner (title, frame) stays put */
.cover-screen { transform-origin: left top; }
.case-card:hover .case-card__cover > .cover-screen,
.case-card:focus-visible .case-card__cover > .cover-screen { transform: scale(1.03); }
.case-card:hover .cover-screen__img, .case-card:focus-visible .cover-screen__img { transform: none; }

/* wide covers v3: the screenshot fills the screen card edge to edge (no inner gap, so no extra line),
   only the card has the hairline; on hover only the screenshot grows right and down from a fixed top-left corner */
.case-card .cover-screen,
.case-card:hover .case-card__cover > .cover-screen,
.case-card:focus-visible .case-card__cover > .cover-screen { transform: none; }
.cover-screen__img { left: 0; top: 0; width: var(--w, 100%); height: var(--h, 100%); object-fit: cover; object-position: right top; transform-origin: left top; transition: transform 500ms var(--ease); }
.case-card:hover .cover-screen__img, .case-card:focus-visible .cover-screen__img { transform: scale(1.04); }
/* rounded clip that stays clean while something inside is scaled (no white corner) */
.case-card__cover { isolation: isolate; -webkit-mask-image: -webkit-radial-gradient(white, black); }
/* half covers: grow right and down from the top-left corner too */
.case-card__cover > img { transform-origin: left top; }

/* keyboard focus on a case card = its hover state + an accent ring with the card's radius */
.case-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 16px; }
.text-cta:focus-visible, a.other-col__cta:focus-visible, button.other-col__cta:focus-visible { outline: none; text-decoration: underline; text-underline-offset: 4px; }

/* wide covers v4 (clean like the Figma card): no shadow, only a hairline on the top and left;
   the screen card runs past the right and bottom edges, so no right/bottom border or cut corner shows */
.cover-screen__card { right: -16px; bottom: -16px; box-shadow: none; border-color: #e6e6e6; border-top-left-radius: 8px; }
/* the image keeps the crop it had before the bleed: sized from the visible part of the card (card − 16) */
.cover-screen__img { width: calc((100% - 16px) * var(--kw, 1)); height: calc((100% - 16px) * var(--kh, 1)); }

/* wide covers v5: full hairline on all four sides (the card sits inside the cover, its bottom-right corner
   follows the cover's rounding); the screenshot moves 2px left so its own sidebar edge hides under the hairline */
.cover-screen__card { right: 0; bottom: 0; border: 1px solid #e6e6e6; border-radius: 8px 0 8px 0; box-shadow: none; }
.cover-screen__img { left: -6px; width: calc((100% + 6px) * var(--kw, 1)); height: calc(100% * var(--kh, 1)); }
/* v6: the cover PNGs are cut exactly at the sidebar edge (no grey sliver next to the hairline);
   natural aspect, height as before, an 11px gutter in the screen's own background on the left */
.cover-screen__card { background: #f7f7f8; }
.cover-screen__img { left: 11px; top: 0; width: auto; height: calc(100% * var(--kh, 1)); object-fit: fill; }

/* wide covers v7 (variant A): the grey cover gets its own frame in the card's stroke colour;
   the screen keeps its hairline on the top and left only and runs under the frame on the right and bottom */
.cover-screen__card { right: -1px; bottom: -1px; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.case-card__cover::after { content: ''; position: absolute; inset: 0; border: 1px solid var(--stroke); border-radius: inherit; pointer-events: none; z-index: 2; }

/* ---------- Ending (Figma "Main page — v4 · after review": Let's talk 1601:2819 + Colophon 1601:2831) ----------
   the frame lines run to the very bottom: no empty strip under the last section */
.page-home .content { padding-bottom: 0; }
.lets-talk {
  display: flex; flex-direction: column; align-items: center; gap: 24px;
  padding: 64px var(--section-pad);
  text-align: center;
}
.lets-talk__photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; }
.lets-talk__text { display: grid; gap: 16px; max-width: 420px; }
.lets-talk__text p { font-size: 16px; line-height: 24px; color: var(--dark-grey); }
.lets-talk__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 32px; }
.lets-talk__links a { font-size: 16px; line-height: 24px; font-weight: 700; color: var(--accent); text-decoration: none; text-underline-offset: 4px; }
.lets-talk__links a:hover, .lets-talk__links a:focus-visible { text-decoration: underline; outline: none; }
.colophon {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 8px 24px;
  padding: 24px var(--section-pad);
  font-size: 14px; line-height: 20px; color: var(--dark-grey);
}
.colophon__top { color: inherit; text-decoration: none; text-underline-offset: 4px; }
.colophon__top:hover, .colophon__top:focus-visible { color: var(--black); text-decoration: underline; outline: none; }
@media (max-width: 767px) {
  .lets-talk { padding: 48px var(--section-pad); }
  .colophon { flex-direction: column; }
}
/* below 1024 the floating contents pill sits at the bottom: room for it inside the colophon cell, so the frame still closes at the very end */
@media (max-width: 1023px) { .colophon { padding-bottom: calc(96px + env(safe-area-inset-bottom)); } }
/* colophon: three equal-weight sides, so the © line sits exactly in the centre of the row */
.colophon { display: grid; grid-template-columns: 1fr auto 1fr; }
.colophon > :nth-child(2) { justify-self: center; }
.colophon > :nth-child(3) { justify-self: end; }
@media (max-width: 767px) {
  .colophon { grid-template-columns: minmax(0, 1fr); }
  .colophon > :nth-child(2), .colophon > :nth-child(3) { justify-self: start; }
}

/* ---------- First screen v6 (Figma "First screen · 06", main layout 1537:26918) ----------
   grey eyebrow → two-line title 44 → intro 20 black; the video keeps its own ratio (1280×754),
   tilted −4° with a soft shadow. Rotation sits on the inner .hero__video so the load animation stays on .hero__media */
.hero { grid-template-columns: minmax(0, 521px) minmax(0, 500px); gap: 64px; }
.hero__text { gap: 24px; }
.hero__head { display: grid; gap: 16px; }
.hero__eyebrow { font-size: 16px; line-height: 24px; color: var(--dark-grey); }
.hero__intro { max-width: 480px; font-size: 20px; line-height: 28px; color: var(--black); }
.hero__media { width: 100%; height: auto; aspect-ratio: auto; overflow: visible; border-radius: 0; background: none; outline: none; }
.hero__video {
  aspect-ratio: 1280 / 754;
  overflow: hidden;
  border-radius: 16px;
  background: var(--grey-white);
  transform: rotate(-4deg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06), 0 16px 40px rgba(0, 0, 0, .10);
}
.hero__video video { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
@media (max-width: 1023px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero__media { max-width: 560px; justify-self: start; padding: 0 8px; }
  .hero__video { transform: rotate(-3deg); }
}
@media (max-width: 767px) {
  .hero__title { font-size: 32px; line-height: 40px; }
  .hero__intro { font-size: 18px; line-height: 26px; }
  .hero__video { transform: rotate(-2deg); }
}
