/* brek.design — Figma 311:4639 ("home"). */

:root {
  --ink: #000;
  --ink-2: #16161a;
  --ui-bg: #f2f2f2;
  --ui-frame: #e6e6e6;
  --phones-bg: #f5f5f5;
  --txt-secondary: #767676; /* 4.54:1 on white (AA); was #787878 at 4.42:1 */
  --txt-tertiary: #a3a3a3;
  --divider: #e6e6e6;
  --radius: 8px; /* corners of cards, images and videos: same as the case-study buttons */
  --font: "Medeo Sans", "Inter", system-ui, -apple-system, sans-serif;
}

/* Medeo Sans (SIL Open Font License 1.1, github.com/DNFDEVS/medeo-font), hosted with the site so
   every visitor sees the Figma typeface: variable font limited to weights 400-600 with optical
   sizing, Latin subset (licence and copyright kept in the file's name table). */
@font-face {
  font-family: "Medeo Sans";
  src: url("assets/fonts/medeo-sans-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  /* No scroll anchoring. Chrome restores the scroll position on reload by re-finding a block on
     screen, and it measured that block mid-appear-animation, so each quick reload opened the page
     a few px further down, then pulled it back. Image and video boxes have fixed sizes, so the
     layout doesn't shift and anchoring isn't needed; reloads now restore the exact position. */
  overflow-anchor: none;
}

/* Smooth in-page scrolling ("Zerion" → top), switched on by reveal.js at the visitor's first
   click, tap or key press. Set from the start, it also animated the scroll restore on reload. */
@media (prefers-reduced-motion: no-preference) {
  html.smooth-scroll {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--font);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

p {
  margin: 0;
}

/* Headings look like the text they replace (the name, the section labels); class rules style them.
   :where() keeps this at zero specificity so .cs-title / .cs-h on the case pages still win. */
:where(h1, h2) {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Shell: sticky sidebar + main column ---------- */

.v2 {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  max-width: 1480px;
  margin: 0 auto;
  padding: 16px;
}

/* Sidebar (Figma 312:13453): one viewport tall; name, bio and menu on top, links pinned to the bottom */
.v2-side {
  position: sticky;
  top: 16px;
  flex: 0 0 235px;
  height: calc(100vh - 32px);
  height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0 8px;
  font-size: 14px;
  line-height: 20px;
}

.v2-side-top {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.v2-id {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.v2-id-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.v2-avatar {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

.v2-bio {
  color: var(--txt-secondary);
}

/* Menu: the current page in black, the placeholder "Exploration · soon" in tertiary grey */
.v2-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.v2-nav-item.is-soon {
  color: var(--txt-tertiary);
  cursor: default;
}

/* Links (Figma 334:4546): "subtitle" style, 12/16 +2% uppercase, 16 apart */
.v2-links {
  display: flex;
  gap: 16px;
  color: var(--txt-secondary);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.24px;
  text-transform: uppercase;
}

.v2-links a {
  transition: color 0.2s ease;
}

.v2-links a:hover {
  color: var(--ink);
}

.v2-main {
  flex: 1 1 0;
  min-width: 0;
  max-width: 1205px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Hero (Figma 352:5169 "intro screen"): same collage as the exported image, with 7.5px corners */
.v2-hero {
  width: 100%;
  height: auto;
  aspect-ratio: 2560 / 1360;
  border-radius: var(--radius);
}

/* ---------- Text blocks: divider, label on the left, copy on the right ---------- */

/* Figma divider frame: 8 top padding + 1px line */
.v2-rule {
  flex: none;
  width: 100%;
  height: 0;
  margin: 8px 0 0;
  border: 0;
  border-top: 1px solid var(--divider);
}

.v2-text {
  display: flex;
  gap: 8px;
}

/* Section label (Figma "subtitle": 12/16, +2%; Secondary, uppercase) */
.v2-label {
  flex: 1 1 0;
  min-width: 0;
  padding: 48px 0 64px;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.24px;
  color: var(--txt-secondary);
  text-transform: uppercase;
  text-wrap: balance; /* no lone "·" or split year at the end of a line */
}

.nowrap {
  white-space: nowrap;
}

/* Copy column: 48 top, 32 bottom; stats or a case-study bar 24 below the copy */
.v2-text-card {
  flex: none;
  width: calc(50% - 4px);
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 48px 0 32px;
}

/* Copy (Figma "h2"): 16/24, -2%; paragraphs 16 apart */
.v2-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.32px;
}

/* Desktop: no single word alone on a paragraph's last line (home and case pages). Phones keep the
   default wrapping, where re-balancing would make the narrow column's right edge more ragged. */
@media (min-width: 901px) {
  .v2-body p,
  .cs-text p {
    text-wrap: pretty;
  }
}

/* Zerion stats */
.v2-stats {
  display: flex;
  gap: 8px;
  color: var(--ink);
}

.v2-stat {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.v2-num {
  font-size: 28px;
  line-height: 36px;
  white-space: nowrap;
}

.v2-lbl {
  font-size: 14px;
  line-height: 20px;
  color: var(--txt-secondary);
}

/* Case-study bar (Figma 334:4733): label with a 24px arrow 16 after it, on black */
.v2-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 16px 24px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  line-height: 20px;
  transition: background 0.2s ease;
}

.v2-cta:hover {
  background: var(--ink-2);
}

.v2-cta-title {
  white-space: nowrap;
}

.v2-cta-arrow {
  flex: none;
  width: 24px;
  height: 24px;
  transition: transform 0.2s ease;
}

.v2-cta:hover .v2-cta-arrow {
  transform: translateX(3px);
}

/* ---------- Media ---------- */

.v2-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.v2-row--16 {
  gap: 16px;
}

.v2-card {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--ui-bg);
}

.v2-card--r8 {
  border-radius: var(--radius);
}

.v2-card--frame {
  background: var(--ui-frame);
  box-shadow: inset 0 0 0 1px var(--ui-frame);
}

.v2-flex1 {
  flex: 1 1 0;
  min-width: 0;
}

.v2-half {
  flex: 0 0 calc(50% - 4px);
  min-width: 0;
}

/* Phone shots that share a card equally */
.v2-phone {
  flex: 1 1 0;
  min-width: 0;
  aspect-ratio: 936 / 1952;
}

.v2-phone img {
  width: 100%;
  height: 100%;
  object-fit: fill; /* the exports are within 0.1% of 936:1952; cover would crop a sliver, and Chrome then skips mipmaps (jagged text on 1x screens) */
}

/* Fixed-size phones (mobile + swap rows) */
.v2-phone--fixed {
  flex: 0 1 191px;
}

.v2-phone--192 {
  flex-basis: 192px;
}

/* Cropped image: a box with the image scaled/offset inside, exactly as in Figma */
.v2-crop {
  position: relative;
  overflow: hidden;
}

.v2-crop > img {
  position: absolute;
  left: var(--l, 0);
  top: var(--t, 0);
  width: var(--w, 100%);
  height: var(--h, 100%);
  max-width: none;
}

.v2-cover {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Mobile app row */
.v2-mobile {
  gap: 24px;
  padding: 64px 0;
  background: var(--phones-bg);
}

/* Swap row */
.v2-swap-left {
  padding: 64px 40px;
}

/* Demo videos: swap.mp4 at 412.6px tall = the 400px Figma phone; perps-demo.mp4 at 522.1px = the 512px phone */
.v2-swap-left video {
  height: 412.6px;
  width: auto;
  max-width: 100%;
}

.v2-perps-left video {
  height: 522.1px;
  width: auto;
  max-width: 100%;
}

.v2-swap-right {
  gap: 24px;
  padding: 64px;
}

/* Perps row (Figma 312:13695): 597 / 600 split */
.v2-perps-left {
  flex: 0 0 calc((100% - 8px) * 597 / 1197);
  min-width: 0;
  height: 632px;
  padding: 64px 32px;
}

.v2-perps-right {
  flex: 1 1 0;
  min-width: 0;
  height: 632px;
  gap: 32px;
  padding: 32px 64px;
}

.v2-pad-32-64 {
  gap: 32px;
  padding: 32px 64px;
}

.v2-pad-64 {
  gap: 32px;
  padding: 64px;
}

/* Safety row + magnifier lens over the third phone (Figma mask group 312:13736) */
.v2-safety-shot {
  flex: 0 0 calc((100% - 8px) * 477 / 1197);
  min-width: 0;
  height: auto;
  aspect-ratio: 477 / 572;
  border-radius: var(--radius);
  object-fit: cover;
}

.v2-lens-host {
  position: relative;
}

.v2-lens {
  position: absolute;
  left: 35.227%;
  top: 7.559%;
  width: 55.114%;
  aspect-ratio: 1;
  overflow: hidden; /* the mask hides the zoomed shot visually but not its layout box */
  -webkit-mask: url("assets/magnifier-mask.svg") center / 100% 100% no-repeat;
  mask: url("assets/magnifier-mask.svg") center / 100% 100% no-repeat;
  pointer-events: none;
}

.v2-lens > img.v2-lens-zoom {
  position: absolute;
  left: -129.41%;
  top: -112.54%;
  width: 456.69%;
  height: 952.4%;
  max-width: none;
}

.v2-lens > img.v2-lens-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Web */
/* Web cards keep Figma's proportions; the shot fills the width minus 32px each side, centred */
.v2-web-big {
  aspect-ratio: 1205 / 875;
  padding: 0 32px;
}

.v2-web-small {
  aspect-ratio: 595 / 432;
  padding: 0 32px;
}

.v2-web-shot {
  flex: 1 1 0;
  min-width: 0;
  aspect-ratio: 2880 / 1784;
  object-fit: cover;
}

/* Extension */
.v2-ext-big {
  padding: 64px 40px;
}

.v2-ext-small {
  padding: 32px 20px;
}

/* DNA */
.v2-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Side-by-side blocks end level (Security, extension, DNA and Rebrand rows). Rows stack below
   901px, so this is desktop only. Cards centre their content in the extra height; a DNA column
   that comes out a few px shorter shares the difference between its two images. */
@media (min-width: 901px) {
  .v2-row--eq {
    align-items: stretch;
  }

  .v2-row--eq > .v2-col > .v2-crop {
    flex: 1 1 auto;
  }

  /* Rebrand: the key visual + Web3 pair takes the height left beside the moodboard */
  .v2-row--eq .v2-brand-pair {
    flex: 1 1 0;
    min-height: 0;
  }

  .v2-row--eq .v2-brand-pair + .v2-cover {
    flex: none;
  }
}

/* Rebrand key visual + Web3 visual: one row at every width (beats the stacking .v2-row rule
   below 901px), both filled to the same height */
.v2-row.v2-brand-pair {
  flex-direction: row;
  align-items: stretch;
}

.v2-brand-pair > .v2-cover {
  height: auto;
  min-width: 0;
}

/* Branding */
.v2-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.v2-brand-video {
  width: 100%;
  height: 400px;
  border-radius: var(--radius);
  object-fit: cover;
  background: #d9d9d9;
}


/* ---------- Small screens: basic stacking ---------- */

@media (max-width: 900px) {
  .v2 {
    flex-direction: column;
    gap: 24px;
  }

  .v2-side {
    position: static;
    flex-basis: auto;
    width: 100%;
    height: auto;
    gap: 16px;
    padding: 8px 0 0;
  }

  .v2-side-top {
    gap: 16px;
  }

  .v2-nav {
    flex-direction: row;
    flex-wrap: wrap;
    column-gap: 16px;
  }

  .v2-links {
    flex-direction: row;
  }

  .v2-main {
    flex: none;
    width: 100%;
    max-width: none;
  }

  .v2-text {
    flex-direction: column;
    gap: 12px;
  }

  .v2-label {
    flex: none;
    padding: 32px 0 0;
  }

  .v2-text-card {
    width: 100%;
    max-width: 720px; /* keeps lines readable on tablets */
    gap: 24px;
    padding: 0 0 32px;
  }

  .v2-stats {
    flex-wrap: wrap;
    row-gap: 20px;
  }

  .v2-stat {
    flex-basis: calc(50% - 4px);
  }

  .v2-row {
    flex-direction: column;
    align-items: stretch;
  }

  /* Stacked rows: items take their content height. flex-basis 0 would apply to height here and
     collapse the cards that clip their content (the extension video, the brand moodboard). The
     KV + Web3 row inside the brand column stays horizontal (.v2-brand-pair), so it's not matched. */
  .v2-main > .v2-row > .v2-flex1,
  .v2-brand > .v2-row > .v2-flex1 {
    flex: none;
  }

  .v2-half,
  .v2-safety-shot {
    flex: none;
    width: 100%;
  }

  .v2-safety-shot {
    height: auto;
    max-width: 477px; /* its desktop size; no 900px-tall card on tablets */
    align-self: center;
  }

  .v2-perps-right .v2-phone {
    flex: 0 1 192px; /* same phone size as the neighbouring cards instead of 400px+ on tablets */
  }

  /* Demo videos shrink with the card instead of letterboxing inside a fixed height */
  .v2-swap-left video {
    width: min(309.45px, 100%);
    height: auto;
  }

  .v2-perps-left video {
    width: min(252.2px, 100%);
    height: auto;
  }

  .v2-mobile {
    flex-wrap: wrap;
    padding: 32px 16px;
  }

  .v2-mobile .v2-phone--fixed {
    flex: 0 1 calc(33.333% - 16px);
  }

  .v2-swap-right,
  .v2-pad-32-64,
  .v2-pad-64,
  .v2-perps-right {
    gap: 12px;
    padding: 24px;
  }

  .v2-perps-left,
  .v2-perps-right {
    flex: none;
    height: auto;
  }

  .v2-web-big,
  .v2-web-small {
    aspect-ratio: auto;
    padding: 24px;
  }

  .v2-ext-big,
  .v2-ext-small {
    padding: 24px;
  }

  .v2-brand-video {
    height: 220px;
  }
}


/* ---------- Appear on scroll (same style as the previous site) ----------
   Blocks fade in and rise 10px over 1.1s (ease-out) as they enter the viewport, staggered 70ms
   top-to-bottom, left-to-right. Gated by .js-reveal on <html>, which an inline <head> script adds
   before paint only when motion is allowed; reveal.js adds .is-in per block, once. No-JS and
   reduced-motion visitors get everything immediately. :where() keeps the hiding rule at low
   specificity so .is-in always wins. */
.js-reveal :where(
  .v2-id-row, .v2-bio, .v2-nav, .v2-links,
  .v2-main > :not(.v2-row):not(.v2-brand),
  .v2-main > .v2-row > *,
  .v2-brand > :not(.v2-row),
  .v2-brand > .v2-row > *,
  .cs-home, .cs-sec > :not(.cs-stack), .cs-stack > *
) {
  opacity: 0.001; /* not 0: browsers don't count opacity-0 paints, which delayed the measured LCP by the 1.1s fade */
  transform: translateY(10px);
  transition: opacity 1.1s cubic-bezier(0.22, 1, 0.36, 1), transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Name row, links and "← Home" fade in place (no rise), like the previous site's name and links */
.js-reveal :where(.v2-id-row, .v2-links, .cs-home) {
  transform: none;
}

.js-reveal .is-in {
  opacity: 1;
  transform: none;
}


/* ---------- Video cards (same player as the previous site) ----------
   Videos play only while on screen. A bar with play/pause and a seekable progress line fades in on
   hover or keyboard focus; clicking the video toggles it. Each card keeps its Figma size: the
   video is scaled so the phone/page in it matches the still it replaces. */
.v2-vcard {
  position: relative;
  overflow: hidden;
}

.v2-vcard video {
  display: block;
  cursor: pointer;
}

/* iOS only sends taps (click) to clickable elements: let a tap on the card's padding show the bar too */
@media (hover: none) {
  .v2-vcard {
    cursor: pointer;
  }
}

/* Without JavaScript the custom bar can't work (browsers show native controls instead) */
html:not(.js) .vc-bar {
  display: none;
}

/* Controls: a compact dark pill centred near the bottom of the card, readable on light and dark media */
.vc-bar {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(320px, calc(100% - 32px));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(20, 20, 20, 0.72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none; /* while hidden, taps go to the video instead of an invisible control */
  transition: opacity 0.18s ease;
}

@media (hover: hover) {
  .v2-vcard:hover .vc-bar {
    opacity: 1;
    pointer-events: auto;
  }
}

/* video.js adds .vc-show after a tap on the card (touch), .vc-drag during a seek drag, and .vc-paused
   when the visitor paused the video, under reduced motion, or when autoplay is blocked */
.v2-vcard.vc-show .vc-bar,
.v2-vcard.vc-drag .vc-bar,
.v2-vcard.vc-paused .vc-bar,
.v2-vcard:focus-within .vc-bar {
  opacity: 1;
  pointer-events: auto;
}

.vc-toggle {
  flex: none;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
}

.vc-toggle .ic-pause {
  display: none;
}

.v2-vcard.is-playing .vc-toggle .ic-play {
  display: none;
}

.v2-vcard.is-playing .vc-toggle .ic-pause {
  display: block;
}

.vc-track {
  position: relative;
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  touch-action: pan-y pinch-zoom; /* sideways drags seek; vertical swipes scroll; pinch-zoom still works */
}

/* A 24px-tall hit area around the 4px line */
.vc-track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -10px;
  bottom: -10px;
}

.vc-fill {
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: #fff;
}

/* Slot sizing: padding keeps each card at its Figma height around the scaled video */
.v2-swap-left.v2-vcard {
  padding: 57.7px 40px; /* swap.mp4 at 412.6px tall = the 400px phone */
}

.v2-perps-left.v2-vcard {
  padding: 54.9px 32px; /* perps-demo.mp4 at 522.1px tall = the 512px phone */
}

.v2-ext-big.v2-vcard {
  padding: 83.6px 40px; /* ext-wallet.mp4 at full width keeps the 820px Figma card */
}

@media (max-width: 900px) {
  .v2-ext-big.v2-vcard {
    padding: 24px;
  }
}

/* Safari keeps the stacked layout's height as a minimum after a resize across 900px */
@media (min-width: 901px) {
  .v2-web-big,
  .v2-web-small {
    min-height: 0;
  }
}

/* Laptop widths (901-1480px): the main column is narrower than its 1205px design width, so the
   Swap and Perps rows scale as a whole and keep their Figma proportions (no ragged card heights,
   no tiny phones in 632px cards). 1cqw = 1% of .v2-main's width, so N px at full size is
   N / 12.05 cqw; at 1480px and wider these resolve to exactly the Figma pixel values. */
@media (min-width: 901px) {
  .v2-main {
    container-type: inline-size;
  }

  .v2-swap-left.v2-vcard {
    padding: calc(57.7cqw / 12.05) calc(40cqw / 12.05);
  }

  .v2-swap-left video {
    height: calc(412.6cqw / 12.05);
  }

  .v2-swap-right {
    gap: calc(24cqw / 12.05);
    padding: calc(64cqw / 12.05);
  }

  .v2-swap-right .v2-phone--fixed {
    flex: 0 0 calc(192cqw / 12.05);
  }

  .v2-perps-left,
  .v2-perps-right {
    height: calc(632cqw / 12.05);
  }

  .v2-perps-left.v2-vcard {
    padding: calc(54.9cqw / 12.05) calc(32cqw / 12.05);
  }

  .v2-perps-left video {
    height: calc(522.1cqw / 12.05);
  }

  .v2-perps-right {
    gap: calc(32cqw / 12.05);
    padding: calc(32cqw / 12.05) calc(64cqw / 12.05);
  }
}


/* ---------- Phones: social links share the top row with the avatar and name ----------
   The sidebar's wrappers step aside (display: contents) so its pieces form one small grid:
   name + links, then the bio (8 below), then the menu (16 below). Desktop is unchanged. */
@media (max-width: 900px) {
  .v2-side {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "id links"
      "bio bio"
      "nav nav";
    align-items: center;
    row-gap: 8px;
    column-gap: 16px;
  }

  .v2-side-top,
  .v2-id {
    display: contents;
  }

  .v2-id-row {
    grid-area: id;
  }

  .v2-links {
    grid-area: links;
  }

  .v2-bio {
    grid-area: bio;
  }

  .v2-nav {
    grid-area: nav;
    margin-top: 8px;
  }
}


/* ---------- Image zoom (zoom.js), like the previous site's lightbox ----------
   Home-page images open large over the dimmed, blurred page; a click anywhere, × or Esc closes. */
.v2-zoomable {
  cursor: zoom-in;
}

/* Keyboard focus ring; a cropped image would clip its own ring, so its crop box shows it */
.v2-zoomable:focus-visible,
.v2-crop:has(> .v2-zoomable:focus-visible) {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.v2-crop > .v2-zoomable:focus-visible {
  outline: none;
}

.v2-zoom {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 48px; /* room above and below for the close button */
  background: rgba(18, 18, 18, 0.55);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  cursor: zoom-out;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.v2-zoom[hidden] {
  display: none;
}

.v2-zoom.is-open {
  opacity: 1;
}

/* zoom.js sizes the frame to the image's (or its crop's) shape and places the image inside */
.v2-zoom-frame {
  position: relative;
  flex: none;
  overflow: hidden;
  border-radius: var(--radius);
  transform: scale(0.98);
  transition: transform 0.2s ease;
}

.v2-zoom.is-open .v2-zoom-frame {
  transform: none;
}

.v2-zoom-img {
  position: absolute;
  max-width: none;
  transition: opacity 0.15s ease;
}

.v2-zoom-img.is-loading {
  opacity: 0;
}

/* Phones open as transparent cutouts (data-zoom), like the previous site: no frame, no background */
.v2-zoom.is-flat .v2-zoom-frame {
  overflow: visible;
  border-radius: 0;
}

.v2-zoom-close {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease;
}

.v2-zoom-close:hover {
  background: rgba(255, 255, 255, 0.24);
}

@media (max-width: 900px) {
  .v2-zoom {
    padding: 72px 16px;
  }

  .v2-zoom-close {
    right: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .v2-zoom,
  .v2-zoom-frame,
  .v2-zoom-img {
    transition: none;
  }
}


/* ---------- Print / Save as PDF ----------
   Blocks not yet scrolled into view are still hidden by the appear animation; show everything,
   and drop the video control bars. */
@media print {
  .js-reveal :where(
    .v2-id-row, .v2-bio, .v2-nav, .v2-links,
    .v2-main > :not(.v2-row):not(.v2-brand),
    .v2-main > .v2-row > *,
    .v2-brand > :not(.v2-row),
    .v2-brand > .v2-row > *,
    .cs-home, .cs-sec > :not(.cs-stack), .cs-stack > *
  ),
  .js-reveal .cs-pill {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .vc-bar,
  .v2-zoom {
    display: none !important;
  }

  /* Keep cards and figures whole on one page (a video split across a page break prints blank) */
  .v2-card,
  .v2-vcard,
  .v2-crop,
  .cs-card,
  .cs-fig {
    break-inside: avoid;
  }

  .v2-label,
  .cs-h {
    break-after: avoid;
  }
}
