/* Page chrome carried over from the design canvas, plus the rules that used to
   live as runtime-computed inline styles. Everything else stays inline. */

body {
  margin: 0;
  background: var(--color-neutral-100);
  /* Brand palette from jurczak.me: black ink, no accent — Nocturne's ramps
     retuned to true neutrals so the blue-violet cast drops out. */
  --color-neutral-100: #f7f7f6;
  --color-neutral-200: #e7e7e5;
  --color-neutral-300: #d1d1ce;
  --color-neutral-400: #b2b2ae;
  --color-neutral-500: #91918d;
  --color-neutral-600: #65655f;
  --color-neutral-700: #52524f;
  --color-neutral-800: #383836;
  --color-neutral-900: #1b1b1a;
  --color-accent-600: #1b1b1a;
}
/* Nocturne is a dark theme: its element rules paint h1-h6/p with
   --color-text (#e9e9ed), which is invisible on this light ground. */
:root, body { --color-text: #1b1b1a; }
h1, h2, h3, h4, h5, h6, p, li, figcaption, code, strong, em, span, a, button { color: inherit; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 144px; }
a { color: var(--color-neutral-900); text-decoration: none; }
a:hover { color: var(--color-neutral-600); }
::selection { background: color-mix(in srgb, var(--color-neutral-900) 14%, transparent); }
:focus-visible { outline: 2px solid var(--color-neutral-900); outline-offset: 3px; }

/* Hover treatments (were style-hover="" attributes handled by the runtime).
   The properties these override are set inline on the elements themselves, so
   the hover state only wins with !important. */
/* Buttons: ink fills from the bottom on hover, a small press on click (Nuno picked 1B, 2026-11-12) */
[data-hv="btn"] { position: relative; overflow: hidden; isolation: isolate; transition: border-color 160ms ease, color 180ms ease 60ms, transform 120ms ease !important; }
[data-hv="btn"]::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--color-neutral-900);
  transform: scaleY(0); transform-origin: bottom; transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
}
[data-hv="btn"]:hover { border-color: var(--color-neutral-900) !important; color: var(--color-neutral-100) !important; }
[data-hv="btn"]:hover span { color: inherit !important; }
[data-hv="btn"]:hover::before { transform: none; }
[data-hv="btn"]:active { transform: scale(0.97); }
@media (prefers-reduced-motion: reduce) { [data-hv="btn"]::before { transition: none; } [data-hv="btn"]:active { transform: none; } }
/* Cards keep their size on hover: the tile's own animation replays, and a clickable
   card lights a thin ring on its edge so it reads as a link. */
/* Clickable cards: a grey line drawn on the page 5px around the picture, so it never sits on the
   tile's own colours (Nuno, 2026-11-12). Keyboard focus keeps a dark line.
   Drawn as two box-shadow rings (page-coloured gap + 1px line), not as an outline: browsers
   round outline-offset down to whole pixels, so an animated outline grew in 1px steps and
   jumped at the very end; a box-shadow spread is drawn with sub-pixel precision. */
@property --card-ring-gap { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --card-ring-color { syntax: "<color>"; inherits: false; initial-value: transparent; }
[data-hv="card"][data-case],
.case-item[data-case] > [data-hv="card"] {
  box-shadow: 0 0 0 var(--card-ring-gap) var(--color-neutral-100),
              0 0 0 calc(var(--card-ring-gap) + 1px) var(--card-ring-color) !important;
  transition: --card-ring-color 200ms ease, --card-ring-gap 400ms cubic-bezier(0.16, 1, 0.3, 1) !important;
}
[data-hv="card"][data-case]:hover,
.case-item[data-case]:hover > [data-hv="card"] { --card-ring-color: var(--color-neutral-400); --card-ring-gap: 5px; }
[data-hv="card"][data-case]:focus-visible,
.case-item[data-case]:focus-visible > [data-hv="card"] { outline: none; --card-ring-color: var(--color-neutral-900); --card-ring-gap: 5px; }
@media (prefers-reduced-motion: reduce) {
  [data-hv="card"][data-case], .case-item[data-case] > [data-hv="card"] { transition: --card-ring-color 120ms ease !important; }
}

[data-lockup]:hover [data-lockup-clip],
[data-lockup]:focus-visible [data-lockup-clip] {
  max-width: 150px !important;
  --lockup-shift: 0px;
}

/* Copy-email button */
.copy-wrap { position: relative; display: inline-block; width: 80px; height: 18px; overflow: hidden; }
.copy-a, .copy-b { position: absolute; left: 0; top: 0; white-space: nowrap; }
.copy-a { transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1), opacity 220ms ease; }
.copy-b { transform: translateY(100%); opacity: 0; transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1) 40ms, opacity 220ms ease 40ms; }
[data-copy-email].copied .copy-a { transform: translateY(-100%); opacity: 0; }
[data-copy-email].copied .copy-b { transform: translateY(0); opacity: 1; }

/* Skills. The hidden sizer copy reserves the expanded height so the About
   column doesn't jump when the list opens. */
.skills-live { position: absolute; top: 0; left: 0; right: 0; }
.skills-sizer { visibility: hidden; pointer-events: none; }
.skill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.skill-frame { box-sizing: border-box; display: flex; flex-wrap: wrap; }
.skill {
  display: inline-flex; align-items: center; padding: 8px 16px; border-radius: 8px;
  background: #efefec; font-size: 13px; color: var(--color-neutral-900); white-space: nowrap;
}
.skill.sizer-extra { margin-right: 8px; margin-bottom: 8px; }
.skill.extra {
  box-sizing: border-box; margin-right: 8px; margin-bottom: 0;
  padding: 0 16px; max-height: 0; overflow: hidden; opacity: 0;
  transform: scale(0); transform-origin: center top;
  transition:
    opacity 120ms ease var(--d-out), transform 170ms cubic-bezier(0.4, 0, 1, 1) var(--d-out),
    max-height 170ms cubic-bezier(0.4, 0, 1, 1) var(--d-out), padding-top 170ms ease var(--d-out),
    padding-bottom 170ms ease var(--d-out), margin-bottom 170ms ease var(--d-out);
}
[data-skills][data-expanded="true"] .skill.extra {
  padding-top: 8px; padding-bottom: 8px; margin-bottom: 8px;
  max-height: 40px; opacity: 1; transform: scale(1);
  transition:
    opacity 200ms ease var(--d-in), transform 280ms cubic-bezier(0.22, 1, 0.36, 1) var(--d-in),
    max-height 280ms cubic-bezier(0.22, 1, 0.36, 1) var(--d-in), padding-top 280ms ease var(--d-in),
    padding-bottom 280ms ease var(--d-in), margin-bottom 280ms ease var(--d-in);
}
.skill-toggle {
  display: inline-flex; align-items: center; padding: 8px 16px; margin: 0;
  border: 1px solid var(--color-neutral-300); border-radius: 999px; background: transparent;
  color: var(--color-neutral-800); font-size: 13px; line-height: inherit; white-space: nowrap;
  cursor: pointer; font-family: var(--font-body); appearance: none; -webkit-appearance: none;
  transition: border-color 160ms ease, background 160ms ease;
}

/* Case study modal — the case study page itself loads in the frame, so there
   is exactly one copy of that markup on the server. */
[data-modal] {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: color-mix(in srgb, var(--color-neutral-900) 32%, transparent);
}
[data-modal][data-open] { display: flex; }
[data-modal-panel] {
  position: absolute; top: 24px; left: 24px; right: 24px; bottom: 24px;
  background: var(--color-neutral-100); border-radius: var(--radius-lg); overflow: hidden;
}
[data-modal-frame] { display: block; width: 100%; height: 100%; border: 0; }

/* ---- case study pages ---- */
.case-root {
  min-height: 100vh; background: var(--color-neutral-100); color: var(--color-neutral-900);
  font-family: var(--font-body); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
.case-headerwrap { position: fixed; top: 0; left: 0; right: 0; z-index: 50; pointer-events: none; }
.case-fade {
  position: absolute; inset: 0; height: 140px; --mobile-fade-h: 200px;
  background: linear-gradient(to bottom, var(--color-neutral-100) 55%, rgba(247, 247, 246, 0.72) 72%, rgba(247, 247, 246, 0.5) 80%, rgba(247, 247, 246, 0) 100%);
}
.case-headerrow {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  gap: 40px; max-width: 1120px; margin: 0 auto;
  padding: clamp(16px, 3vw, 32px) clamp(16px, 5vw, 40px) 40px; pointer-events: auto;
}
.case-hero { max-width: 1120px; margin: 0 auto; padding: clamp(152px, 20vw, 200px) clamp(16px, 5vw, 40px) 0; }

/* Embedded (in the home page's modal): sticky header, no logo/back link/footer. */
[data-embed] .case-root { overflow-x: visible; }
[data-embed] .case-headerwrap { position: sticky; }
[data-embed] .case-fade { height: 120px; --mobile-fade-h: 120px; }
[data-embed] .case-headerrow { max-width: none; width: 100%; box-sizing: border-box; padding: 20px 24px 24px; }
[data-embed] .case-hero { padding: 32px clamp(16px, 5vw, 40px) 0; }
.only-embed { display: none; }
[data-embed] .only-embed { display: contents; }
[data-embed] .only-page { display: none; }
.only-page, .view-skim, .view-full { display: contents; }
[data-view="skim"] .view-full, [data-view="full"] .view-skim { display: none; }

/* Skim / Full toggle (variant C "elastic", chosen in toggle-lab).
   .vt-ink is the dark capsule AND its white labels in one layer, revealed by a
   clip-path, so the label colour flips exactly at the capsule's edge. The two
   edges animate separately: the leading edge leaves first, the trailing edge
   follows, so the capsule stretches briefly and settles back to a pill. */
@property --vt-l { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --vt-r { syntax: "<length>"; inherits: false; initial-value: 0px; }
.vt {
  --vt-w: 86px; --vt-pad: 3px; --vt-dur: 420ms; --vt-ease: cubic-bezier(0.32, 0.72, 0, 1);
  position: relative; display: flex; align-items: center; isolation: isolate;
  width: calc(var(--vt-w) * 2 + var(--vt-pad) * 2 + 2px); height: 40px; padding: var(--vt-pad);
  box-sizing: border-box; border: 1px solid var(--color-neutral-300); border-radius: 999px;
  user-select: none; -webkit-user-select: none;
}
.vt-btn, .vt-ink > span {
  box-sizing: border-box; flex: none; width: var(--vt-w); height: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  font-family: var(--font-body); font-size: 13px; line-height: 1; white-space: nowrap;
}
.vt-btn {
  position: relative; margin: 0; padding: 0; border: 0; border-radius: 999px; background: transparent;
  color: var(--color-neutral-600); cursor: pointer; appearance: none; -webkit-appearance: none;
  transition: color 160ms ease, background 160ms ease;
}
.vt-btn:focus-visible { outline: 2px solid var(--color-neutral-900); outline-offset: 2px; }
[data-view="skim"] .vt-btn[data-view-btn="full"]:hover,
[data-view="full"] .vt-btn[data-view-btn="skim"]:hover {
  color: var(--color-neutral-900); background: color-mix(in srgb, var(--color-neutral-900) 5%, transparent);
}
.vt-ink {
  position: absolute; inset: var(--vt-pad); z-index: 2; display: flex; pointer-events: none;
  border-radius: 999px; background: var(--color-neutral-900); color: #fff;
  clip-path: inset(0 var(--vt-r) 0 var(--vt-l) round 999px);
  transition: --vt-l var(--vt-dur) var(--vt-ease), --vt-r var(--vt-dur) var(--vt-ease), scale 140ms ease;
}
[data-view="skim"] .vt-ink { --vt-l: 0px; --vt-r: var(--vt-w);
  transition: --vt-l calc(var(--vt-dur) * 0.8) var(--vt-ease), --vt-r var(--vt-dur) var(--vt-ease) calc(var(--vt-dur) * 0.22), scale 140ms ease; }
[data-view="full"] .vt-ink { --vt-l: var(--vt-w); --vt-r: 0px;
  transition: --vt-r calc(var(--vt-dur) * 0.8) var(--vt-ease), --vt-l var(--vt-dur) var(--vt-ease) calc(var(--vt-dur) * 0.22), scale 140ms ease; }
.vt:has(.vt-btn:active) .vt-ink { scale: 0.985; }
@media (prefers-reduced-motion: reduce) { .vt-ink { transition: none !important; } }

/* Breakpoints — the desktop values stay inline; these only stack and soften. */
@media (max-width: 1000px) {
  [style*="grid-template-columns: repeat(3, 1fr)"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 896px) {
  [style*="grid-template-columns: repeat(12, 1fr)"] { grid-template-columns: minmax(0, 1fr) !important; }
  [style*="grid-column: span"] { grid-column: 1 / -1 !important; }
}
@media (max-width: 860px) {
  [style*="grid-template-columns: 1.15fr 1fr"],
  [style*="grid-template-columns: 1.1fr 1fr"],
  [style*="grid-template-columns: 1.2fr 1fr"] { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (max-width: 760px) {
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns: repeat(3, 1fr)"] { grid-template-columns: minmax(0, 1fr) !important; }
  [data-modal-panel] { top: 4px; left: 4px; right: 4px; bottom: 4px; }
  /* Phones keep logo and both buttons on one row: tighter gaps and button padding (fits 360 px) */
  header { gap: 12px !important; }
  header > div:last-child { gap: 8px !important; }
  header > div:last-child > [data-copy-email], header > div:last-child > a { padding-inline: 16px !important; }
  .case-fade { height: var(--mobile-fade-h); }
  [id] { scroll-margin-top: 128px; }
  /* No height reservation on narrow screens — the list is too tall to hold open. */
  .skills-live { position: static; }
  .skills-sizer { display: none; }
}
@media (max-width: 560px) {
  [style*="grid-template-columns: 90px 1fr"] { grid-template-columns: minmax(0, 1fr) !important; gap: 4px !important; }
}

/* Talkie.ai card: the brand's purple ground with the scenario designer set on it as
   a window, inset top-left and running off the bottom; the tile's call card
   straddles its right edge. */
.tk-ground { background: #5c59cb; }
.tk-shot {
  position: absolute;
  left: 5%;
  top: 48px;
  width: 68%;
  height: auto;
  /* a floating window: a smaller radius in step with the scaled-down UI, a light
     hairline edge on the purple, then a fine dark one and a soft long shadow */
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.45), 0 0 0 2px rgba(20, 16, 90, 0.14), 0 30px 60px -16px rgba(20, 16, 90, 0.45);
}
/* Phones: only the call on the purple ground, centred; the designer screenshot goes */
@media (max-width: 560px) {
  .tk-shot { display: none; }
  .tk-ground [data-tile="talkie"] { top: 50%; translate: 0 -50%; }
}

/* Case studies: the tile is all picture; its name, year, title and line sit under it */
.case-meta { padding: 20px 0 0; }
.case-item:focus-visible { outline: none; }

/* Other projects: the copy keeps one inset from the card's left, right and bottom */
.other-grid > [data-hv="card"] > div:last-child { padding: 20px !important; }

/* Type system (phase 2): one family, Schibsted Grotesk; headings at 500. Inter stays loaded for the tiles only. */
:root {
  --font-heading: "Schibsted Grotesk", system-ui, sans-serif;
  --font-body: "Schibsted Grotesk", system-ui, sans-serif;
}
#top h1, #work h3, .sec-h, .xp-role, #contact h2 { font-weight: 500 !important; }
.sec-h, .xp-role { letter-spacing: -0.02em; }
.sec-h {
  margin: 0 0 40px; font-family: var(--font-heading); font-weight: 400;
  font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -0.015em;
  color: var(--color-neutral-900);
}
.label-h {
  margin: 0 0 12px; font-family: var(--font-body); font-size: 13px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-neutral-700);
}
.contact-grid a span:last-child { transition: color 160ms ease; }
@media (max-width: 760px) {
  .contact-grid { grid-template-columns: 1fr !important; align-items: start !important; }
}
/* Phones: the header is one row, so the hero starts right below it */
@media (max-width: 760px) { #top { padding-top: 128px !important; padding-bottom: 64px !important; } }
/* Header icons (envelope, LinkedIn): hidden until the narrowest phones */
.copy-mail, .hdr-li { display: none; }
/* Below 360 px the labels no longer fit next to the logo: both buttons become round icon buttons */
@media (max-width: 359px) {
  header > div:last-child > [data-copy-email], header > div:last-child > [data-hdr-li] { width: 40px !important; padding: 0 !important; justify-content: center !important; }
  [data-copy-email] .copy-wrap, [data-copy-email] .copy-arrow, [data-hdr-li] .hdr-label, [data-hdr-li] .hdr-arrow { display: none; }
  [data-copy-email] .copy-ic { width: 18px; height: 18px; }
  .copy-mail { display: block; transition: opacity 160ms ease, transform 280ms cubic-bezier(0.16, 1, 0.3, 1); }
  [data-copy-email].copied .copy-mail { opacity: 0; transform: scale(0.4); }
  .hdr-li { display: block; width: 16px; height: 16px; }
}

/* Experience: a short CV under About */
.xp { margin-top: 72px; }
.xp-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--color-neutral-300); }
.xp-row {
  display: grid; grid-template-columns: 140px minmax(0, 1fr) minmax(0, 1.3fr); gap: 32px;
  padding: 20px 0; border-bottom: 1px solid var(--color-neutral-200); align-items: baseline;
}
.xp-row:last-child { border-bottom: 0; }
.xp-years { font-size: 14px; color: var(--color-neutral-600); font-variant-numeric: tabular-nums; }
.xp-role { font-family: var(--font-heading); font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; }
.xp-co { display: block; margin-top: 4px; font-family: var(--font-body); font-size: 14px; letter-spacing: 0; color: var(--color-neutral-600); }
.xp-line { font-size: 15px; color: var(--color-neutral-700); text-wrap: pretty; }
@media (max-width: 760px) {
  .xp { margin-top: 64px; }
  .xp-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}
.fact { margin: 0; font-size: 15px; line-height: 1.5; color: var(--color-neutral-800); text-wrap: pretty; }

/* Toolkit: each tool makes its own small gesture on hover (2B) */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  #about span:hover > img[src*="toolkit-figma"] { animation: tk-wiggle 520ms ease; }
  #about span > img[src*="toolkit-claude"] { transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1); }
  #about span:hover > img[src*="toolkit-claude"] { transform: rotate(72deg) scale(1.15); }
  #about span:hover > img[src*="toolkit-affinity"] { animation: tk-flip 520ms cubic-bezier(0.16, 1, 0.3, 1); }
  #about span:hover > img[src*="toolkit-zed"] { animation: tk-zip 420ms cubic-bezier(0.16, 1, 0.3, 1); }
}
@keyframes tk-wiggle { 20% { transform: rotate(-12deg) } 45% { transform: rotate(10deg) } 70% { transform: rotate(-6deg) } 100% { transform: none } }
@keyframes tk-flip { from { transform: perspective(80px) rotateY(0) } to { transform: perspective(80px) rotateY(360deg) } }
@keyframes tk-zip { 40% { transform: translateX(6px) skewX(-14deg) } 100% { transform: none } }

/* Experience: spotlight, the row under the pointer stays, the rest fade (3A); not clickable, so the arrow cursor stays */
.xp-list, .xp-list * { cursor: default; }
@media (hover: hover) {
  /* fade the row's text, never its separator line */
  .xp-row > * { transition: opacity 220ms ease; }
  .xp-list:hover .xp-row > * { opacity: 0.4; }
  .xp-list:hover .xp-row:hover > * { opacity: 1; }
}

/* Clickable cards: an arrow joins the title, a "View project" pill follows the pointer (site.js) */
.card-ar { display: inline-block; width: 0.8em; height: 0.8em; margin-left: 8px; vertical-align: -0.05em; opacity: 0; transform: translateX(-8px);
           transition: opacity 200ms ease, transform 300ms cubic-bezier(0.16, 1, 0.3, 1); }
[data-case]:hover .card-ar, [data-case]:focus-visible .card-ar { opacity: 1; transform: none; }
.has-pill { cursor: none !important; }
.card-pill { position: fixed; left: 0; top: 0; z-index: 900; transform: translate(-50%, -50%); padding: 10px 16px; border-radius: 999px; background: var(--color-neutral-900); color: var(--color-neutral-100);
             font: 14px var(--font-body); white-space: nowrap; pointer-events: none; opacity: 0; scale: 0.6; transition: opacity 160ms ease, scale 220ms cubic-bezier(0.16, 1, 0.3, 1); }
.card-pill.on { opacity: 1; scale: 1; }
/* The same pill, sitting on the top-left corner of a scrollable/draggable area (half above it,
   like a notification badge) while the mouse is over it */
.has-hint { position: relative; }
.hint-pill { position: absolute; top: 0; left: 0; z-index: 5; translate: -12px -50%; padding: 10px 16px; border-radius: 999px; background: var(--color-neutral-900); color: var(--color-neutral-100);
             font: 14px var(--font-body); white-space: nowrap; pointer-events: none; opacity: 0; scale: 0.6; transform-origin: left center;
             transition: opacity 160ms ease, scale 220ms cubic-bezier(0.16, 1, 0.3, 1); }
.sc > .hint-pill { left: var(--sc-out); }
@media (hover: hover) and (pointer: fine) { .has-hint:hover > .hint-pill { opacity: 1; scale: 1; } }
/* Touch screens: no frame inside the page; the picture runs full height and scrolls with the page */
@media (hover: none), (pointer: coarse) {
  .dv-stage.dv-stage--scroll { height: auto; }
  .dv-stage.dv-stage--scroll .dv-layer { position: static; overflow: visible; }
  .dv-stage.dv-stage--scroll .dv-layer:not(.is-on) { display: none; }
  /* the switcher leads, so people know there is something to switch before they scroll through it */
  figure:has(> figcaption .dv) { display: flex; flex-direction: column; }
  figure > figcaption:has(.dv) { order: -1; margin: 0 0 16px !important; justify-content: flex-start !important; }
}
@media (prefers-reduced-motion: reduce) { .hint-pill { transition: opacity 120ms ease; } }
@media (prefers-reduced-motion: reduce) { .card-ar { transition: opacity 120ms ease; transform: none; } .card-pill { transition: opacity 120ms ease; } }

/* Copy email: the arrow turns into a check mark while "You got it!" shows */
.copy-ic { position: relative; display: inline-block; width: 13px; height: 13px; flex-shrink: 0; }
.copy-ic svg { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity 160ms ease, transform 280ms cubic-bezier(0.16, 1, 0.3, 1); }
.copy-ok { opacity: 0; transform: scale(0.4); }
.copy-ok path { stroke-dasharray: 22; stroke-dashoffset: 22; transition: stroke-dashoffset 320ms cubic-bezier(0.16, 1, 0.3, 1) 80ms; }
[data-copy-email].copied .copy-arrow { opacity: 0; transform: scale(0.4); }
[data-copy-email].copied .copy-ok { opacity: 1; transform: none; }
[data-copy-email].copied .copy-ok path { stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) { .copy-ic svg, .copy-ok path { transition: opacity 120ms ease; transform: none; } }

/* Contact links: the same spotlight as Experience; these are links, so the pointer stays */
@media (hover: hover) {
  .contact-grid > div:last-child > a > span { transition: opacity 220ms ease; }
  .contact-grid > div:last-child:hover > a > span { opacity: 0.4; }
  .contact-grid > div:last-child:hover > a:hover > span { opacity: 1; }
  .contact-grid > div:last-child > a:hover { color: var(--color-neutral-900); }
}

/* About: the facts column starts level with the first paragraph */
.about-facts > div:first-child > div:first-child { padding-top: 0 !important; }

/* Case-study decisions (Skim): number · lead as a heading · body and tradeoff.
   The lead used to sit bold inside the paragraph in a 560px column; now it scans on its own. */
.dec { display: grid; grid-template-columns: 34px minmax(0, 5fr) minmax(0, 7fr); gap: 0 32px; align-items: baseline; padding: 32px 0; }
.dec + .dec { border-top: 1px solid var(--color-neutral-200); }
.dec-num { font-family: var(--font-heading); font-size: 16px; color: var(--color-neutral-600); font-variant-numeric: tabular-nums; }
.dec-lead { margin: 0; font-size: 24px; line-height: 1.2; font-weight: 400; letter-spacing: -0.02em; text-wrap: balance; }
@media (max-width: 760px) {
  .dec { grid-template-columns: 34px minmax(0, 1fr); gap: 12px 16px; padding: 24px 0; }
  .dec > div { grid-column: 2; }
  .dec-lead { font-size: 20px; }
}

/* Device switcher (Coverseal): the Skim/Full pill with three options. The ink's
   insets come from the active index (--dv-i); data-dir picks which edge leads. */
.dv { --vt-w: 84px; --dv-i: 0; width: calc(var(--vt-w) * 3 + var(--vt-pad) * 2 + 2px); }
.dv .vt-ink { --vt-l: calc(var(--vt-w) * var(--dv-i)); --vt-r: calc(var(--vt-w) * (2 - var(--dv-i))); }
.dv[data-dir="right"] .vt-ink { transition: --vt-r calc(var(--vt-dur) * 0.8) var(--vt-ease), --vt-l var(--vt-dur) var(--vt-ease) calc(var(--vt-dur) * 0.22), scale 140ms ease; }
.dv[data-dir="left"] .vt-ink { transition: --vt-l calc(var(--vt-dur) * 0.8) var(--vt-ease), --vt-r var(--vt-dur) var(--vt-ease) calc(var(--vt-dur) * 0.22), scale 140ms ease; }
.dv--2 { width: calc(var(--vt-w) * 2 + var(--vt-pad) * 2 + 2px); }
.dv--2 .vt-ink { --vt-r: calc(var(--vt-w) * (1 - var(--dv-i))); }
.dv .vt-btn:not([aria-pressed="true"]):hover { color: var(--color-neutral-900); background: color-mix(in srgb, var(--color-neutral-900) 5%, transparent); }
.dv-stage { position: relative; aspect-ratio: 2740 / 1400; border-radius: var(--radius-lg); overflow: hidden; background: var(--color-neutral-200); }
.dv-layer { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 4%; opacity: 0; transform: scale(0.985); transition: opacity 360ms ease, transform 480ms cubic-bezier(0.22, 0.7, 0.2, 1); }
.dv-layer.is-on { opacity: 1; transform: none; }
.dv-layer img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 12px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 12px 32px -12px rgba(0, 0, 0, 0.18); }
.dv-layer[data-device-view="desktop"] { padding: 0; }
.dv-layer[data-device-view="desktop"] img { border-radius: 0; box-shadow: none; }
.dv-layer[data-device-view="mobile"] img { border-radius: 28px; }
@media (max-width: 700px) {
  .dv-stage { aspect-ratio: 4 / 5; }
  .dv-layer[data-device-view="desktop"] { padding: 4%; }
  .dv-layer[data-device-view="desktop"] img { border-radius: 8px; }
}
@media (prefers-reduced-motion: reduce) { .dv-layer { transition: none; } }
/* Tall screens: a fixed-height frame, each layer scrolls on its own. */
.dv-stage--scroll { aspect-ratio: auto !important; height: min(720px, 80vh); }
.dv-stage--scroll .dv-layer { display: block; overflow-y: auto; overscroll-behavior: contain; padding: 32px 24px; }
.dv-stage--scroll .dv-layer img { width: 100%; max-height: none; margin: 0 auto; }
/* Vink hero: desktop and phone side by side, equal height, on Vink's light blue */
.vk-hero { display: grid; grid-template-columns: 1.406fr 0.461fr; gap: clamp(16px, 3vw, 40px); align-items: center; padding: clamp(16px, 4vw, 56px); border-radius: var(--radius-lg); background: rgb(158, 199, 235); }
.vk-hero img { display: block; width: 100%; height: auto; border-radius: 12px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 16px 40px -16px rgba(16, 32, 64, 0.35); }
.vk-hero img + img { border-radius: 24px; }
@media (max-width: 600px) { .vk-hero { grid-template-columns: 1fr; } .vk-hero img + img { display: none; } }
/* A decision's picture spans the whole row, under the text. */
.dec-media { grid-column: 1 / -1; margin: 32px 0 0; }
/* Three phone screens side by side under a decision. */
.shots-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, 2vw, 24px); }
.shots-3 img { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); border: 1px solid var(--color-neutral-200); }

/* Coverseal decision 03: looping demo of the mobile options panel (rebuilt from Nuno's exports at half size, 384 × 700).
   site.js [data-cfg-demo] scrolls it, moves the cursor, flips options and rolls the price; zoom shrinks it on narrow screens. */
.cfg-stage { display: flex; justify-content: center; padding: 40px 16px; border-radius: var(--radius-lg); background: var(--color-neutral-200); }
.cfg-panel { --ink: #2b2e36; position: relative; width: 384px; height: 700px; flex: none; overflow: hidden; border-radius: 12px; background: #fff; color: #111; font-family: Lexend, var(--font-body); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 12px 32px -12px rgba(0, 0, 0, 0.18); transition: opacity 300ms ease; }
.cfg-view { height: 619px; overflow: hidden; }
.cfg-scroll { position: relative; padding: 24px 24px 40px; transition: transform 825ms cubic-bezier(0.45, 0, 0.2, 1); }
.cfg-h { display: flex; justify-content: space-between; align-items: center; height: 24px; margin: 24px 0 16px; font-size: 16px; font-weight: 500; }
.cfg-scroll > .cfg-h:first-child { margin-top: 0; }
.cfg-h small { margin-left: 8px; font-size: 13px; font-weight: 300; color: #6b6b6b; }
.cfg-h--sm { height: 22px; margin: 52px 0 12px; font-size: 14px; }
.cfg-h--gap { margin-top: 56px; }
.cfg-h--gap2 { margin-top: 28px; }
.cfg-add { font-size: 15px; font-weight: 400; }
.cfg-i { display: inline-grid; place-items: center; width: 14px; height: 14px; margin-left: 3px; border: 1.2px solid currentColor; border-radius: 50%; font: 500 9px/1 Lexend, sans-serif; font-style: normal; vertical-align: 1px; }
.cfg-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cfg-b { display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; border: 1px solid var(--ink); font-size: 14px; font-weight: 400; color: var(--ink); background: #fff; transition: background-color 180ms ease, color 180ms ease; }
.cfg-b.is-on { background: var(--ink); color: #fff; }
.cfg-ic--rect { display: inline-block; width: 13px; height: 17px; border: 1.2px solid currentColor; border-radius: 1px; }
.cfg-f { display: grid; grid-template-columns: 152px 1fr; align-items: center; margin-bottom: 16px; font-size: 13.5px; font-weight: 500; }
.cfg-f em, .cfg-in { display: flex; align-items: center; height: 40px; padding: 0 12px; background: #f4f4f4; font-style: normal; font-weight: 300; font-size: 13.5px; color: #6f6f6f; }
.cfg-in { padding: 0 12px; }
.cfg-sws { display: grid; grid-template-columns: repeat(5, 48px); gap: 19px; padding-left: 3px; }
.cfg-sw { width: 48px; height: 48px; border-radius: 50%; box-shadow: 0 0 0 3px #fff, 0 0 0 3px transparent; transition: box-shadow 200ms ease; }
.cfg-sw.is-on { box-shadow: 0 0 0 3px #fff, 0 0 0 4.5px var(--ink); }
.cfg-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 81px; padding: 14px 24px 0; border-top: 1px solid #e4e4e4; background: #fff; }
.cfg-bar > div { display: flex; justify-content: space-between; align-items: center; height: 34px; }
.cfg-bar > div > span:first-child { font-size: 17px; font-weight: 400; color: #333; }
.cfg-bar p { margin: 4px 0 0; font-size: 11.5px; font-weight: 300; color: #666; }
.cfg-price { display: flex; align-items: baseline; gap: 4px; font-size: 26px; font-weight: 600; color: var(--ink); }
.cfg-price small { font-size: 15px; font-weight: 500; }
.cfg-roll { position: relative; display: inline-block; overflow: hidden; height: 34px; line-height: 34px; text-align: right; }
.cfg-roll > span { display: block; white-space: nowrap; transition: transform 420ms cubic-bezier(0.22, 0.7, 0.2, 1), opacity 420ms ease; }
.cfg-roll > span + span { position: absolute; top: 0; right: 0; }
.cfg-cursor { position: absolute; left: 0; top: 0; opacity: 0; pointer-events: none; transition: transform 525ms cubic-bezier(0.45, 0, 0.2, 1), opacity 240ms ease; }
.cfg-cursor path { transform-origin: 2px 2px; transition: transform 120ms ease; }
.cfg-cursor.is-down path { transform: scale(0.82); }
.cfg-add--fade { opacity: 0; transition: opacity 200ms ease; }
.cfg-add--fade.is-on { opacity: 1; }
.cfg-f em.is-set { color: #111; font-weight: 400; }
@media (max-width: 560px) { .cfg-stage { padding: 16px; } } /* phones: the panel is zoomed to fit, so keep the same 16px frame on all four sides */
