/* ---------------------------------------------------------------
   Fonts
   These point at the "GT America" folder (the N26-licensed files),
   for now. Before going live, swap in the files from Breno's own
   Grilli Type licence: replace the 13 file names below, ideally
   with .woff2 versions (format("woff2")).
   --------------------------------------------------------------- */
@font-face { font-family: "GT America"; font-weight: 300; font-style: normal; font-display: block;
  src: url("../../GT%20America/GT-America-Standard-Light.otf") format("opentype"); }
@font-face { font-family: "GT America"; font-weight: 400; font-style: normal; font-display: block;
  src: url("../../GT%20America/GT-America-Standard-Regular.otf") format("opentype"); }
@font-face { font-family: "GT America"; font-weight: 400; font-style: italic; font-display: block;
  src: url("../../GT%20America/GT-America-Standard-Regular-Italic.otf") format("opentype"); }
@font-face { font-family: "GT America"; font-weight: 500; font-style: normal; font-display: block;
  src: url("../../GT%20America/GT-America-Standard-Medium.otf") format("opentype"); }
@font-face { font-family: "GT America Condensed"; font-weight: 400; font-style: normal; font-display: block;
  src: url("../../GT%20America/GT-America-Condensed-Regular.otf") format("opentype"); }
@font-face { font-family: "GT America Condensed"; font-weight: 300; font-style: normal; font-display: block;
  src: url("../../GT%20America/GT-America-Condensed-Light.otf") format("opentype"); }
@font-face { font-family: "GT America Compressed"; font-weight: 100; font-style: normal; font-display: block;
  src: url("../../GT%20America/GT-America-Compressed-Thin.otf") format("opentype"); }
@font-face { font-family: "GT America Compressed"; font-weight: 100; font-style: italic; font-display: block;
  src: url("../../GT%20America/GT-America-Compressed-Thin-Italic.otf") format("opentype"); }
@font-face { font-family: "GT America Expanded"; font-weight: 900; font-style: normal; font-display: block;
  src: url("../../GT%20America/GT-America-Expanded-Black.otf") format("opentype"); }
@font-face { font-family: "GT America Expanded"; font-weight: 900; font-style: italic; font-display: block;
  src: url("../../GT%20America/GT-America-Expanded-Black-Italic.otf") format("opentype"); }
@font-face { font-family: "GT America Extended"; font-weight: 100; font-style: normal; font-display: block;
  src: url("../../GT%20America/GT-America-Extended-Thin.otf") format("opentype"); }
@font-face { font-family: "GT America Extended"; font-weight: 500; font-style: normal; font-display: block;
  src: url("../../GT%20America/GT-America-Extended-Medium.otf") format("opentype"); }
@font-face { font-family: "GT America Extended"; font-weight: 900; font-style: normal; font-display: block;
  src: url("../../GT%20America/GT-America-Extended-Black.otf") format("opentype"); }

/* ---------------------------------------------------------------
   Tokens (names follow the Figma variables)
   --u is set by home.js: 1 at the 1280×832 Figma frame, scales with
   the viewport, capped for very large screens.
   --------------------------------------------------------------- */
:root {
  --red: #dd4f52;
  --black: #1c0303;
  --black-80: rgba(28, 3, 3, 0.8);
  --black-15: rgba(28, 3, 3, 0.15);
  --grey: #d0d0d0;
  --light-grey: #c1c1c1;
  --white: #fff;

  --shadow-small: 0 3px 2px -3px rgba(0, 0, 0, 0.35);

  --u: 1;
  --page-w: 100vw;
  --page-x: 0px;
  --vh: 100vh;
}

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

html, body { margin: 0; background: var(--white); }

body {
  color: var(--black);
  font-family: "GT America", system-ui, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul { margin: 0; padding: 0; font-weight: inherit; font-size: inherit; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; }

.fx-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Fonts load blocking; hide the hero until they are in to avoid a jump */
html:not(.is-ready) .stage { visibility: hidden; }

/* The nav lives in case-shared.css; the home hero card is light grey,
   so the nav type stays black over it */
:root {
  --nav-on-card: var(--black);
}

/* ---------------------------------------------------------------
   Hero: a sticky stage on desktop (.is-stage); home.js drives every
   layer from scroll, interpolating between the states drawn in Figma.
   Below 960px (tablet & mobile) it switches to a clean vertical flow.
   --------------------------------------------------------------- */
.hero { position: relative; height: calc(var(--vh) * 6); }

.stage {
  position: sticky;
  top: 0;
  height: var(--vh);
}

.page {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--page-x);
  width: var(--page-w);
  /* clip, not hidden: a hidden box can still be scrolled by the browser when
     it jumps to an anchor (#contact), which pushed the stage out of place */
  overflow: clip;
}

.card {
  position: absolute;
  z-index: 30;
  top: calc(var(--u) * 16px);
  left: calc(var(--u) * 16px);
  right: calc(var(--u) * 16px);
  height: calc(var(--vh) - var(--u) * 32px);
  border-radius: calc(var(--u) * 8px);
  background: var(--grey);
}

.type-layer {
  position: absolute;
  z-index: 40;
  inset: 0;
  pointer-events: none;
}

.statement { display: block; }

.statement__design,
.statement__judgment {
  position: absolute;
  top: 0;
  left: 50%;
  white-space: nowrap;
  text-align: center;
  will-change: transform;
}

.statement__design {
  margin-left: calc(var(--u) * 0.5px);
  font-family: "GT America Expanded";
  font-weight: 900;
  font-style: italic;
  font-size: calc(var(--u) * 800px);
  line-height: 0.9;
  letter-spacing: 0.02em;
  color: var(--red);
}
.statement__design-inner {
  display: block;
  filter: url(#fx-deboss);
}

.statement__judgment {
  margin-left: calc(var(--u) * 0.5px);
  font-family: "GT America Compressed";
  font-weight: 100;
  font-size: calc(var(--u) * 100px);
  line-height: 0.9;
  letter-spacing: 0.02em;
  color: var(--black);
}

/* Home lockup (Figma State 52): "Product Design / Leadership" on two lines
   (104 so the first line fits the card), the line under it at 76 on a 1030
   measure */
.statement--lockup .statement__design {
  margin-left: calc(var(--u) * 0.5px);
  font-size: calc(var(--u) * 104px);
  line-height: 1.07;
  letter-spacing: 0;
}
.statement--lockup .statement__judgment {
  width: calc(var(--u) * 1030px);
  font-size: calc(var(--u) * 76px);
  margin-left: 0;
}

/* Intro once fonts are ready */
.statement__design-inner,
.statement__judgment { transition: opacity var(--dur-xl) var(--ease-out); }
html.is-ready .statement__design-inner { animation: rise-in 1.6s var(--ease-out-expo) both; }
.nav { transition: opacity var(--dur-xl) 0.4s; }
html:not(.is-ready) .nav { opacity: 0; }

@keyframes rise-in {
  from { opacity: 0; transform: translateY(6%); }
  to { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------
   Content layer (photo, intro, highlights)
   --------------------------------------------------------------- */
.content {
  position: absolute;
  z-index: 10;
  inset: 0;
}

.photo {
  position: absolute;
  top: 0;
  left: 50%;
  border-radius: calc(var(--u) * 8px);
  overflow: hidden;
  will-change: transform;
}
/* Anchored to the top, so every crop keeps the face */
.photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }

.hello,
.bio {
  position: absolute;
  top: 0;
  left: 50%;
  width: calc(var(--u) * 384px);
  text-align: center;
  will-change: transform;
}

.hello {
  z-index: 2;
  color: var(--red);
  font-size: calc(var(--u) * 78px);
  line-height: calc(var(--u) * 81px);
}
.hello__hi { font-family: "GT America Compressed"; font-weight: 100; font-style: italic; }
.hello__name { font-family: "GT America Extended"; font-weight: 900; }

.bio {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--u) * 40px);
}

.bio__lead {
  font-size: calc(var(--u) * 24px);
  line-height: normal;
  letter-spacing: 0.02em;
}
.bio__lead b { font-family: "GT America Expanded"; font-weight: 900; }
.bio__lead .l { font-weight: 300; letter-spacing: calc(var(--u) * 0.32px); }

.bio__sub {
  font-family: "GT America Extended";
  font-weight: 100;
  font-size: calc(var(--u) * 18px);
  line-height: calc(var(--u) * 24px);
  letter-spacing: -0.01em;
  color: var(--black-80);
}

.previously {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: calc(var(--u) * 16px);
  color: var(--black-80);
  font-size: calc(var(--u) * 14px);
  line-height: calc(var(--u) * 19px);
  letter-spacing: 0.02em;
}
/* "Previously" sits centred over the roles, a little closer than the roles
   are to each other, in the type of the "N26 highlights" title
   (Breno, 2026-11-03) */
.previously__title {
  align-self: center;
  margin: 0 0 calc(var(--u) * -4px);
  font-family: "GT America Extended";
  font-weight: 100;
  font-size: calc(var(--u) * 14px);
  line-height: calc(var(--u) * 19px);
  letter-spacing: 0.02em;
  color: var(--black-80);
}
.previously__list { display: flex; flex-direction: column; gap: calc(var(--u) * 16px); }

.role {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 16px);
  font-weight: 300;
  white-space: nowrap;
}
/* Both icons sit in the same badge, which carries the shadow, lift and tilt,
   so N26 (one image) and Nuri (layered) get exactly the same shadow shape */
.role__badge {
  display: block;
  flex: none;
  width: calc(var(--u) * 40px);
  height: calc(var(--u) * 40px);
  border-radius: calc(var(--u) * 10px);
  box-shadow: 0 calc(var(--u) * 3.37px) calc(var(--u) * 5.33px) calc(var(--u) * -3.37px) rgba(0, 0, 0, 0.4);
}
.role__icon {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

/* Role links: the icon lifts and tilts on a spring, the text darkens and
   an underline draws in from the left, and a small arrow slides in to say
   the link opens another site */
.role__link {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 16px);
  color: inherit;
  border-radius: calc(var(--u) * 10px);
}
.role__link .role__badge {
  transition: transform var(--dur-m) var(--ease-spring), box-shadow var(--dur-s) ease;
}
.role__text {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  padding-bottom: calc(var(--u) * 1px);
  transition: background-size var(--dur-m) var(--ease-out), color var(--dur-xs);
}
.role__arrow {
  width: calc(var(--u) * 10px);
  height: calc(var(--u) * 10px);
  margin-left: calc(var(--u) * -10px);
  opacity: 0;
  transform: translate(calc(var(--u) * -4px), calc(var(--u) * 4px));
  transition: opacity var(--dur-xs), transform var(--dur-m) var(--ease-out);
}
.role__link:hover .role__badge,
.role__link:focus-visible .role__badge {
  transform: translateY(calc(var(--u) * -2px)) rotate(-4deg) scale(1.06);
  box-shadow: 0 calc(var(--u) * 8px) calc(var(--u) * 12px) calc(var(--u) * -6px) rgba(0, 0, 0, 0.45);
}
.role__link:hover .role__text,
.role__link:focus-visible .role__text { background-size: 100% 1px; color: var(--black); }
.role__link:hover .role__arrow,
.role__link:focus-visible .role__arrow { opacity: 1; transform: none; }
.role__link:active .role__badge { transform: translateY(0) rotate(-2deg) scale(0.98); transition-duration: var(--dur-xs); }
.role__link:focus-visible { outline: 2px solid var(--red); outline-offset: 6px; }
@media (prefers-reduced-motion: reduce) {
  .role__link .role__badge, .role__text, .role__arrow { transition: none; }
}

/* Nuri app icon, rebuilt from its Figma layers */
/* Dark base (not the red fallback, which showed as a rim on the tilted
   corners) and isolation, so the colour-blend tint mixes only with the
   icon's own layers, never with the page behind it */
.nuri-icon {
  position: relative;
  overflow: hidden;
  background: #302230;
  isolation: isolate;
}
.nuri-icon > * { position: absolute; }
.nuri-icon__bg { inset: 0; background: #302230; }
.nuri-icon__tint {
  left: 0;
  top: -2.8%;
  width: 101.06%;
  height: 103.87%;
  background: linear-gradient(180deg, #865f86 0%, #302230 84.615%);
  mix-blend-mode: color;
}
.nuri-icon__glint { left: 22.15%; top: -10.09%; width: 56.42%; height: 12.95%; }
.nuri-icon__union--a { left: -33.42%; top: -20.88%; width: 173.82%; height: 90.37%; }
.nuri-icon__union--b { left: -33.69%; top: -21.15%; width: 174.38%; height: 90.93%; }
.nuri-icon__mark {
  left: calc(50% + var(--u) * 0.3px);
  top: calc(50% + var(--u) * 0.41px);
  width: 53.77%;
  height: 57.13%;
  transform: translate(-50%, -50%);
  overflow: hidden;
}
.nuri-icon__mark img {
  position: absolute;
  left: -40.28%;
  top: -26.8%;
  width: 169.44%;
  height: 143.14%;
  max-width: none;
}

/* ---------------------------------------------------------------
   Video hero (Figma 108:2019, States 47, 48, 50, 51): the video fills
   the window, then the white box closes up from the bottom over the
   grey band; the video inside it is clipped and never scales. The title
   sits over both; the intro card comes up underneath. home.js sets the
   box and video heights, every top, and the title's clip.
   --------------------------------------------------------------- */
.reel-layer {
  position: absolute;
  z-index: 27; /* over the grey band and the cases while it leaves */
  inset: 0;
  pointer-events: none;
}
.reel-layer > * { pointer-events: auto; }

.reel {
  position: absolute;
  top: 0;
  left: 50%;
  width: calc(var(--page-w) - var(--u) * 32px);
  height: calc(var(--vh) - var(--u) * 32px);
  border-radius: calc(var(--u) * 8px);
  overflow: hidden;
  background: var(--white);
  transform: translate(-50%, calc(var(--u) * 16px));
  will-change: transform, height;
}

.reel__media {
  position: relative;
  height: 100%;
  border-radius: calc(var(--u) * 8px);
  overflow: hidden;
  background: var(--grey);
}
/* Figma "Breno Frias Clips 1": laid out for the open state (the whole
   window), covering it from the top left, so closing the box only crops it */
.reel__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(var(--vh) - var(--u) * 32px);
  object-fit: cover;
  object-position: 0 0;
}

.reel__title {
  position: absolute;
  top: 0;
  left: calc(50% - var(--u) * 608px);
  width: calc(var(--u) * 876px);
  font-size: calc(var(--u) * 76px);
  line-height: 1.057;
  letter-spacing: -0.01em;
  text-box: trim-both cap alphabetic;
  will-change: transform;
}
.reel__roles,
.reel__years { display: block; }
.reel__roles {
  font-family: "GT America Expanded";
  font-weight: 900;
  color: var(--red);
}
.reel__years {
  font-family: "GT America Compressed";
  font-weight: 100;
  font-style: italic;
  color: var(--black);
}

/* Intro card: 1px light grey stroke, no fill */
.former {
  position: absolute;
  top: 0;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: calc(var(--u) * 4px);
  width: calc(var(--u) * 490px);
  padding: calc(var(--u) * 16px);
  border: 1px solid var(--light-grey);
  border-radius: calc(var(--u) * 8px);
  font-size: calc(var(--u) * 24px);
  line-height: normal;
  letter-spacing: 0.02em;
  will-change: transform;
}
.former__role {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 11px);
  color: var(--black-80);
}
.former__icon {
  width: calc(var(--u) * 31px);
  height: calc(var(--u) * 31px);
  border-radius: calc(var(--u) * 4px);
  box-shadow: 0 calc(var(--u) * 3.37px) calc(var(--u) * 5.33px) calc(var(--u) * -3.37px) rgba(0, 0, 0, 0.4);
}
.former__bio {
  font-weight: 300;
  color: rgba(28, 3, 3, 0.6);
}

/* N26 highlights: on the About page since 2026-11-03 (about.css places
   the box); the numbers can zoom by --num-zoom, labels keep their size.
   The layer is still used by the index-swap.html test page */
.hl-layer {
  position: absolute;
  z-index: 26;
  inset: 0;
  pointer-events: none;
}
.hl-layer > * { pointer-events: auto; }

.highlights {
  --num-zoom: 1;
  --k: var(--u);
  position: absolute;
  top: 0;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(var(--k) * 8px);
  padding: calc(var(--k) * 16px);
  border-radius: calc(var(--k) * 8px);
  background: #fafafa;
  box-shadow: inset 0 0 0 calc(var(--k) * 1px) var(--light-grey);
  overflow: hidden;
  will-change: transform;
}

.highlights__title {
  display: flex;
  align-items: center;
  gap: calc(var(--k) * 8px);
  font-family: "GT America Extended";
  font-weight: 100;
  font-size: calc(var(--k) * 14px);
  line-height: calc(var(--k) * 19px);
  letter-spacing: 0.02em;
  color: var(--black-80);
  white-space: nowrap;
}
.highlights__title img { width: calc(var(--k) * 24px); height: calc(var(--k) * 24px); }

/* Columns top-aligned so the numbers always sit on one line. The gap
   tightens while the numbers are big (8px at --num-zoom 2.1667, 32px at 1),
   which leaves room for the fixed-width labels below */
.highlights__grid {
  display: flex;
  align-items: flex-start;
  gap: calc(var(--k) * (32px - (var(--num-zoom) - 1) * 20.57px));
  width: 100%;
  padding: 0 calc(var(--k) * 1px);
}

.metric {
  flex: 1 1 0;
  /* A column never gets narrower than its number, so a big "€1B+" widens
     its column instead of being cut */
  min-width: min-content;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.metric__num {
  font-family: "GT America Expanded";
  font-weight: 900;
  font-size: calc(var(--u) * var(--num-zoom) * 48px);
  line-height: normal;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--black);
}
.metric__num svg { display: block; overflow: visible; }

/* Every label keeps the width of its final column, so its line breaks
   never change while the box and numbers animate */
.metric__label {
  width: calc(var(--k) * 279.5px);
  flex: none;
  font-family: "GT America Extended";
  font-weight: 100;
  font-size: calc(var(--k) * 18px);
  line-height: calc(var(--k) * 25px);
  letter-spacing: 0.02em;
  color: var(--black-80);
  /* two lines of about the same length, never one word left alone */
  text-wrap: balance;
}

/* Buttons (Figma: 1px black-15% border, "Small" shadow) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--u) * 12px) calc(var(--u) * 14px);
  border-radius: calc(var(--u) * 4px);
  box-shadow: inset 0 0 0 1px var(--black-15), var(--shadow-small);
  font-size: calc(var(--u) * 14px);
  line-height: calc(var(--u) * 10px);
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: transform var(--dur-xs) var(--ease-out), box-shadow var(--dur-xs);
}
.btn:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.btn--dark { background: var(--black); color: var(--grey); }
.btn--light { background: var(--white); color: var(--black-80); }

/* Sits in the intro, under the roles */
.discover { align-self: center; }

/* ---------------------------------------------------------------
   Cases: grey band + N26 investments card (States 13–15)
   --------------------------------------------------------------- */
.band {
  position: absolute;
  z-index: 25;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--vh) * 2);
  background: var(--grey);
  will-change: transform;
}

.case {
  position: absolute;
  z-index: 26;
  inset: 0;
  pointer-events: none;
}
.case,
.upto,
.hl-layer,
.articles {
  clip-path: none;
}
.case > * { pointer-events: auto; }

.case__base {
  position: absolute;
  top: 0;
  /* 32 → 1248: lined up with the logo and the last nav button */
  left: calc(50% - var(--u) * 608px);
  width: calc(var(--u) * 1216px);
  height: calc(var(--u) * 369px);
  border-radius: calc(var(--u) * 8px);
  background: #003b39;
  box-shadow: inset 0 0 0 1px var(--black-15), var(--shadow-small);
  will-change: transform;
}

/* Grey that grows out of the text panel during the reading pause: first
   over the green (leaving only the stroke), then past the edge, so the
   card dissolves into the page. Sized and placed by home.js */
.case__cover {
  position: absolute;
  top: 0;
  left: 50%;
  background: var(--grey);
  visibility: hidden;
  will-change: transform, width, height;
}

/* Box the phone is drawn in: its bottom edge sits on the bottom of the
   green card, so the phone appears to rise out of it */
.case__phone-clip {
  position: absolute;
  top: 0;
  left: calc(50% - var(--u) * 608px);
  width: calc(var(--u) * 590px);
  /* Only the bottom edge clips (set by home.js), so the phone's shadow is never cut */
}

/* iPhone 16 Pro proportions (home.js sets size, --bezel and --radius from
   the width): thin even bezel, continuous-looking corners about 16.5% of
   the width, a fine titanium band around the edge, and a screen that has
   the recording's exact aspect, so nothing (Dynamic Island, status bar) is cropped */
.case__phone {
  --bezel: calc(var(--u) * 7px);
  --radius: calc(var(--u) * 46px);
  position: absolute;
  top: 0;
  left: 0;
  border: var(--bezel) solid #050505;
  border-radius: var(--radius);
  box-shadow:
    0 0 0 calc(var(--u) * 1px) #6e6e72,
    0 0 0 calc(var(--u) * 2.2px) #2c2c2e,
    0 0 calc(var(--u) * 43px) calc(var(--u) * -13px) rgba(0, 0, 0, 0.75);
  overflow: hidden;
  background: #000;
  will-change: transform;
}
.case__video { display: block; width: 100%; height: 100%; object-fit: cover; }

.case__icon {
  position: absolute;
  top: 0;
  left: 50%;
  width: calc(var(--u) * 144px);
  height: calc(var(--u) * 144px);
  border-radius: calc(var(--u) * 36px);
  box-shadow: 0 calc(var(--u) * 12px) calc(var(--u) * 19px) calc(var(--u) * -12px) rgba(0, 0, 0, 0.4);
  will-change: transform;
}

/* Text panel: revealed from the right edge of the green card */
.case__panel {
  position: absolute;
  top: 0;
  left: calc(50% - var(--u) * 2px);
  width: calc(var(--u) * 608px);
  height: calc(var(--u) * 365px);
  border-radius: calc(var(--u) * 7px);
  background: var(--grey);
  display: flex;
  align-items: center;
  padding: 0 calc(var(--u) * 40px);
  will-change: transform, clip-path;
}

.case__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: calc(var(--u) * 16px);
  width: 100%;
}

.case__pill,
.pill {
  padding: calc(var(--u) * 2px) calc(var(--u) * 6px);
  border-radius: calc(var(--u) * 8px);
  background: var(--grey);
  box-shadow: inset 0 calc(var(--u) * 1px) calc(var(--u) * 0.5px) rgba(0, 0, 0, 0.08);
  filter: drop-shadow(0 calc(var(--u) * 1px) calc(var(--u) * 0.25px) rgba(255, 255, 255, 0.43));
  font-family: "GT America Condensed";
  font-weight: 300;
  font-size: calc(var(--u) * 12px);
  line-height: normal;
  letter-spacing: 0.04em;
  color: #000;
}

.case__title {
  font-family: "GT America Extended";
  font-weight: 500;
  font-size: calc(var(--u) * 41px);
  line-height: normal;
  letter-spacing: 0.02em;
  color: var(--black);
}

.case__desc {
  font-family: "GT America Extended";
  font-weight: 100;
  font-size: calc(var(--u) * 24px);
  line-height: normal;
  letter-spacing: 0.02em;
  color: var(--black-80);
}

/* oorbi: mirror of the N26 card (panel left, phone right) */
.case--oorbi .case__base {
  background: linear-gradient(-65.56deg, #350234 0.91%, #201a20 17.19%, #1f1d1d 55.28%);
}
.case--oorbi .case__phone-clip { left: calc(50% + var(--u) * 10px); }
.case--oorbi .case__panel { left: calc(50% - var(--u) * 606px); }
/* The icon SVG carries its own shadow and corner radius */
.case--oorbi .case__icon {
  width: calc(var(--u) * 158px);
  height: calc(var(--u) * 163px);
  border-radius: 0;
  box-shadow: none;
}

/* ---------------------------------------------------------------
   What I'm up to (States 17–20)
   --------------------------------------------------------------- */
.upto {
  position: absolute;
  z-index: 27;
  inset: 0;
  pointer-events: none;
}
.upto > * { pointer-events: auto; }

.upto__title {
  position: absolute;
  top: 0;
  left: 50%;
  font-family: "GT America Compressed";
  font-weight: 100;
  font-style: italic;
  font-size: calc(var(--u) * 80px);
  line-height: normal;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--black);
  will-change: transform;
}
.upto__title b {
  font-family: "GT America Expanded";
  font-weight: 900;
  font-style: normal;
}

.social {
  position: absolute;
  top: 0;
  left: 50%;
  width: calc(var(--u) * 213px);
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 16px);
  padding: calc(var(--u) * 16px);
  border-radius: calc(var(--u) * 4px);
  overflow: hidden;
  /* Figma noise (monotone, size 1 × 0.6, density 0.42) lives in the fill,
     under the logo and text; kept faint, as Figma renders it. The tile is
     drawn at half size so a dot is one device pixel on Retina screens */
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='0.9 1.5' numOctaves='1' seed='4' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  -10 0 0 0 5.4'/><feComponentTransfer><feFuncA type='discrete' tableValues='0 0.07'/></feComponentTransfer></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>") 0 0 / 80px 80px,
    linear-gradient(180deg, #f5f5f5 0%, #dedede 100%);
  box-shadow:
    0 calc(var(--u) * 2px) calc(var(--u) * 3px) calc(var(--u) * -3px) rgba(0, 0, 0, 0.3),
    inset 0 calc(var(--u) * 2px) calc(var(--u) * 4px) rgba(255, 255, 255, 0.96),
    inset 0 calc(var(--u) * -4px) calc(var(--u) * 6px) rgba(0, 0, 0, 0.04);
  will-change: translate, scale, rotate;
  /* Hover grows and tilts the card around its own center once settled
     (translate is set by home.js, which runs before rotate & scale in CSS) */
  transition: scale var(--dur-s) var(--ease-spring), rotate var(--dur-s) var(--ease-spring), box-shadow var(--dur-s);
}
.social--3 { width: calc(var(--u) * 214px); }
.social.is-settled:hover { scale: 1.06; rotate: -2deg; }
.social--2.is-settled:hover { rotate: 2deg; }
@media (prefers-reduced-motion: reduce) {
  .social.is-settled:hover, .social--2.is-settled:hover { scale: none; rotate: none; }
}
.social.is-settled:hover { box-shadow:
    0 calc(var(--u) * 4px) calc(var(--u) * 6px) calc(var(--u) * -3px) rgba(0, 0, 0, 0.3),
    inset 0 calc(var(--u) * 2px) calc(var(--u) * 4px) rgba(255, 255, 255, 0.96),
    inset 0 calc(var(--u) * -4px) calc(var(--u) * 6px) rgba(0, 0, 0, 0.04); }
.social:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.social__logo { width: calc(var(--u) * 68px); height: calc(var(--u) * 68px); flex: none; }
.social__logo--github { width: calc(var(--u) * 70px); margin: 0 calc(var(--u) * -1px); }
.social__text { display: flex; flex-direction: column; align-items: flex-start; }
.social__name {
  font-size: calc(var(--u) * 21px);
  line-height: normal;
  letter-spacing: 0.02em;
  color: var(--black);
}

/* ---------------------------------------------------------------
   Latest articles (States 21–24)
   --------------------------------------------------------------- */
.latest {
  position: absolute;
  z-index: 29;
  top: 0;
  left: 50%;
  font-family: "GT America Compressed";
  font-weight: 100;
  font-style: italic;
  font-size: calc(var(--u) * 40px);
  line-height: normal;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--black);
  will-change: transform;
}
.latest b { font-family: "GT America Expanded"; font-weight: 900; font-style: normal; }

.articles {
  position: absolute;
  z-index: 27;
  inset: 0;
  pointer-events: none;
}

.article {
  position: absolute;
  top: 0;
  left: 50%;
  width: calc(var(--u) * 288px);
  display: flex;
  flex-direction: column;
  gap: calc(var(--u) * 8px);
  pointer-events: auto;
  will-change: transform;
}
.article:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; border-radius: 4px; }

/* Thumbnails: positions in em, where 1em = one Figma pixel */
.article__thumb {
  position: relative;
  display: block;
  height: calc(var(--u) * 123px);
  border-radius: calc(var(--u) * 4px);
  overflow: hidden;
  font-size: calc(var(--u) * 1px);
}
.article__thumb > * { position: absolute; }
.article__thumb--1, .article__thumb--3, .article__thumb--4 { background: #004233; }
.article__thumb--2 { background: var(--black); }
.thumb1__img, .thumb2__img { left: 50%; transform: translateX(-50%); border-radius: 4em; object-fit: cover; }
.thumb1__img { top: -15em; width: 206em; height: 137em; }
.thumb2__img { top: -18em; width: 214em; height: 143em; }

.article__thumb img { transition: transform var(--dur-l) var(--ease-out-expo); }
.article:hover .thumb1__img,
.article:hover .thumb2__img { transform: translateX(-50%) scale(1.04); }

/* "UX not boring" */
.thumb3 { left: 1em; top: -18.09em; width: 281em; height: 158.19em; overflow: hidden; background: #2f2f2f; }
.thumb3 > * { position: absolute; }
.thumb3__bg { left: 0; top: 0; width: 280.76em; height: 153.14em; object-fit: cover; }
.thumb3__tab { left: 234.86em; top: 124.35em; width: 46.14em; height: 27.68em; }
.thumb3__panel { left: 46.8em; top: 8.57em; width: 187.19em; height: 153.57em; background: var(--grey); }
.thumb3__chair { left: 150.5em; top: 14.5em; width: 63.08em; height: 105.86em; overflow: hidden; }
.thumb3__chair img { position: absolute; left: -185.38%; top: -32.11%; width: 469.39%; height: 152.68%; max-width: none; }
.thumb3__text {
  left: calc(50% - 83.6em);
  top: calc(50% - 12em);
  width: 138.3em;
  display: flex;
  flex-direction: column;
}
/* Font size set on the lines, so the box above keeps measuring in Figma px */
.thumb3__ux,
.thumb3__boring { font-size: 26.07em; line-height: 1.2; letter-spacing: -0.022em; white-space: nowrap; }
.thumb3__ux { font-style: italic; color: var(--black); }
.thumb3__boring { font-family: "GT America Expanded"; font-weight: 900; color: var(--red); }
.thumb3__cursor { left: 188.72em; top: 97.11em; width: 24.75em; height: 27.27em; display: grid; place-items: center; }
.thumb3__cursor img { position: static; width: 15.61em; height: 22.48em; transform: rotate(-30deg); overflow: visible; }

/* "interfaces" collage */
.thumb4 { left: -9em; top: -14em; width: 308em; height: 150em; overflow: hidden; background: var(--black); }
.t4 { position: absolute; display: block; max-width: none; }
.t4-crop { overflow: hidden; }
.t4-crop > img { position: absolute; max-width: none; }
.t4-v0 { left: 87.72em; top: calc(50% - 1.38em); width: 28.4em; height: 20.57em; transform: translateY(-50%); }
.t4-v1 { left: 251.91em; top: calc(50% - 1.38em); width: 26.95em; height: 20.57em; transform: translateY(-50%); }
.t4-img4 { left: 153.71em; top: 10.36em; width: 104.68em; height: 69.93em; border-radius: 1.23em; object-fit: cover; }
.t4-v2 { left: 222.55em; top: calc(50% - 1.38em); width: 28.4em; height: 20.57em; transform: translateY(-50%); }
.t4-v3 { left: 191.4em; top: calc(50% - 1.38em); width: 28.9em; height: 20.57em; transform: translateY(-50%); }
.t4-v4 { left: 161.08em; top: calc(50% - 1.38em); width: 27.68em; height: 20.57em; transform: translateY(-50%); }
.t4-v5 { left: 138.64em; top: calc(50% - 5.87em); width: 21.64em; height: 28.1em; transform: translateY(-50%); }
.t4-v6 { left: 119.56em; top: calc(50% - 1.67em); width: 17.66em; height: 19.69em; transform: translateY(-50%); }
.t4-v7 { left: 64.99em; top: calc(50% - 4.65em); width: 21.6em; height: 26.72em; transform: translateY(-50%); }
.t4-img8 { left: 45.56em; top: 72.93em; width: 36.29em; height: 47.2em; border-radius: 2.04em; }
.t4-img8 img { left: 0; top: -29.31%; width: 224.22%; height: 129.31%; }
.t4-v8 { left: 22.68em; top: calc(50% - 16.67em); width: 7.76em; height: 5.89em; transform: translateY(-50%); }
.t4-v9 { left: 35.74em; top: calc(50% - 1.74em); width: 28.1em; height: 19.84em; transform: translateY(-50%); }
.t4-img2 { left: 19.66em; top: 65.47em; width: 12.61em; height: 48.82em; }
.t4-img2 img { left: -27.27%; top: -47.94%; width: 1389.09%; height: 259.74%; }
.t4-img5 { left: 35.82em; top: 10.57em; width: 85.03em; height: 16.39em; border-radius: 5.11em; }
.t4-img5 img { left: -16.31%; top: -804%; width: 376.58%; height: 1098.67%; }
.t4-glass { left: 124.29em; top: 85.78em; width: 61.22em; height: 30.41em; border-radius: 17.92em; }
.t4-glass img { left: -9.27%; top: -2.53%; width: 115.83%; height: 102.33%; }
.t4-img6 { left: 102.12em; top: 9.12em; width: 45.27em; height: 49.23em; display: grid; place-items: center; }
.t4-img6 .t4-crop { position: relative; display: block; width: 30.96em; height: 39.63em; transform: rotate(-26.2deg); }
.t4-img6 img { left: -68.97%; top: 0; width: 169.03%; height: 100%; }
.t4-img9 { left: 185.41em; top: 107.95em; width: 85.75em; height: 31.84em; }
.t4-img9 img { left: -179.81%; top: -266.32%; width: 312.5%; height: 421.05%; }
.t4-img3 { left: 169.25em; top: 89.92em; width: 29.56em; height: 30.32em; border-radius: 2.59em; }
.t4-img3 img { left: -476.42%; top: -320.75%; width: 945.09%; height: 518.24%; }

/* Title, description and date: masked by the thumbnail when the cards leave */
.article__body {
  display: flex;
  flex-direction: column;
  gap: calc(var(--u) * 8px);
  will-change: transform;
}
.article__thumb { flex: none; }

.article__title {
  font-family: "GT America Extended";
  font-weight: 500;
  font-size: calc(var(--u) * 19px);
  line-height: calc(var(--u) * 26px);
  letter-spacing: 0.02em;
  color: var(--black-80);
}
.article__desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  font-family: "GT America Extended";
  font-weight: 100;
  font-size: calc(var(--u) * 14px);
  line-height: calc(var(--u) * 19px);
  letter-spacing: 0.02em;
  color: var(--black-80);
}
.article__date {
  font-weight: 300;
  font-size: calc(var(--u) * 12px);
  line-height: normal;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(28, 3, 3, 0.5);
}

/* ---------------------------------------------------------------
   Footer (States 24–25 on desktop stage): green panel slides up, the
   wordmark stays. Base visual styles live in case-shared.css.
   --------------------------------------------------------------- */
html.is-stage .page .footer {
  position: absolute;
  z-index: 28;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--u) * 453px);
  will-change: transform;
}
html.is-stage .page .footer__row {
  position: absolute;
  z-index: 2;
  top: calc(var(--u) * 32px);
  left: 50%;
  transform: translateX(-50%);
  width: calc(var(--page-w) - var(--u) * 54px);
}
html.is-stage .page .footer__nav { gap: calc(var(--u) * 32px); width: auto; }
html.is-stage .page .footer__col {
  gap: calc(var(--u) * 16px);
  font-size: calc(var(--u) * 14px);
  line-height: calc(var(--u) * 10px);
}
html.is-stage .page .footer__btns { gap: calc(var(--u) * 16px); }
html.is-stage .page .fbtn {
  gap: calc(var(--u) * 8px);
  padding: calc(var(--u) * 8px) calc(var(--u) * 14px);
  border-radius: calc(var(--u) * 4px);
  font-size: calc(var(--u) * 14px);
  line-height: calc(var(--u) * 18px);
}
html.is-stage .page .fbtn img { width: calc(var(--u) * 16px); height: calc(var(--u) * 16px); }
html.is-stage .page .footer__mark {
  position: absolute;
  z-index: 1;
  top: 0;
  left: calc(50% - var(--page-w) / 2 + var(--u) * 27px);
  right: auto;
  font-size: calc((var(--page-w) - var(--u) * 54px) / 5.15);
  line-height: 1.2;
  will-change: transform;
}

/* Case text entrance (home.js adds .is-in as the card settles):
   a single continuous word-by-word optical focus + silky rise wave
   flowing from the pill through the title, description, and button. */
.case__pill {
  opacity: 0;
  filter: blur(5px);
  transform: translateY(calc(var(--u) * 8px)) scale(0.96);
  transition:
    opacity var(--dur-m) var(--ease-out-expo),
    filter var(--dur-m) var(--ease-out-expo),
    transform var(--dur-m) var(--ease-out-expo);
}
.case-word {
  display: inline-block;
  opacity: 0;
  filter: blur(6px);
  transform: translateY(0.38em);
  will-change: transform, opacity, filter;
  transition:
    opacity var(--dur-m) var(--ease-out-expo),
    filter var(--dur-m) var(--ease-out-expo),
    transform var(--dur-m) var(--ease-out-expo);
}
.case__body .btn {
  opacity: 0;
  filter: blur(5px);
  transform: translateY(calc(var(--u) * 10px)) scale(0.97);
  transition:
    opacity var(--dur-m) var(--ease-out-expo),
    filter var(--dur-m) var(--ease-out-expo),
    transform var(--dur-m) var(--ease-out-expo),
    translate var(--dur-s) var(--ease-out),
    scale var(--dur-s) var(--ease-out),
    background-color var(--dur-xs),
    box-shadow var(--dur-s);
}

.case__panel.is-in .case__pill {
  opacity: 1;
  filter: blur(0);
  transform: none;
  transition:
    opacity var(--dur-l) var(--ease-out-expo),
    filter var(--dur-l) var(--ease-out-expo),
    transform var(--dur-xl) var(--ease-out-expo);
}
.case__panel.is-in .case-word {
  opacity: 1;
  filter: blur(0);
  transform: none;
  transition:
    opacity var(--dur-l) var(--ease-out-expo) calc(0.06s + var(--i) * 22ms),
    filter var(--dur-l) var(--ease-out-expo) calc(0.06s + var(--i) * 22ms),
    transform var(--dur-xl) var(--ease-out-expo) calc(0.06s + var(--i) * 22ms);
}
.case__panel.is-in .btn {
  opacity: 1;
  filter: blur(0);
  transform: none;
  transition:
    opacity var(--dur-l) var(--ease-out-expo) calc(0.14s + var(--words, 12) * 18ms),
    filter var(--dur-l) var(--ease-out-expo) calc(0.14s + var(--words, 12) * 18ms),
    transform var(--dur-xl) var(--ease-out-expo) calc(0.14s + var(--words, 12) * 18ms),
    translate var(--dur-s) var(--ease-out),
    scale var(--dur-s) var(--ease-out),
    background-color var(--dur-xs),
    box-shadow var(--dur-s);
}

@media (prefers-reduced-motion: reduce) {
  .case__pill, .case-word, .case__body .btn {
    opacity: 1; filter: none; transform: none; transition: none;
  }
}

/* Visually hidden, for screen readers */
.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;
}

/* ---------------------------------------------------------------
   Tablet & Mobile layout (when html is not .is-stage: < 960px wide
   or short viewports < 560px tall).
   Unpins the desktop stage into a clean, responsive vertical flow
   while keeping every material, SVG deboss/engraving, video phone,
   bevelled social tile, and smooth scroll-in reveal.
   --------------------------------------------------------------- */
html:not(.is-stage),
html:not(.is-stage) body {
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
}
html:not(.is-stage) .hero {
  height: auto !important;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}
html:not(.is-stage) .stage {
  position: relative;
  top: auto;
  height: auto;
  width: 100%;
  max-width: 100%;
}
html:not(.is-stage) .page {
  position: relative;
  inset: auto;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  display: flex;
  flex-direction: column;
}
html:not(.is-stage) .page > * {
  min-width: 0;
  max-width: 100%;
}

/* Hide desktop-only choreography layers */
html:not(.is-stage) .band,
html:not(.is-stage) .card,
html:not(.is-stage) .case__cover,
html:not(.is-stage) .case__base {
  display: none;
}

/* Remove desktop nav mask on scrolling sections */
html:not(.is-stage) .case,
html:not(.is-stage) .upto,
html:not(.is-stage) .hl-layer,
html:not(.is-stage) .articles {
  -webkit-mask-image: none;
  mask-image: none;
  pointer-events: auto;
}

/* 1. Video hero at the top of the page */
html:not(.is-stage) .reel-layer {
  order: 1;
  position: relative;
  inset: auto;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 16px 16px 48px;
}
html:not(.is-stage) .reel,
html:not(.is-stage) .reel__title,
html:not(.is-stage) .former {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  clip-path: none;
}
html:not(.is-stage) .reel {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  max-height: 70vh;
}
html:not(.is-stage) .reel__media { height: 100%; }
html:not(.is-stage) .reel__video {
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
html:not(.is-stage) .reel__title {
  width: auto;
  padding: 0 4px;
  font-size: clamp(32px, 7.4vw, 76px);
}
html:not(.is-stage) .former {
  align-self: center;
  width: min(100%, 490px);
  font-size: clamp(18px, 3vw, 24px);
  gap: 8px;
}
html:not(.is-stage) .former__icon { width: 1.3em; height: 1.3em; }

/* 1. Statement card ("Design is a judgment call") at top of page */
html:not(.is-stage) .type-layer {
  order: 1;
  position: relative;
  inset: auto;
  z-index: 1;
  width: calc(100% - 32px);
  max-width: calc(100% - 32px);
  margin: 16px auto 0;
  min-height: clamp(300px, 50vh, 460px);
  padding: 88px 20px 44px;
  border-radius: 8px;
  background: var(--grey);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: auto;
}
html:not(.is-stage) .statement {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  text-align: center;
}
html:not(.is-stage) .statement__design,
html:not(.is-stage) .statement__judgment {
  position: static;
  margin: 0;
  max-width: 100%;
  transform: none !important;
}
html:not(.is-stage) .statement__design {
  font-size: clamp(48px, 15.5vw, 156px);
  line-height: 0.94;
}
html:not(.is-stage) .statement__design-inner {
  padding: 0 0.06em;
}
html:not(.is-stage) .statement__judgment {
  font-size: clamp(30px, 9vw, 88px);
  line-height: 0.98;
  white-space: normal;
}
html:not(.is-stage) .statement--lockup .statement__design {
  font-size: clamp(24px, 7.6vw, 104px);
  line-height: 1.07;
}
html:not(.is-stage) .statement--lockup .statement__judgment {
  width: auto;
  font-size: clamp(26px, 7vw, 76px);
  line-height: 0.9;
}

/* 2. Intro / Bio ("Hi, I'm Breno", photo, bio, roles, CTA) */
html:not(.is-stage) .content {
  order: 2;
  position: relative;
  inset: auto;
  z-index: 2;
  padding: 56px 24px 64px;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  clip-path: none !important;
}
html:not(.is-stage) .photo {
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 4 / 3.4;
  border-radius: 8px;
  transform: none !important;
  visibility: visible !important;
}
html:not(.is-stage) .hello {
  position: static;
  width: 100%;
  font-size: clamp(36px, 10.5vw, 72px);
  line-height: 1.05;
  white-space: normal;
  transform: none !important;
  clip-path: none !important;
  visibility: visible !important;
}
html:not(.is-stage) .bio {
  position: static;
  width: 100%;
  max-width: 480px;
  gap: 28px;
  transform: none !important;
  clip-path: none !important;
}
html:not(.is-stage) .bio__lead {
  font-size: clamp(20px, 4.2vw, 24px);
  line-height: 1.32;
}
html:not(.is-stage) .bio__sub {
  font-size: clamp(16px, 3.4vw, 18px);
  line-height: 1.4;
}
html:not(.is-stage) .previously {
  align-items: center;
  font-size: 14px;
  line-height: 19px;
}
html:not(.is-stage) .previously__title {
  font-size: 14px;
  line-height: 19px;
}
html:not(.is-stage) .previously__list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 28px;
}
html:not(.is-stage) .role {
  gap: 12px;
  white-space: normal;
}
html:not(.is-stage) .role__link {
  gap: 12px;
  border-radius: 10px;
}
html:not(.is-stage) .role__badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: 0 3.37px 5.33px -3.37px rgba(0, 0, 0, 0.4);
}
html:not(.is-stage) .role__arrow {
  width: 10px;
  height: 10px;
  margin-left: -6px;
  opacity: 0.7;
  transform: none;
}
html:not(.is-stage) .btn {
  padding: 13px 18px;
  border-radius: 4px;
  font-size: 14px;
  line-height: 12px;
}

/* 3–5. Cases & Highlights on the grey band surface */
html:not(.is-stage) .case--n26 { order: 3; padding-top: 48px; }
html:not(.is-stage) .hl-layer  { order: 4; }
html:not(.is-stage) .case--oorbi { order: 5; padding-bottom: 48px; }

html:not(.is-stage) .case,
html:not(.is-stage) .hl-layer {
  position: relative;
  inset: auto;
  background: var(--grey);
  padding-left: 24px;
  padding-right: 24px;
}

/* Case card on tablet & mobile: a rich self-contained card with the
   coloured showcase area and phone on one side/top, and the grey info
   panel beside/below it */
html:not(.is-stage) .case {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 100%;
}
html:not(.is-stage) .case::before {
  content: "";
  grid-column: 1 / -1;
  grid-row: 1;
  border-radius: 8px;
  background: #003b39;
  box-shadow: inset 0 0 0 1px var(--black-15), var(--shadow-small);
}
html:not(.is-stage) .case--oorbi::before {
  background: linear-gradient(-65.56deg, #350234 0.91%, #201a20 17.19%, #1f1d1d 55.28%);
}
html:not(.is-stage) .case__phone-clip {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  inset: auto;
  width: 100%;
  height: 380px !important;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 28px;
  overflow: hidden;
  border-radius: 8px 0 0 8px;
  transform: none !important;
}
html:not(.is-stage) .case--oorbi .case__phone-clip {
  grid-column: 2;
  border-radius: 0 8px 8px 0;
}
html:not(.is-stage) .case__phone {
  --bezel: 6px !important;
  --radius: 36px !important;
  position: relative;
  inset: auto;
  width: 220px !important;
  height: 458px !important;
  border-width: 6px;
  border-radius: 36px;
  box-shadow:
    0 0 0 1px #6e6e72,
    0 0 0 2px #2c2c2e,
    0 0 36px -10px rgba(0, 0, 0, 0.75);
  transform: none !important;
  flex: none;
}
html:not(.is-stage) .case__icon {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  inset: auto;
  z-index: 3;
  align-self: end;
  justify-self: center;
  margin-left: 0;
  margin-bottom: -24px;
  width: 96px;
  height: 96px;
  border-radius: 24px;
  box-shadow: 0 10px 16px -10px rgba(0, 0, 0, 0.4);
  transform: none !important;
}
html:not(.is-stage) .case--oorbi .case__icon {
  grid-column: 2;
  margin-bottom: -38px;
  width: 106px;
  height: 110px;
  border-radius: 0;
  box-shadow: none;
}
html:not(.is-stage) .case__panel {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  inset: auto;
  z-index: 2;
  width: calc(100% - 2px);
  height: calc(100% - 4px);
  margin: 2px 2px 2px 0;
  padding: 32px;
  border-radius: 7px;
  background: var(--grey);
  transform: none !important;
  clip-path: none !important;
  visibility: visible !important;
}
html:not(.is-stage) .case--oorbi .case__panel {
  grid-column: 1;
  margin: 2px 0 2px 2px;
}
html:not(.is-stage) .case__body {
  gap: 16px;
}
html:not(.is-stage) .case__pill,
html:not(.is-stage) .pill {
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 12px;
  box-shadow: inset 0 1px 0.5px rgba(0, 0, 0, 0.08);
  filter: drop-shadow(0 1px 0.25px rgba(255, 255, 255, 0.43));
}
html:not(.is-stage) .case__title {
  font-size: clamp(28px, 4.5vw, 38px);
}
html:not(.is-stage) .case__desc {
  font-size: clamp(17px, 2.6vw, 21px);
  line-height: 1.35;
}

/* Highlights box (About page; the layer for index-swap.html) */
html:not(.is-stage) .hl-layer {
  padding-top: 44px;
  padding-bottom: 44px;
}
html:not(.is-stage) .highlights {
  position: relative;
  inset: auto;
  width: 100% !important;
  height: auto !important;
  padding: 32px 24px;
  gap: 24px;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px var(--light-grey);
  transform: none !important;
  clip-path: none !important;
  visibility: visible !important;
}
html:not(.is-stage) .highlights__title {
  gap: 8px;
  font-size: 14px;
  line-height: 19px;
}
html:not(.is-stage) .highlights__title img {
  width: 24px;
  height: 24px;
}
html:not(.is-stage) .highlights__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 24px;
  padding: 0;
}
html:not(.is-stage) .metric {
  min-width: 0;
  max-width: 100%;
  gap: 4px;
}
html:not(.is-stage) .metric__num {
  font-size: clamp(26px, 7.2vw, 48px);
  max-width: 100%;
}
html:not(.is-stage) .metric__num svg {
  max-width: 100%;
  height: auto;
}
html:not(.is-stage) .metric__label {
  width: auto;
  max-width: 220px;
  font-size: clamp(14px, 2.2vw, 17px);
  line-height: 1.35;
}

/* 6. What I'm up to */
html:not(.is-stage) .upto {
  order: 6;
  position: relative;
  inset: auto;
  background: var(--grey);
  padding: 24px 24px 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
html:not(.is-stage) .upto__title {
  grid-column: 1 / -1;
  position: static;
  margin-bottom: 8px;
  text-align: center;
  font-size: clamp(34px, 8.5vw, 64px);
  line-height: 1.05;
  white-space: normal;
  max-width: 100%;
  transform: none !important;
  clip-path: none !important;
  visibility: visible !important;
}
html:not(.is-stage) .social {
  position: relative;
  inset: auto;
  width: 100%;
  min-width: 0;
  justify-content: center;
  gap: 14px;
  padding: 16px;
  border-radius: 6px;
  translate: none !important;
  box-shadow:
    0 2px 3px -3px rgba(0, 0, 0, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.96),
    inset 0 -4px 6px rgba(0, 0, 0, 0.04);
}
html:not(.is-stage) .social__logo {
  width: 56px;
  height: 56px;
}
html:not(.is-stage) .social__logo--github {
  width: 58px;
  margin: 0 -1px;
}
html:not(.is-stage) .social__name {
  font-size: 19px;
}

/* 7 & 8. Latest articles */
html:not(.is-stage) .latest {
  order: 7;
  position: relative;
  inset: auto;
  width: 100%;
  background: var(--grey);
  padding: 24px 24px 24px;
  text-align: center;
  font-size: clamp(30px, 8.6vw, 64px);
  line-height: 1.05;
  white-space: normal;
  transform: none !important;
}
html:not(.is-stage) .articles {
  order: 8;
  position: relative;
  inset: auto;
  background: var(--grey);
  padding: 16px 24px 72px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px 20px;
}
html:not(.is-stage) .article {
  position: relative;
  inset: auto;
  width: 100%;
  min-width: 0;
  gap: 12px;
  transform: none !important;
  visibility: visible !important;
}
html:not(.is-stage) .article__thumb {
  width: 100%;
  height: auto !important;
  aspect-ratio: 288 / 123;
  border-radius: 6px;
  /* Scale the internal Figma-pixel em art proportionally to card width */
  font-size: calc((100vw - 68px) / 576);
}
html:not(.is-stage) .article__body {
  gap: 8px;
  transform: none !important;
  clip-path: none !important;
}
html:not(.is-stage) .article__title {
  font-size: 19px;
  line-height: 25px;
}
html:not(.is-stage) .article__desc {
  font-size: 14px;
  line-height: 20px;
}
html:not(.is-stage) .article__date {
  font-size: 12px;
}

/* 9. Footer in flow */
html:not(.is-stage) .page .footer {
  order: 9;
  position: relative;
  inset: auto;
  height: auto !important;
  transform: none !important;
}
html:not(.is-stage) .page .footer__row {
  position: relative;
  inset: auto;
  width: 100%;
}
html:not(.is-stage) .page .footer__nav {
  width: auto;
}
html:not(.is-stage) .page .footer__mark {
  position: relative;
  inset: auto;
  line-height: 1;
  transform: none !important;
}

/* Scroll-in reveal on tablet & mobile */
html:not(.is-stage) [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--dur-l) var(--ease-out), transform var(--dur-l) var(--ease-out-expo);
}
html:not(.is-stage) [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}
/* The intro sits just under the hero on a phone: it follows the hero in,
   one piece after another, so the hero is always seen first */
html:not(.is-stage) .photo[data-reveal] { transition-delay: 0.35s; }
html:not(.is-stage) .hello[data-reveal] { transition-delay: 0.5s; }
html:not(.is-stage) .bio[data-reveal] { transition-delay: 0.65s; }
@media (prefers-reduced-motion: reduce) {
  html:not(.is-stage) [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Mobile (< 680px) single-column refinements */
@media (max-width: 680px) {
  html:not(.is-stage) .type-layer {
    width: calc(100% - 24px);
    max-width: calc(100% - 24px);
    margin: 12px auto 0;
    min-height: clamp(260px, 44vh, 360px);
    padding: 72px 16px 36px;
  }
  html:not(.is-stage) .content {
    padding: 44px 16px 52px;
    gap: 24px;
  }
  html:not(.is-stage) .previously__list {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  html:not(.is-stage) .case,
  html:not(.is-stage) .hl-layer,
  html:not(.is-stage) .upto,
  html:not(.is-stage) .latest,
  html:not(.is-stage) .articles {
    padding-left: 16px;
    padding-right: 16px;
  }
  html:not(.is-stage) .case {
    grid-template-columns: 1fr;
  }
  html:not(.is-stage) .case::before {
    grid-row: 1 / 3;
  }
  html:not(.is-stage) .case__phone-clip,
  html:not(.is-stage) .case--oorbi .case__phone-clip {
    grid-column: 1;
    grid-row: 1;
    height: 310px !important;
    padding-top: 24px;
    border-radius: 8px 8px 0 0;
  }
  html:not(.is-stage) .case__phone {
    width: 196px !important;
    height: 408px !important;
    border-radius: 32px;
  }
  html:not(.is-stage) .case__icon,
  html:not(.is-stage) .case--oorbi .case__icon {
    grid-column: 1;
    grid-row: 1;
    margin-left: 0;
    margin-bottom: -18px;
    width: 80px;
    height: 80px;
    border-radius: 20px;
  }
  html:not(.is-stage) .case--oorbi .case__icon {
    margin-bottom: -29px;
    width: 88px;
    height: 91px;
    border-radius: 0;
  }
  html:not(.is-stage) .case__panel,
  html:not(.is-stage) .case--oorbi .case__panel {
    grid-column: 1;
    grid-row: 2;
    width: calc(100% - 4px);
    height: auto;
    margin: 0 2px 2px;
    padding: 28px 22px 24px;
  }
  html:not(.is-stage) .highlights {
    padding: 24px 16px;
  }
  html:not(.is-stage) .highlights__grid {
    gap: 24px 16px;
  }
  html:not(.is-stage) .upto {
    grid-template-columns: 1fr;
    width: 100%;
    background: var(--grey);
  }
  html:not(.is-stage) .social {
    max-width: 440px;
    margin: 0 auto;
  }
  html:not(.is-stage) .articles {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  html:not(.is-stage) .article__thumb {
    font-size: calc((100vw - 32px) / 288);
  }
}

/* Nothing in the hero shows before home.js has laid it out (is-ready).
   Before the script runs every screen starts in the flow layout, whose
   photo and "Hi, I'm Breno" force themselves visible, so they used to
   show alone while the fonts loaded (Breno, 2026-11-03). Last in the file
   so it outranks those rules */
html:not(.is-ready) .stage,
html:not(.is-ready) .stage * { visibility: hidden !important; }
