/* ==========================================================================
   Gustavo Lucena — Portfolio
   Breakpoints (mobile-first):
     Mobile   < 810px   (base styles)
     Tablet   ≥ 810px   @media (min-width: 810px)
     Web      ≥ 1200px  @media (min-width: 1200px)
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg: #fcfcfc;
  --fg: #050505;
  --text: #202020;
  --muted: rgba(5, 5, 5, 0.5);
  --subtle: rgba(5, 5, 5, 0.4);
  --soft: rgba(5, 5, 5, 0.7);
  --surface: #efefef;
  --surface-glass: rgba(239, 239, 239, 0.82);
  --line: rgba(5, 5, 5, 0.12);
  --inverse-bg: #050505;
  --inverse-fg: #fcfcfc;
  --termoli-red: #e64a33;

  --font-sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Sometype Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius-lg: 20px;
  --radius-sm: 8px;
  --radius-pill: 999px;

  /* layout */
  --gutter: 16px;          /* page side padding */
  --page-max: 1440px;
  --col-narrow: 552px;     /* about / contact column */
  --space-section: 64px;
  --space-block: 48px;
  --header-h: 76px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 810px) {
  :root {
    --gutter: 40px;
    --space-section: 88px;
    --space-block: 64px;
  }
}

@media (min-width: 1200px) {
  :root {
    --gutter: 32px;
    --space-section: 112px;
    --space-block: 72px;
  }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }

:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  padding: 10px 16px; border-radius: var(--radius-pill);
  background: var(--fg); color: var(--bg);
  transform: translateY(-200%);
}
.skip-link:focus-visible { transform: none; }

/* ---------- Typography ---------- */
.label {             /* nav, tags, tiny captions */
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
}
.meta {              /* location • year, section labels */
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
}
.title {
  font-size: 24px;
  line-height: 1.35;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.lead {
  font-size: clamp(20px, 1.4vw + 12px, 24px);
  line-height: 1.35;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.body {
  font-size: clamp(16px, 0.4vw + 14px, 18px);
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--text);
}
.muted { color: var(--muted); }

.link-underline {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: opacity 0.2s;
}
.link-underline:hover { opacity: 0.6; }

/* ---------- Icons (Phosphor sprite) ---------- */
.icon { width: 24px; height: 24px; flex: none; }
.icon--sm { width: 16px; height: 16px; }
.icon--xs { width: 12px; height: 12px; }

/* ---------- Header: two bars (site nav + projects) ----------
   On the home page the bars sit in the middle of the screen; everywhere
   else they're pinned to the top. Clicking a project morphs one into the
   other (see "Page transitions" at the end). */
:root {
  --bar-pad: 4px;
  --bar-h: 40px;
  --icon: 30px;      /* icon size (height of the glyph box) */
  --icon-w: 22px;    /* hit box width: close to the glyph, so spacing reads even */
  --icon-gap: 4px;
  --projects-pad: 8px;
}
@media (min-width: 810px) {
  :root { --bar-h: 48px; --icon: 40px; --icon-w: 30px; --icon-gap: 8px; --projects-pad: 14px; }
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px var(--gutter);
  pointer-events: none;
}

.bars {
  --ext-l: 0px;      /* how far the projects bar grows while magnified (set by JS) */
  --ext-r: 0px;
  --nav-shift: 0px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  pointer-events: auto;
}
/* Named only while a page transition runs: a permanent view-transition-name
   would stop the bars' backdrop blur from seeing the page behind them. */
html:active-view-transition .bars { view-transition-name: bars; }

.bar {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  height: var(--bar-h);
  padding: var(--bar-pad);
  border-radius: var(--radius-pill);
}
.bar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
}

/* Site nav */
.nav {
  gap: 2px;
  transform: translateX(calc(-1 * var(--nav-shift)));
}
.nav a {
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  font-weight: 400;
  color: var(--muted);  /* current page and hover go full black */
  transition: color 0.25s;
}
/* Avatar: first item inside the nav bar, full bar height */
.nav a.avatar {
  flex: none;
  width: calc(var(--bar-h) - 2 * var(--bar-pad));
  padding: 0;
  margin-right: 2px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface);
  transition: transform 0.3s var(--ease-out);
}
.nav a.avatar:hover { transform: scale(1.06); }
.nav a.avatar img { width: 100%; height: 100%; object-fit: cover; }
.nav a:hover,
.nav a[aria-current="page"] { color: var(--fg); }
.nav a[aria-current="page"] { font-weight: 600; } /* monospace: no width shift */
@media (min-width: 810px) {
  .bars { gap: 8px; }
  .nav { gap: 4px; }
  .nav a { padding: 0 18px; }
}

/* Projects */
.projects { gap: var(--icon-gap); padding-inline: var(--projects-pad); }
.projects::before {
  left: calc(-1 * var(--ext-l));
  right: calc(-1 * var(--ext-r));
}
.project {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: var(--icon-w);
  height: var(--icon);
  border-radius: 50%;
  color: var(--subtle);  /* 40% at rest; hover and current go full black */
  transition: color 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.project.is-active,
.project[aria-current="page"] { color: var(--fg); }
.project:focus-visible { outline-offset: 4px; }

/* Single-colour SVG marks (sprite symbols), optically sized per shape */
.project__icon {
  width: calc(var(--icon) * 0.62);
  height: calc(var(--icon) * 0.62);
  overflow: visible;
  transform-origin: 50% 0;     /* pinned bar: icons grow downwards */
}
.project__icon--termoli,
.project__icon--sprinter { width: calc(var(--icon) * 0.7); height: calc(var(--icon) * 0.7); }
.project__icon--acaso-employee { width: calc(var(--icon) * 0.74); height: calc(var(--icon) * 0.74); }
.page-home .project__icon { transform-origin: 50% 100%; } /* centred bar: they pop up */

/* Without the magnifier (touch, keyboard-only, reduced motion) */
.projects:not(.has-dock) .project__icon { transition: transform 0.4s var(--ease-out); }
.projects:not(.has-dock) .project.is-active .project__icon { transform: scale(1.18); }

/* Project name under the bar, follows the active icon (positioned by JS) */
.bars__label {
  position: absolute;
  top: 0;
  left: 0;
  max-width: calc(100% - 2 * var(--gutter));
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  background: var(--inverse-bg);
  color: var(--inverse-fg);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  opacity: 0;
  translate: 0 -4px;
  transition: opacity 0.2s, translate 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.bars__label.is-visible { opacity: 1; translate: 0 0; }
.bars__label:empty { display: none; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--inverse-bg);
  color: var(--inverse-fg);
}
.site-footer__inner {
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 24px;
  padding: 40px var(--gutter);
}
.socials { display: flex; gap: 24px; }
.socials a { opacity: 1; transition: opacity 0.2s, transform 0.3s var(--ease-out); }
.socials a:hover { opacity: 0.6; transform: translateY(-2px); }

@media (min-width: 810px) {
  .site-footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    min-height: 124px;
    padding: 0 40px;
  }
}

/* ---------- Media helpers ---------- */
.media { position: relative; overflow: hidden; background: var(--surface); }
.media > img,
.media > video { width: 100%; height: 100%; object-fit: cover; }

/* Placeholder stripes while media loads (as in the original) */
.media--stripes {
  background-color: #e6e6e6;
  background-image: repeating-linear-gradient(
    -45deg, transparent 0 14px, rgba(255, 255, 255, 0.55) 14px 16px
  );
}

/* Fade media in once loaded (JS adds .is-loaded); without JS it's always visible */
.js .fade-media { opacity: 0; transition: opacity 0.6s var(--ease-out); }
.js .fade-media.is-loaded { opacity: 1; }

/* ==========================================================================
   HOME — two bars in the middle of the screen; hovering a project shows its
   cover full-screen, an info card above and its name below.
   ========================================================================== */
.page-home {
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.page-home .site-header {
  inset: 0;
  display: grid;
  grid-template-rows: 1fr auto 1fr; /* keeps the bars exactly centred */
  justify-items: center;
}
.page-home .bars { grid-row: 2; }

/* Info cards (one per project, stacked; the active one shows) */
.previews {
  grid-row: 1;
  align-self: end;
  display: grid;
  width: min(380px, 100%);
  margin-bottom: 32px;  /* clears the magnified icons */
  transition: transform 0.45s var(--ease-out); /* follows the active icon (JS) */
}
.preview {
  grid-area: 1 / 1;
  align-self: end;
  display: grid;
  gap: 12px;
  padding: 20px 22px 18px;
  border-radius: var(--radius-lg);
  background: var(--surface-glass);  /* same glass as the bars */
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.98);
  transform-origin: 50% 100%;
  transition: opacity 0.2s, transform 0.4s var(--ease-out), visibility 0s 0.4s;
}
.preview.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.25s, transform 0.4s var(--ease-out);
}
.preview__meta { display: flex; gap: 8px; color: var(--subtle); }
.preview__desc {
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--text);
}
.preview__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.preview__cta { display: inline-flex; align-items: center; gap: 6px; color: var(--fg); }
.hint-touch { display: none; }
@media (hover: none) {
  .hint-hover { display: none; }
  .hint-touch { display: inline; }
}

/* Full-screen covers */
.covers {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.cover {
  position: absolute;
  inset: 0;
  background: var(--cover-bg, var(--surface));
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.5s var(--ease-out), transform 1.2s var(--ease-out);
}
.cover.is-active {
  opacity: 1;
  transform: none;
  view-transition-name: cover;
}
.cover img,
.cover video { width: 100%; height: 100%; object-fit: cover; }
.cover--contain video {
  position: absolute;
  top: 0;
  left: 50%;
  width: auto;
  max-width: none;
  aspect-ratio: 7 / 9;
  transform: translateX(-50%);
}
/* Wider than the video: fade its sides into the matching background colour */
@media (min-aspect-ratio: 7 / 9) {
  .cover--contain video {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
  }
}

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about-hero {
  height: 200px;
  background: #0d3a6b;
}
.about-hero video { width: 100%; height: 100%; object-fit: cover; }

.column {
  width: 100%;
  max-width: calc(var(--col-narrow) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.about-main { padding-top: 40px; padding-bottom: var(--space-block); }
.about-main .column > section + section { margin-top: var(--space-block); }

.bio { display: grid; gap: 20px; }
.bio__intro .lead:first-child { font-weight: 500; }

.edu { display: grid; gap: 10px; margin-top: 16px; }
.edu__card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px 16px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.edu__icon { width: 42px; height: 42px; display: grid; place-items: center; flex: none; }
.edu__icon img { width: 42px; height: 42px; object-fit: contain; }
.edu__body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.edu__row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.edu__name { font-size: 14px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; }
.edu__years { font-family: var(--font-mono); font-size: 12px; line-height: 1.5; color: var(--soft); flex: none; }
.edu__sub { font-size: 12px; line-height: 1.5; color: var(--soft); }

.section-head { display: grid; gap: 4px; margin-bottom: 20px; }
.section-head .body { color: var(--muted); }

/* Collaborations carousel */
.collab {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: var(--radius-lg);
  margin: 0 calc(-1 * var(--gutter));
  padding: 0 var(--gutter);
  scroll-padding: 0 var(--gutter);
}
.collab::-webkit-scrollbar { display: none; }
.collab__item {
  flex: none;
  width: calc((100% - 8px) / 1.6);
  aspect-ratio: 248 / 308;
  display: grid;
  place-items: center;
  border-radius: var(--radius-lg);
  scroll-snap-align: start;
}
.collab__item img { width: auto; height: auto; max-width: 60%; }

/* Skills grid */
.tools { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.tool {
  position: relative;
  aspect-ratio: 179 / 184;
  display: grid;
  place-items: center;
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: transform 0.4s var(--ease-out);
}
.tool:hover { transform: translateY(-3px); }
.tool img { margin-bottom: 20px; }
.tool .label {
  position: absolute;
  left: 8px; right: 8px; bottom: 22px;
  text-align: center;
}

@media (min-width: 480px) {
  .tools { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 810px) {
  .about-hero { height: 260px; }
  .about-main { padding-top: 48px; }
  .collab { margin: 0; padding: 0; scroll-padding: 0; }
  .collab__item { width: calc((100% - 8px) / 2.2); }
}
@media (min-width: 1200px) {
  .about-hero { height: 300px; }
}

/* ==========================================================================
   CONTACT
   ========================================================================== */
.page-contact { min-height: 100svh; display: flex; flex-direction: column; }
.page-contact main { flex: 1; padding-top: 180px; padding-bottom: var(--space-block); }
.contact-title {
  font-size: clamp(36px, 4vw + 16px, 56px);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -0.03em;
}
.contact-intro { margin-top: 16px; }

/* Link rows (contact + case study awards) */
.rows { display: grid; margin-top: 40px; border-bottom: 1px solid var(--line); }
.row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 4px;
  border-top: 1px solid var(--line);
}
.row__text { flex: 1; display: grid; gap: 4px; }
.row__text .label { color: var(--muted); }
.row__title { font-size: 20px; line-height: 1.25; font-weight: 500; letter-spacing: -0.02em; }
.row > * { transition: transform 0.35s var(--ease-out); }
a.row:hover > :not(:last-child) { transform: translateX(6px); }
a.row:hover > :last-child { transform: translate(2px, -2px); }

/* ==========================================================================
   CASE STUDY (Termoli)
   ========================================================================== */
.case { padding-top: 120px; }
.wrap { width: 100%; max-width: var(--page-max); margin: 0 auto; padding: 0 var(--gutter); }

.case-intro__text {
  font-size: clamp(26px, 1.2vw + 20px, 36px);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -0.02em;
  max-width: 62ch;
}
.case-intro__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 40px;
  margin-top: 40px;
}
.case-intro__meta a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-top: 4px;
  border-top: 1px solid currentColor;
  transition: opacity 0.2s;
}
.case-intro__meta a:hover { opacity: 0.6; }

.case-hero { margin-top: var(--space-block); }

.bleed { width: 100%; }
.bleed img, .bleed video { width: 100%; height: auto; }
.bleed + .bleed { margin-top: 0; }

.pair {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--termoli-red);
}
.pair img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 720 / 810; }

.case-section { margin-top: var(--space-section); }
.case-section--tight { margin-top: var(--space-block); }

/* Overview: sidebar + content */
.overview { display: grid; gap: 48px; }
.overview__title {
  font-size: clamp(36px, 1.5vw + 26px, 45px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.overview__place { margin-top: 20px; }
.credits { display: grid; gap: 24px; margin-top: 40px; }
.credits dt { color: var(--muted); margin-bottom: 8px; }
.credits dd + dd { margin-top: 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 40px; max-width: 280px; }
.tags li {
  padding: 13px 16px;
  border-radius: var(--radius-pill);
  background: var(--inverse-bg);
  color: var(--inverse-fg);
}

.overview__content > * + * { margin-top: 24px; }
.overview__content .rows { margin-top: 48px; border-bottom: 0; }
.overview__content .row { padding: 16px 0 24px; }
.overview__content h2 { margin-top: 72px; }
.overview__content h2 + p { margin-top: 20px; }
.overview__content p + p { margin-top: 20px; }

/* "Content" column used for text blocks aligned with the overview content */
.content-col > p + p { margin-top: 20px; }
.logo-text { margin-top: 32px; }
.logo-text p + p { margin-top: 20px; }

.figure-wide img { width: 100%; height: auto; border-radius: 0; }

/* Brand values list */
.values { display: grid; gap: 32px; }
.value { display: grid; gap: 8px; }

/* Motion trio */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.trio video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; background: var(--surface); }

/* Statement + vertical video */
.statement { display: grid; gap: 40px; }
.statement__title {
  font-size: clamp(52px, 4vw + 32px, 81px);
  line-height: 0.9;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.statement video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; background: #2b2b2b; }

.case-end { margin-top: var(--space-block); }

/* --- Tablet --- */
@media (min-width: 810px) {
  .case { padding-top: 132px; }
  .pair { grid-template-columns: 1fr 1fr; }
  .trio { gap: 20px; }
  .value { grid-template-columns: 1fr 1fr; gap: 24px; }
  .statement { grid-template-columns: 1fr 1fr; align-items: start; gap: 24px; }
  .statement video { max-width: 456px; justify-self: end; }
}

/* --- Web: 12-column grid, 108px margins at 1440 --- */
@media (min-width: 1200px) {
  .case .wrap { padding: 0 7.5vw; }
  @supports (width: min(1px, 2px)) {
    .case .wrap { padding: 0 min(7.5vw, 108px); }
  }
  .overview {
    grid-template-columns: minmax(260px, 1fr) minmax(0, 800px);
    gap: 24px clamp(40px, 7vw, 100px);
    align-items: start;
  }
  .overview__aside { position: sticky; top: 100px; }
  .content-col { margin-left: auto; max-width: 800px; }
}

/* ==========================================================================
   Custom cursor (as on the Framer site) — mouse/trackpad only, created by JS.
   A white shape with mix-blend-mode: difference, so it inverts whatever is
   underneath: dark on light backgrounds, light on dark ones.
     default → 12px dot · links/buttons → 28px circle · cards → 40px circle + arrow
   ========================================================================== */
.has-cursor,
.has-cursor * { cursor: none !important; }

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  pointer-events: none;
  mix-blend-mode: difference;
  opacity: 0;
  transition: opacity 0.2s;
}
.cursor.is-active { opacity: 1; }

.cursor__dot {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #fff;
  transform: scale(0.3); /* 12px */
  transition: transform 0.4s var(--ease-out);
}
.cursor[data-state="link"] .cursor__dot { transform: scale(0.7); } /* 28px */
.cursor[data-state="arrow"] .cursor__dot { transform: scale(1); }  /* 40px */
.cursor.is-down .cursor__dot { transform: scale(0.24); }
.cursor.is-down[data-state="link"] .cursor__dot { transform: scale(0.6); }
.cursor.is-down[data-state="arrow"] .cursor__dot { transform: scale(0.88); }

.cursor__icon {
  position: absolute;
  top: 7px;
  left: 7px;
  width: 26px;
  height: 26px;
  color: #000; /* black under "difference" = the colour underneath shows through */
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.2s, transform 0.4s var(--ease-out);
}
.cursor[data-state="arrow"] .cursor__icon--arrow { opacity: 1; transform: none; }

/* ==========================================================================
   Lenis smooth scroll (from lenis/dist/lenis.css)
   ========================================================================== */
html.lenis,
html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent],
.lenis [data-lenis-prevent-wheel],
.lenis [data-lenis-prevent-touch],
.lenis [data-lenis-prevent-vertical],
.lenis [data-lenis-prevent-horizontal] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* ==========================================================================
   Motion preferences
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Page transitions (cross-document View Transitions; Chrome/Edge/Safari 18+,
   other browsers just navigate normally).
   Home → project: the bars glide to the top, the full-screen cover shrinks
   into the case-study cover image and the rest of the page fades in.
   ========================================================================== */
@view-transition { navigation: auto; }

.case-hero img { view-transition-name: cover; }

::view-transition-group(*) {
  animation-duration: 1.1s;
  animation-timing-function: cubic-bezier(0.65, 0, 0.2, 1); /* slow start, long glide in */
}
/* Both ends are the same picture: show just one snapshot (no ghosting) and
   crop it instead of stretching while the box changes aspect ratio */
::view-transition-old(cover) { display: none; }
::view-transition-new(cover) {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: none;
}
::view-transition-old(root) { animation: vt-out 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; }
::view-transition-new(root) { animation: vt-in 0.8s 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(24px); } }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}
