/* =====================================================================================================
   Home page (redesign) — page-scoped: everything is under body.home2 / .site-header--v2, so About, the
   case studies and the Guest Area keep their existing look. Reuses the project's Inter (fonts.css,
   weights 400 / 600) and the case-study font stack; hierarchy comes from size, line height and tracking.
   ===================================================================================================== */
/* tokens on the v2 pages, and on the v2 header / footer wherever they appear (also the case studies) */
body.home2, .site-header--v2, .hm-foot {
  --hm-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;  /* = case.css --cs-font */
  --hm-bg: #FFFFFF;
  --hm-ink: #161616;
  --hm-ink-2: #4A4A4A;          /* secondary text on white: 9.0:1 */
  --hm-red: #C82419;            /* accent; 5.9:1 on white, white on it 5.9:1 */
  --hm-rose: #FAEFED;           /* pale red */
  --hm-warm: #F5F3EF;
  --hm-char: #45403C;           /* 01 thumbnail: deep warm charcoal; light text on it 9.9:1 */
  --hm-stone: #ECE8E3;          /* 02 / 03 thumbnails: soft warm light grey */
  --hm-line: #161616;
  --hm-max: 1200px;
  --hm-gutter: clamp(20px, 4vw, 48px);
  --hm-header: 64px;
  --hm-radius: 8px;
  --hm-ease: cubic-bezier(.2, .7, .2, 1);
  background: var(--hm-bg); color: var(--hm-ink); font-family: var(--hm-font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body.home2 :where(h1, h2, h3, p, ol, figure) { margin: 0; padding: 0; }
body.home2 a { color: inherit; }
html:has(body.home2) { scroll-behavior: smooth; scroll-padding-top: calc(var(--hm-header) + 16px); }
@media (prefers-reduced-motion: reduce) { html:has(body.home2) { scroll-behavior: auto; } }
body.home2 :focus-visible { outline: 2px solid var(--hm-red); outline-offset: 3px; border-radius: 2px; }

/* ---------- header (v2) ---------- */
.site-header--v2 { position: sticky; top: 0; z-index: 50; height: var(--hm-header); background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); color: var(--hm-ink); }
.site-header--v2 .bar { width: auto; max-width: var(--hm-max); margin: 0 auto; padding: 0 var(--hm-gutter); height: 100%;
  display: flex; align-items: center; justify-content: space-between; border-bottom: 1.5px solid var(--hm-line); box-sizing: border-box; }
.site-header--v2 .logo--v2 { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--hm-ink); }
.site-header--v2 .logo--v2 .name { font-size: 18px; line-height: 1; letter-spacing: -.01em; font-weight: 600; }
.site-header--v2 .logo-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--hm-red); flex: none; }
.site-header--v2 .nav { margin: 0; gap: 28px; }
.site-header--v2 .nav a { color: var(--hm-ink); font-size: 15px; font-weight: 400; line-height: 44px; }
.site-header--v2 .nav a:hover { color: var(--hm-red); }
/* current page: red underline under the link (not colour alone) */
.site-header--v2 .nav a[aria-current="page"] { color: var(--hm-ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--hm-red);
  text-decoration-thickness: 2px; text-underline-offset: 8px; }
.site-header--v2 .drawer a[aria-current="page"] { color: var(--hm-red); font-weight: 600; }
.site-header--v2 .has-sub .sub::before { background: #fff; box-shadow: 0 12px 30px rgba(0, 0, 0, .10); border: 1px solid #ECECEC; border-radius: 8px; }
.site-header--v2 .has-sub .sub a { color: var(--hm-ink); line-height: 36px; height: 36px; font-size: 14px; }
.site-header--v2 .has-sub .sub a:hover { color: var(--hm-red); }
.site-header--v2 .menu-btn { color: var(--hm-ink); }
.site-header--v2 .drawer { background: #fff; }
.site-header--v2 .drawer a { color: var(--hm-ink); }
@media (max-width: 999px) {
  .site-header--v2 { height: var(--hm-header); }
  .site-header--v2 .bar { padding: 0 var(--hm-gutter); align-items: center; }
  .site-header--v2 .logo--v2 .name { font-size: 16px; }
  .site-header--v2 .menu-btn { width: 44px; height: 44px; margin: 0; padding: 12px 10px; }
  .site-header--v2 .menu-btn span { margin: 5px 0; }
  .site-header--v2 .drawer { inset: var(--hm-header) 0 0 0; }
}

/* ---------- layout ---------- */
.hm { max-width: var(--hm-max); margin: 0 auto; padding: 0 var(--hm-gutter); }
.hm-eyebrow, .hm-kicker { font-size: 13px; line-height: 1.4; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.hm-eyebrow { color: var(--hm-ink); }
.hm-kicker { color: var(--hm-red); }
.hm-body { font-size: 18px; line-height: 1.6; color: var(--hm-ink-2); }
.hm-red { color: var(--hm-red); }
.hm-h2 { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.12; letter-spacing: -.025em; font-weight: 600; }
.hm-h2--big { font-size: clamp(34px, 4.6vw, 60px); line-height: 1.05; letter-spacing: -.035em; }
.hm-h3 { font-size: clamp(26px, 2.9vw, 40px); line-height: 1.08; letter-spacing: -.03em; font-weight: 600; }

/* links: underline in red, arrow nudges on hover */
.hm-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 17px; font-weight: 600; text-decoration: none; color: var(--hm-ink);
  background: linear-gradient(var(--hm-red), var(--hm-red)) left calc(100% - 8px) / 100% 2px no-repeat; transition: background-size .25s ease, color .2s ease; }
.hm-link:hover { color: var(--hm-red); }
.hm-arrow { display: inline-block; transition: transform .25s var(--hm-ease); }
.hm-link:hover .hm-arrow { transform: translate(2px, -2px); }
.hm-link--cta:hover .hm-arrow { transform: translateY(3px); }
.hm-lock { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }

/* ---------- hero ---------- */
.hm-hero { display: grid; gap: 32px; align-items: end; padding: clamp(32px, 5vh, 56px) 0 0; border-bottom: 1.5px solid var(--hm-line); }
.hm-hero__text { display: grid; gap: 0; align-content: center; padding-bottom: clamp(28px, 5vh, 56px); }
.hm-display { margin-top: 18px !important; font-size: clamp(40px, 4.9vw, 72px); line-height: 1.0; letter-spacing: -.045em; font-weight: 600; }
@media (min-width: 900px) { .hm-display span { white-space: nowrap; } }
.hm-display span { display: block; }
.hm-lead { margin-top: 28px !important; max-width: 34em; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.55; color: var(--hm-ink); }
.hm-link--cta { justify-self: start; margin-top: 20px; }
.hm-note { margin-top: 28px !important; font-size: 13px; color: var(--hm-ink-2); }
.hm-hero__photo { position: relative; align-self: end; margin: 0; overflow: hidden; border-radius: var(--hm-radius) var(--hm-radius) 0 0; background: #F6F1EC; }
.hm-hero__photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
@media (min-width: 900px) {
  /* first screen: hero fills the view below the header, leaving the top of "Selected work" in sight */
  .hm-hero { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: clamp(24px, 3vw, 48px);
    min-height: clamp(520px, calc(100svh - var(--hm-header) - 110px), 720px); }
  .hm-hero__photo { height: 100%; min-height: 460px; }
}
@media (max-width: 899px) {
  .hm-hero__photo { aspect-ratio: 4 / 4.6; max-height: 560px; }
}

/* ---------- selected work ---------- */
.hm-work { padding: clamp(28px, 4vw, 40px) 0 clamp(64px, 8vw, 104px); }
.hm-work__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.hm-count { font-size: 18px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.hm-case { display: grid; gap: 20px; align-content: start; }
.hm-case__text { display: grid; gap: 12px; align-content: start; }
.hm-case__text .hm-h3 { margin-top: 4px; }
.hm-case__text .hm-link { justify-self: start; margin-top: 4px; }
.hm-thumb { display: block; overflow: hidden; border-radius: var(--hm-radius); text-decoration: none; }
.hm-thumb img { display: block; transition: transform .6s var(--hm-ease); }
.hm-case:hover .hm-thumb img, .hm-case:focus-within .hm-thumb img { transform: scale(1.02); }
/* 02 / 03: the devices (backdrop removed) on the same pale red as 01; the former in-image caption is live, dark text */
.hm-thumb--device { background: linear-gradient(160deg, #F1EEEA 0%, var(--hm-stone) 55%, #E3DED8 100%); aspect-ratio: 988 / 692; display: grid; place-items: center;
  padding: 5% 3.5% 3.5%; box-sizing: border-box; }
.hm-thumb--device img { width: 100%; height: 100%; object-fit: contain; }
.hm-thumb__cap { font-size: 12px; line-height: 1.4; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; color: var(--hm-ink-2); text-align: center; }
/* 01: copy and the two phones in separate areas on a pale red ground; dark text */
.hm-thumb--rose { background: radial-gradient(120% 140% at 85% 20%, #57504A 0%, var(--hm-char) 55%, #3A3532 100%); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); gap: clamp(20px, 3vw, 40px);
  align-items: center; padding: clamp(24px, 3.4vw, 44px); color: #F5F2EE; aspect-ratio: 16 / 10; box-sizing: border-box; }
.hm-thumb__copy { display: grid; gap: 14px; align-content: center; }
.hm-thumb__label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; color: rgba(245, 242, 238, .78); }
.hm-thumb__title { font-size: clamp(20px, 2vw, 26px); line-height: 1.15; letter-spacing: -.02em; font-weight: 600; }
.hm-thumb__body { font-size: clamp(14px, 1.15vw, 16px); line-height: 1.5; color: rgba(245, 242, 238, .82); }
/* two phones in identical boxes: same size, same top and bottom line */
.hm-thumb__phones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 22px); align-items: start; }
.hm-thumb__phones img { width: 100%; height: auto; aspect-ratio: 583 / 1256; object-fit: contain; }
.hm-pair { display: grid; gap: clamp(40px, 5vw, 56px); margin-top: clamp(40px, 5vw, 64px); }
@media (min-width: 900px) {
  .hm-case--lead { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 3.5vw, 48px); align-items: center; }
  .hm-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
  .hm-pair .hm-h3 { font-size: clamp(26px, 2.4vw, 34px); }
}
@media (max-width: 599px) {
  .hm-thumb--rose { grid-template-columns: minmax(0, 1fr); aspect-ratio: auto; gap: 20px; }
  .hm-thumb__phones { max-width: 320px; }
}

/* ---------- how I work ---------- */
.hm-how { padding: clamp(56px, 7vw, 88px) 0; border-top: 1.5px solid var(--hm-line); }
.hm-how .hm-kicker { margin-bottom: 14px; }
.hm-how .hm-h2 + .hm-body { margin-top: 18px; max-width: 46em; }
.hm-steps { list-style: none; display: grid; gap: 28px; margin-top: 40px !important; }
.hm-steps li { display: grid; gap: 8px; align-content: start; }
.hm-step__title { font-size: 20px; line-height: 1.3; letter-spacing: -.01em; font-weight: 600; }
.hm-steps p { font-size: 16px; line-height: 1.6; color: var(--hm-ink-2); }
@media (min-width: 900px) {
  .hm-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
  .hm-steps li { padding: 0 32px; border-left: 1.5px solid #D9D9D9; }
  .hm-steps li:first-child { padding-left: 0; border-left: 0; }
}

/* ---------- footer ---------- */
.hm-foot { background: var(--hm-red); color: #fff; }
.hm-foot__inner { max-width: var(--hm-max); margin: 0 auto; padding: clamp(48px, 6vw, 80px) var(--hm-gutter) 24px; }
.hm-foot__title { font-size: clamp(40px, 6vw, 84px); line-height: .98; letter-spacing: -.045em; font-weight: 600; }
.hm-foot__title span { display: block; }
.hm-foot__mail { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; margin-top: 28px; font-size: clamp(20px, 2.2vw, 28px); font-weight: 600; letter-spacing: -.01em;
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; color: #fff; word-break: break-all; }
.hm-foot__mail:hover { text-decoration-thickness: 3px; }
.hm-foot__tags { margin-top: 10px !important; font-size: 15px; color: #fff; }
.hm-foot__bar { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; margin-top: clamp(40px, 5vw, 64px);
  padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .45); font-size: 14px; }
.hm-foot__links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.hm-foot__links a { display: inline-flex; align-items: center; min-height: 44px; color: #fff; text-decoration: none; }
.hm-foot__links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.hm-foot :focus-visible { outline-color: #fff; }

/* ---------- motion: short, restrained; off with reduced motion (site.css .reveal handles the base) ---------- */
.js-reveal body.home2 .reveal { transform: translateY(16px); transition-duration: .7s; }
.js-reveal body.home2 .reveal.in { transform: none; }
.hm-steps li { transition: opacity .5s ease, transform .6s var(--hm-ease); transition-delay: calc(var(--i) * 110ms); }
.js-reveal .hm-steps.reveal:not(.in) li { opacity: 0; transform: translateY(10px); }
.hm-display span { transition: opacity .6s ease, transform .7s var(--hm-ease); }
.hm-display span:nth-child(2) { transition-delay: .08s; } .hm-display span:nth-child(3) { transition-delay: .16s; }
.js-reveal .hm-hero__text.reveal:not(.in) .hm-display span { opacity: 0; transform: translateY(14px); }
@media (prefers-reduced-motion: reduce) {
  body.home2 :is(.hm-steps li, .hm-display span, .hm-thumb img, .hm-arrow, .hm-link) { transition: none !important; }
  .hm-case:hover .hm-thumb img { transform: none; }
}
@media print { body.home2 :is(.hm-steps li, .hm-display span) { opacity: 1 !important; transform: none !important; } }
.hm-work { scroll-margin-top: calc(var(--hm-header) + 8px); }   /* "Explore selected work" lands below the sticky header */
body.home2 .hm-thumb--rose, body.home2 .hm-thumb--rose .hm-thumb__title { color: #F5F2EE; }   /* light text on the charcoal card (beats the generic link colour) */

/* slim footer (private-access page) */
.hm-foot--slim .hm-foot__inner { padding-top: 8px; padding-bottom: 8px; }
.hm-foot--slim .hm-foot__bar { margin-top: 0; border-top: 0; }
/* mobile drawer (v2): fully hidden when closed, so its links are not in the tab order */
@media (max-width: 999px) {
  .site-header--v2 .drawer { visibility: hidden; transition: opacity .25s ease, visibility 0s linear .25s; }
  .menu-open .site-header--v2 .drawer { visibility: visible; transition: opacity .25s ease; }
  .site-header--v2 .drawer .btn-cta { background: var(--hm-red); color: #fff; border: 0; border-radius: 999px; }
}

/* v2 header / footer on pages without body.home2 (case studies): own font, resets and box model */
.site-header--v2, .hm-foot { font-family: var(--hm-font); -webkit-font-smoothing: antialiased; }
.hm-foot :where(h2, p) { margin: 0; padding: 0; }
.hm-foot a { color: #fff; }
.site-header--v2 .bar { background: transparent; }
/* case studies with the v2 header: white page behind it (the old theme's body was dark grey) */
body:not(.home2):has(> .site-header--v2) { background: #fff; }
body:not(.home2) .site-header--v2 { background: #fff; }
/* mobile menu (v2): an opaque white panel from under the header to the bottom of the screen.
   The header's backdrop-filter made the header the containing block of the fixed drawer (so the drawer
   was only as tall as its links and the hero showed through); on small screens the header is solid
   white without blur, and the drawer is sized to the viewport and scrolls inside itself. */
@media (max-width: 999px) {
  .site-header--v2 { background: #FFFFFF; -webkit-backdrop-filter: none; backdrop-filter: none; z-index: 60; }
  .site-header--v2 .drawer { position: fixed; top: var(--hm-header); right: 0; bottom: auto; left: 0; height: calc(100vh - var(--hm-header));
    height: calc(100dvh - var(--hm-header)); box-sizing: border-box; background: #FFFFFF; z-index: 59;
    overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    justify-content: flex-start; padding: 32px var(--hm-gutter) 48px; }
  body.menu-open:has(.site-header--v2) { overflow: hidden; }   /* the page behind does not scroll while the menu is open */
}
