/* =========================================================
   Design tokens
   The site is drawn as a Figma file: a gridded canvas,
   frames with layer names, a selection, multiplayer cursors.
   Type is Swiss (tight grotesk, flush left); controls are
   glass in the Apple style (translucent, blurred, lit edge).
   ========================================================= */
/* TeX Gyre Heros: a free Helvetica clone (GUST Font License, fonts/GUST-FONT-LICENSE.txt), self-hosted
   and cut down to Latin. It has two weights only: 400 serves 100–500 and 700 serves 600–900 */
@font-face { font-family: 'TeX Gyre Heros'; src: url('fonts/texgyreheros-regular.woff2') format('woff2'); font-weight: 100 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'TeX Gyre Heros'; src: url('fonts/texgyreheros-bold.woff2') format('woff2'); font-weight: 600 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'TeX Gyre Heros'; src: url('fonts/texgyreheros-italic.woff2') format('woff2'); font-weight: 100 500; font-style: italic; font-display: swap; }
@font-face { font-family: 'TeX Gyre Heros'; src: url('fonts/texgyreheros-bolditalic.woff2') format('woff2'); font-weight: 600 900; font-style: italic; font-display: swap; }
:root {
  --canvas: #F5F5F5;          /* Figma canvas */
  --canvas-line: #E8E8E8;
  --grid-line: #EEEEEE;       /* background squares: lighter than the canvas lines */
  --ink: #000000;
  --paper: #FFFFFF;
  --select: #0D99FF;          /* Figma selection blue */
  --select-ink: #0A6CC9;      /* same hue, dark enough for text on white */
  --dark-canvas: #1E1E1E;     /* Figma dark canvas */
  --sticky: #FFE58A;

  --c-orange: #F24E1E;
  --c-purple: #9747FF;
  --c-yellow: #FFC700;

  /* legacy names still used by the case-study pages */
  --color-primary: var(--ink);
  --color-on-primary: #FFFFFF;
  --color-secondary: #333333;
  --color-accent: var(--select-ink);
  --color-accent-hover: #08559F;
  --color-on-accent: #FFFFFF;
  --color-background: var(--canvas);
  --color-foreground: var(--ink);
  --color-card: var(--paper);
  --color-muted: #EDEDED;
  --color-muted-foreground: #5C5C5C;
  --color-border: #D9D9D9;
  --color-ring: var(--select);
  --color-destructive: #DC2626;
  --color-success: #14AE5C;

  --font-heading: 'TeX Gyre Heros', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-body: 'TeX Gyre Heros', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;
  --space-8: 96px;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;

  --glass: rgba(255, 255, 255, 0.58);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --glass-edge: rgba(255, 255, 255, 0.75);
  --glass-blur: blur(18px) saturate(180%);
  --glass-light: inset 0 1px 0 rgba(255,255,255,0.95), inset 0 -1px 0 rgba(0,0,0,0.04);
  --glass-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 10px 28px -10px rgba(0,0,0,0.22);
  --apple-blue: #0A84FF;
  --apple-blue-deep: #0060D0;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.08);
  --shadow-md: var(--glass-shadow);

  --duration-fast: 120ms;
  --duration-base: 200ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --max-width: 1240px;
  --ruler: 0px;
  --edge: 24px; /* header and footer items sit this close to the screen's sides */
}

/* =========================================================
   Reset
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
html.jump-to-section { scroll-behavior: auto; } /* opened at a section: land there, no glide from the top */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  /* the light canvas is painted as the bottom image layer, not as the body's background color: Safari takes
     the page's background color for what it draws around the page (its bars, past the edges), and that must
     be the footer's white */
  background-color: #fff;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    linear-gradient(var(--canvas), var(--canvas));
  background-size: 24px 24px, 24px 24px, auto;
  background-position: -1px -1px, -1px -1px, 0 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 104px; /* room for the toolbar */
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
}

p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button {
  font-family: inherit;
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-4);
}
.container-narrow { max-width: 800px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: var(--space-2) var(--space-3);
  z-index: 200;
}
.skip-link:focus { left: 0; }

.eyebrow {
  font-weight: 500;
  font-size: 14px;
  color: var(--select-ink);
  margin-bottom: var(--space-3);
}

/* =========================================================
   Buttons — Apple-style glass capsules
   ========================================================= */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px 20px;
  min-height: 44px;
  border: 1px solid var(--glass-edge);
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-light), var(--glass-shadow);
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 260ms var(--ease-out), box-shadow 260ms var(--ease-out), background-color var(--duration-base) var(--ease);
}
.btn:hover {
  background: var(--glass-strong);
  transform: translateY(-1px);
  box-shadow: var(--glass-light), 0 2px 4px rgba(0,0,0,0.06), 0 16px 32px -12px rgba(0,0,0,0.26);
}
.btn:active { transform: scale(0.97); transition-duration: 90ms; }

.btn-primary {
  color: #fff;
  border-color: rgba(255,255,255,0.28);
  background: linear-gradient(180deg, rgba(42,147,255,0.94) 0%, rgba(0,96,208,0.94) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), inset 0 -1px 0 rgba(0,0,0,0.12), 0 1px 2px rgba(0,60,140,0.2), 0 10px 26px -10px rgba(0,96,208,0.65);
}
.btn-primary:hover {
  background: linear-gradient(180deg, rgba(58,156,255,0.96) 0%, rgba(0,104,222,0.96) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), inset 0 -1px 0 rgba(0,0,0,0.12), 0 2px 4px rgba(0,60,140,0.2), 0 16px 32px -12px rgba(0,96,208,0.7);
}
.btn-ghost, .btn-secondary { color: var(--ink); }

.btn-lg { padding: 13px 24px; font-size: 16px; min-height: 50px; }

.icon { flex-shrink: 0; }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky;
  top: var(--ruler);
  z-index: 100;
  /* a solid white bar on every page: what scrolls under it is hidden, not seen through */
  background: #fff;
  border-bottom: 1px solid var(--color-border);
}
/* home, contact and case pages: the same white bar, with no line under it (it runs into the white page).
   It used to be drawn as a "difference" against the page with pre-inverted content, so it flipped over
   dark areas; with a solid background that blend would invert the whole bar, so it's drawn normally */
html:has(.hero) .site-header, html:has(.contact-page) .site-header, html:has(.cs-chrome) .site-header {
  border-bottom: 0;
}
/* ...and its items go out to the screen's edges, like the footer's */
html:has(.hero) .site-header .header-inner, html:has(.contact-page) .site-header .header-inner, html:has(.cs-chrome) .site-header .header-inner { max-width: none; padding-left: var(--edge); padding-right: var(--edge); }
@media (max-width: 599px) { :root { --edge: 16px; } }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 10px var(--space-4);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 6px; /* the language switch and "Contato" read as one group */
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 5px; /* the cube sits inside a 32px box; 5px leaves 0.5em of the name between the die and the W */
  color: var(--ink);
}
.logo-word {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.04em;
  line-height: 1;
  white-space: nowrap;
}

/* monogram: a black W die tumbling, every face the same black with a white W (no selection frame) */
.logo-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1.5px solid transparent; /* keeps the old frame's room so the layout doesn't shift */
  perspective: 140px;
  flex-shrink: 0;
}
/* the frame's corner handles are hidden everywhere (header, footer, case and glossary pages) */
.lm-h { display: none; }
.lm-h {
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--paper);
  border: 1.5px solid var(--select);
}
.lm-h--tl { left: -4px; top: -4px; }
.lm-h--br { right: -4px; bottom: -4px; }
.cube {
  position: relative;
  width: 23px; /* 122% of the 19px name beside it */
  height: 23px;
  transform-style: preserve-3d;
}
.face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 1px; /* nearly square, like a stamp */
  font-family: var(--font-heading);
  font-size: 15.6px; /* the W is 68% of the face */
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
  color: #fff;
  backface-visibility: hidden;
}
/* every face its own color, white W on all (header and footer dice share these) */
.face { background: #000; }
.face.f-front  { background: #000; } /* black */
.face.f-right  { background: #4285F4; } /* blue */
.face.f-left   { background: #EA4335; } /* red */
.face.f-top    { background: #34A853; } /* green */
.face.f-back   { background: #000; }
.face.f-bottom { background: #FBBC05; } /* yellow */
.f-front  { transform: translateZ(11.5px); }
.f-right  { transform: rotateY(90deg) translateZ(11.5px); }
.f-back   { transform: rotateY(180deg) translateZ(11.5px); }
.f-left   { transform: rotateY(-90deg) translateZ(11.5px); }
.f-top    { transform: rotateX(90deg) translateZ(11.5px); }
.f-bottom { transform: rotateX(-90deg) translateZ(11.5px); }

/* sways gently, showing a sliver of the side and top faces, the W always facing front */
.js .cube { animation: die 9s ease-in-out infinite; }
@keyframes die {
  0%, 100% { transform: rotateX(-10deg) rotateY(-24deg); }
  50%      { transform: rotateX(8deg) rotateY(24deg); }
}

/* the name writes itself in on load, and again on hover */
/* the clip leaves room above and below so descenders like the g are never cut */
@keyframes write { from { clip-path: inset(-0.4em 100% -0.4em -0.1em); } to { clip-path: inset(-0.4em -0.2em -0.4em -0.1em); } }
.js .logo-word { animation: write 900ms var(--ease-out) 200ms both; }
.js .logo:hover .logo-word { animation: write 700ms var(--ease-out) both; }

.site-footer .logo-mark { width: 28px; height: 28px; }
.site-footer .logo-word { font-size: 17px; }
@media (max-width: 420px) {
  .logo { gap: 3px; }
  .logo-word { font-size: 17px; }
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--glass-edge);
  border-radius: 999px;
  background: rgba(118, 118, 128, 0.12);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.lang-btn {
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #5C5C5C;
  transition: background-color var(--duration-base) var(--ease), color var(--duration-base) var(--ease), box-shadow var(--duration-base) var(--ease);
}
.lang-btn[aria-pressed="true"] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1), 0 3px 8px rgba(0,0,0,0.08);
}
.lang-btn:hover:not([aria-pressed="true"]) { color: var(--ink); }

/* "Contato" in the header: the same glass capsule as the language switch, same height and type */
.nav-contact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 33px; /* the language switch's height */
  padding: 0 14px;
  border: 1px solid var(--glass-edge);
  border-radius: 999px;
  background: rgba(118, 118, 128, 0.12);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--duration-base) var(--ease), box-shadow var(--duration-base) var(--ease);
}
.nav-contact .icon { flex-shrink: 0; }
/* hover and the page you're on read like the chosen language: a raised white pill */
.nav-contact:hover, .nav-contact[aria-current="page"] {
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1), 0 3px 8px rgba(0,0,0,0.08);
}
.nav-contact:focus-visible { outline: 2px solid var(--select); outline-offset: 2px; }
@media (max-width: 599px) {
  .nav-contact span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .nav-contact { width: 33px; padding: 0; justify-content: center; }
}

/* =========================================================
   Toolbar (bottom navigation, Figma UI3 style)
   ========================================================= */
.toolbar {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(calc(-50% + var(--ruler) / 2));
  z-index: 110;
  display: flex;
  gap: 2px;
  padding: 5px;
  border: 1px solid var(--glass-edge);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  backdrop-filter: blur(24px) saturate(190%);
  box-shadow: var(--glass-light), 0 2px 6px rgba(0,0,0,0.06), 0 18px 40px -14px rgba(0,0,0,0.3);
}
.tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 64px;
  padding: 7px 12px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  color: #333;
  transition: background-color var(--duration-base) var(--ease), color var(--duration-base) var(--ease), box-shadow var(--duration-base) var(--ease);
}
.tool:hover { color: var(--ink); background: rgba(0,0,0,0.04); }
.tool[aria-current="true"] {
  color: var(--apple-blue-deep);
  background: rgba(255,255,255,0.9);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08), 0 4px 12px -4px rgba(0,0,0,0.14);
}
.toolbar { transition: background-color 300ms var(--ease), border-color 300ms var(--ease); }
.toolbar.is-dark {
  background: rgba(44, 44, 46, 0.6);
  border-color: rgba(255,255,255,0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 18px 40px -14px rgba(0,0,0,0.6);
}
.toolbar.is-dark .tool { color: #E5E5E5; }
.toolbar.is-dark .tool:hover { color: #fff; background: rgba(255,255,255,0.08); }
.toolbar.is-dark .tool[aria-current="true"] { color: #fff; background: rgba(255,255,255,0.18); box-shadow: inset 0 1px 0 rgba(255,255,255,0.15); }
@media (min-width: 700px) {
  .tool { flex-direction: row; gap: 8px; padding: 9px 14px; font-size: 13px; }
}

/* =========================================================
   Shared Figma vocabulary
   ========================================================= */
/* Layer name shown above a frame */
.frame-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  color: #6B6B6B;
  margin: 0 0 7px;
  transition: color var(--duration-fast) var(--ease);
}
.frame-box {
  --frame-r: 16px;
  position: relative;
  background: var(--paper);
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: var(--frame-r);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 14px 34px -18px rgba(0, 0, 0, 0.22);
  transition: box-shadow 300ms var(--ease);
}

/* Selection: blue outline with four square handles */
.is-selectable { position: relative; }
.frame-box::after,
.sel::before {
  content: '';
  position: absolute;
  inset: -1px;
  border: 1.5px solid var(--select);
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease);
}

/* Multiplayer cursor */
.cur {
  position: absolute;
  z-index: 5;
  display: inline-flex;
  align-items: flex-start;
  pointer-events: none;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.18));
}
.cur svg { display: block; flex-shrink: 0; }
.cur b {
  margin: 14px 0 0 -2px;
  padding: 3px 8px 4px;
  border-radius: 2px 10px 10px 10px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  color: #fff;
  white-space: nowrap;
}

/* Comment pin */
.pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50% 50% 50% 2px;
  border: 1.5px solid var(--ink);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}
.pin--q { background: var(--paper); color: var(--ink); }
.pin--w { background: var(--select-ink); color: #fff; }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  /* the cover fills the first screen, whatever its size (svh: the phone's toolbar doesn't count),
     minus the header above it; its content (logo space + headline) sits in the middle */
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100svh - var(--header-h, 56px));
  /* the headline itself sits in the middle of the screen: the padding below matches the header
     above, and the headline has the same room above (the logo's) and below it */
  padding: 0 0 var(--header-h, 56px);
  /* sideways clipped as before; downward open, so the headline can sink under the projects panel (motion.js) */
  overflow-x: clip;
  overflow-y: visible;
}
.hero-copy { transform-origin: 0 0; will-change: transform, opacity; }
/* the projects slide up over the sinking headline */
#portfolio { position: relative; z-index: 3; }
.hero-grid {
  display: grid;
  gap: clamp(48px, 6vw, 72px);
  align-items: start;
}

/* the headline sits on the left, lined up with the logo in the header's corner (as on the share image) */
.hero-copy { text-align: left; }
/* the cover's headline isn't held to the 1240px content column: at 128px it needs more, and its own
   max-width (in ch) already keeps the lines in shape */
/* full width (the cover is a flex column, which shrank the container and centred it), the text from the logo's edge */
.hero > .container.hero-grid { max-width: none; width: 100%; margin-left: 0; margin-right: 0; padding-left: var(--edge); padding-right: var(--edge); }
/* the screen is split in 9 equal blocks and the headline and name start two blocks in (from 600px up;
   phones keep them at the edge, where 2/9 would leave too narrow a column) */
@media (min-width: 600px) {
  .hero > .container.hero-grid { padding-left: calc(100% * 2 / 9); }
}
.sel {
  position: relative;
  display: inline-block;
}
/* room between the selection border and the headline (handles and the cursor follow it) */
.sel { --sel-py: clamp(16px, 2.2vw, 30px); --sel-px: clamp(18px, 3vw, 44px); }
.sel::before { inset: calc(-1 * var(--sel-py)) calc(-1 * var(--sel-px)); opacity: 1; }

.sel-h {
  position: absolute;
  width: 9px;
  height: 9px;
  background: var(--paper);
  border: 1.5px solid var(--select);
}
.sel-h--tl { top: calc(-4px - var(--sel-py)); left: calc(-4px - var(--sel-px)); }
.sel-h--tr { top: calc(-4px - var(--sel-py)); right: calc(-4px - var(--sel-px)); }
.sel-h--bl { bottom: calc(-4px - var(--sel-py)); left: calc(-4px - var(--sel-px)); }
.sel-h--br { bottom: calc(-4px - var(--sel-py)); right: calc(-4px - var(--sel-px)); }

.hero-who { margin-top: clamp(28px, 3.4vw, 56px); font-size: clamp(16px, 1.5vw, 22px); line-height: 1.35; font-weight: 700; color: var(--ink); }
.hero-title {
  /* sized to the 7 blocks left: the longest line is ~8.7em in PT and ~10.1em in EN (measured) */
  font-size: clamp(36px, calc((100vw * 7 / 9 - 2 * var(--edge)) / 9), 150px);
  font-weight: 600;
  line-height: 0.94;
  letter-spacing: -0.05em;
  /* three lines, broken where the share image breaks them (<br class="ht-br"> in pt.html) */
}
.hero-title:lang(en) { font-size: clamp(36px, calc((100vw * 7 / 9 - 2 * var(--edge)) / 10.5), 150px); }

/* cursor placement */
@media (max-width: 599px) {
  .sel { --sel-py: 12px; --sel-px: 10px; } /* the 16px gutter leaves no more room on the sides */
  
  /* phones: the logo stays in the header (motion.js), so no room is kept above the headline for it and
     the headline sits in the middle of the screen; and it reads bigger, over more lines */
  .sel { margin-top: 0; margin-bottom: 0; }
  .hero-title, .hero-title:lang(en) { font-size: min(15vw, 64px); text-wrap: balance; }
  .hero-title .ht-br { display: none; } /* phones wrap the sentence on their own */
  /* the headline doesn't sink and the projects panel comes in full size (motion.js): nothing to promote */
  .hero-copy, #portfolio .fsec { will-change: auto; }
}

/* Page-load sequence: type rises, then the selection is drawn,
   then collaborators join. One moment, then the canvas is still. */
@keyframes rise { from { transform: translateY(0.35em); opacity: 0; } }
@keyframes appear { from { opacity: 0; } }
@keyframes pop { from { transform: scale(0); } }

@keyframes join { from { transform: translate(-40px, -30px); opacity: 0; } }
@keyframes drift {
  50% { transform: translate(var(--dx, 10px), var(--dy, -8px)); }
}

@property --grid-line { syntax: '<color>'; inherits: true; initial-value: #EEEEEE; }

/* =========================================================
   Contact page (/contato): the channels as two cards, centered like the home's headline
   ========================================================= */
.contact-page { padding: clamp(56px, 9vw, 128px) 0 clamp(56px, 8vw, 104px); text-align: center; }
.cp-title {
  font-size: clamp(44px, 7vw, 104px);
  font-weight: 600;
  line-height: 0.94;
  letter-spacing: -0.05em;
  max-width: 15ch;
  margin: 0 auto var(--space-4);
  text-wrap: balance;
}
.cp-title .ht-b { color: #7A7A7A; }
.cp-lead { max-width: 46ch; margin: 0 auto var(--space-6); font-size: clamp(17px, 1.6vw, 19px); line-height: 1.55; color: #444; }
.cp-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-4);
  max-width: 760px;
  margin: 0 auto;
  text-align: left;
}
.cp-option {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 12px 28px -18px rgba(0,0,0,0.35);
  transition: transform 250ms var(--ease-out), box-shadow 250ms var(--ease), border-color 250ms var(--ease);
}
.cp-option:hover { transform: translateY(-3px); border-color: var(--select); box-shadow: 0 2px 4px rgba(0,0,0,0.06), 0 22px 40px -22px rgba(0,0,0,0.4); }
.cp-option:focus-visible { outline: 2px solid var(--select); outline-offset: 3px; }
.cp-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 8px; border-radius: 12px; color: #fff; }
.cp-icon--linkedin { background: #0A66C2; }
.cp-icon--email { background: var(--ink); }
.cp-option-title { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.cp-option-body { margin: 0; font-size: 16px; line-height: 1.5; color: #555; }
.cp-action { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 14px; font-weight: 600; color: var(--select-ink); }
.cp-option:hover .cp-action .icon { translate: 2px 0; }
.cp-action .icon { transition: translate 250ms var(--ease-out); }
@media (prefers-reduced-motion: reduce) { .cp-option, .cp-action .icon { transition: none; } .cp-option:hover { transform: none; } }

/* =========================================================
   Sections drawn as Figma sections
   ========================================================= */
.section { padding: var(--space-6) 0; }
.section--tight { padding-top: 0; }

.fsec {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: clamp(64px, 7vw, 88px) clamp(20px, 4vw, 56px) clamp(32px, 5vw, 64px);
}
/* the projects panel has no tab on top: the same room above as below */
#portfolio .fsec { padding-top: clamp(32px, 5vw, 64px); }
/* the projects panel spans the screen like the header: its sides line up with the logo and the buttons */
#portfolio > .container { max-width: none; padding-left: 0; padding-right: 0; }
/* it starts as a smaller card and grows to the full width of the screen as you scroll (motion.js panelGrow
   sets the scale and the corner radius); without motion it simply sits full width */
#portfolio .fsec { transform-origin: 50% 0; will-change: transform; }
/* the footer is plain white on every page, with black type and the giant name in ink */
html:has(.hero) body, html:has(.cs-chrome) body { padding-bottom: 0; } /* no bottom toolbar to make room for */
html:has(.hero) #portfolio { padding-bottom: 0; }
/* the home's first screen is plain white, with no canvas grid */
html:has(.hero) body { background-image: linear-gradient(#fff, #fff); background-size: auto; background-position: 0 0; }
html:has(.site-footer) .site-footer {
  position: relative;
  isolation: isolate;
  padding-bottom: var(--space-5);
  border-top: 0; /* no line: it runs on from the page above */
  background: #fff;
  color: var(--ink);
}
html:has(.site-footer) .site-footer .fg-word { color: var(--ink); }
html:has(.site-footer) .site-footer .footer-inner { color: #6E6E73; }
html:has(.site-footer) .site-footer .footer-links a { color: var(--ink); }
html:has(.site-footer) .site-footer .footer-links a:hover { background: rgba(0, 0, 0, 0.05); color: var(--ink); }
/* home projects: a looping carousel like enclose.dev's showcase. All cards share one grid cell
   (the tallest sets the height) and are moved sideways by their slot (script.js): -1 left, 0 middle,
   1 right, others off screen. The rail clips sideways only, so the middle card's zoom has room */
#portfolio { --slide-w: min(55vw, 920px); --slide-gap: 36px; --side-k: 0.82; }
#portfolio .fsec { padding-left: 0; padding-right: 0; }
#portfolio .project-grid.pf-rail {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 0;
  overflow-x: clip;
  overflow-y: visible;
  padding: clamp(32px, 4vw, 56px) 0 clamp(48px, 5vw, 72px); /* room under the title; below, a clear gap before the footer's line */
}
/* the footer follows the cases closely: no extra panel padding below them, a shorter run-in to the name */
#portfolio .fsec { padding-bottom: 0; }
/* the section's title, white on the dark panel, centred over the middle card */

html:has(.site-footer) .site-footer { padding-top: var(--space-6); }
#portfolio .pf-rail .frame {
  grid-area: 1 / 1;
  width: var(--slide-w);
  /* script.js sets --x (where it sits) and --k (side cards smaller than the middle one) */
  transform: translateX(var(--x, 0px)) scale(var(--k, 1));
  transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1), scale 260ms cubic-bezier(0.22, 1, 0.36, 1), opacity 400ms var(--ease);
  user-select: none;
}
#portfolio .pf-rail .frame.is-teleport { transition: none; }
#portfolio .pf-rail .frame.is-center { z-index: 2; }
#portfolio .pf-rail .frame.is-side { cursor: pointer; }
#portfolio .pf-rail .frame.is-side .frame-hint { display: none; }
/* side cards hold their film still, so they show the project's cover instead (the film's own <img>,
   normally hidden under it), fading back to the live film as the card reaches the middle;
   their caption is quieter, and the film's buttons are out of the way */
#portfolio .pf-rail .has-film > img {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--thumb-bg, #111); /* a cover with a transparent margin (EuGestor's) shows the card's own colour there, not the film */
  opacity: 0;
  pointer-events: none;
  transition: opacity 450ms var(--ease);
}
#portfolio .pf-rail .frame.is-side .has-film > img { opacity: 1; }
/* the hover parallax nudges a card's image a few px (motion.js tiltFrames); on these covers that bared the
   card's own colour along an edge, so here the image stays put (the card still tilts) */
#portfolio .pf-rail .frame-thumb img { translate: none !important; }
/* the Loopin film's big caption pills ("O Loopin monta o fluxo"…) stay off the home card: the caption under it says it */
#portfolio .lf-act { display: none; }
#portfolio .pf-rail .frame.is-side .frame-thumb button { visibility: hidden; }

/* side cards: only the name; the description fades in once the card is in the middle */
#portfolio .pf-rail .ft-desc { transition: opacity 450ms var(--ease); }
#portfolio .pf-rail .frame.is-side .ft-desc { opacity: 0; }
#portfolio .pf-rail .frame-thumb img { pointer-events: none; }
/* the middle card's zoom: a touch, so it stays inside the panel (48px above and below) */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  #portfolio .pf-rail .frame.is-focus { scale: 1.05; z-index: 6; }
}
@media (prefers-reduced-motion: reduce) { #portfolio .pf-rail .frame { transition: none; } }
@media (max-width: 699px) { #portfolio { --slide-w: 82vw; --slide-gap: 16px; --side-k: 0.86; } #portfolio .project-grid.pf-rail { padding: 40px 0; } }
/* phones: no carousel, the cards simply stack, one after the other, with no motion (script.js leaves
   them unplaced); the panel is the full width of the screen, so it has no edge or shadow either */
@media (max-width: 599px) {
  #portfolio .project-grid.pf-rail { gap: 48px; padding: 32px var(--edge) 48px; }
  #portfolio .pf-rail .frame { grid-area: auto; width: 100%; transform: none; transition: none; user-select: auto; }
  #portfolio .pf-rail .ft-desc, #portfolio .pf-rail .has-film > img { transition: none; }
  html:has(.hero) #portfolio .fsec { border: 0; box-shadow: none; }
}

/* home cards, like enclose.dev's showcase: the film is a rounded tile of its own, and under it, outside
   the tile, a caption: the project's name in white, then its short description in gray, one paragraph */
#portfolio .pf-rail .frame-box, #portfolio .pf-rail .frame:hover .frame-box { background: none; border: 0; box-shadow: none; } /* beats the dark-card rule further down */
#portfolio .frame-box::after, #portfolio .frame-box .sel-h { display: none; }
#portfolio .frame-thumb {
  border-radius: 20px;
  border: 1px solid transparent; /* no light edge; it turns blue only under the pointer (middle card) */
  background-clip: padding-box;
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.8);
  transition: border-color 300ms var(--ease), box-shadow 300ms var(--ease);
}
/* no selection outline around the cases (not even after a click gives a card focus); any card under
   the pointer (middle or side) gets a light blue edge on its film only */
#portfolio .pf-rail .frame:focus-within .frame-box { outline: none; }
#portfolio .pf-rail .frame:hover .frame-thumb { border-color: rgba(13, 153, 255, 0.45); box-shadow: 0 0 0 3px rgba(13, 153, 255, 0.1), 0 30px 60px -28px rgba(0, 0, 0, 0.95); }
/* keyboard only: a quiet ring on the film shows where the focus is */
#portfolio .pf-rail .frame:has(.frame-link:focus-visible) .frame-thumb { outline: 2px solid rgba(255, 255, 255, 0.5); outline-offset: 4px; }

#portfolio .ft-name { display: inline; font-weight: 600; color: #F4F4F5; }
#portfolio .ft-name::after { content: ".\00a0"; }
#portfolio .ft-desc { display: inline; margin: 0; font-size: inherit; line-height: inherit; color: #8A8A93; }
.fsec-tab {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--color-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  color: #444;
}

.section-head {
  max-width: 760px;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.section-head h2 {
  font-size: clamp(36px, 5.4vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.section-lead {
  margin-top: var(--space-4);
  max-width: 52ch;
  font-size: 17px;
  color: #444;
}

/* =========================================================
   Project frames
   ========================================================= */
.project-grid {
  position: relative;
  display: grid;
  gap: 48px var(--space-4);
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  /* an odd last project sits alone in the middle of its row (script.js marks it, filters included) */
  .project-grid .frame.is-odd-last { grid-column: 1 / -1; justify-self: center; width: calc(50% - var(--space-4) / 2); }
}
@media (min-width: 1100px) {
  .project-grid { grid-template-columns: repeat(12, 1fr); column-gap: 28px; }
  .project-grid .frame { grid-column: span 3; }
  
  
}

.frame { position: relative; margin: 0; }
.frame .frame-box { height: calc(100% - 19px); display: flex; flex-direction: column; }

.frame-thumb {
  aspect-ratio: 4 / 3; /* most covers are 4:3; others sit whole on their own edge colour */
  overflow: hidden;
  background: var(--thumb-bg, var(--color-muted));
  border-radius: calc(var(--frame-r) - 1px) calc(var(--frame-r) - 1px) 0 0;
}
.frame-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* the whole screen, never cropped */
  transition: transform 500ms var(--ease-out);
}
/* the card's link covers the whole card; the film's own buttons (sound, pause)
   sit above it, and the rest of the film lets clicks through to the link */
.frame-thumb:has(.pc-sound, .ts-toggle) { position: relative; z-index: 3; pointer-events: none; }
.frame-thumb :is(.pc-sound, .ts-toggle) { pointer-events: auto; }
/* on the cards the film's sound and pause buttons show up with the pointer (or keyboard focus);
   a sound left on stays visible, so it's clear where it comes from. Touch screens keep them. */
@media (hover: hover) {
  .frame-thumb :is(.pc-sound, .kf-toggle, .eg-toggle, .ts-toggle) { opacity: 0; pointer-events: none; transition: opacity 200ms var(--ease), background 160ms var(--ease); }
  .frame:is(:hover, :focus-within) .frame-thumb :is(.pc-sound, .kf-toggle, .eg-toggle, .ts-toggle),
  .frame-thumb .pc-sound.is-on { opacity: 1; pointer-events: auto; }
}
/* the cards play no music (it starts on the case page), so they have no sound button */
.frame .pc-sound { display: none; }

/* category chips above the project grid: loose buttons, the chosen one a raised white pill (like the toolbar) */
.project-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 32px; }
/* phones: one row that scrolls sideways; the padding (taken back by the margin) leaves room
   for the chosen chip's shadow, which the scroll would otherwise cut off */
@media (max-width: 699px) {
  .project-filters { flex-wrap: nowrap; margin: -12px -20px 12px; padding: 12px 20px 20px; overflow-x: auto; scrollbar-width: none; }
}
.project-filters::-webkit-scrollbar { display: none; }
.pf-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0,0,0,0.06), 0 4px 12px -4px rgba(0,0,0,0.12);
  color: #333;
  font: 500 15px/1 var(--font-body);
  cursor: pointer;
  transition: background 200ms var(--ease), color 200ms var(--ease), box-shadow 200ms var(--ease), border-color 200ms var(--ease);
}
.pf-chip:hover { color: var(--ink); background: #fff; box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0,0,0,0.06), 0 8px 18px -8px rgba(0,0,0,0.18); }
.pf-chip:focus-visible { outline: 2px solid var(--select); outline-offset: 2px; }
.pf-chip[aria-pressed="true"] { color: #fff; border-color: rgba(255,255,255,0.28);
  background: linear-gradient(180deg, rgba(42,147,255,0.94) 0%, rgba(0,96,208,0.94) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), inset 0 -1px 0 rgba(0,0,0,0.12), 0 1px 2px rgba(0,60,140,0.2), 0 10px 26px -10px rgba(0,96,208,0.65); }
.pf-chip[aria-pressed="true"]:hover { background: linear-gradient(180deg, rgba(58,156,255,0.96) 0%, rgba(0,104,222,0.96) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), inset 0 -1px 0 rgba(0,0,0,0.12), 0 2px 4px rgba(0,60,140,0.2), 0 16px 32px -12px rgba(0,96,208,0.7); }
/* the chosen chip gets the LinkedIn button's white sheen under the pointer */
.pf-chip[aria-pressed="true"].has-sheen::after { z-index: 0; mix-blend-mode: soft-light; background: radial-gradient(110px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 70%); }
.pf-chip.has-sheen > * { position: relative; z-index: 1; }
.pf-n { min-width: 20px; padding: 2px 6px; border-radius: 999px; background: rgba(0, 0, 0, 0.06); font-size: 12px; font-weight: 600; text-align: center; }
.pf-chip[aria-pressed="true"] .pf-n { background: rgba(255, 255, 255, 0.22); }
.project-grid .frame[hidden] { display: none; }
.project-grid .frame.is-filtered-in { animation: pfIn 360ms var(--ease-out) both; }
@keyframes pfIn { from { opacity: 0; translate: 0 12px; } }
@media (prefers-reduced-motion: reduce) { .project-grid .frame.is-filtered-in { animation: none; } }
.tag {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--color-muted);
  color: #333;
}

/* whole frame is the link target */
.frame-link::after { content: ''; position: absolute; inset: 0; z-index: 2; }
.frame-link:focus-visible { outline: none; }

/* hover / focus = selected in Figma */
.frame:hover .frame-label,
.frame:focus-within .frame-label { color: var(--select-ink); }
.frame:hover .frame-box::after,
.frame:focus-within .frame-box::after { opacity: 1; }
.frame:focus-within .frame-box { outline: 2px solid var(--select); outline-offset: 4px; }
.frame:hover .frame-box { box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05), 0 24px 44px -20px rgba(0, 0, 0, 0.3); }
.frame-box .sel-h { z-index: 3; opacity: 0; transition: opacity var(--duration-fast) var(--ease); }
.frame:hover .frame-box .sel-h,
.frame:focus-within .frame-box .sel-h { opacity: 1; }
.frame-box .sel-h--tl { top: -6px; left: -6px; }
.frame-box .sel-h--tr { top: -6px; right: -6px; }
.frame-box .sel-h--bl { bottom: -6px; left: -6px; }
.frame-box .sel-h--br { bottom: -6px; right: -6px; }

/* cursor tag that follows the pointer over a frame */
.grid-cursor {
  position: absolute;
  top: 0; left: 0;
  z-index: 6;
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease);
}
.grid-cursor.is-on { opacity: 1; }
.grid-cursor b { background: var(--select-ink); }
.grid-cursor { color: var(--select-ink); }
@media (hover: hover) and (pointer: fine) {
  .project-grid.has-follow .frame { cursor: none; }
}

/* =========================================================
   FAQ as a comment thread
   ========================================================= */
@media (min-width: 1000px) {
  .fsec--split {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--space-6);
    align-items: start;
  }
  .fsec--split .section-head { margin-bottom: 0; position: sticky; top: 120px; }
}

.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-item:first-child { border-top: 1px solid var(--color-border); }
.faq-item h3 { margin: 0; }
.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 0;
  text-align: left;
  font-family: var(--font-heading);
  font-size: clamp(17px, 1.6vw, 20px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--ink);
}
.faq-q { flex: 1; }
.faq-icon { flex-shrink: 0; transition: transform var(--duration-base) var(--ease); }
.faq-trigger[aria-expanded="true"] .faq-icon { transform: rotate(180deg); }
.faq-trigger[aria-expanded="true"] .pin--q { background: var(--sticky); }

.faq-panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height 320ms var(--ease);
}
.faq-item.is-open .faq-panel { max-height: 400px; }
.reply {
  display: flex;
  gap: 14px;
  padding: 2px 0 22px 42px;
}
.reply-name { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.reply p:not(.reply-name) { color: #444; max-width: 60ch; }
@media (max-width: 599px) {
  .reply { padding-left: 0; }
}

/* =========================================================
   Contact — dark canvas, type as the image
   ========================================================= */
.contact {
  margin-top: var(--space-6);
  padding: clamp(72px, 10vw, 136px) 0;
  background-color: var(--dark-canvas);
  background-image:
    linear-gradient(#2A2A2A 1px, transparent 1px),
    linear-gradient(90deg, #2A2A2A 1px, transparent 1px);
  background-size: 24px 24px;
  color: #fff;
}
.contact-grid {
  display: grid;
  gap: var(--space-7);
  align-items: end;
}
@media (min-width: 1000px) {
  /* the board sits level with the headline block, not the button row */
  .contact-grid .board { align-self: center; margin-top: -40px; }
}
@media (min-width: 1000px) {
  .contact-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
}
.contact-title {
  color: #fff;
  font-size: clamp(48px, 8vw, 116px);
  line-height: 0.92;
  letter-spacing: -0.055em;
  max-width: 10ch;
  margin-bottom: var(--space-5);
}
.contact-lead {
  max-width: 44ch;
  font-size: 17px;
  color: #C9C9C9;
  margin-bottom: var(--space-5);
}
.contact .frame-label { color: #A8A8A8; }

/* FigJam board: sticky notes for the first message */
.board {
  position: relative;
  margin: 0;
  justify-self: end;
  width: min(100%, 460px);
}
.board-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 6px 0 0;
}
.note {
  position: relative;
  min-height: 150px;
  padding: 18px 18px 22px;
  font-family: var(--font-heading);
  font-size: clamp(17px, 1.6vw, 20px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: #1E1E1E;
  transform: rotate(var(--r, 0deg));
  box-shadow: 0 1px 1px rgba(0,0,0,0.12), 0 14px 22px -12px rgba(0,0,0,0.55);
  user-select: none;
  touch-action: pan-y;
}
.note--yellow { background: #FFE58A; }
.note--pink { background: #FFC2EC; }
.note--green { background: #B3EFBD; }
.note--blue { background: #A8DAFF; }
.note:nth-child(2) { margin-top: 26px; }
.note:nth-child(3) { margin-top: -10px; }
.note:nth-child(4) { margin-top: 14px; }

.stamp {
  position: absolute;
  right: -10px;
  top: 2px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--c-orange);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 700;
  border: 3px solid #fff;
  transform: rotate(12deg);
  box-shadow: 0 8px 16px -8px rgba(0,0,0,0.6);
}
.scribble {
  position: absolute;
  left: -150px;
  bottom: 18px;
  width: 140px;
  height: 90px;
  overflow: visible;
  fill: none;
  stroke: #FFE58A;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (max-width: 999px) {
  .board { justify-self: stretch; width: 100%; }
  .scribble { display: none; }
  .stamp { right: 4px; top: -6px; width: 46px; height: 46px; font-size: 16px; }
}
.contact { overflow-x: clip; }
@media (max-width: 420px) {
  .note { min-height: 128px; padding: 14px 14px 18px; }
}

/* motion: notes stick on one by one, the stamp lands, the arrow draws itself */
.motion-ready .board .note,
.motion-ready .board .stamp { opacity: 0; }
.motion-ready .board .scribble path { stroke-dasharray: 220; stroke-dashoffset: 220; }
.motion-ready .board.in .note {
  opacity: 1;
  animation: stick 700ms var(--ease-out) calc(var(--i) * 140ms) both, bob 6s ease-in-out calc(1s + var(--i) * 0.7s) infinite;
}
.motion-ready .board.in .stamp { opacity: 1; animation: stamp 520ms cubic-bezier(0.34, 1.56, 0.64, 1) 820ms both; }
.motion-ready .board.in .scribble-line { animation: draw 900ms var(--ease-out) 1000ms forwards; }
.motion-ready .board.in .scribble-head { animation: draw 300ms var(--ease-out) 1750ms forwards; }
@keyframes stick {
  0% { opacity: 0; transform: translateY(-28px) scale(1.12) rotate(calc(var(--r) + 9deg)); box-shadow: 0 30px 40px -18px rgba(0,0,0,0.6); }
  70% { opacity: 1; transform: translateY(2px) scale(0.99) rotate(calc(var(--r) - 1deg)); }
  100% { opacity: 1; transform: rotate(var(--r)); }
}
@keyframes bob {
  0%, 100% { transform: rotate(var(--r)) translateY(0); }
  50% { transform: rotate(calc(var(--r) + 1.2deg)) translateY(-4px); }
}
@keyframes stamp {
  from { opacity: 0; transform: rotate(-30deg) scale(2.2); }
  to { opacity: 1; transform: rotate(12deg) scale(1); }
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* hover lifts a note; dragging holds it up */
.motion-ready .note { transition: translate 500ms var(--ease-out), box-shadow 250ms var(--ease), scale 250ms var(--ease-out); }
.motion-ready .note:hover { scale: 1.04; box-shadow: 0 1px 1px rgba(0,0,0,0.12), 0 24px 30px -14px rgba(0,0,0,0.6); z-index: 2; }
.note.is-drop-target {
  outline: 2px solid var(--select);
  outline-offset: 5px;
  scale: 0.96;
}
.note.is-dragging {
  z-index: 4;
  scale: 1.08;
  transition: box-shadow 250ms var(--ease), scale 250ms var(--ease-out);
  box-shadow: 0 2px 2px rgba(0,0,0,0.12), 0 34px 40px -16px rgba(0,0,0,0.65);
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer { padding: var(--space-5) 0; }
.contact + .site-footer, main:has(> .contact:last-child) + .site-footer, main:has(> .more-work:last-child) + .site-footer { padding-top: var(--space-5); }
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: center;
  text-align: center;
  font-size: 14px;
  color: #555;
}
.footer-notice { display: block; margin-top: var(--space-2); max-width: 62ch; font-size: 13px; }
.footer-notice a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.footer-links { display: flex; gap: var(--space-3); }
.footer-links a {
  display: inline-flex;
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  color: var(--ink);
}
.footer-links a:hover { background: var(--color-muted); color: var(--select-ink); }

/* a short confirmation (e.g. "Email copied"), floating above the toolbar */
.site-toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  z-index: 500;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(20, 20, 24, 0.86);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 10px 28px -10px rgba(0, 0, 0, 0.45);
  opacity: 0;
  translate: -50% 8px;
  pointer-events: none;
  transition: opacity 200ms var(--ease), translate 260ms var(--ease-out);
}
.site-toast.is-on { opacity: 1; translate: -50% 0; }

/* header email: just the envelope, round, beside "Conversar no LinkedIn" (the label stays for screen readers) */

@media (min-width: 700px) {
  .footer-inner { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* =========================================================
   Case study pages
   ========================================================= */

.cs-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  font-size: 14px;
  color: var(--color-secondary);
  transition: color var(--duration-fast) var(--ease), gap var(--duration-fast) var(--ease);
}
.cs-back:hover {
  color: var(--color-accent);
  gap: 10px;
}

.cs-hero {
  padding: var(--space-5) 0 0;
}

.cs-hero h1 {
  font-size: clamp(28px, 4.5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-3);
}

.cs-hero-image {
  width: 100%;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-2);
  overflow: hidden;
  background: var(--thumb-bg, var(--color-muted));
}
/* the cover at its own proportions, whole; very tall ones are held to the screen height */
.cs-hero-image img {
  width: 100%;
  height: auto;
  max-height: 82vh;
  object-fit: contain;
  display: block;
}

/* a recorded prototype, looping silently like a screen */
.cs-flow-video { margin: var(--space-6) 0 0; }
.cs-flow-video video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1280 / 760;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: #05021F;
}
.cs-flow-video figcaption {
  margin-top: var(--space-3);
  font-size: 14px;
  color: var(--color-muted-foreground);
}

.cs-section {
  padding: var(--space-7) 0;
}

.cs-section .eyebrow {
  margin-bottom: var(--space-2);
}
.cs-section h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-4);
  max-width: 24ch;
}
.cs-section > .container > p {
  font-size: 17px;
  color: var(--color-secondary);
  max-width: 68ch;
}

.cs-stats {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--space-4);
  margin: var(--space-6) 0;
}
.cs-stats div {
  padding: var(--space-4);
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.cs-stats strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 800;
  color: var(--color-accent);
  margin-bottom: 4px;
}
.cs-stats span {
  font-size: 14px;
  color: var(--color-muted-foreground);
}
@media (min-width: 700px) {
  .cs-stats { grid-template-columns: repeat(3, 1fr); }
}

.cs-feature {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.cs-feature h3 {
  font-size: 17px;
  font-weight: 700;
}
.cs-feature p {
  font-size: 15px;
  color: var(--color-muted-foreground);
  max-width: none !important;
}

/* Screens gallery */

.cs-screen {
  margin: 0;
}
.cs-screen img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}
.cs-screen figcaption {
  margin-top: var(--space-3);
  font-size: 14px;
  color: var(--color-muted-foreground);
}

/* two crops with different widths side by side, equal height (set --cols per page) */

.cs-full-shot {
  margin: var(--space-6) auto 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  max-width: 900px;
}
.cs-full-shot img {
  width: 100%;
  display: block;
}

.cs-inline-image {
  margin: var(--space-6) 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
}
.cs-inline-image img {
  width: 100%;
  display: block;
}

/* Before/after showcase (sequential, no slider) */

.cs-compare-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  margin-bottom: var(--space-4);
  background: #0E1215;
}
.cs-compare-image img {
  width: 100%;
  display: block;
}

/* Full flow diagram */

.cs-nav-link {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-card);
  transition: box-shadow var(--duration-base) var(--ease), transform var(--duration-base) var(--ease);
  max-width: 100%;
}
.cs-nav-link:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.cs-nav-link span {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-muted-foreground);
}
.cs-nav-link strong {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
  text-align: right;
}

/* =========================================================
   Confirm-before-navigate modal
   ========================================================= */
.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.confirm-modal[hidden] { display: none; }
.confirm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 24, 0.32);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  animation: modalFade 200ms var(--ease) both;
}
/* glass card, same family as the buttons and toolbar */
.confirm-modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 2px 6px rgba(0,0,0,0.06), 0 30px 60px -20px rgba(0,0,0,0.35);
  animation: modalIn 260ms var(--ease-out) both;
}
.confirm-modal-card h2 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  text-wrap: balance;
}
.confirm-modal-card p {
  margin: 0 0 22px;
  font-size: 15px;
  line-height: 1.5;
  color: #555;
  text-wrap: pretty;
}
/* two equal buttons filling the row, no extra lift or offset shadow */
.confirm-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.confirm-modal-actions .btn {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  white-space: normal;
  text-align: center;
  line-height: 1.2;
  translate: none !important;
}
.confirm-modal-actions .btn:hover { transform: none; }
.confirm-modal-actions .btn-ghost {
  background: rgba(0, 0, 0, 0.05);
  border-color: transparent;
  box-shadow: none;
}
.confirm-modal-actions .btn-ghost:hover { background: rgba(0, 0, 0, 0.09); box-shadow: none; }
.confirm-modal-actions .btn-primary { box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 6px 16px -8px rgba(0,96,208,0.6); }
.confirm-modal-actions .btn-primary:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), 0 8px 20px -8px rgba(0,96,208,0.7); }
@media (max-width: 380px) {
  .confirm-modal-actions { grid-template-columns: 1fr; }
  .confirm-modal-actions .btn-primary { order: -1; }
}
/* case study screens open full screen (script.js) */
.is-zoomable { cursor: zoom-in; transition: filter 200ms var(--ease); }
.is-zoomable:hover { filter: brightness(1.04); }
.is-zoomable:focus-visible { outline: 2px solid var(--select); outline-offset: 4px; }
.lb-open, .lb-open body { overflow: hidden; }
.lightbox { z-index: 400; padding: 0; }
.lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 14, 18, 0.9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  animation: modalFade 260ms var(--ease) both;
}
.lb-dialog {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 64px 88px 24px;
}
.lb-stage {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 100%;
  max-height: 100%;
  min-height: 0;
}
.lb-img {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - 140px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
  user-select: none;
  -webkit-user-drag: none;
}
.lb-img[hidden] { display: none; }
.lb-cap {
  display: flex;
  gap: 14px;
  align-items: baseline;
  max-width: 720px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
  text-wrap: balance;
}
.lb-count { flex-shrink: 0; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, 0.5); }
.lb-count:empty { display: none; }
/* round glass buttons, the dark sibling of the site's capsules */
.lb-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  color: #fff;
  transition: background 160ms var(--ease), transform 160ms var(--ease);
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.2); }
.lb-btn:active { transform: scale(0.94); }
.lb-btn:focus-visible { outline: 2px solid var(--select); outline-offset: 3px; }
.lb-close { top: 16px; right: 16px; }
.lb-nav { top: 50%; margin-top: -23px; }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }
.lightbox.is-single .lb-nav { display: none; }
.lb-dialog > .lb-btn { animation: modalFade 260ms var(--ease) 80ms both; }
.lightbox.is-closing .lb-backdrop,
.lightbox.is-closing .lb-btn,
.lightbox.is-closing .lb-cap { opacity: 0; transition: opacity 200ms var(--ease); }
@media (max-width: 700px) {
  .lb-dialog { padding: 64px 12px 84px; }
  .lb-img { max-height: calc(100dvh - 200px); border-radius: 8px; }
  .lb-nav { top: auto; bottom: 20px; margin-top: 0; }
  .lb-prev { left: calc(50% - 56px); }
  .lb-next { right: calc(50% - 56px); }
}
@media (prefers-reduced-motion: reduce) {
  .lb-backdrop, .lb-dialog > .lb-btn { animation: none; }
}

@keyframes modalFade { from { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(0.97); } }

/* =========================================================
   Motion layer (motion.js adds .motion-ready; absent with
   reduced motion, where everything above stays still)
   ========================================================= */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }

/* headings enter word by word */
.split .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: 0.1em 0.03em 0.08em;
  margin: -0.1em -0.03em -0.08em;
}
.split .w > span {
  display: inline-block;
  transform: translateY(105%);
  filter: blur(6px);
  transition: transform 1s var(--ease-out) calc(var(--i) * 70ms), filter 1s var(--ease-out) calc(var(--i) * 70ms);
}
.split.in .w > span { transform: none; filter: none; }

/* blocks blur in as they arrive */
[data-reveal] {
  opacity: 0;
  translate: 0 36px;
  filter: blur(10px);
  transition: opacity 0.9s var(--ease-out) var(--d, 0ms), translate 0.9s var(--ease-out) var(--d, 0ms), filter 0.9s ease var(--d, 0ms);
}
[data-reveal].in { opacity: 1; translate: none; filter: none; }
/* screens and frames rise without the blur: a filter animated on big images is the costliest
   thing on the page, and several arrive together */
:is(.cs-screen, .cs-full-shot, .cs-inline-image, .cs-feature, .project-grid .frame)[data-reveal] { filter: none; }

/* magnetic pull uses `translate`, so it stacks with hover transforms */
.motion-ready .btn,
.motion-ready .tool,
.motion-ready .lang-switch,
.motion-ready .faq-trigger .pin { transition-property: transform, box-shadow, background-color, color, translate; }
.motion-ready .btn { transition: transform 260ms var(--ease-out), box-shadow 260ms var(--ease-out), background-color var(--duration-base) var(--ease), translate 380ms var(--ease-out); }
.motion-ready .tool { transition: background-color var(--duration-base) var(--ease), color var(--duration-base) var(--ease), box-shadow var(--duration-base) var(--ease), translate 380ms var(--ease-out); }
.motion-ready .lang-switch,
.motion-ready .faq-trigger .pin { transition: translate 380ms var(--ease-out), background-color var(--duration-base) var(--ease); }

/* frames tilt in 3D, the thumbnail pans */
.motion-ready .project-grid .frame { perspective: 900px; }
.motion-ready .project-grid .frame-box {
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 600ms var(--ease-out);
}
.motion-ready .project-grid .frame.tilting .frame-box { transition: transform 120ms linear; }
.motion-ready .frame-thumb img { transition: transform 500ms var(--ease-out), translate 600ms var(--ease-out); }
.motion-ready .frame.tilting .frame-thumb img { transition: transform 500ms var(--ease-out), translate 140ms linear; }

/* hero layers drift with the pointer */

/* multiplayer cursors: the layer lives on the page (not fixed to the screen) and each cursor sits
   at its page position, so scrolling carries them along natively, with no frame of lag */

.cur.is-handed-off { visibility: hidden; animation: none; }

/* what a collaborator is "selecting" */

.frame-box.peer-on { outline-offset: 3px; }
.faq-item.peer-on { outline-offset: 0; }

/* page to page: blur through */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vtOut 0.3s cubic-bezier(0.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: vtIn 0.55s var(--ease-out) both; }
@keyframes vtOut { to { opacity: 0; filter: blur(12px); transform: scale(0.99); } }
@keyframes vtIn { from { opacity: 0; filter: blur(12px); transform: scale(1.01); } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* the visitor's own Figma cursor (mouse devices, motion on) */
/* the arrow is the system cursor (an SVG set by motion.js): drawn by the OS, it never lags */
.has-cursor, .has-cursor * { cursor: var(--cur, auto) !important; }
.has-cursor.is-grabbing, .has-cursor.is-grabbing * { cursor: var(--cur-grabbing, grabbing) !important; }
.has-cursor .me > svg, .has-cursor .me .me-hand, .has-cursor .me .me-resize { display: none !important; }
.has-cursor .me .me-tag { margin-left: 21px; }
/* the tag is part of the cursor image (motion.js); the page copy only stands in when it doesn't fit */
.has-cursor .me.tag-in-cursor .me-tag { display: none; }
.has-cursor iframe { cursor: auto !important; }
.me {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  pointer-events: none;
  color: var(--ink);
  opacity: 0;
  transition: opacity 150ms var(--ease);
  will-change: transform;
}
.me.is-on { opacity: 1; }
.me svg { display: block; flex-shrink: 0; transform-origin: 2.2px 2.2px; transition: transform 200ms var(--ease-out), color 200ms var(--ease); }
.me.is-link svg { color: var(--select-ink); transform: scale(1.08); }
.me.is-down svg { transform: scale(0.85); }
.me-tag {
  margin: 22px 0 0 -3px;
  padding: 4px 10px 5px;
  border-radius: 2px 10px 10px 10px;
  background: var(--select-ink);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
  opacity: 0;
  transform: scale(0.6) translate(-6px, -6px);
  transform-origin: 0 0;
  transition: opacity 160ms var(--ease), transform 260ms var(--ease-out);
}
.me.has-tag .me-tag { opacity: 1; transform: none; }
.me.on-dark svg { color: #fff; }
.me.on-dark.is-link svg { color: #6CC0FF; }

/* the tag opens toward the side with room (set per frame in motion.js);
   the sharp corner always points at the arrow tip */

/* over sticky notes the cursor becomes a hand: open to grab, closed while dragging */
.me .me-hand {
  position: absolute;
  left: -15px;
  top: -13px;
  display: none;
  fill: #fff;
  stroke: #000;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* a thick white underlay closes the gaps between the outline strokes, so the hand reads solid */
.me .me-hand .hand-fill { stroke: #fff; stroke-width: 5.5; fill: #fff; }
.me.is-grab > svg:first-child { visibility: hidden; }
.me.is-grab .me-hand--open { display: block; }
.me.is-grab .me-hand { transform: none; }
.is-grabbing .me .me-hand--open { display: none; }
.is-grabbing .me .me-hand--closed { display: block; }
.is-grabbing .me > svg:first-child { visibility: hidden; }
.me.is-grab .me-tag { margin-top: 26px; }

/* ===== Hero canvas (desktop): free notes, new notes, resizable headline ===== */
.is-draggable { touch-action: none; }

/* added notes and stickers live on one layer over the whole home page */
.page-notes { position: absolute; top: 0; left: 0; width: 100%; z-index: 80; pointer-events: none; }
.page-notes > * { pointer-events: auto; }
.note--user {
  position: absolute;
  width: 184px;
  min-height: 150px;
  padding: 16px 16px 20px;
  font-size: 17px;
  pointer-events: auto;
  animation: stick 560ms var(--ease-out) both;
}
.note--purple { background: #D9B8FF; }
.note--orange { background: #FFC9A3; }
.note-text {
  min-height: 108px;
  outline: none;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  user-select: text;
}
.note-text:empty::before { content: attr(data-placeholder); color: rgba(0,0,0,0.38); }
.note-del {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0,0,0,0.08);
  color: #1E1E1E;
  font-size: 16px;
  line-height: 1;
  opacity: 0;
  transition: opacity 150ms var(--ease), background-color 150ms var(--ease);
}
.note--user:hover .note-del, .note--user:focus-within .note-del { opacity: 1; }
.note-del:hover { background: rgba(0,0,0,0.18); }

.add-note {
  position: fixed;
  left: calc(var(--ruler) + 20px);
  bottom: 20px;
  z-index: 110;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 10px;
  border: 1px solid var(--glass-edge);
  border-radius: 999px;
  background: rgba(255,255,255,0.6);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-light), 0 2px 6px rgba(0,0,0,0.06), 0 16px 34px -14px rgba(0,0,0,0.3);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  opacity: 0;
  translate: 0 12px;
  pointer-events: none;
  transition: opacity 300ms var(--ease), translate 400ms var(--ease-out), background-color 200ms var(--ease);
}
.add-note.is-on { opacity: 1; translate: 0 0; pointer-events: auto; }
.add-note:hover { background: rgba(255,255,255,0.85); }
.add-note:active { scale: 0.96; }
.add-note-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,0.05); }

/* the selection handles are real resize handles */
.sel-h.is-handle { z-index: 2; cursor: nwse-resize; }
.sel-h.is-handle[data-axis="nesw"] { cursor: nesw-resize; }
.sel-h.is-handle::after { content: ''; position: absolute; inset: -9px; }
.sel-h.is-handle:hover, .sel.is-resizing .sel-h { background: var(--select); }

/* resize arrows for the visitor's cursor */
.me .me-resize {
  position: absolute;
  left: -12px;
  top: -12px;
  display: none;
  fill: none;
  stroke: #000;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px #fff);
}
.me.is-resize > svg:first-child, .is-resizing .me > svg:first-child { visibility: hidden; }
.me.is-resize .me-resize, .is-resizing .me .me-resize { display: block; }
.me.is-nesw .me-resize { rotate: 90deg; }
.me.is-resize .me-tag { margin-top: 24px; }

/* glass sheen: a soft light follows the pointer inside header and toolbar controls */
.has-sheen { position: relative; overflow: hidden; isolation: isolate; }
.has-sheen::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(90px circle at var(--mx, 50%) var(--my, 50%), rgba(13, 153, 255, 0.16), rgba(13, 153, 255, 0) 70%);
  opacity: 0;
  transition: opacity 250ms var(--ease);
  pointer-events: none;
}
.has-sheen:hover::after { opacity: 1; }
.btn-primary.has-sheen::after { z-index: 0; mix-blend-mode: soft-light; background: radial-gradient(110px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 70%); }
.btn-primary.has-sheen > * { position: relative; z-index: 1; }
.toolbar.is-dark .has-sheen::after { background: radial-gradient(90px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 70%); }
.site-header .btn:hover, .toolbar .tool:hover { transform: none; }

/* "+" tool in the toolbar: a menu with Post-it and Sticker; sticker types open above Sticker */
/* floating "+" in the bottom-right corner */
.add-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 110;
}
.add-fab[hidden] { display: none; }
.tool--add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 18px 0 14px;
  border: 1px solid var(--glass-edge);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  backdrop-filter: blur(24px) saturate(190%);
  box-shadow: var(--glass-light), 0 2px 6px rgba(0,0,0,0.06), 0 18px 40px -14px rgba(0,0,0,0.3);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  transition: background-color 200ms var(--ease), scale 200ms var(--ease-out);
}
.tool--add:hover { background: rgba(255, 255, 255, 0.85); }
.tool--add:active { scale: 0.96; }
.tool--add svg { transition: rotate 300ms var(--ease-out); }
.tool--add.is-open svg { rotate: 45deg; }
.add-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  display: flex;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--glass-edge);
  border-radius: 20px;
  background: rgba(255,255,255,0.72);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-light), 0 18px 40px -14px rgba(0,0,0,0.3);
  animation: pickerIn 220ms var(--ease-out);
}
.add-menu[hidden] { display: none; }
.add-menu .add-note {
  position: relative;
  left: auto;
  bottom: auto;
  justify-content: flex-start;
  border: 0;
  border-radius: 14px;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  opacity: 1;
  translate: none;
  pointer-events: auto;
  white-space: nowrap;
}
.add-menu .add-note:hover, .add-menu .add-note[aria-expanded="true"] { background: rgba(0,0,0,0.05); }
.add-menu .stamp-picker { left: auto; right: 4px; bottom: calc(100% + 10px); }
.stamp-picker {
  position: absolute;
  display: grid;
  grid-template-columns: repeat(3, 44px);
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--glass-edge);
  border-radius: 18px;
  background: rgba(255,255,255,0.72);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-light), 0 18px 40px -14px rgba(0,0,0,0.3);
  animation: pickerIn 220ms var(--ease-out);
}
.stamp-picker[hidden] { display: none; }
@keyframes pickerIn { from { opacity: 0; translate: 0 8px; scale: 0.96; } }
.stamp-option {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2.5px solid #fff;
  box-shadow: 0 4px 10px -4px rgba(0,0,0,0.4);
  transition: scale 200ms var(--ease-out), rotate 200ms var(--ease-out);
}
.stamp-option:hover, .stamp-option:focus-visible { scale: 1.12; rotate: -8deg; }

.stamp.stamp--user {
  --size: 56px;
  position: absolute;
  right: auto;
  width: var(--size);
  height: var(--size);
  pointer-events: auto;
  transform: rotate(var(--rot, 0deg));
  animation: stampDrop 480ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes stampDrop { from { opacity: 0; transform: rotate(calc(var(--rot, 0deg) - 40deg)) scale(2.2); } }
.stamp-del { top: -6px; right: -6px; width: 20px; height: 20px; font-size: 13px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.25); }
.stamp--user:hover .stamp-del { opacity: 1; }

/* stickers scale from a corner handle; the glyph follows the size */
.stamp--user svg { width: 46%; height: 46%; }
.stamp--user .stamp-resize {
  right: -6px;
  bottom: -6px;
  opacity: 0;
  transition: opacity 150ms var(--ease);
}
.stamp--user:hover .stamp-resize, .stamp--user.is-scaling .stamp-resize { opacity: 1; }
.stamp--user.is-scaling { outline: 1.5px solid var(--select); outline-offset: 3px; }

/* restore sits left of "+ Adicionar" in the corner */
.add-fab { display: flex; gap: 8px; align-items: flex-end; }
.add-fab[hidden] { display: none; }
.tool--restore[hidden] { display: none; }
.tool--restore { padding: 0 16px 0 13px; }
.add-fab .add-menu { right: 0; }
.is-restoring { transition: translate 800ms var(--ease-out), font-size 700ms var(--ease-out) !important; }

/* iOS-style jiggle while hovering anything draggable: driven by motion.js
   (each cycle starts and ends level, so leaving never snaps). Amplitude per item: */
.is-draggable, .board .note { --jig: 1.6deg; }
.stamp--user { --jig: 4deg; }

/* ===== Footer: the name as one giant, selected text layer ===== */
.site-footer { padding-top: var(--space-6); padding-bottom: var(--space-5); overflow: hidden; }
.footer-giant {
  padding: 22px var(--space-4) 0;
  max-width: none;
}
.fg-sel {
  position: relative;
  display: block;
  margin-top: 6px;
  outline: 1.5px solid var(--select);
  outline-offset: 0;
}
.fg-word {
  display: block;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 22vw; /* refined to the exact width by script.js */
  line-height: 0.82;
  letter-spacing: -0.06em;
  color: var(--ink);
  white-space: nowrap;
  padding: 0.04em 0 0.22em;
  text-align: center;
  user-select: none;
}
.fg-word .fl { display: inline-block; } /* each letter's weight is set by script.js (tapered) */
/* the headline reads like a sentence with its key words lit (in the spirit of guglieri.com): the linking
   words in a quiet gray, the key words in ink */
.hero-title .ht-m { color: #8E8E93; }
.hero-title .ht-pair { white-space: nowrap; } /* a key word and its object never part at a line break */
.hero-title .ht-k { color: var(--ink); }
/* hero headline split the same way (motion.js): words never break, letters change weight */

.hero-title .fl { display: inline-block; font-variation-settings: 'wght' 600; text-align: center; } /* width fixed by motion.js */

.fg-size {
  position: absolute;
  left: 50%;
  bottom: -11px;
  translate: -50% 0;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--select-ink);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.fg-size:empty { display: none; }
.site-footer .footer-giant { margin-bottom: 14px; }
/* the copyright line sits just above the toolbar (body keeps room for it), edges lined up with the name */
.site-footer { padding-bottom: 0; }
@media (min-width: 700px) {
  .site-footer .footer-inner { max-width: none; padding-left: var(--edge); padding-right: var(--edge); }
  .site-footer .footer-links a { margin-right: -11px; }
}

/* the tumbling W cube at cap height: its bottom sits on the baseline and its top
   meets the top of the capitals */
.fg-sel { outline: none; }
.fg-mark {
  --cap: 0.727em; /* Inter Tight cap height */
  position: relative;
  display: inline-block;
  width: var(--cap);
  height: var(--cap);
  margin-right: 0.12em;
  vertical-align: baseline;
  letter-spacing: 0;
  perspective: 3em;
}
.fg-mark .lm-h { width: 10px; height: 10px; }
.fg-mark .lm-h--tl { left: calc(-0.05em - 6px); top: calc(-0.05em - 6px); }
.fg-mark .lm-h--br { right: calc(-0.05em - 6px); bottom: calc(-0.05em - 6px); }
.fg-cube {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  /* perspective enlarges the front face by 3 / (3 - 0.3635); undo it so the face is exactly cap height */
  scale: 0.879;
}
.js .fg-cube { animation: die 9s ease-in-out infinite; }
.fg-cube .face { border-radius: 0.015em; font-size: 1em; }
.fg-cube .face b { font-size: 0.56em; font-weight: 800; letter-spacing: -0.06em; line-height: 1; }
.fg-cube .f-front  { transform: translateZ(calc(var(--cap) / 2)); }
.fg-cube .f-right  { transform: rotateY(90deg) translateZ(calc(var(--cap) / 2)); }
.fg-cube .f-back   { transform: rotateY(180deg) translateZ(calc(var(--cap) / 2)); }
.fg-cube .f-left   { transform: rotateY(-90deg) translateZ(calc(var(--cap) / 2)); }
.fg-cube .f-top    { transform: rotateX(90deg) translateZ(calc(var(--cap) / 2)); }
.fg-cube .f-bottom { transform: rotateX(-90deg) translateZ(calc(var(--cap) / 2)); }

/* ...drawn in the header logo's proportions instead (a 23px die beside 19px type): 122% of the type,
   centred 0.384em above the baseline (so it dips ~0.23em below it, like the g), 0.5em before the W,
   and the same perspective-to-size ratio (140/22), so the sway looks the same. --cap keeps its
   name (it sizes the faces) but now means the die's size, not the cap height.
   margin-left keeps room for the side face the sway brings out, so it never runs off the screen
   (fitGiant in script.js counts that margin when sizing the word) */
.fg-mark {
  --cap: 1.22em; /* 122% of the type, as in the header */
  margin: 0 0.5em 0 0.17em;
  vertical-align: -0.226em; /* centre 0.384em above the baseline */
  perspective: calc(var(--cap) * 140 / 22);
}
.fg-cube { scale: 1; }
/* the white W is 68% of the face, as in the header (0.68 × 1.22em) */
.fg-cube .face b { font-size: 0.83em; }

/* the footer fills the screen: the giant name sits in the middle of whatever room is left above the
   copyright line, which keeps to the bottom */
html:has(.site-footer) .site-footer { min-height: 100svh; display: flex; flex-direction: column; }
html:has(.site-footer) .site-footer .footer-giant { flex: 1; display: flex; flex-direction: column; justify-content: center; }
html:has(.site-footer) .site-footer .fg-sel { width: 100%; }
/* in a flex column the containers' auto side margins would shrink them to their content and centre
   them: keep them full width, so the copyright line stays at the left edge and the links at the right */
html:has(.site-footer) .site-footer > .footer-giant, html:has(.site-footer) .site-footer > .footer-inner { width: 100%; }
/* phones: the die stands on top, big and centred, with the name under it, so the pair fills the screen
   (fitGiant still fits the name to the width; the die is sized off it). "body" outranks the older phone
   padding further down (160/128px), which would push the footer past the screen */
@media (max-width: 599px) {
  html:has(.site-footer) body .site-footer { padding-top: 48px; }
  html:not(:has(.toolbar)) body .site-footer { padding-bottom: 40px; }
  html:has(.site-footer) body .site-footer .footer-giant { margin-bottom: 24px; }
  .fg-mark { --cap: 1.8em; display: block; margin: 0 auto 0.3em; }
}

/* card titles: project name in the display face, its short description below in the text face */
.ft-name { display: block; }
.ft-desc {
  display: block;
  margin-top: 6px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0;
  color: #5c5c5c;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* =========================================================
   KITT launch film (kitt-film.js) — sizes in cqw so it scales
   ========================================================= */
.has-film > img { display: none; }
/* a case cover that plays a film has no static image: until the film is built the box holds the film's
   own shape (all are 16:9) in plain colour (--thumb-bg on the page: white behind the light films, black
   behind the dark ones), so the film comes in with no jump. With reduced motion the films don't run: only
   there the old cover (--cover, --cover-en on English pages) is drawn, as a background, which the browser
   fetches only when this rule applies (an <img>, even lazy, was fetched before the CSS could hide it) */
.cs-hero-image:is([data-kitt-film], [data-eugestor-film], [data-loopin-film], [data-pitstop-film]) { aspect-ratio: 16 / 9; }
@media (prefers-reduced-motion: reduce) {
  .cs-hero-image:is([data-kitt-film], [data-eugestor-film], [data-loopin-film], [data-pitstop-film]) {
    background: var(--cover) center / contain no-repeat, var(--thumb-bg);
  }
  html[lang="en"] .cs-hero-image:is([data-kitt-film], [data-eugestor-film], [data-loopin-film], [data-pitstop-film]) {
    background: var(--cover-en, var(--cover)) center / contain no-repeat, var(--thumb-bg);
  }
}
.kfilm {
  --k-primary: #7B66F0;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  container-type: inline-size;
  background: radial-gradient(70% 80% at 50% 40%, #1C1650 0%, #0B0920 70%);
  color: #fff;
  font-family: var(--font-body);
  border-radius: inherit;
  isolation: isolate;
}
.kfilm * { box-sizing: border-box; }
.kf-i { width: 1em; height: 1em; flex-shrink: 0; }
.kf-scene { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 600ms var(--ease), visibility 0s 600ms; }
.kf-scene.on { opacity: 1; visibility: visible; transition: opacity 600ms var(--ease); }
.kf-scene.on.out { opacity: 0; }
.kfilm.is-paused *, .kfilm.is-paused *::before, .kfilm.is-paused *::after { animation-play-state: paused !important; }

/* shared UI pieces */
.kf-badge { display: inline-flex; align-items: center; padding: 0.22cqw 0.6cqw; border-radius: 99px; font-size: 0.82cqw; font-weight: 700; letter-spacing: 0.02em; border: 1px solid; transition: color 300ms, background-color 300ms, border-color 300ms; }
.kf-badge.is-matriz { color: #5CC6EE; background: rgba(92,198,238,0.12); border-color: rgba(92,198,238,0.45); }
.kf-badge.is-filial { color: #A99CFF; background: rgba(123,102,240,0.18); border-color: rgba(169,156,255,0.45); }
.kf-badge.is-unidade { color: #6CC58A; background: rgba(108,197,138,0.12); border-color: rgba(108,197,138,0.45); }
.kf-status { display: inline-flex; align-items: center; gap: 0.4cqw; font-size: 0.95cqw; font-weight: 600; color: #57C35C; transition: color 300ms; }
.kf-status i { width: 0.55cqw; height: 0.55cqw; border-radius: 50%; background: currentColor; }
.kf-status.is-off { color: #A3A1BD; }
.kf-tile { display: grid; place-items: center; width: 2.4cqw; height: 2.4cqw; border-radius: 0.6cqw; background: rgba(92,198,238,0.12); color: #5CC6EE; font-size: 1.3cqw; transition: color 300ms, background-color 300ms; }
.kf-tile.is-green { background: rgba(108,197,138,0.14); color: #6CC58A; }
.kf-tile.is-purple { background: rgba(123,102,240,0.2); color: #A99CFF; }

/* ---- act 1: bento ---- */
.kf-bento { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); gap: 1.6cqw; padding: 6cqw 8cqw; background: #0B0920; transition: background-color 500ms var(--ease); }
.kf-bento[data-theme="light"] { background: #F1F0F8; }
.kf-card {
  --c-bg: #151236; --c-line: #2A2552; --c-text: #fff; --c-muted: #9C98C9;
  display: flex; flex-direction: column; justify-content: center; gap: 1.2cqw; padding: 1.8cqw;
  border-radius: 1.4cqw; background: var(--c-bg); border: 1px solid var(--c-line); color: var(--c-text);
  opacity: 0; transform: translateY(1.6cqw) scale(0.94);
  transition: opacity 500ms var(--ease-out) calc(var(--i) * 80ms), transform 600ms var(--ease-out) calc(var(--i) * 80ms), background-color 450ms var(--ease), color 450ms var(--ease), border-color 450ms var(--ease);
}
.kf-card[data-theme="light"] { --c-bg: #FFFFFF; --c-line: #E3E1F0; --c-text: #15122E; --c-muted: #6E6A8C; }
.kf-card.in { opacity: 1; transform: none; }
.kf-bento.out .kf-card { opacity: 0; transform: scale(0.9); transition-delay: calc(var(--i) * 50ms); }
.kf-swatches { display: grid; grid-template-columns: repeat(6, 1fr); height: 5cqw; border-radius: 0.8cqw; overflow: hidden; }
.kf-neutrals { display: grid; grid-template-columns: repeat(8, 1fr); height: 1.4cqw; border-radius: 0.4cqw; overflow: hidden; }
.kf-neutrals i:nth-child(1) { background: #FFFFFF; } .kf-neutrals i:nth-child(2) { background: #E6E5F0; } .kf-neutrals i:nth-child(3) { background: #C7C5D9; } .kf-neutrals i:nth-child(4) { background: #9C98C9; }
.kf-neutrals i:nth-child(5) { background: #6E6A8C; } .kf-neutrals i:nth-child(6) { background: #3A3566; } .kf-neutrals i:nth-child(7) { background: #1C1846; } .kf-neutrals i:nth-child(8) { background: #0B0920; }
.kf-type { flex-direction: row; align-items: center; gap: 2cqw; }
.kf-aa { font: 700 2.6cqw/1 var(--font-body); letter-spacing: -0.02em; }
.kf-weights { display: grid; gap: 0.3cqw; font-size: 1.6cqw; line-height: 1.1; }
.kf-weights small { font-size: 0.8cqw; color: var(--c-muted); }
.kf-weights span:nth-of-type(1) { font-weight: 400; } .kf-weights span:nth-of-type(2) { font-weight: 500; } .kf-weights span:nth-of-type(3) { font-weight: 600; }
.kf-badges > div:first-child { display: flex; flex-wrap: wrap; gap: 0.6cqw; }
.kf-seg { display: inline-flex; border: 1px solid var(--c-line); border-radius: 0.6cqw; overflow: hidden; font-size: 0.95cqw; width: max-content; }
.kf-seg span { padding: 0.5cqw 0.9cqw; color: var(--c-muted); border-right: 1px solid var(--c-line); }
.kf-seg span:last-child { border-right: 0; }
.kf-seg span.on { background: var(--k-primary); color: #fff; }
.kf-mini-row { display: flex; align-items: center; gap: 0.8cqw; font-size: 0.95cqw; padding: 0.4cqw 0; border-bottom: 1px solid var(--c-line); }
.kf-mini-row:last-child { border-bottom: 0; }
.kf-mini-row b { flex: 1; font-weight: 600; }
.kf-nav { gap: 0.5cqw; }
.kf-nav span { display: flex; align-items: center; gap: 0.8cqw; padding: 0.5cqw 0.8cqw; border-radius: 99px; font-size: 1cqw; color: var(--c-muted); }
.kf-nav span .kf-i { font-size: 1.2cqw; }
.kf-nav span.on { background: rgba(123,102,240,0.2); color: var(--c-text); font-weight: 600; }
.kf-card[data-theme="light"] .kf-nav span.on { background: rgba(123,102,240,0.14); }
.kf-btn { display: inline-flex; align-items: center; gap: 0.6cqw; width: max-content; padding: 0.8cqw 1.2cqw; border-radius: 0.6cqw; background: var(--k-primary); color: #fff; font-size: 1cqw; font-weight: 600; }
.kf-ctrl-line { display: flex; align-items: center; gap: 0.7cqw; font-size: 1cqw; color: var(--c-muted); }
.kf-switch { width: 2.6cqw; height: 1.4cqw; border-radius: 99px; background: #2E9E5B; position: relative; }
.kf-switch i { position: absolute; right: 0.2cqw; top: 0.2cqw; width: 1cqw; height: 1cqw; border-radius: 50%; background: #fff; }
.kf-check { display: grid; place-items: center; width: 1.3cqw; height: 1.3cqw; margin-left: 1cqw; border-radius: 0.3cqw; background: var(--k-primary); color: #fff; font-size: 1cqw; }

/* ---- act 2: the new screens ---- */
.kf-window { position: absolute; left: 50%; top: 52%; width: 66cqw; translate: -50% -50%; border-radius: 1cqw; overflow: hidden; background: #070512; box-shadow: 0 2cqw 5cqw -1cqw rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.08); scale: 0.94; transition: scale 900ms var(--ease-out); }
.kf-act2.on .kf-window { scale: 1; }
/* act 3: the Flows module, recorded at 1280x760, in a wider window */
.kfilm .kf-act3 .kf-window { width: 76cqw; }
.kf-act3.on .kf-window { scale: 1; }
.kf-act3 .kf-screen { aspect-ratio: 1280 / 760; }
.kf-spot { position: absolute; width: 1px; height: 1px; pointer-events: none; }
.kf-chrome { display: flex; align-items: center; gap: 0.5cqw; height: 2.2cqw; padding: 0 1cqw; background: #120F2B; border-bottom: 1px solid rgba(255,255,255,0.06); }
.kf-chrome i { width: 0.7cqw; height: 0.7cqw; border-radius: 50%; background: #3A3566; }
.kf-url { margin: 0 auto; padding: 0.2cqw 3cqw; border-radius: 99px; background: #1C1846; color: #9C98C9; font-size: 0.8cqw; }
.kf-screen { position: relative; aspect-ratio: 1600 / 1138; }
.kfilm .kf-shot { max-height: none; position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; scale: 1.03; transition: opacity 500ms var(--ease), scale 700ms var(--ease-out); }
.kf-shot.on { opacity: 1; scale: 1; }
.kf-tick { position: absolute; left: 78.1%; top: 36.05%; width: 1.25cqw; height: 1.25cqw; translate: -50% -50%; border-radius: 50%; background: var(--k-primary); color: #fff; display: grid; place-items: center; font-size: 0.85cqw; scale: 0; transition: scale 350ms cubic-bezier(0.34, 1.56, 0.64, 1); }
.kf-tick.on { scale: 1; }
.kf-toast { position: absolute; right: 2cqw; bottom: 2cqw; display: flex; align-items: center; gap: 0.7cqw; padding: 0.9cqw 1.3cqw; border-radius: 0.7cqw; background: #1A2E22; border: 1px solid rgba(108,197,138,0.4); color: #CFEFD9; font-size: 1cqw; font-weight: 600; opacity: 0; translate: 0 1cqw; transition: opacity 400ms var(--ease), translate 500ms var(--ease-out); }
.kf-toast .kf-i { color: #6CC58A; font-size: 1.2cqw; }
.kf-toast.on { opacity: 1; translate: none; }

/* cursor shared by the acts */
.kf-cur { position: absolute; left: 96%; top: 96%; z-index: 5; display: flex; align-items: flex-start; color: #0A6CC9; pointer-events: none; transition-property: left, top; transition-timing-function: cubic-bezier(0.45, 0, 0.2, 1); }
.kf-cur svg { width: 1.5cqw; height: 1.9cqw; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4)); transform-origin: 10% 10%; }
.kf-cur b { margin: 1.4cqw 0 0 -0.2cqw; padding: 0.25cqw 0.6cqw; border-radius: 0.15cqw 0.8cqw 0.8cqw 0.8cqw; background: #0A6CC9; color: #fff; font-size: 0.85cqw; font-weight: 500; }
.kf-cur.is-click svg { animation: kfClick 260ms ease; }
.kf-cur.is-click::after { content: ""; position: absolute; left: -0.9cqw; top: -0.9cqw; width: 2cqw; height: 2cqw; border-radius: 50%; border: 2px solid #A99CFF; animation: kfRipple 600ms var(--ease-out) forwards; }
@keyframes kfClick { 50% { scale: 0.8; } }
@keyframes kfRipple { from { scale: 0.3; opacity: 1; } to { scale: 1.6; opacity: 0; } }

/* ---- act 3: one component, edited live ---- */

/* ---- act 4: logo and icon ring ---- */
.kf-act4 { display: grid; place-items: center; }
.kfilm .kf-logo { position: relative; max-height: none; z-index: 2; width: 24cqw; height: auto; opacity: 0; scale: 0.9; transition: opacity 700ms var(--ease) 200ms, scale 900ms var(--ease-out) 200ms; }
.kf-act4.on .kf-logo { opacity: 1; scale: 1; }
.kf-ring { position: absolute; left: 50%; top: 50%; width: 64cqw; height: 34cqw; translate: -50% -50%; opacity: 0; transition: opacity 900ms var(--ease) 500ms; }
.kf-act4.on .kf-ring { opacity: 1; }
.kf-ring-tile { position: absolute; left: 50%; top: 50%; margin: -2.2cqw 0 0 -2.2cqw; display: grid; place-items: center; width: 4.4cqw; height: 4.4cqw; border-radius: 1.2cqw; background: #1C1846; border: 1px solid #2E2860; color: #A99CFF; font-size: 2cqw; box-shadow: 0 1cqw 2cqw -0.8cqw rgba(0,0,0,0.6); }
.kf-ring-tile.is-cyan { color: #5CC6EE; background: #10243A; border-color: #1E4660; }
.kf-ring-tile.is-green { color: #6CC58A; background: #12291E; border-color: #21503A; }
.kf-ring-tile.is-purple { color: #fff; background: var(--k-primary); border-color: #9C8BFF; }
.kf-ring-tile.is-orange { color: #F7A35C; background: #33210F; border-color: #5E3B1A; }

/* pause / play */
.kf-toggle { position: absolute; right: 1.4cqw; bottom: 1.4cqw; z-index: 10; width: 3cqw; height: 3cqw; min-width: 32px; min-height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.22); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.kf-toggle:hover { background: rgba(255,255,255,0.2); }
.kf-pause { width: 34%; height: 34%; border-left: 3px solid #fff; border-right: 3px solid #fff; }
.kf-toggle.is-play .kf-pause { border: 0; width: 0; height: 0; border-left: 10px solid #fff; border-top: 6px solid transparent; border-bottom: 6px solid transparent; margin-left: 3px; }

/* the film as the KITT card cover on the home page (4:3 box) */
.frame-thumb .kfilm { aspect-ratio: auto; height: 100%; isolation: auto; border-radius: 0; }
.frame-thumb .kf-window { width: 78cqw; }
.frame-thumb .kf-bento { padding: 8cqw 6cqw; }
.motion-ready .frame-thumb .kfilm img { transition: opacity 500ms var(--ease), scale 700ms var(--ease-out); }

/* =========================================================
   Case studies: "more work" — dark canvas with a card rail
   ========================================================= */
.more-work {
  --rail-pad: max(var(--space-4), calc((100vw - var(--max-width)) / 2 + var(--space-4)));
  margin-top: var(--space-7);
  padding: clamp(64px, 8vw, 112px) 0 clamp(56px, 7vw, 96px);
  background-color: var(--dark-canvas);
  background-image:
    linear-gradient(#2A2A2A 1px, transparent 1px),
    linear-gradient(90deg, #2A2A2A 1px, transparent 1px);
  background-size: 24px 24px;
  color: #fff;
  overflow-x: clip;
}

.mw-count { margin-right: 8px; font-size: 14px; color: #A8A8A8; font-variant-numeric: tabular-nums; }
.mw-count b { color: #fff; font-weight: 600; }
.mw-arrow {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease), opacity var(--duration-fast) var(--ease), scale 200ms var(--ease-out);
}
.mw-arrow:hover:not(:disabled) { background: rgba(255, 255, 255, 0.16); }
.mw-arrow:active:not(:disabled) { scale: 0.94; }
.mw-arrow:disabled { opacity: 0.35; cursor: default; }
.mw-arrow:focus-visible { outline: 2px solid var(--select); outline-offset: 3px; }

.mw-track {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--rail-pad);
  padding: 8px var(--rail-pad) 24px;
  scrollbar-width: none;
}
.mw-track::-webkit-scrollbar { display: none; }
.mw-track:focus-visible { outline: 2px solid var(--select); outline-offset: -2px; }
.mw-track.is-dragging { scroll-snap-type: none; cursor: grabbing; }
.mw-track.is-dragging .frame-link { pointer-events: none; }
.mw-card {
  flex: 0 0 clamp(270px, 32vw, 420px);
  scroll-snap-align: start;
}
.mw-card .frame-box { height: calc(100% - 19px); display: flex; flex-direction: column; transition: box-shadow 300ms var(--ease), translate 300ms var(--ease-out); }

.mw-card:hover .frame-box { translate: 0 -4px; }
.mw-card .frame-thumb img { pointer-events: none; }
.more-work .frame-label { color: #A8A8A8; display: flex; align-items: center; gap: 8px; }
.more-work .frame:hover .frame-label,
.more-work .frame:focus-within .frame-label { color: #8EC5FF; }

@media (pointer: fine) { .mw-track { cursor: grab; } }
@media (max-width: 640px) {
  
  .mw-card { flex-basis: 78vw; }
}
@media (prefers-reduced-motion: reduce) {
  .mw-card .frame-box { transition: none; }
}
/* the chip must not make the first label taller than the others */

/* on the dark rail the paper edge around the cover read as a white line */
.more-work .frame-box { border: 0; box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.7); }
.more-work .frame-thumb { border-radius: var(--frame-r) var(--frame-r) 0 0; }
/* lift the whole card (label + chip included) so the box never runs into the chip */
.mw-card { transition: translate 300ms var(--ease-out); }
.mw-card:hover { translate: 0 -4px; }
.mw-card:hover .frame-box { translate: none; }
@media (prefers-reduced-motion: reduce) { .mw-card { transition: none; } }

/* =========================================================
   EuGestor launch film (eugestor-film.js) — film sizes in cqw,
   the app UI in em of the window so it scales as one piece
   ========================================================= */
.egfilm {
  --eg-blue: #446DA6;
  --eg-navy: #3A5D93;
  --eg-orange: #F28A2B;
  --eg-ink: #1F2937;
  --eg-muted: #6B7280;
  --eg-line: #E3E7EE;
  --eg-bg: #EEF1F5;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  container-type: inline-size;
  background: radial-gradient(80% 90% at 50% 35%, #FFFFFF 0%, #E4EAF3 75%);
  color: var(--eg-ink);
  font-family: var(--font-body);
  border-radius: inherit;
  isolation: isolate;
}
.egfilm * { box-sizing: border-box; }
.egfilm img { max-height: none; }
.eg-i { width: 1.15em; height: 1.15em; flex-shrink: 0; }
.eg-scene { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 600ms var(--ease), visibility 0s 600ms; }
.eg-scene.on { opacity: 1; visibility: visible; transition: opacity 600ms var(--ease); }
.eg-scene.on.out { opacity: 0; }
.egfilm.is-paused *, .egfilm.is-paused *::before, .egfilm.is-paused *::after { animation-play-state: paused !important; }

/* shared pieces */
.eg-chip { display: inline-flex; align-items: center; gap: 0.35em; padding: 0.2em 0.65em; border-radius: 99px; font-size: 0.82em; font-weight: 600; white-space: nowrap; transition: background-color 300ms, color 300ms; }
.eg-chip .eg-i { width: 1em; height: 1em; }
.eg-chip.is-aberta { background: #E4EEFB; color: #2F5F9E; }
.eg-chip.is-andamento { background: #FDEBD9; color: #B95F0F; }
.eg-chip.is-concluida { background: #DDF3E6; color: #17804A; animation: egPop 450ms var(--ease-out); }
.eg-chip.is-late { background: #FBE2E2; color: #B42323; }
.eg-chip.is-date { background: #F1F3F6; color: var(--eg-muted); font-weight: 500; }
@keyframes egPop { from { scale: 0.7; } }
.eg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.45em; padding: 0.6em 1.1em; border-radius: 0.5em; background: #ECEEF2; color: #4B5563; font-size: 0.92em; font-weight: 600; white-space: nowrap; transition: scale 160ms var(--ease), filter 160ms; }
.eg-btn.is-primary { background: var(--eg-orange); color: #fff; }
.eg-btn.is-success { background: #22A45D; color: #fff; }
.eg-btn.is-outline { background: #fff; color: var(--eg-orange); box-shadow: inset 0 0 0 1px #F6C394; }
.eg-input { display: flex; align-items: center; gap: 0.5em; height: 2.6em; padding: 0 0.8em; border-radius: 0.45em; background: #fff; border: 1px solid #DCE1E8; color: var(--eg-muted); font-size: 0.92em; transition: border-color 200ms, box-shadow 200ms; }
.eg-ph { flex: 1; color: #A3A9B4; white-space: nowrap; overflow: hidden; }
.eg-val { flex: 1; color: var(--eg-ink); font-weight: 500; white-space: nowrap; overflow: hidden; display: none; }
.eg-chev { color: #9AA1AC; }
.has-val .eg-ph { display: none; }
.has-val .eg-val, .is-focus .eg-val { display: block; }
.is-focus .eg-ph { display: none; }
.is-focus .eg-input { border-color: var(--eg-blue); box-shadow: 0 0 0 3px rgba(68, 109, 166, 0.18); }
.is-focus .eg-val::after { content: ""; display: inline-block; width: 1px; height: 1.05em; margin-left: 1px; vertical-align: -0.15em; background: var(--eg-ink); animation: egBlink 1s steps(1) infinite; }
@keyframes egBlink { 50% { opacity: 0; } }
.eg-cb { display: grid; place-items: center; width: 1.25em; height: 1.25em; border-radius: 0.3em; border: 1.5px solid #C5CBD4; background: #fff; flex-shrink: 0; transition: background-color 200ms, border-color 200ms; }

/* ---- act 1: the design system's parts ---- */
.eg-bento { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); gap: 1.6cqw; padding: 6cqw 8cqw; font-size: 1cqw; }
.eg-card {
  display: flex; flex-direction: column; justify-content: center; gap: 1.2em; padding: 1.8em;
  border-radius: 1.4em; background: #fff; border: 1px solid var(--eg-line);
  box-shadow: 0 1.2em 2.6em -1.6em rgba(31, 41, 55, 0.35);
  opacity: 0; transform: translateY(1.6em) scale(0.94);
  transition: opacity 500ms var(--ease-out) calc(var(--i) * 80ms), transform 600ms var(--ease-out) calc(var(--i) * 80ms);
}
.eg-card.in { opacity: 1; transform: none; }
.eg-bento.out .eg-card { opacity: 0; transform: scale(0.9); transition-delay: calc(var(--i) * 50ms); }
.eg-card small { font-size: 0.85em; font-weight: 600; color: var(--eg-muted); letter-spacing: 0.02em; text-transform: uppercase; }
.eg-sw { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9em 0.6em; }
.eg-sw span { display: flex; flex-direction: column; align-items: center; gap: 0.4em; font-size: 0.8em; color: var(--eg-muted); }
.eg-sw i { width: 3.4em; height: 3.4em; border-radius: 50%; background: var(--c); transition: box-shadow 300ms var(--ease), scale 400ms var(--ease-out); transition-delay: calc(var(--j) * 60ms); }
.eg-bento.pick .eg-sw span:nth-child(2) i { box-shadow: 0 0 0 0.25em #fff, 0 0 0 0.42em var(--eg-orange); scale: 1.08; }
.eg-type-row { display: flex; align-items: center; gap: 1.6em; }
.eg-aa { font: 700 4.2em/1 var(--font-body); letter-spacing: -0.04em; color: var(--eg-blue); }
.eg-scale { display: grid; gap: 0.25em; line-height: 1.15; }
.eg-scale span:nth-child(1) { font-size: 1.7em; font-weight: 700; letter-spacing: -0.02em; }
.eg-scale span:nth-child(2) { font-size: 1.3em; font-weight: 600; }
.eg-scale span:nth-child(3) { font-size: 1.05em; color: #4B5563; }
.eg-scale span:nth-child(4) { font-size: 0.85em; color: var(--eg-muted); }
.eg-cols { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0.45em; height: 8em; }
.eg-cols i { border-radius: 0.3em; background: #DCE6F4; transform-origin: bottom; scale: 1 0; transition: scale 600ms var(--ease-out) calc(var(--j) * 45ms), background-color 300ms; }
.eg-bento.grow .eg-cols i { scale: 1 1; }
.eg-bento.pick .eg-cols i:nth-child(-n+8) { background: #C2D3EC; }
.eg-icon-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.6em; }
.eg-icon-grid span { display: grid; place-items: center; aspect-ratio: 1; border-radius: 0.6em; background: #F3F5F9; color: var(--eg-navy); font-size: 1.35em; opacity: 0; scale: 0.4; transition: opacity 300ms var(--ease) calc(var(--j) * 50ms), scale 450ms cubic-bezier(0.34, 1.56, 0.64, 1) calc(var(--j) * 50ms); }
.eg-bento.pop .eg-icon-grid span { opacity: 1; scale: 1; }
.eg-ctrl-row { display: flex; gap: 0.7em; }
.eg-ctrl-row .eg-btn { font-size: 1.05em; }
.eg-btn.is-pressed { scale: 0.93; filter: brightness(0.92); }
.eg-input.is-demo { font-size: 1em; }
.eg-chips { display: flex; flex-wrap: wrap; gap: 0.5em; font-size: 1.05em; }
.eg-ctrl-line { display: flex; align-items: center; gap: 0.7em; font-size: 1em; color: #4B5563; }
.eg-switch { position: relative; width: 2.8em; height: 1.55em; border-radius: 99px; background: #D1D6DE; transition: background-color 300ms var(--ease); }
.eg-switch i { position: absolute; left: 0.2em; top: 0.2em; width: 1.15em; height: 1.15em; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); transition: translate 300ms var(--ease-out); }
.eg-switch.on { background: var(--eg-blue); }
.eg-switch.on i { translate: 1.25em 0; }

/* ---- act 2: the app ---- */
.eg-win { position: absolute; left: 50%; top: 52%; width: 72cqw; translate: -50% -50%; font-size: 0.74cqw; border-radius: 1.2em; overflow: hidden; background: #fff; box-shadow: 0 2.6em 6em -2em rgba(31, 41, 55, 0.45), 0 0 0 1px rgba(31, 41, 55, 0.08); scale: 0.94; transition: scale 900ms var(--ease-out); }
.eg-act2.on .eg-win { scale: 1; }
.eg-chrome { display: flex; align-items: center; gap: 0.6em; height: 2.6em; padding: 0 1.2em; background: #F4F6F9; border-bottom: 1px solid var(--eg-line); }
.eg-chrome i { width: 0.8em; height: 0.8em; border-radius: 50%; background: #D3D8E0; }
.eg-url { margin: 0 auto; padding: 0.25em 3.5em; border-radius: 99px; background: #fff; border: 1px solid var(--eg-line); color: var(--eg-muted); font-size: 0.9em; }
.eg-app { position: relative; display: grid; grid-template-columns: 15.5em 1fr; grid-template-rows: 3.8em 1fr; aspect-ratio: 16 / 10; background: var(--eg-bg); overflow: hidden; }
.eg-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 1.2em; padding: 0 1.4em; background: var(--eg-navy); color: #fff; }
.eg-top > .eg-i { opacity: 0.85; }
.egfilm .eg-top-logo { width: 7.2em; height: auto; }
.eg-search { display: flex; align-items: center; gap: 0.6em; width: 26em; height: 2.4em; margin-left: 2.6em; padding: 0 1em; border-radius: 99px; background: #fff; color: #9AA1AC; font-size: 0.9em; }
.eg-top-r { display: flex; align-items: center; gap: 0.9em; margin-left: auto; font-size: 0.9em; font-weight: 600; }
.eg-top-r .eg-i:first-child { margin-left: -0.6em; }
.eg-avatar { display: grid; place-items: center; width: 2.2em; height: 2.2em; border-radius: 50%; background: #F6C394; color: #8A4A10; }
.eg-side { padding: 0.8em 0; background: var(--eg-navy); color: #E6ECF5; border-top: 1px solid rgba(255, 255, 255, 0.08); overflow: hidden; }
.eg-nav-row { display: flex; align-items: center; gap: 0.8em; height: 2.55em; padding: 0 1.2em; font-size: 0.95em; font-weight: 500; }
.eg-nav-row .eg-chev { margin-left: auto; color: rgba(255, 255, 255, 0.6); rotate: -90deg; transition: rotate 300ms var(--ease); }
.eg-nav.is-open > .eg-nav-row { background: rgba(255, 255, 255, 0.1); }
.eg-nav.is-open > .eg-nav-row .eg-chev { rotate: 0deg; }
.eg-sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 400ms var(--ease-out); }
.eg-nav.is-open .eg-sub { grid-template-rows: 1fr; }
.eg-sub > div { overflow: hidden; }
.eg-sub span { display: block; padding: 0.5em 1.2em 0.5em 3.2em; font-size: 0.88em; color: rgba(230, 236, 245, 0.8); transition: background-color 200ms, color 200ms; }
.eg-sub span.on { background: rgba(255, 255, 255, 0.16); color: #fff; font-weight: 600; box-shadow: inset 0.25em 0 0 var(--eg-orange); }
.eg-main { position: relative; overflow: hidden; }
.eg-page { position: absolute; inset: 0; padding: 1.4em 2em; opacity: 0; translate: 0 1em; transition: opacity 450ms var(--ease), translate 550ms var(--ease-out); pointer-events: none; }
.eg-page.on { opacity: 1; translate: none; }
.eg-crumb { margin: 0 0 0.5em; font-size: 0.82em; color: var(--eg-muted); }
.eg-crumb b { color: var(--eg-orange); font-weight: 600; }
.eg-page h4 { margin: 0 0 1em; font-size: 1.6em; font-weight: 700; letter-spacing: -0.02em; color: var(--eg-ink); }
.eg-panel { position: relative; padding: 1.6em; border-radius: 0.9em; background: #fff; border: 1px solid var(--eg-line); }
.eg-purpose { display: flex; align-items: center; gap: 1em; margin-bottom: 1.4em; }
.eg-purpose label, .eg-field label { font-size: 0.85em; font-weight: 600; color: #374151; }
.eg-field label i { color: #E54545; font-style: normal; }
.eg-seg { display: inline-flex; padding: 0.25em; border-radius: 0.6em; background: #F1F3F6; font-size: 0.88em; }
.eg-seg span { padding: 0.45em 1em; border-radius: 0.45em; color: var(--eg-muted); }
.eg-seg span.on { background: #fff; color: var(--eg-blue); font-weight: 600; box-shadow: 0 1px 3px rgba(31, 41, 55, 0.12); }
.eg-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1em 1.4em; }
.eg-field { display: grid; gap: 0.45em; }
.eg-dd { position: absolute; right: 1.6em; top: 15.2em; z-index: 3; width: calc(50% - 2.3em); display: grid; padding: 0.4em; border-radius: 0.7em; background: #fff; border: 1px solid var(--eg-line); box-shadow: 0 1.2em 2.4em -1em rgba(31, 41, 55, 0.35); font-size: 0.85em; opacity: 0; translate: 0 -0.6em; transition: opacity 250ms var(--ease), translate 300ms var(--ease-out); }
.eg-dd.on { opacity: 1; translate: none; }
.eg-dd span { display: grid; gap: 0.15em; padding: 0.55em 0.7em; color: var(--eg-muted); }
.eg-dd span b { color: var(--eg-ink); }
.eg-dd .eg-dd-new { display: flex; align-items: center; justify-content: center; gap: 0.4em; margin-top: 0.3em; border-radius: 0.45em; background: var(--eg-navy); color: #fff; font-weight: 600; }
.eg-actions { display: flex; gap: 0.7em; margin-top: 1.6em; }
.eg-scrim { position: absolute; inset: 0; background: rgba(31, 41, 55, 0.32); opacity: 0; transition: opacity 300ms var(--ease); }
.eg-scrim.on { opacity: 1; }
.eg-modal { position: absolute; left: 50%; top: 50%; width: 26em; display: grid; gap: 0.9em; padding: 1.5em; border-radius: 1em; background: #fff; box-shadow: 0 2em 4em -1.5em rgba(31, 41, 55, 0.5); translate: -50% -46%; scale: 0.94; opacity: 0; transition: opacity 300ms var(--ease), scale 400ms var(--ease-out), translate 400ms var(--ease-out); }
.eg-modal.on { opacity: 1; scale: 1; translate: -50% -50%; }
.eg-modal-head { display: flex; align-items: center; justify-content: space-between; }
.eg-modal-head b { font-size: 1.2em; }
.eg-x { display: grid; place-items: center; width: 1.9em; height: 1.9em; border-radius: 50%; background: #F1F3F6; color: var(--eg-muted); }
.eg-check-line { display: flex; align-items: center; gap: 0.6em; font-size: 0.88em; color: #4B5563; }
.eg-modal .eg-actions { margin-top: 0.4em; }
.eg-modal .eg-actions .eg-btn { flex: 1; }
.eg-toast { position: absolute; right: 1.6em; bottom: 1.6em; z-index: 5; display: flex; align-items: center; gap: 0.6em; padding: 0.85em 1.2em; border-radius: 0.7em; background: #1F2937; color: #fff; font-size: 0.95em; font-weight: 600; box-shadow: 0 1em 2em -0.8em rgba(0, 0, 0, 0.5); opacity: 0; translate: 0 1em; transition: opacity 350ms var(--ease), translate 450ms var(--ease-out); }
.eg-toast .eg-i { color: #4ADE80; }
.eg-toast.on { opacity: 1; translate: none; }

/* service orders */
.eg-os-title { display: flex; align-items: flex-start; justify-content: space-between; }
.eg-tools { display: flex; align-items: center; gap: 0.6em; }
.eg-ibtn { display: grid; place-items: center; width: 2.4em; height: 2.4em; border-radius: 0.5em; background: #fff; border: 1px solid var(--eg-line); color: var(--eg-muted); }
.eg-filters { display: flex; align-items: center; gap: 0.6em; margin: -0.2em 0 1em; }
.eg-pill { display: flex; align-items: center; gap: 0.5em; height: 2.4em; padding: 0 0.9em; border-radius: 0.5em; background: #fff; border: 1px solid var(--eg-line); color: #4B5563; font-size: 0.85em; white-space: nowrap; }
.eg-pill.is-wide { flex: 1; color: #A3A9B4; }
.eg-os-cols { display: grid; grid-template-columns: 19em 1fr; gap: 1.1em; }
.eg-os-list { display: grid; gap: 0.7em; }
.eg-os { padding: 0.9em 1em; border-radius: 0.8em; background: #fff; border: 1px solid var(--eg-line); transition: border-color 250ms, box-shadow 250ms; }
.eg-os.on { border-color: var(--eg-blue); box-shadow: 0 0 0 2px rgba(68, 109, 166, 0.18); }
.eg-os-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6em; font-size: 0.95em; }
.eg-os-head b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eg-os-n { display: grid; place-items: center; min-width: 1.9em; height: 1.6em; border-radius: 0.4em; background: #F1F3F6; color: var(--eg-muted); font-size: 0.85em; font-weight: 700; }
.eg-os-chips { display: flex; gap: 0.4em; margin: 0.55em 0; }
.eg-os p { display: flex; align-items: center; gap: 0.45em; margin: 0.25em 0 0; font-size: 0.8em; color: var(--eg-muted); white-space: nowrap; overflow: hidden; }
.eg-os p .eg-i { width: 1em; height: 1em; }
.eg-detail { border-radius: 0.9em; background: #fff; border: 1px solid var(--eg-line); padding: 1.3em 1.5em; overflow: hidden; }
.eg-detail-in.swap { animation: egSwap 450ms var(--ease-out); }
@keyframes egSwap { from { opacity: 0; translate: 0.8em 0; } }
.eg-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1em; }
.eg-detail-head > div { display: grid; gap: 0.5em; justify-items: start; }
.eg-detail-name { font-size: 1.3em; letter-spacing: -0.01em; }
.eg-tabs { position: relative; display: flex; gap: 1.6em; margin: 1.3em 0 1.1em; border-bottom: 1px solid var(--eg-line); font-size: 0.9em; }
.eg-tabs span { padding-bottom: 0.7em; color: var(--eg-muted); white-space: nowrap; transition: color 200ms; }
.eg-tabs span.on { color: var(--eg-blue); font-weight: 600; }
.eg-tabs em { font-style: normal; display: inline-grid; place-items: center; min-width: 1.5em; height: 1.5em; margin-left: 0.3em; border-radius: 99px; background: #E4EEFB; color: #2F5F9E; font-size: 0.8em; font-weight: 700; }
.eg-tab-bar { position: absolute; bottom: -1px; left: 0; height: 2px; width: 4em; background: var(--eg-blue); transition: left 400ms var(--ease-out), width 400ms var(--ease-out); }
.eg-tab-body { display: none; }
.eg-tab-body.on { display: grid; gap: 0.75em; animation: egSwap 400ms var(--ease-out); }
.eg-tab-body p { display: grid; grid-template-columns: 7em 1fr; margin: 0; font-size: 0.9em; }
.eg-tab-body p span { color: var(--eg-muted); }
.eg-at { display: flex; align-items: flex-start; gap: 0.8em; padding: 0.9em 1em; border-radius: 0.7em; background: #F7F8FA; font-size: 0.9em; transition: background-color 300ms; }
.eg-at div { display: grid; gap: 0.25em; }
.eg-at div span { color: var(--eg-muted); font-size: 0.92em; }
.eg-at.done { background: #EEF8F2; }
.eg-at.done .eg-cb { background: #22A45D; border-color: #22A45D; }
.eg-at.done .eg-cb::after { content: ""; width: 0.65em; height: 0.35em; margin-top: -0.15em; border: solid #fff; border-width: 0 0 2px 2px; rotate: -45deg; animation: egPop 300ms var(--ease-out); }
.eg-add { justify-self: end; }

/* cursor */
.eg-cur { position: absolute; left: 94%; top: 94%; z-index: 8; display: flex; align-items: flex-start; color: #0A6CC9; font-size: 0.74cqw; pointer-events: none; transition-property: left, top; transition-timing-function: cubic-bezier(0.45, 0, 0.2, 1); }
.eg-cur svg { width: 2em; height: 2.5em; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35)); }
.eg-cur b { margin: 1.9em 0 0 -0.3em; padding: 0.3em 0.75em; border-radius: 0.2em 1em 1em 1em; background: #0A6CC9; color: #fff; font-size: 1.05em; font-weight: 500; }
.eg-cur.is-click svg { animation: kfClick 260ms ease; }
.eg-cur.is-click::after { content: ""; position: absolute; left: -1.2em; top: -1.2em; width: 2.6em; height: 2.6em; border-radius: 50%; border: 2px solid #F28A2B; animation: kfRipple 600ms var(--ease-out) forwards; }

/* ---- act 3: logo and modules ---- */
.eg-act3 { display: grid; place-items: center; background: radial-gradient(70% 80% at 50% 45%, #5079B4 0%, #3A5D93 80%); color: #fff; font-size: 1cqw; }
.egfilm .eg-logo { position: relative; z-index: 2; width: 34cqw; height: auto; opacity: 0; scale: 0.9; transition: opacity 700ms var(--ease) 200ms, scale 900ms var(--ease-out) 200ms; }
.eg-act3.on .eg-logo { opacity: 1; scale: 1; }
.eg-mod { position: absolute; display: flex; align-items: center; gap: 0.6em; padding: 0.7em 1.2em; border-radius: 99px; background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.28); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font-size: 1.15em; font-weight: 600; white-space: nowrap; opacity: 0; scale: 0.7; transition: opacity 500ms var(--ease) calc(600ms + var(--j) * 110ms), scale 600ms cubic-bezier(0.34, 1.56, 0.64, 1) calc(600ms + var(--j) * 110ms); animation: egFloat 5.5s ease-in-out calc(var(--j) * -0.7s) infinite; }
.eg-mod .eg-i { width: 1.3em; height: 1.3em; color: #FFC58F; }
.eg-act3.on .eg-mod { opacity: 1; scale: 1; }
.eg-mod:nth-of-type(1) { left: 12%; top: 18%; }
.eg-mod:nth-of-type(2) { left: 40%; top: 11%; }
.eg-mod:nth-of-type(3) { right: 13%; top: 20%; }
.eg-mod:nth-of-type(4) { right: 8%; top: 52%; }
.eg-mod:nth-of-type(5) { right: 20%; bottom: 14%; }
.eg-mod:nth-of-type(6) { left: 42%; bottom: 10%; }
.eg-mod:nth-of-type(7) { left: 13%; bottom: 18%; }
.eg-mod:nth-of-type(8) { left: 6%; top: 47%; }
@keyframes egFloat { 50% { transform: translateY(-0.7em); } }

/* pause / play */
.eg-toggle { position: absolute; right: 1.4cqw; bottom: 1.4cqw; z-index: 10; width: 3cqw; height: 3cqw; min-width: 32px; min-height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(31, 41, 55, 0.55); border: 1px solid rgba(255, 255, 255, 0.3); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.eg-toggle:hover { background: rgba(31, 41, 55, 0.7); }
.eg-pause { width: 34%; height: 34%; border-left: 3px solid #fff; border-right: 3px solid #fff; }
.eg-toggle.is-play .eg-pause { border: 0; width: 0; height: 0; border-left: 10px solid #fff; border-top: 6px solid transparent; border-bottom: 6px solid transparent; margin-left: 3px; }

/* as a 4:3 card cover */
.frame-thumb .egfilm { aspect-ratio: auto; height: 100%; isolation: auto; border-radius: 0; }
.frame-thumb .eg-win { width: 86cqw; font-size: 0.885cqw; }
.frame-thumb .eg-cur { font-size: 0.885cqw; }
.frame-thumb .eg-bento { padding: 8cqw 6cqw; }
.frame-thumb .eg-logo { width: 42cqw; }
.motion-ready .frame-thumb .egfilm img { transition: opacity 700ms var(--ease) 200ms, scale 900ms var(--ease-out) 200ms; }
/* short enter animations finish even when paused, so nothing freezes half-visible */
.egfilm.is-paused .eg-detail-in, .egfilm.is-paused .eg-tab-body, .egfilm.is-paused .eg-chip { animation-play-state: running !important; }
/* meta links never break: text and arrow stay on one line, the column grows to fit */

/* =========================================================
   Shared film styles (.tsfilm, .ts-*), first made for Trans Scalcon, now the base of the Pitstop film — sizes in cqw
   ========================================================= */
.tsfilm {
  --ts-green: #5BA43B;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  container-type: inline-size;
  background: radial-gradient(80% 90% at 50% 30%, #1E1E1E 0%, #050505 75%);
  color: #fff;
  font-family: var(--font-body);
  border-radius: inherit;
  isolation: isolate;
}
.tsfilm * { box-sizing: border-box; }
.tsfilm img { max-height: none; }

.ts-scene { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 600ms var(--ease), visibility 0s 600ms; }
.ts-scene.on { opacity: 1; visibility: visible; transition: opacity 600ms var(--ease); }
.ts-scene.on.out { opacity: 0; }
.tsfilm.is-paused *, .tsfilm.is-paused *::before, .tsfilm.is-paused *::after { animation-play-state: paused !important; }

/* ---- act 1: the site in use ---- */
.ts-win { position: absolute; left: 50%; top: 52%; width: 68cqw; translate: -50% -50%; border-radius: 1cqw; overflow: hidden; background: #000; box-shadow: 0 2.4cqw 5cqw -1.6cqw rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.1); scale: 0.94; transition: scale 900ms var(--ease-out); }

.ts-chrome { display: flex; align-items: center; gap: 0.5cqw; height: 2.2cqw; padding: 0 1cqw; background: #161616; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.ts-chrome i { width: 0.7cqw; height: 0.7cqw; border-radius: 50%; background: #3A3A3A; }
.ts-url { margin: 0 auto; padding: 0.2cqw 3cqw; border-radius: 99px; background: #232323; color: #9A9A9A; font-size: 0.8cqw; }
.ts-view { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #000; }

.ts-cur { position: absolute; left: 88%; top: 88%; z-index: 5; display: flex; align-items: flex-start; color: #0A6CC9; pointer-events: none; transition-property: left, top; transition-timing-function: cubic-bezier(0.45, 0, 0.2, 1); }
.ts-cur svg { width: 1.5cqw; height: 1.9cqw; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5)); }
.ts-cur b { margin: 1.4cqw 0 0 -0.2cqw; padding: 0.25cqw 0.6cqw; border-radius: 0.15cqw 0.8cqw 0.8cqw 0.8cqw; background: #0A6CC9; color: #fff; font-size: 0.85cqw; font-weight: 500; }
.ts-cur.is-click svg { animation: kfClick 260ms ease; }
.ts-cur.is-click::after { content: ""; position: absolute; left: -0.9cqw; top: -0.9cqw; width: 2cqw; height: 2cqw; border-radius: 50%; border: 2px solid var(--ts-green); animation: kfRipple 600ms var(--ease-out) forwards; }

/* ---- act 2: the sections on a tilted canvas ---- */
.ts-act2 { perspective: 140cqw; }
.ts-canvas { position: absolute; left: 50%; top: 50%; width: 74cqw; columns: 2; column-gap: 2.4cqw; translate: -50% -50%; transform: rotateX(42deg) rotateZ(-24deg); transform-style: preserve-3d; }
.ts-act2.on .ts-canvas { animation: tsDrift 7s cubic-bezier(0.4, 0, 0.3, 1) forwards; }
@keyframes tsDrift { from { translate: -46% -38%; } to { translate: -54% -58%; } }
.ts-tile { break-inside: avoid; margin: 0 0 2.6cqw; opacity: 0; translate: 0 3cqw; transition: opacity 600ms var(--ease) calc(200ms + var(--j) * 140ms), translate 800ms var(--ease-out) calc(200ms + var(--j) * 140ms); }
.ts-act2.on .ts-tile { opacity: 1; translate: none; }
.ts-tile figcaption { margin: 0 0 0.6cqw; font-size: 1.1cqw; font-weight: 500; color: #9A9A9A; }
.ts-tile div { width: 100%; border-radius: 0.6cqw; background-size: 100% auto; background-repeat: no-repeat; box-shadow: 0 2cqw 4cqw -1cqw rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.08); }

/* ---- act 3: palette and typography ---- */
.ts-bento { position: absolute; inset: 0; display: grid; grid-template-columns: 1.15fr 1fr; grid-template-rows: 1fr 1fr; gap: 1.6cqw; padding: 5.5cqw 8cqw; font-size: 1cqw; }
.ts-card {
  display: flex; flex-direction: column; justify-content: center; gap: 1.3em; padding: 2em;
  border-radius: 1.4em; background: #121212; border: 1px solid #262626;
  opacity: 0; transform: translateY(1.6em) scale(0.94);
  transition: opacity 500ms var(--ease-out) calc(var(--i) * 90ms), transform 600ms var(--ease-out) calc(var(--i) * 90ms);
}
.ts-card.in { opacity: 1; transform: none; }
.ts-bento.out .ts-card { opacity: 0; transform: scale(0.9); transition-delay: calc(var(--i) * 50ms); }
.ts-card small { font-size: 0.85em; font-weight: 600; color: #8A8A8A; letter-spacing: 0.04em; text-transform: uppercase; }
.ts-sw { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.8em; }
.ts-sw span { display: grid; gap: 0.35em; }
.ts-sw i { aspect-ratio: 1 / 1.25; border-radius: 0.8em; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); transition: translate 450ms var(--ease-out) calc(var(--j) * 70ms), box-shadow 300ms; }
.ts-sw b { font-size: 0.85em; font-weight: 600; }
.ts-sw em { font-style: normal; font-size: 0.75em; color: #8A8A8A; font-variant-numeric: tabular-nums; }
.ts-bento.pick .ts-sw span:first-child i { translate: 0 -0.6em; box-shadow: 0 0 0 0.2em #121212, 0 0 0 0.38em var(--ts-green); }
.ts-display { margin: 0; font: 800 3.4em/0.98 var(--font-heading); letter-spacing: -0.035em; }
.ts-weights { display: grid; gap: 0.35em; font-size: 1em; color: #BDBDBD; }
.ts-weights span { transition: color 300ms, translate 400ms var(--ease-out); }
.ts-weights span:nth-child(1) { font-weight: 800; }
.ts-weights span:nth-child(2) { font-weight: 700; }
.ts-bento.weights .ts-weights span { color: #fff; }
.ts-bento.weights .ts-weights span:nth-child(1) { translate: 0.4em 0; color: var(--ts-green); transition-delay: 0ms; }

/* ---- act 4: the logo on the road ---- */

/* pause / play */
.ts-toggle { position: absolute; right: 1.4cqw; bottom: 1.4cqw; z-index: 10; width: 3cqw; height: 3cqw; min-width: 32px; min-height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.22); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.ts-toggle:hover { background: rgba(255, 255, 255, 0.2); }
.ts-pause { width: 34%; height: 34%; border-left: 3px solid #fff; border-right: 3px solid #fff; }
.ts-toggle.is-play .ts-pause { border: 0; width: 0; height: 0; border-left: 10px solid #fff; border-top: 6px solid transparent; border-bottom: 6px solid transparent; margin-left: 3px; }

/* as a 4:3 card cover */
.frame-thumb .tsfilm { aspect-ratio: auto; height: 100%; isolation: auto; border-radius: 0; }
.frame-thumb .ts-win { width: 82cqw; }
.frame-thumb .ts-bento { padding: 7cqw 5cqw; font-size: 1.15cqw; grid-template-columns: 1fr; grid-template-rows: auto; align-content: center; }

.frame-thumb .ts-canvas { width: 92cqw; }

.motion-ready .frame-thumb .tsfilm img { transition: opacity 700ms var(--ease) 200ms, scale 900ms var(--ease-out) 200ms; }

/* Kanban Notes: the main screenshot's frame follows the screen's own rounded corners
   (2% of the width; the vertical radius is scaled by 1600/1040 so the curve stays round) */
.cs-full-shot:has(> img[src*="kanbannotes/kanban-interface"]) { border-radius: 2% / 3.08%; overflow: hidden; }

/* Saved-edits hint: marker writing on the canvas, pointing at Restore.
   It is painted on the page's first screen only (top set by motion.js): at the top
   its arrow points at Restore; once the visitor scrolls, the arrow goes and the
   words stay on the wall, scrolling away with it */

/* =========================================================
   Pitstop film (pitstop-film.js) — reuses the .ts-* and phone styles
   ========================================================= */
.psfilm { --ts-green: #E10600; background: radial-gradient(80% 90% at 50% 30%, #262A33 0%, #0E0F12 75%); }
.psfilm .ts-win { left: 43%; width: 60cqw; }
.psfilm .ts-view .ps-shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; scale: 1.02; transition: opacity 380ms var(--ease), scale 520ms var(--ease-out); }
.psfilm .ps-shot.on { opacity: 1; scale: 1; }
.ps-display { font-family: var(--font-heading); font-weight: 800; font-size: 4em; line-height: 0.88; letter-spacing: 0; text-transform: uppercase; }
.ps-stats p { display: flex; align-items: baseline; gap: 0.7em; margin: 0; }
.ps-stats b { font-family: var(--font-heading); font-size: 2.8em; font-weight: 800; line-height: 1; color: #FFC21A; }
.ps-stats span { color: #A8A8A8; }
.ps-series span { display: flex; align-items: center; gap: 0.7em; font-size: 1.15em; font-weight: 600; }
.ps-series span::before { content: ""; width: 0.6em; height: 0.6em; border-radius: 50%; background: var(--c); }

.frame-thumb .psfilm .ts-win { left: 40%; width: 66cqw; }

.frame-thumb .psfilm .ps-stats, .frame-thumb .psfilm .ps-series { display: none; }

/* a phone screenshot in a two-up screens grid: keep it phone-sized and centred */

/* Pitstop film v2: a camera that dives into the UI and pulls back out */
.pc-cam { position: absolute; left: 50%; top: 52%; width: 70cqw; margin-left: -35cqw; translate: 0 -50%; transform-origin: 50% 50%; transition-property: transform; transition-timing-function: cubic-bezier(0.65, 0, 0.25, 1); will-change: transform; }
.psfilm .pc-cam .ts-win { position: relative; left: auto; top: auto; width: 100%; translate: none; scale: 1; }
.pc-act.on .pc-cam .ts-win { scale: 1; }
.pc-play { position: absolute; left: 50%; top: 46%; z-index: 2; display: grid; place-items: center; width: 6cqw; height: 6cqw; margin: -3cqw 0 0 -3cqw; border-radius: 50%; background: #E10600; color: #fff; box-shadow: 0 0 0 0 rgba(225, 6, 0, 0.6); opacity: 0; scale: 0.6; transition: opacity 300ms var(--ease), scale 400ms var(--ease-out); }
.pc-play svg { width: 45%; height: 45%; margin-left: 8%; fill: currentColor; stroke: none; }
.pc-play.on { opacity: 1; scale: 1; animation: pcPulse 1.2s ease-out infinite; }
.pc-play.is-hit { scale: 1.35; opacity: 0; transition-duration: 500ms; }
@keyframes pcPulse { 70% { box-shadow: 0 0 0 1.6cqw rgba(225, 6, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(225, 6, 0, 0); } }
.pc-caption { position: absolute; left: 4cqw; bottom: 3.4cqw; z-index: 6; margin: 0; padding: 0.4cqw 1.2cqw; border-radius: 0.4cqw; background: #E10600; color: #fff; font: 800 2.6cqw/1 var(--font-heading); letter-spacing: 0.02em; text-transform: uppercase; opacity: 0; translate: 0 1cqw; }
.pc-caption.on { animation: pcCap 1.9s var(--ease-out) forwards; }
@keyframes pcCap { 0% { opacity: 0; translate: 0 1cqw; } 15%, 80% { opacity: 1; translate: none; } 100% { opacity: 0; translate: 0 -0.6cqw; } }
.pc-end { display: grid; place-items: center; align-content: center; gap: 1.6cqw; background: radial-gradient(70% 80% at 50% 45%, #2A1416 0%, #0E0F12 75%); }
.pc-ring { position: absolute; left: 50%; top: 50%; width: 66cqw; height: 36cqw; translate: -50% -50%; opacity: 0; transition: opacity 900ms var(--ease) 300ms; }
.pc-end.on .pc-ring { opacity: 1; }
.pc-ring-tile { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 5cqw; height: 5cqw; margin: -2.5cqw 0 0 -2.5cqw; border-radius: 1.2cqw; background: #1F2228; border: 1px solid #3A3F49; color: #ECEEF1; font: 800 1.9cqw/1 var(--font-heading); box-shadow: 0 1cqw 2cqw -0.8cqw rgba(0, 0, 0, 0.7); }
.pc-ring-tile svg { width: 48%; height: 48%; color: #FFC21A; }
.pc-ring-tile.is-series { background: var(--c); border-color: rgba(255, 255, 255, 0.25); color: #fff; }
.psfilm .pc-logo { position: relative; z-index: 4; width: 32cqw; height: auto; opacity: 0; scale: 0.88; transition: opacity 600ms var(--ease) 150ms, scale 800ms var(--ease-out) 150ms; }
.pc-end.on .pc-logo { opacity: 1; scale: 1; }
.pc-tag { position: relative; z-index: 4; margin: 0; font: 800 2cqw/1 var(--font-heading); letter-spacing: 0.06em; text-transform: uppercase; color: #FFC21A; opacity: 0; transition: opacity 600ms var(--ease) 700ms; }
.pc-end.on .pc-tag { opacity: 1; }
.pc-sound { position: absolute; right: 5.4cqw; bottom: 1.4cqw; z-index: 10; display: grid; place-items: center; width: 3cqw; height: 3cqw; min-width: 32px; min-height: 32px; border-radius: 50%; color: #fff; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.22); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.pc-sound:hover { background: rgba(255, 255, 255, 0.2); }
.pc-sound svg { width: 50%; height: 50%; }
.pc-sound .pc-wave { display: none; }
.pc-sound.is-on { background: #E10600; border-color: #E10600; }
.pc-sound.is-on .pc-wave { display: inline; }
.pc-sound.is-on .pc-mute { display: none; }
.frame-thumb .pc-cam { width: 84cqw; margin-left: -42cqw; }
.frame-thumb .psfilm .pc-logo { width: 46cqw; }
.frame-thumb .pc-ring { width: 88cqw; height: 52cqw; }
.frame-thumb .pc-ring-tile { width: 6.6cqw; height: 6.6cqw; margin: -3.3cqw 0 0 -3.3cqw; font-size: 1.8cqw; }

/* sound sits left of the pause button at any size (both have a 32px floor) */
.pc-sound { right: calc(1.4cqw + max(3cqw, 32px) + 8px); }

/* home: resting on a card zooms it in a little, floating over the grid
   (scale doesn't touch layout, so the other cards stay put) */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .project-grid .frame { transition: scale 260ms cubic-bezier(0.22, 1, 0.36, 1); }
  .project-grid .frame.is-focus { scale: 1.16; z-index: 6; }
  .project-grid .frame.is-focus .frame-box { box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 36px 70px -28px rgba(0, 0, 0, 0.42); }
}

/* the card's film grows into the case study cover */
.cs-hero-image:is([data-kitt-film], [data-eugestor-film], [data-pitstop-film]) { view-transition-name: project-film; }
::view-transition-group(project-film) { animation-duration: 750ms; animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); z-index: 50; }
::view-transition-old(project-film), ::view-transition-new(project-film) { height: 100%; width: 100%; object-fit: cover; animation-duration: 750ms; }
::view-transition-old(project-film) { animation-name: vtFilmOut; }
::view-transition-new(project-film) { animation-name: vtFilmIn; }
@keyframes vtFilmOut { to { opacity: 0; } }
@keyframes vtFilmIn { from { opacity: 0; } }
/* opened from a card: no blur, the case is on screen almost at once and the film lands fast */
html.vt-film::view-transition-old(root) { animation: vtFilmOut 120ms linear both; }
html.vt-film::view-transition-new(root) { animation: vtFilmIn 220ms var(--ease-out) both; }
html.vt-film::view-transition-group(project-film),
html.vt-film::view-transition-old(project-film),
html.vt-film::view-transition-new(project-film) { animation-duration: 320ms; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(project-film), ::view-transition-old(project-film), ::view-transition-new(project-film) { animation: none; }
  html.vt-film::view-transition-old(root), html.vt-film::view-transition-new(root) { animation: none; }
}

/* case studies with a film: the film is the top of the page, centred on screen,
   so the card's screen lands right there when the page opens */
.cs-hero--film { padding-top: 0; }
.cs-hero--film .cs-hero-image { margin-bottom: 0; }
/* the back link sits above the film, aligned with the logo and the film's left edge */

.cs-hero--film .cs-hero-image + * , .cs-hero--film > .container + .container-narrow { padding-top: var(--space-6); }

/* film camera (FilmLens): the window glides in and out of the UI */
.kf-window { transition: scale 900ms var(--ease-out), transform var(--lens-ms, 900ms) cubic-bezier(0.65, 0, 0.25, 1); }
.eg-win { transition: scale 900ms var(--ease-out), transform var(--lens-ms, 900ms) cubic-bezier(0.65, 0, 0.25, 1); }
.ts-win { transition: scale 900ms var(--ease-out), transform var(--lens-ms, 900ms) cubic-bezier(0.65, 0, 0.25, 1); }

/* no selection outlines in the films (Trans Scalcon's green hover ring) */

/* film camera v2: zoom by layout, not by transform, so everything stays sharp.
   The stage is a size container as big as the film times the zoom; everything inside is
   sized in cqw/em of it, so it is laid out (and rasterised) at the zoomed size. */
@property --z { syntax: '<number>'; inherits: false; initial-value: 1; }
@property --fx { syntax: '<number>'; inherits: false; initial-value: 50; }
@property --fy { syntax: '<number>'; inherits: false; initial-value: 50; }
/* light mode (default): a GPU transform, cheap, fine at card size */
.lens-stage {
  position: absolute;
  left: 0; top: 0; width: 100%; height: 100%;
  container-type: inline-size;
  transform-origin: 50% 50%;
  transition: transform var(--lens-ms, 900ms) cubic-bezier(0.65, 0, 0.25, 1);
}
/* sharp mode (the film in focus): moves are transforms; at rest the stage is laid out
   at the zoomed size (film-audio.js settles it), so it is redrawn sharp once per move */
.is-sharp .lens-stage {
  left: calc(50% - var(--fx) * var(--z) * 1%);
  top: calc(50% - var(--fy) * var(--z) * 1%);
  width: calc(100% * var(--z));
  height: calc(100% * var(--z));
}
/* each film lays out on its own, so one film's work never re-lays out the page */
.kfilm, .egfilm, .tsfilm { contain: layout paint style; }
.pc-cam { will-change: auto; }

/* EuGestor as a card, like KITT's: the whole window in view (no cropped edges), a little larger
   than on the cover, and the camera dives where the cursor works to make the text readable */
.frame-thumb .eg-win { width: 80cqw; font-size: 0.82cqw; }
.frame-thumb .eg-cur { font-size: 0.82cqw; }
.frame-thumb .egfilm { text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }

/* zoomed card: a pill inviting to open the film full screen */
.frame-hint {
  position: absolute; left: 50%; bottom: 16px; z-index: 12;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 99px;
  background: rgba(17, 17, 17, 0.72); color: #fff;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 13px; font-weight: 600; white-space: nowrap; pointer-events: none;
  opacity: 0; translate: -50% 6px; scale: 0.94; transform-origin: 50% 100%;
  transition: opacity 300ms var(--ease), translate 450ms var(--ease-out), scale 450ms var(--ease-out);
}
.frame-thumb { position: relative; }
.project-grid .frame.is-focus .frame-hint { opacity: 1; translate: -50% 0; scale: 1; transition-delay: 120ms; animation: hintNudge 2.4s ease-in-out 0.6s infinite; }
@keyframes hintNudge { 50% { translate: -50% -3px; } }
@media (prefers-reduced-motion: reduce) { .frame-hint { animation: none !important; } }

/* with a film on top, the title block lines up with the film (and the logo) instead of the narrow column */
.cs-hero--film .container-narrow { max-width: var(--max-width); }
.cs-hero--film h1 { max-width: 22ch; }

/* opener: the three screens fanned out over the name */

/* the phone in use */

/* foundations, light cards */

/* ending: the name with the characters orbiting */

/* as a card */

/* each render already includes the phone: screens cross-fade in place, no slide, no outlines */

/* the rebuilt phones inside the film: sized by --phone-w */

/* =========================================================
   Case studies read like news: a headline, the problem first, a 30-second
   summary, a sticky index and bigger, calmer type
   ========================================================= */
.cs-hero h1 { font-size: clamp(32px, 5vw, 56px); line-height: 1.04; letter-spacing: -0.035em; }
.cs-hero--film .container-narrow h1 { max-width: 20ch; }

.cs-section h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.08; letter-spacing: -0.03em; max-width: 22ch; }
.cs-section .container > p:not(.eyebrow),
.cs-section .container-narrow > p:not(.eyebrow) { font-size: 18px; line-height: 1.65; color: var(--color-secondary); max-width: 64ch; }
.cs-feature p { font-size: 17px; line-height: 1.6; }
.cs-screen figcaption { font-size: 15px; }

/* chapters are numbered: "01 · Problema" */
main { counter-reset: chapter; }

/* in 30 seconds: problem, what I did, outcome, and the facts in numbers */

/* the outcome, as a short checklist */

/* the index sticks under the header; the current chapter is highlighted (script.js) */
/* a sub-header right under the site header: the project's name and its chapters */
.cs-toc {
  position: sticky;
  top: calc(var(--ruler, 0px) + 66px);
  z-index: 50;
  padding: 8px 0;
  background: rgba(245, 245, 245, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.cs-toc-inner { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.cs-toc .cs-toc-name { flex-shrink: 0; margin-right: 14px; padding: 6px 0; border: 0; font: 800 18px/1 var(--font-heading); letter-spacing: -0.03em; color: var(--ink); text-decoration: none; }
.cs-toc .cs-toc-name:hover { background: none; color: var(--select-ink); }
/* the way back to the portfolio, at the start of the bar */
.cs-toc .cs-toc-back { display: grid; place-items: center; width: 34px; height: 34px; margin-right: 6px; padding: 0; border-radius: 50%; color: var(--ink); }
.cs-toc .cs-toc-back:hover { background: rgba(0, 0, 0, 0.06); }
/* without the breadcrumb above it, the cover keeps a little air under the bar */
.cs-toc + .cs-hero--film { padding-top: var(--space-5); }
.cs-toc + .cs-hero:not(.cs-hero--film) { padding-top: var(--space-7); }
.cs-toc-inner::-webkit-scrollbar { display: none; }
.cs-toc a {
  flex-shrink: 0;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--color-secondary);
  font: 500 14px/1 var(--font-body);
  text-decoration: none;
  transition: background 160ms var(--ease), color 160ms var(--ease);
}
.cs-toc a:hover { background: rgba(0, 0, 0, 0.05); color: var(--ink); }
.cs-toc a:focus:not(:focus-visible) { outline: none; }
.cs-toc a:focus-visible { outline: 2px solid var(--select); outline-offset: 2px; }
/* the chapters as loose buttons, the current one a raised white pill (like the toolbar) */
.cs-toc-track { display: inline-flex; flex-shrink: 0; gap: 2px; }
.cs-toc .cs-toc-track a { border: 0; color: #333; transition: background-color var(--duration-base) var(--ease), color var(--duration-base) var(--ease), box-shadow var(--duration-base) var(--ease); }
.cs-toc .cs-toc-track a:hover { background: rgba(0, 0, 0, 0.04); color: var(--ink); }
.cs-toc .cs-toc-track a[aria-current="true"] { color: var(--apple-blue-deep); background: rgba(255, 255, 255, 0.9); box-shadow: 0 1px 2px rgba(0,0,0,0.08), 0 4px 12px -4px rgba(0,0,0,0.14); }

/* ---------- showcase layout (KITT first): screens lead, each with a short explanation ---------- */

.cs-feature-row { display: grid; gap: 20px 56px; align-items: center; margin-top: 56px; }
.cs-feature-row:first-of-type { margin-top: 40px; }
@media (min-width: 900px) {
  .cs-feature-row { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
  .cs-feature-row:nth-of-type(even) { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); }
  
}

/* ---------- the site's sound: speaker button ---------- */
.site-sound {
  display: grid;
  place-items: center;
  width: 33px; /* same height as the language switch and "Contato" */
  height: 33px;
  padding: 0;
  border: 1px solid var(--glass-edge);
  border-radius: 50%;
  background: rgba(118, 118, 128, 0.12);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  color: var(--ink);
  transition: background 160ms var(--ease), color 160ms var(--ease);
}
.site-sound:hover { background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.1), 0 3px 8px rgba(0,0,0,0.08); }
.site-sound:focus-visible { outline: 2px solid var(--select); outline-offset: 2px; }
.site-sound svg { width: 15px; height: 15px; }
.site-sound .ss-mute { display: none; }
.site-sound.is-off { color: var(--color-muted-foreground); }
.site-sound.is-off .ss-wave { display: none; }
.site-sound.is-off .ss-mute { display: inline; }

/* the overview label sits over the title; the summary cards follow the intro closely */
.cs-hero--film > .container-narrow:has(> .eyebrow) { padding-top: var(--space-5); }
.cs-hero .container-narrow > .eyebrow { margin-bottom: 12px; }

/* Before / after: the two screens stacked; dragging the bar reveals one or the other */
.cs-ba {
  --pos: 50%;
  position: relative; overflow: hidden; aspect-ratio: 1600 / 1138;
  border-radius: var(--radius-lg); border: 1px solid var(--color-border);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 24px 48px -28px rgba(0,0,0,0.35);
  cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none;
  background: #0B0920;
}
.cs-ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }

.cs-ba-handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 44px; margin-left: -22px; z-index: 3;
  display: grid; place-items: center; outline: none; cursor: ew-resize;
}
.cs-ba-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.08), 0 0 12px rgba(0,0,0,0.25); }

/* KITT, "Monte automações": the flow runs on the editor screen when the play button is pressed */
.cs-flowplay {
  position: relative; aspect-ratio: 1920 / 1140; overflow: hidden;
  border-radius: var(--radius-lg); border: 1px solid var(--color-border); background: #070512;
}
.cs-flowplay > img { display: block; width: 100%; height: auto; }
/* EuGestor: the screens are 1600x1040, so the slider and the player keep that ratio (nothing cropped) */

/* EuGestor, "Gestão de OS": the same player on the prototype's light screens */

/* the ending the video doesn't show, laid over the real screens (1600px wide = 100cqw) */
.eg-pill, .eg-toast { position: absolute; z-index: 2; opacity: 0; pointer-events: none; font-family: var(--font-body); transition: opacity 350ms var(--ease), transform 450ms var(--ease-out); }
.eg-pill.on, .eg-toast.on { opacity: 1; transform: none; }

.eg-pill { display: grid; place-items: center; border-radius: 0.5cqw; background: #E3F6EA; color: #1D8A4C; font-size: 0.95cqw; font-weight: 500; }

.eg-toast { display: flex; align-items: center; gap: 1cqw; padding: 0 1.4cqw; border-radius: 0.9cqw; background: #fff; box-shadow: 0 0.2cqw 0.5cqw rgba(16, 24, 40, 0.08), 0 1.4cqw 3cqw -0.6cqw rgba(16, 24, 40, 0.25); border-left: 0.3cqw solid #22A05A; color: #5B6170; font-size: 0.85cqw; line-height: 1.35; transform: translateY(-30%); }
.eg-toast svg { flex: none; width: 2cqw; height: 2cqw; color: #22A05A; }
.eg-toast b { display: block; color: #1F2430; font-size: 1cqw; font-weight: 600; }

/* a node at work: a violet ring breathing around it */

.fp-play > span { display: inline-flex; align-items: center; gap: 8px; }
.fp-play > span[hidden] { display: none; }
/* a row that continues the one above (the flows: the editor, then its catalog of tasks) */
.cs-feature-row.cs-feature-row--follow { margin-top: 32px; }

/* the flows, all together under the editor, as four small cards */

/* a learning that leads, across the whole row (KITT: AI first) */

/* Solução in two blocks (KITT): each opens with a label, a title and a short text, then its screens */

/* Solução as two stages that tell the story: first a light one, where the old screen turns into the
   new; then the product's own dark canvas (dotted, violet glow), where the flows run */
.cs-sol-block--light, .cs-sol-block--canvas { position: relative; isolation: isolate; overflow: hidden; padding: 56px; border-radius: 28px; }

.cs-sol-block--light {
  background:
    radial-gradient(55% 60% at 78% 38%, rgba(123, 102, 240, 0.16), transparent 70%),
    radial-gradient(40% 50% at 8% 95%, rgba(10, 108, 201, 0.10), transparent 70%),
    var(--paper);
  border: 1px solid var(--color-border);
}
.cs-sol-block--light::before { /* a faint grid, like a design file */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(0,0,0,0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,0.045) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(80% 70% at 60% 40%, #000, transparent 85%);
}
.cs-sol-block--canvas {
  color: #fff;
  background:
    radial-gradient(50% 45% at 85% 30%, rgba(123, 102, 240, 0.35), transparent 70%),
    radial-gradient(45% 40% at 10% 100%, rgba(47, 91, 234, 0.25), transparent 70%),
    linear-gradient(180deg, #0B0920, #120B33);
}
.cs-sol-block--canvas::before { /* the dotted canvas of the flow editor */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,0.14) 1px, transparent 1.2px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, #000, rgba(0,0,0,0.5));
}

.cs-sol-block--canvas h3, .cs-sol-block--canvas h4 { color: #fff; }
.cs-sol-block--canvas p { color: rgba(255,255,255,0.72); }
.cs-sol-block--canvas .cs-flowplay, .cs-sol-block--canvas .cs-screen img { border-color: rgba(255,255,255,0.12); box-shadow: 0 30px 60px -30px rgba(0,0,0,0.8), 0 0 0 1px rgba(169,156,255,0.08); }

.cs-sol-block--light .cs-ba { box-shadow: 0 40px 80px -40px rgba(43, 28, 120, 0.45), 0 0 0 1px rgba(0,0,0,0.04); }
@media (max-width: 640px) { .cs-sol-block--light, .cs-sol-block--canvas { padding: 28px 20px; border-radius: 20px; } }

/* Fluxos: less text, more pieces. Descriptions step back; chips and the big number carry the story */

/* O novo visual: the same pieces in the light stage */

/* Showcase frame (KITT): the star components sit on a glass mat, selected as in Figma
   (blue outline, square handles, the frame's name above and its size below) with a glow behind */
.cs-showcase { position: relative; padding: 14px; border-radius: 26px; isolation: isolate;
  background: rgba(255, 255, 255, 0.55); border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 0 rgba(255,255,255,0.8) inset, 0 30px 70px -40px rgba(43, 28, 120, 0.45); }
.cs-showcase::before { /* the glow: a radial gradient is soft already, no blur filter needed */
  content: ""; position: absolute; inset: -4% -14% -22%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(123, 102, 240, 0.35), rgba(10, 108, 201, 0.12) 60%, transparent); }
.cs-showcase::after { /* the selection outline */
  content: ""; position: absolute; inset: -9px; border: 1.5px solid var(--select); border-radius: 30px; pointer-events: none; }
.cs-showcase > .cs-ba, .cs-showcase > .cs-flowplay { border-radius: 14px; }

 
 

.cs-showcase-size { position: absolute; left: 50%; top: calc(100% + 18px); transform: translateX(-50%); padding: 2px 6px; border-radius: 3px; background: var(--select-ink); color: #fff; font-size: 11px; font-weight: 500; line-height: 1.4; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cs-showcase-size:empty { display: none; }

/* on the dark canvas: a smoky mat, a lilac selection */
.cs-sol-block--canvas .cs-showcase { background: rgba(169, 156, 255, 0.07); border-color: rgba(169, 156, 255, 0.18); box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 40px 90px -40px rgba(0,0,0,0.9); }
.cs-sol-block--canvas .cs-showcase::before { background: radial-gradient(closest-side, rgba(123, 102, 240, 0.55), rgba(47, 91, 234, 0.2) 60%, transparent); }
.cs-sol-block--canvas .cs-showcase::after { border-color: #A99CFF; }

.cs-sol-block--canvas .cs-showcase-size { background: #7B66F0; }
@media (max-width: 640px) { .cs-showcase { padding: 8px; border-radius: 18px; } .cs-showcase::after { border-radius: 22px; } }

/* the design changes, as small cards: a gradient tile, what changed, and what it was before */

/* old vs new: the text column takes the height of the framed screen, title at its top, cards at its bottom */

/* old vs new: the text and the changes live in one panel, the twin of the screen's frame
   (same height, same corners, same glass), so everything lines up on one edge */

/* the same glass panel for the everyday screens: header and cards in one piece */

/* Solução as glass (KITT): soft colored lights float behind the two stages, and the stages are
   frosted glass over them, the same material as the panels inside */

.cs-sol-block--light {
  background:
    radial-gradient(55% 60% at 78% 38%, rgba(123, 102, 240, 0.10), transparent 70%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.38));
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 0 0 1px rgba(255, 255, 255, 0.25), 0 40px 90px -50px rgba(43, 28, 120, 0.45);
  -webkit-backdrop-filter: blur(28px) saturate(140%); backdrop-filter: blur(28px) saturate(140%);
}
.cs-sol-block--canvas {
  background:
    radial-gradient(50% 45% at 85% 30%, rgba(123, 102, 240, 0.30), transparent 70%),
    radial-gradient(45% 40% at 10% 100%, rgba(47, 91, 234, 0.20), transparent 70%),
    linear-gradient(180deg, rgba(11, 9, 32, 0.93), rgba(18, 11, 51, 0.88));
  border: 1px solid rgba(169, 156, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 50px 100px -50px rgba(18, 11, 51, 0.8);
  -webkit-backdrop-filter: blur(28px) saturate(150%); backdrop-filter: blur(28px) saturate(150%);
}
/* Fluxos: the same panels, in dark glass */

/* one rhythm inside each stage: 56px from the edges to the frames, and 56px between the frame and the panel below
   (the media column already keeps 28px above and 34px below for the frame's name and size tags) */
@media (min-width: 641px) {
  .cs-sol-block--light, .cs-sol-block--canvas { padding-top: 28px; }
  
  
}
/* the panel beside a framed screen matches the selection outline, not the mat inside it,
   so at any width both read as one row: same top, same bottom, same corners */

/* "Ver a execução": the product's own run button, in glass — a violet pill with a lit play disc */
.cs-sol-block--canvas .fp-play {
  position: relative; display: inline-flex; align-items: center; gap: 12px; align-self: flex-start;
  padding: 7px 22px 7px 7px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(135deg, rgba(139, 120, 255, 0.95), rgba(91, 70, 229, 0.95));
  color: #fff; font-size: 15px; font-weight: 600; letter-spacing: 0.01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 10px 30px -8px rgba(123, 102, 240, 0.75), 0 0 0 6px rgba(123, 102, 240, 0.12);
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease);
}
.cs-sol-block--canvas .fp-play:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 14px 36px -8px rgba(123, 102, 240, 0.9), 0 0 0 8px rgba(123, 102, 240, 0.16); }
.cs-sol-block--canvas .fp-play:active { transform: scale(0.98); }
.cs-sol-block--canvas .fp-play > span { gap: 12px; }
.cs-sol-block--canvas .fp-play svg { box-sizing: content-box; width: 14px; height: 14px; padding: 10px; border-radius: 50%; background: #fff; color: #5B46E5; box-shadow: 0 2px 8px rgba(30, 10, 90, 0.35); }

.cs-flowplay.is-playing ~ * .fp-play, .fp-play:disabled { opacity: 0.7; }
/* the selection outline (9px outside the mat) is the edge that counts: it sits 56px from the stage's
   top and left, the panel beside it shares its top and bottom, the panel below its left edge */

/* the panel beside a screen keeps its own height (no stretching to match), centered on the screen;
   its content flows: title, text, then the list or the button right after */

/* in the case studies, buttons don't move: the run button lights up where the pointer is, like the navbar */
.cs-section .btn:hover, .cs-hero .btn:hover { transform: none; }
.cs-sol-block--canvas .fp-play:hover { transform: none; }
.cs-sol-block--canvas .fp-play.has-sheen::after { z-index: 0; mix-blend-mode: normal; background: radial-gradient(120px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 70%); }
.cs-sol-block--canvas .fp-play.has-sheen > * { position: relative; z-index: 1; }
/* the run button spans the panel, label centered, the play disc at the left edge */

.cs-sol-block--canvas .fp-play { display: flex; width: 100%; box-sizing: border-box; justify-content: center; padding: 7px 52px; }
.cs-sol-block--canvas .fp-play > span { position: static !important; }
.cs-sol-block--canvas .fp-play svg { position: absolute; left: 7px; top: 50%; translate: 0 -50%; }
/* the run button, roomier: 60px tall, a bigger play disc, a larger label */
.cs-sol-block--canvas .fp-play { min-height: 60px; padding: 0 64px; font-size: 16.5px; border-radius: 18px; }
.cs-sol-block--canvas .fp-play svg { left: 9px; width: 18px; height: 18px; padding: 12px; border-radius: 12px; }

/* round again: a pill, with a round play disc */
.cs-sol-block--canvas .fp-play { border-radius: 999px; }
/* in a narrow panel the label wraps inside its padding, never under the play disc */
.cs-sol-block--canvas .fp-play { padding-top: 8px; padding-bottom: 8px; }
.cs-sol-block--canvas .fp-play > span { min-width: 0; max-width: 100%; }
.cs-sol-block--canvas .fp-play > span > span { white-space: normal; text-align: center; line-height: 1.2; overflow-wrap: anywhere; }
.cs-sol-block--canvas .fp-play svg { border-radius: 50%; }
/* the change icons as glass tiles: frosted white over a soft violet tint, a lit top edge, violet line icon */

/* case-study screens that open full screen: tilt, a light under the pointer, a lit edge, an expand badge */
.cs-screen.is-live { position: relative; perspective: 900px; }
.cs-screen.is-live img { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transform-style: preserve-3d;
  transition: transform 350ms var(--ease-out), box-shadow 300ms var(--ease), border-color 300ms var(--ease), filter 200ms var(--ease); }
.cs-screen.is-live::after { /* the light that follows the pointer */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; z-index: 1;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.22), rgba(169, 156, 255, 0.10) 40%, transparent 70%);
  mix-blend-mode: screen; transition: opacity 250ms var(--ease); }
.cs-screen.is-live:hover::after { opacity: 1; }
.cs-screen.is-live:hover img { border-color: rgba(123, 102, 240, 0.75);
  box-shadow: 0 0 0 1px rgba(123, 102, 240, 0.35), 0 0 28px -4px rgba(123, 102, 240, 0.55), 0 24px 44px -22px rgba(20, 10, 60, 0.6); filter: none; }
.cs-shot-badge { position: absolute; right: 10px; bottom: 10px; z-index: 2; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  color: #fff; background: rgba(20, 16, 48, 0.55); border: 1px solid rgba(255, 255, 255, 0.35);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 6px 16px -6px rgba(0,0,0,0.5);
  opacity: 0; scale: 0.8; transition: opacity 220ms var(--ease), scale 260ms var(--ease-out); pointer-events: none; }
.cs-shot-badge svg { width: 15px; height: 15px; }
.cs-screen.is-live:hover .cs-shot-badge { opacity: 1; scale: 1; }
.cs-screen.is-live figcaption { position: relative; z-index: 2; }
@media (prefers-reduced-motion: reduce) { .cs-screen.is-live img { transform: none; } }

/* closing the viewer: the dark glass fades away over the page instead of vanishing at once
   (the opening animation held its opacity, so the old transition never ran) */
@keyframes lbOut { from { opacity: 1; } to { opacity: 0; } }
.lightbox.is-closing .lb-backdrop, .lightbox.is-closing .lb-btn, .lightbox.is-closing .lb-cap,
.lightbox.is-closing .lb-dialog > .lb-btn { animation: lbOut 240ms var(--ease) forwards; }
/* the page keeps its scrollbar's room while the viewer is open, so nothing shifts when it closes */
html { scrollbar-gutter: stable; }

/* =========================================================
   KITT, the rest of the page in the language of the Solução:
   soft lights behind each chapter, glass stages, glass pieces
   ========================================================= */
#processo, #impacto { position: relative; overflow: hidden; isolation: isolate; }
#processo::before, #impacto::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none; border-radius: 50%; filter: blur(70px);
  width: 48vw; height: 48vw; max-width: 760px; max-height: 760px; }

#processo::before { right: -14vw; top: 10%; background: radial-gradient(closest-side, rgba(47, 91, 234, 0.32), rgba(123, 102, 240, 0.14) 55%, transparent); }
#impacto::before { left: -12vw; top: 0; background: radial-gradient(closest-side, rgba(123, 102, 240, 0.42), rgba(47, 91, 234, 0.18) 55%, transparent); }

/* the stages: the same glass as the two blocks of the Solução */
.cs-stage { position: relative; isolation: isolate; overflow: hidden; margin-top: 8px; padding: 40px; border-radius: 28px; }

@media (max-width: 640px) { .cs-stage { padding: 20px; border-radius: 20px; } }

/* one glass piece, reused below */

/* Visão geral: glass cards with glass icon tiles, each tinted by its meaning */

/* Processo: a path. A violet line runs through the step numbers */

/* Impacto: the outcomes on the dark canvas of the product, each a glass row with a lit check */

/* Aprendizados: glass cards with a glass icon tile; the lead one (AI) carries a violet edge */

/* lights, calmer: no more big blobs behind the chapters (they spilled over the edges between
   sections). The light now lives inside each stage and drifts toward the pointer */
#processo::before, #impacto::before { content: none; }
.cs-sol-block--light, .cs-sol-block--canvas, .cs-stage { --lx: 70%; --ly: 25%; }
.cs-sol-block--light > .stage-light, .cs-sol-block--canvas > .stage-light, .cs-stage > .stage-light {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
  background: radial-gradient(520px circle at var(--lx) var(--ly), rgba(123, 102, 240, 0.13), rgba(10, 108, 201, 0.05) 45%, transparent 70%);
}
.cs-sol-block--canvas > .stage-light {
  background: radial-gradient(560px circle at var(--lx) var(--ly), rgba(139, 120, 255, 0.24), rgba(47, 91, 234, 0.08) 45%, transparent 70%);
}
/* flatter stages: the fixed tints go, the shadow stays close to the card */
.cs-sol-block--light {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.46));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 18px 40px -28px rgba(43, 28, 120, 0.28);
}
.cs-sol-block--canvas {
  background: linear-gradient(180deg, #0D0A26, #140D38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 24px 50px -30px rgba(18, 11, 51, 0.55);
}
.cs-showcase::before { opacity: 0.6; }

/* Aprendizados: the icon sits beside the title, the text takes the card's full width below;
   every icon in the colored violet tile */

/* "Antigo vs. novo" on the dark canvas too: its list of changes in dark glass */

.cs-sol-block--canvas .cs-ba { box-shadow: 0 30px 60px -30px rgba(0,0,0,0.8); border-color: rgba(255,255,255,0.12); }
.cs-sol-block--canvas .cs-screen img { border-color: rgba(255,255,255,0.12); }

/* the portfolio is a dark stage on the light canvas: near-black glass panel, a blue light that trails
   the pointer behind the cards (motion.js stageLights), and dark glass cards whose screenshots glow on it.
   No backdrop blur: the panel covers moving lights, and re-blurring that big an area every frame stuttered */
#portfolio .fsec { isolation: isolate; border-radius: var(--panel-r, 0px);
  background: linear-gradient(160deg, #141418, #0B0B0E 60%, #09090B);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 30px 60px -30px rgba(0, 0, 0, 0.55); }
#portfolio .fsec-light { position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
  background: radial-gradient(680px circle at var(--lx, 70%) var(--ly, 25%), rgba(13, 153, 255, 0.16), rgba(0, 96, 208, 0.05) 45%, transparent 70%); }
#portfolio .fsec-tab { border-radius: 999px; padding: 4px 10px; background: rgba(255, 255, 255, 0.08); color: #E5E5E5; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08); }
#portfolio .frame-box { --frame-r: 20px;
  background: linear-gradient(160deg, #1B1B20, #141418);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 40px -24px rgba(0, 0, 0, 0.8); }
#portfolio .frame:hover .frame-box { border-color: rgba(13, 153, 255, 0.35); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 0 4px rgba(13, 153, 255, 0.12), 0 26px 50px -26px rgba(0, 0, 0, 0.9); }
#portfolio .frame-link { color: #F4F4F5; }

/* KITT "A solução": the whole chapter on the product's dark canvas, for a more immersive read;
   the two blocks become lifted panels on it */

/* =========================================================
   EuGestor: the KITT case's look, in the product's own colors.
   Navy from its menu and header for the canvas, blue for structure and light,
   the orange of the logo's "g" and of its buttons for actions.
   Scoped to body.cs-theme-eg, so KITT keeps its violet.
   ========================================================= */

/* A solução: the whole chapter on a navy canvas, dotted like a planning board */

/* the framed screens: a smoky blue mat, a pale-blue selection, a blue and orange glow behind */

/* panels on the canvas: dark blue glass */

/* "Ver a execução": the product's own call to action, an orange pill with a lit play disc */

/* glass pieces elsewhere: blue tiles and blue-tinted shadows instead of violet */

/* Visão geral: the card titles in the menu's navy, "O que eu fiz" in blue */

/* Processo: the path, in blue, with orange numbers as the product's steps */

/* Impacto: the outcomes on the navy canvas, glass rows with a lit check */

/* Aprendizados: blue tiles, the lead card with a blue edge */

/* screens that open full screen: a pale-blue light under the pointer and a blue edge */

/* Before / after in full screen: a glass button in the corner opens the same slider over a dark
   layer, as big as the screen allows at its own ratio, still draggable */
.cs-ba { --ba-ratio: 1.406; }

.cs-ba-full { position: absolute; top: 12px; right: 12px; z-index: 3; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border-radius: 12px; cursor: pointer;
  color: #fff; background: rgba(12, 18, 36, 0.55); border: 1px solid rgba(255, 255, 255, 0.35);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.5);
  transition: background 200ms var(--ease), transform 200ms var(--ease-out); }
.cs-ba-full:hover { background: rgba(12, 18, 36, 0.78); transform: scale(1.06); }
.cs-ba-full:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.cs-ba-layer { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; align-content: center; gap: 16px; padding: 64px 24px 56px;
  background: rgba(8, 12, 24, 0.94); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: baIn 220ms var(--ease) both; }
@keyframes baIn { from { opacity: 0; } to { opacity: 1; } }
.cs-ba-layer .cs-ba { width: min(100%, calc((100dvh - 140px) * var(--ba-ratio))); max-width: none; border-radius: 14px; border-color: rgba(255, 255, 255, 0.14); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9); }
.cs-ba-layer .cs-ba-full { display: none; }
.cs-ba-close { position: fixed; top: 16px; right: 16px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; cursor: pointer;
  color: #fff; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.28); transition: background 200ms var(--ease); }
.cs-ba-close:hover { background: rgba(255, 255, 255, 0.22); }
.cs-ba-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.cs-ba-tip { margin: 0; font-size: 13px; color: rgba(255, 255, 255, 0.6); text-align: center; }
html.has-ba-full, html.has-ba-full body { overflow: hidden; }
@media (max-width: 640px) { .cs-ba-full { top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 10px; } .cs-ba-layer { padding: 64px 8px 48px; } }

/* =========================================================
   Pitstop: the KITT case's look, in the product's own colors.
   Asphalt and pit wall for the canvas, chalk for text and lines, the series red for light and
   accents, the amber of "next race" for the play buttons, a red and white kerb on each block.
   Scoped to body.cs-theme-ps, so KITT and EuGestor keep their own.
   ========================================================= */

/* A solução: the whole chapter on asphalt, a red glow like brake lights */

/* the framed screens: a smoky chalk mat, a chalk selection, a red glow behind */

/* panels on the canvas: pit-wall glass */

/* the play buttons: the series red, like the site's own calls to action */

/* glass pieces elsewhere: chalk tiles, neutral shadows */

/* Visão geral: titles in asphalt, "O que eu fiz" in the series red */

/* Processo: the path on a kerb, red numbers like grid positions */

/* Impacto: the outcomes on asphalt, glass rows with an amber check */

/* Aprendizados: asphalt tiles, the lead card with a red edge and a red tile */

/* screens that open full screen: a chalk light under the pointer and a red edge */

/* the players: 1440 x 900 screens */

/* 1. the site, live: drawn at 1440 px and scaled to the frame, so it looks like the desktop */
.ps-live-poster { position: absolute; inset: 0; padding: 0; border: 0; background: none; cursor: pointer; display: block; width: 100%; }
.ps-live-poster img { display: block; width: 100%; height: 100%; object-fit: cover; will-change: transform; transition: filter 300ms var(--ease), transform 600ms var(--ease-out); }
.ps-live-poster:hover img { filter: brightness(0.7); transform: scale(1.015); }

.ps-live-poster:focus-visible { outline: none; }
/* the site opens over the page at the screen's own size, on a dark layer with a slim bar */

html.has-live-full, html.has-live-full body { overflow: hidden; }
/* over the live site the system cursor takes over: the page's own cursor and its tag stay out of the way */
html.has-live-full .me { display: none; }

/* 5. the circuits: the guide's own look, sized to the frame (100cqw = its width) */

/* phones, three across */

/* =========================================================
   Loopin case: the prototype's own dark night and cyan.
   Scoped to body.cs-theme-lp; the film is .lfilm (loopin-film.js).
   ========================================================= */

/* the film: the prototype's screens in a window, with a caption for each act */
.lfilm { position: relative; aspect-ratio: 16 / 9; overflow: hidden; container-type: inline-size; isolation: isolate; border-radius: inherit; color: #fff; font-family: var(--font-body);
  background: radial-gradient(60% 70% at 70% 20%, rgba(34, 211, 238, 0.22), transparent 70%), radial-gradient(45% 50% at 10% 95%, rgba(244, 114, 182, 0.14), transparent 70%), linear-gradient(180deg, #0A1114, #0F1B20); }
.lfilm * { box-sizing: border-box; }
.lf-window { position: absolute; left: 13cqw; top: 5cqw; width: 74cqw; border-radius: 1cqw; overflow: hidden; background: #0A1114;
  box-shadow: 0 2cqw 5cqw -1cqw rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(103, 232, 249, 0.16); }
.lf-chrome { display: flex; align-items: center; gap: 0.5cqw; height: 2.2cqw; padding: 0 1cqw; background: #101C21; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.lf-chrome i { width: 0.7cqw; height: 0.7cqw; border-radius: 50%; background: #23363D; }
.lf-chrome span { margin-left: 1cqw; font-size: 0.9cqw; color: rgba(255, 255, 255, 0.5); }
.lf-screen { position: relative; aspect-ratio: 16 / 10; }
.lf-shot { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 500ms var(--ease); }
.lf-shot.on { opacity: 1; }
.lfilm .kf-cur { opacity: 0; color: #0891B2; transition-property: left, top, opacity; }
.lfilm .kf-cur.on { opacity: 1; }
.lfilm .kf-cur b { background: #0891B2; }
.lfilm .kf-cur.is-click::after { border-color: #67E8F9; }
.lf-act { position: absolute; left: 3cqw; bottom: 3cqw; z-index: 6; display: inline-flex; align-items: center; gap: 0.8cqw; margin: 0; padding: 0.9cqw 1.6cqw; border-radius: 99px;
  font-size: 1.6cqw; font-weight: 600; letter-spacing: -0.01em; color: #fff; background: rgba(10, 17, 20, 0.78); border: 1px solid rgba(103, 232, 249, 0.35);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; translate: 0 0.6cqw; transition: opacity 300ms var(--ease), translate 400ms var(--ease-out); }
.lf-act.on { opacity: 1; translate: 0 0; }
.lf-act i { width: 0.8cqw; height: 0.8cqw; border-radius: 50%; background: #22D3EE; box-shadow: 0 0 0 0.35cqw rgba(34, 211, 238, 0.22); }
.lfilm.is-paused .lf-act i { background: rgba(255, 255, 255, 0.5); box-shadow: none; }
/* as the card cover on the home page (4:3 box) */
.frame-thumb .lfilm { aspect-ratio: auto; height: 100%; isolation: auto; border-radius: 0; }
.frame-thumb .lf-window { left: 5cqw; top: 9cqw; width: 90cqw; }
.frame-thumb .lf-act { font-size: 2.6cqw; padding: 1.2cqw 2.2cqw; }

/* A solução: the whole chapter in the product's night, a cyan glow */

/* the players: 1440 x 900 screens of the prototype */

/* the pitch that opens the solution: describe, the agents work, you decide */

/* Pesquisa: the market in three levels, then the gaps Loopin takes */

/* Decisões: each trade-off with the options weighed and the one that won */

/* buttons, stat and learnings in Loopin cyan */

/* the dark/light compare uses the prototype screens, 16:10 like the players */

/* the glass, borders and pointer light that KITT tints violet, in Loopin cyan */

/* the floating lights behind the chapter, the pointer light in the blocks and the compare's backdrop */

/* the rest of the page's lights and accents, out of KITT violet */

/* =========================================================
   Glossário de Product Design (/glossario/, built by scripts/build-seo.mjs)
   ========================================================= */
.gl { padding: calc(var(--space-8) + var(--space-5)) 0 var(--space-8); }
.gl-article, .gl-index {
  background: var(--paper);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6) var(--space-6) var(--space-5);
}
.gl-index { max-width: 960px; }
.gl-crumbs { display: flex; flex-wrap: wrap; gap: var(--space-2); font-size: 14px; color: var(--color-muted-foreground); margin-bottom: var(--space-5); }
.gl-crumbs a { color: inherit; }
.gl-crumbs a:hover { color: var(--ink); }
.gl-crumbs [aria-current] { color: var(--ink); }
.gl-title { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 var(--space-3); text-wrap: balance; }
.gl-aka { color: var(--color-muted-foreground); font-size: 15px; margin: 0 0 var(--space-4); }
.gl-aka span { color: var(--color-secondary); font-weight: 500; }
.gl-short, .gl-lead { font-size: clamp(19px, 1.7vw, 22px); line-height: 1.5; color: var(--color-secondary); margin: 0 0 var(--space-5); text-wrap: pretty; }
.gl-short { border-left: 3px solid var(--select); padding-left: var(--space-3); color: var(--ink); }
.gl-article h2 { font-size: 22px; margin: var(--space-6) 0 var(--space-3); }
.gl-article p, .gl-article li { font-size: 17px; line-height: 1.65; color: var(--color-secondary); }
.gl-article p { margin: 0 0 var(--space-3); }
.gl-tips { padding-left: 1.2em; margin: 0; }
.gl-tips li { margin-bottom: var(--space-2); }
.gl-tips li::marker { color: var(--select-ink); }
.gl-case {
  margin: var(--space-6) 0 0;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--select) 7%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--select) 30%, transparent);
}
.gl-case-label { font-size: 13px !important; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--select-ink) !important; margin-bottom: var(--space-2) !important; }
.gl-case-link, .gl-byline a { font-weight: 600; color: var(--select-ink); }
.gl-related { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.gl-related a, .gl-letters a {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--color-border); background: var(--paper);
  color: var(--ink); text-decoration: none; font-size: 15px;
  transition: border-color var(--duration-fast) var(--ease), background-color var(--duration-fast) var(--ease);
}
.gl-related a:hover, .gl-letters a:hover { border-color: var(--select); background: color-mix(in srgb, var(--select) 6%, var(--paper)); }
.gl-byline { margin-top: var(--space-6) !important; padding-top: var(--space-4); border-top: 1px solid var(--canvas-line); font-size: 15px !important; }
.gl-search input {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 17px;
  padding: 14px 16px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--paper);
}
.gl-search input:focus { outline: 2px solid var(--select); outline-offset: 1px; border-color: transparent; }
.gl-letters { display: flex; flex-wrap: wrap; gap: 6px; margin: var(--space-4) 0 var(--space-5); }
.gl-letters a { padding: 4px 11px; font-size: 14px; font-weight: 600; }
.gl-group { scroll-margin-top: 120px; }
.gl-group h2 { font-size: 20px; margin: var(--space-5) 0 var(--space-2); color: var(--select-ink); }
.gl-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-2); }
.gl-list a {
  display: flex; flex-direction: column; gap: 4px; height: 100%; box-sizing: border-box;
  padding: var(--space-3); border-radius: var(--radius-md); border: 1px solid var(--canvas-line);
  color: inherit; text-decoration: none; transition: border-color var(--duration-fast) var(--ease), box-shadow var(--duration-fast) var(--ease);
}
.gl-list a:hover { border-color: var(--select); box-shadow: var(--shadow-sm); }
.gl-list strong { font-family: var(--font-heading); font-size: 17px; }
.gl-list span { font-size: 14px; line-height: 1.5; color: var(--color-muted-foreground); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.gl-empty { color: var(--color-muted-foreground); }
@media (max-width: 640px) {
  .gl { padding-top: calc(var(--space-8) + var(--space-3)); }
  .gl-article, .gl-index { padding: var(--space-4) var(--space-3); border-radius: var(--radius-md); }
  .gl > .container { margin: 0 var(--space-3); }
}

/* exit survey (analytics.js): rendered only when the "exit-survey" flag is on in PostHog */
.ws-survey { padding: var(--space-6) 0; }
.ws-survey .container { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.ws-survey-q { margin: 0; font-weight: 600; }
.ws-survey-a { display: flex; gap: var(--space-2); }
.ws-survey-more { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-2); width: 100%; }
.ws-survey-more[hidden], .ws-survey-a[hidden] { display: none; }
.ws-survey-more label { display: grid; gap: var(--space-1); flex: 1 1 280px; }
.ws-survey-more textarea { font: inherit; padding: var(--space-2); border: 1px solid currentColor; border-radius: var(--radius-md); background: transparent; color: inherit; resize: vertical; }

/* phones: more air around the cases (above the title, below the last card), a smaller title, and a footer
   with a lot of room above and below the giant name, so it stands out */
@media (max-width: 599px) {
  #portfolio .fsec { padding-top: 80px; }
  
  #portfolio .project-grid.pf-rail { padding: 40px var(--edge) 104px; }
  html:has(.site-footer) .site-footer { padding-top: 160px; padding-bottom: 128px; }
  html:has(.site-footer) .site-footer .footer-giant { margin-bottom: 64px; }
}

/* =========================================================
   Case pages with the current chrome (body.cs-chrome: KITT, Loopin, EuGestor, Pitstop): the home's
   floating header and dark footer (rules above), no bottom toolbar, and the same grids as the home
   ========================================================= */
/* "Other projects" ends the page right above the footer: the footer's dark tone and grid, so the two read as one */
/* ...and the cover at the top of the page is drawn the same way: the page opens dark, under the floating
   header (it reaches up behind the header, so no light strip is left above it) */
.cs-chrome .more-work, .cs-chrome .cs-hero--film {
  background-color: #09090B;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: -1px -1px;
}
/* the footer keeps its own room (a rule for pages ending on .more-work cut it down) */
html:has(.cs-chrome) main:has(> .more-work) + .site-footer { padding-top: var(--space-6); }
/* the light stages had a second, finer grid of their own fading over them: only the page's grid now */
.cs-chrome .cs-sol-block--light::before { content: none; }
@media (max-width: 599px) {
  html:has(.cs-chrome) main:has(> .more-work) + .site-footer { padding-top: 160px; }
}
/* where the case ends, its index fades out instead of scrolling up through the floating header (script.js) */
.cs-chrome .cs-toc { transition: opacity 250ms var(--ease), visibility 0s linear 0s; }
.cs-chrome .cs-toc.is-away { opacity: 0; visibility: hidden; transition: opacity 250ms var(--ease), visibility 0s linear 250ms; }
/* no index bar under the header any more: the cover keeps the same room above it that the bar's
   "+ .cs-hero--film" rule used to give */
.cs-chrome .cs-hero--film { margin-top: calc(-1 * var(--header-h, 56px)); padding-top: calc(var(--header-h, 56px) + var(--space-5)); }
/* the overview under the cover is gone: the cover keeps some room before the solution's dark stage */
.cs-chrome .cs-hero--film { padding-bottom: var(--space-6); }
/* "Other projects" follows the solution right away: no light band between the two dark sections */
.cs-chrome .more-work { margin-top: 0; }

/* pages that still have the bottom toolbar (glossary, older cases): the body's room for it showed under the
   dark footer as a light strip; the footer keeps that room inside itself instead */
html:has(.toolbar) body { padding-bottom: 0; }
html:has(.toolbar) .site-footer { padding-bottom: 168px; }
/* and pages with no toolbar at all (contact) keep no room for one below the footer */
html:not(:has(.toolbar)) body { padding-bottom: 0; }

/* the home's projects panel: the same solid dark as "Other projects" and the footer, and instead of their
   grid, the dotted canvas of the cases' solution stages (22px apart), a little fainter */
html:has(.hero) #portfolio .fsec {
  background-color: #09090B;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1.2px);
  background-size: 22px 22px;
}

/* "Other projects" cards: dark like the section around them (no white caption block); a shade lighter than
   the section and a hairline edge so the card still reads as one piece, the name in white, the line under it in gray */
.more-work .frame-box { background: #141418; border: 1px solid rgba(255, 255, 255, 0.08); }
.more-work .frame-link, .more-work .ft-name { color: #F4F4F5; }
.more-work .ft-desc { color: #A1A1AA; }

/* Case covers in full screen (script.js): the before/after's glass button, at the cover's top right, and the
   cover in its dark layer as big as the screen allows at its own proportions, still playing */
.cs-hero-image { position: relative; }
.cs-cover-layer .cs-hero-image { width: min(100%, calc((100dvh - 120px) * var(--cover-ratio, 1.7778))); max-width: none; margin: 0;
  border-radius: 14px; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9); }
.cs-cover-layer .cs-hero-image img { max-height: none; }
.cs-cover-layer .cs-cover-full { display: none; }

/* Full screen layers on phones: when the browser's bars move, the strip they uncover showed the light page
   (white at the bottom). Behind the layer the page turns the layer's dark, and the layer's shade reaches past
   the screen's edges */
html.has-ba-full, html.has-ba-full body { background: #080C18; }
.cs-ba-layer { box-shadow: 0 0 0 100vmax rgba(8, 12, 24, 0.94); }

/* Loopin film, steadier (Safari above all): it lays out and paints on its own like the other films, its camera
   keeps one GPU layer, and only the screen on show (and the one fading out) is drawn, not all eight at once */
.lfilm { contain: layout paint style; }
.lfilm .lens-stage { will-change: transform; }
.lf-shot { visibility: hidden; transition: opacity 500ms var(--ease), visibility 0s linear 500ms; }
.lf-shot.on { visibility: visible; transition: opacity 500ms var(--ease), visibility 0s linear 0s; }

/* Loopin film: the flow at work (loopin-film.js). Over the "flow applied" screen each block lights up in
   turn, a pulse runs along the wires and down the branch that asks for approval; a status pill says where it is */
.lf-run { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity 300ms var(--ease); }
.lf-run.on { opacity: 1; }
.lf-node { position: absolute; border-radius: 0.55cqw; transition: box-shadow 300ms var(--ease), background-color 300ms var(--ease), opacity 300ms var(--ease); }
.lf-node.on { background-color: rgba(34, 211, 238, 0.14); box-shadow: 0 0 0 0.16cqw #22D3EE, 0 0 1.8cqw 0.2cqw rgba(34, 211, 238, 0.55); animation: lfNode 900ms ease-in-out infinite alternate; }
.lf-node.done { box-shadow: 0 0 0 0.12cqw rgba(52, 211, 153, 0.9); }
.lf-node.done::after { content: "✓"; position: absolute; right: -0.5cqw; top: -0.5cqw; display: grid; place-items: center; width: 1.05cqw; height: 1.05cqw; border-radius: 50%;
  background: #10B981; color: #04241A; font: 800 0.7cqw/1 var(--font-body); }
.lf-node.skip { background-color: rgba(10, 17, 20, 0.55); }
@keyframes lfNode { to { box-shadow: 0 0 0 0.16cqw #67E8F9, 0 0 2.6cqw 0.45cqw rgba(34, 211, 238, 0.4); } }
.lf-pulse { position: absolute; left: 25.9%; top: 53.3%; width: 0.9cqw; height: 0.9cqw; margin: -0.45cqw 0 0 -0.45cqw; border-radius: 50%; opacity: 0;
  background: #A5F3FC; box-shadow: 0 0 0.8cqw 0.35cqw rgba(103, 232, 249, 0.85); transition-property: left, top, opacity; transition-timing-function: cubic-bezier(0.45, 0, 0.2, 1); }
.lf-pulse.live { opacity: 1; }
.lf-status { position: absolute; left: 44.8%; top: 13%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 0.5cqw; padding: 0.45cqw 0.9cqw; border-radius: 99px;
  white-space: nowrap; font: 600 0.85cqw/1.2 var(--font-body); color: #E6FBFF; background: rgba(10, 17, 20, 0.92); border: 1px solid rgba(103, 232, 249, 0.45);
  box-shadow: 0 0.6cqw 1.6cqw -0.4cqw rgba(0, 0, 0, 0.7); }
.lf-status i { width: 0.6cqw; height: 0.6cqw; border-radius: 50%; background: #22D3EE; animation: lfBlink 700ms ease-in-out infinite alternate; }
.lf-status.is-done { border-color: rgba(52, 211, 153, 0.55); }
.lf-status.is-done i { background: #34D399; animation: none; }
@keyframes lfBlink { to { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .lf-node.on, .lf-status i { animation: none; } }

/* Touch screens (phones, iPad): pulled past the top or the end, the page stretched and showed a light band
   behind it (the rubber band). The page now stops at its edges */
html, body { overscroll-behavior-y: none; }

/* What shows past the page (below the footer when a phone's browser bars move, the home-indicator strip, a
   page shorter than the screen) is the root's background. With none of its own, it took the body's light
   canvas: a white band under the dark footer. The root is the footer's dark; the body keeps its light canvas */
html { background-color: #09090B; }

/* =========================================================
   Home: case studies as plain cards (in the spirit of guglieri.com/work). Each card is a light
   gray tile with the project's cover sitting in the middle like a product shot, and the name and
   kind of work under it. No panel, no carousel, no tilt: the markup no longer uses .fsec,
   .project-grid or .pf-rail, so the older rules above don't reach it.
   ========================================================= */
html:has(.hero) #portfolio.work { padding: clamp(16px, 2vw, 32px) 0 clamp(72px, 9vw, 144px); background: #fff; }
.work-inner { padding: 0 clamp(8px, 1vw, 16px); }
.work-heading { margin: 0 0 clamp(24px, 3vw, 44px); padding-left: 8px; font-family: var(--font-heading); font-size: clamp(36px, 5vw, 72px); font-weight: 700; line-height: 1; letter-spacing: -0.035em; color: var(--ink); }
.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 3vw, 48px) 8px; }
@media (max-width: 699px) { .work-grid { grid-template-columns: minmax(0, 1fr); } }
.work-card { margin: 0; }
#portfolio .work-link { display: block; color: var(--ink); }
.work-media {
  display: grid;
  place-items: center;
  aspect-ratio: 5 / 4;
  overflow: hidden;
  border-radius: 12px;
  background: #EFEFEF;
}
/* every screen gets the same frame (16:10, the most common shape of the prints), so the cards line up;
   a taller print fills it from the top, keeping its header and losing a strip at the bottom */
.work-media img {
  display: block;
  width: 74%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 28px 56px -28px rgba(0, 0, 0, 0.4);
  transition: scale 700ms cubic-bezier(0.22, 1, 0.36, 1);
}
.work-link:hover .work-media img { scale: 1.035; }
.work-link:focus-visible { outline: none; }
.work-link:focus-visible .work-media { outline: 2px solid var(--select); outline-offset: 3px; }
.work-name, .work-tags { display: block; padding: 0 8px; font-size: 15px; line-height: 1.35; }
.work-name { margin-top: 12px; font-weight: 700; }
.work-tags { color: #6E6E73; }
@media (prefers-reduced-motion: reduce) { .work-media img { transition: none; } }

/* =========================================================
   Home in two columns (guglieri.com/about-like): the headline holds the left half of the screen,
   title at the top and the name at the foot of the screen, while the cases scroll by on the right,
   one per row. Below 1000px they stack: headline on the first screen (name at its foot), cases after.
   ========================================================= */
.home-split .hero { justify-content: flex-start; padding: clamp(24px, 4svh, 48px) 0; }
.home-split .hero > .container.hero-grid { flex: 1; display: flex; flex-direction: column; }
.home-split .hero-copy { flex: 1; display: flex; flex-direction: column; }
.home-split .hero-who { margin-top: auto; padding-top: 32px; }
@media (min-width: 1000px) {
  /* both columns end on the same line: the hero and the cases share one bottom padding (--split-end),
     and the room before the footer sits outside the split, so the held headline leaves with the last case */
  .home-split { --split-end: clamp(24px, 3svh, 40px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; margin-bottom: clamp(48px, 6vw, 104px); }
  .home-split .hero {
    position: sticky;
    top: calc(var(--ruler) + var(--header-h, 56px));
    height: calc(100svh - var(--header-h, 56px));
    min-height: 0;
    padding: clamp(16px, 2vw, 32px) 0 var(--split-end);
  }
  .home-split .hero > .container.hero-grid { padding-left: var(--edge); padding-right: clamp(16px, 2vw, 32px); }
  .home-split .hero-title { font-size: clamp(32px, min(calc((50vw - 2 * var(--edge)) / 9), 14svh), 128px); }
  .home-split .hero-title:lang(en) { font-size: clamp(32px, min(calc((50vw - 2 * var(--edge)) / 10.5), 14svh), 128px); }
  html:has(.hero) .home-split #portfolio.work { padding-top: clamp(16px, 2vw, 32px); padding-bottom: var(--split-end); padding-right: calc(var(--edge) - clamp(8px, 1vw, 16px)); }
  .home-split .work-grid { grid-template-columns: minmax(0, 1fr); }
}

/* =========================================================
   Case page, gallery layout (in the spirit of guglieri.com/work/composer): the name, the film on a
   drawing board with rulers, a short text, then only screens. Turned on per page by body.cs-layout-gallery
   (Pitstop first); the older case styles are left as they are for the other pages.
   ========================================================= */
/* --cx-dark and --cx-accent are each project's own two colours, set on the page's <main> */
.cs-layout-gallery { --cx-pad: 16px; --cx-gray: #F2F2F2; --cx-dark: #16181D; --cx-accent: #E10600;
  /* the cover's own measures, shared so the name and the intro start exactly where the film does: the
     rulers' thickness, the board's side margin, and the film's left edge inside the page */
  --ru: 24px; --cx-side: clamp(16px, 7vw, 140px); --cx-left: calc(var(--ru) + var(--cx-side)); }
/* the film is held to 1600 px and centred on very wide screens: the same shift, for the text above and below it
   (a padding % is a share of the page column, the width the cover itself has) */
.cx-head, .cx-intro { padding-left: calc(var(--cx-left) + max(0px, (100% - var(--cx-left) - var(--cx-side) - 1600px) / 2)); padding-right: var(--cx-side); }
/* the page is plain white end to end, with no canvas grid */
body.cs-layout-gallery { background-image: linear-gradient(#fff, #fff); background-size: auto; background-position: 0 0; }
.cx { padding: 0 var(--cx-pad); }
.cx h1, .cx h2 { font-family: var(--font-heading); letter-spacing: 0; }

/* the name: tags on the left half, the name on the right half, as in the reference */
.cx-head { display: flex; flex-direction: column; gap: 10px; padding-top: clamp(32px, 5vw, 72px); padding-bottom: clamp(16px, 2vw, 24px); } /* the name on the left, the tags under it */
.cx-tags { order: 2; color: #8A8A8E; font-size: 15px; }
.cx-title { font-size: clamp(44px, 4.6vw, 72px); font-weight: 700; line-height: 1; letter-spacing: -0.035em; }

/* the cover: the film on a white drawing board, rulers along the top and the left, a light grid and two
   dotted guides at an angle */
.cx-cover {
  position: relative;
  overflow: hidden;
  padding: calc(var(--ru) + clamp(28px, 4vw, 72px)) var(--cx-side) clamp(32px, 5vw, 96px) var(--cx-left);
  background-color: #fff;
  background-image:
    linear-gradient(var(--cx-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--cx-grid) 1px, transparent 1px);
  background-size: 80px 80px;
  background-position: var(--ru) var(--ru);
  border-top: 1px solid #E6E6E6;
  border-bottom: 1px solid #E6E6E6;
}
.cx-ruler { position: absolute; z-index: 1; background-color: #fff; color: #B8B8BC; font-size: 10px; line-height: 1; pointer-events: none; }
.cx-ruler--top {
  left: var(--ru); right: 0; top: 0; height: var(--ru);
  border-bottom: 1px solid #DCDCDC;
  background-image:
    repeating-linear-gradient(90deg, #D2D2D6 0 1px, transparent 1px 80px),
    repeating-linear-gradient(90deg, #D2D2D6 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, #E2E2E5 0 1px, transparent 1px 8px);
  background-size: 100% 100%, 100% 45%, 100% 25%;
  background-position: 0 100%;
  background-repeat: no-repeat;
}
.cx-ruler--left {
  top: var(--ru); bottom: 0; left: 0; width: var(--ru);
  border-right: 1px solid #DCDCDC;
  background-image:
    repeating-linear-gradient(180deg, #D2D2D6 0 1px, transparent 1px 80px),
    repeating-linear-gradient(180deg, #D2D2D6 0 1px, transparent 1px 40px),
    repeating-linear-gradient(180deg, #E2E2E5 0 1px, transparent 1px 8px);
  background-size: 100% 100%, 45% 100%, 25% 100%;
  background-position: 100% 0;
  background-repeat: no-repeat;
}
.cx-cover::before { /* the corner where the rulers meet */
  content: ""; position: absolute; z-index: 2; left: 0; top: 0; width: var(--ru); height: var(--ru);
  background: #fff; border-right: 1px solid #DCDCDC; border-bottom: 1px solid #DCDCDC;
}
.cx-ruler b { position: absolute; font-weight: 500; font-variant-numeric: tabular-nums; } /* numbers, from script.js */
.cx-ruler--top b { top: 3px; translate: 3px 0; }
.cx-ruler--left b { left: 3px; translate: 0 3px; writing-mode: vertical-rl; rotate: 180deg; }
.cx-guides { position: absolute; inset: 0; pointer-events: none; }
.cx-guides i { position: absolute; width: 140%; border-top: 1px dashed #D6D6DA; transform-origin: 0 0; }
.cx-guides i:nth-child(1) { left: 6%; top: 8%; rotate: 24deg; }
.cx-guides i:nth-child(2) { left: 58%; top: 100%; rotate: -52deg; }
.cx-cover-frame { position: relative; z-index: 1; max-width: 1600px; margin: 0 auto; }
.cx-cover .cs-hero-image { margin: 0; border-radius: 12px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 40px 80px -36px rgba(0, 0, 0, 0.45); }

/* what it is: only text, on the right half */
.cx-intro { display: grid; grid-template-columns: 1fr 1fr; gap: var(--cx-pad); padding-top: clamp(48px, 7vw, 120px); padding-bottom: clamp(56px, 8vw, 140px); }
.cx-intro-text { grid-column: 1; max-width: 30em; } /* on the left half, lined up with the name */
.cx-lead { font-size: clamp(20px, 1.9vw, 28px); line-height: 1.3; letter-spacing: -0.01em; color: #111; }
.cx-credits { margin-top: 32px; font-size: 14px; color: #6E6E73; }
.cx-credits a { color: #111; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.cx-credits a:hover { color: #6E6E73; }

/* a block: a small label (title and one grey line), then images */
.cx-block { padding-bottom: clamp(40px, 5vw, 72px); }
.cx-label { margin-bottom: 12px; }
.cx-label h2 { font-size: 13px; font-weight: 700; line-height: 1.35; color: #111; }
.cx-label p { font-size: 13px; line-height: 1.35; color: #8A8A8E; }

/* a screen: rounded, lifted a little off its tile */
.cx-shot { position: relative; }
.cx-shot img { display: block; width: 100%; height: auto; border-radius: 8px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 18px 40px -22px rgba(0, 0, 0, 0.45); cursor: zoom-in; }

/* the gallery: six screens, three by two, on one light grey board */
/* every screen in the same 16:10 frame, filled from the top left, so the rows line up whatever the print's shape */
.cx-gallery .cx-shot img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.cx-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 28px); padding: clamp(16px, 3vw, 56px); border-radius: 16px; background: var(--cx-gray); }

/* the tiles: two per row, each a board of its own colour with a screen on it */
.cx-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cx-tile { position: relative; display: grid; place-items: center; margin: 0; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 16px; padding: 7% 9%; }
.cx-tile--gray { background: var(--cx-gray); }
.cx-tile--dark { background: var(--cx-dark); }
.cx-tile--accent { background: var(--cx-accent); }
.cx-tile .cx-shot { width: 100%; }
/* a screen taller than the tile (a design-system board, say) fits inside it instead of being cut */
.cx-tile:not(.cx-tile--crop):not(.cx-tile--phones) .cx-shot { height: 100%; display: flex; align-items: center; justify-content: center; }
.cx-tile:not(.cx-tile--crop):not(.cx-tile--phones) .cx-shot img { width: auto; height: auto; max-width: 100%; max-height: 100%; }
.cx-tile--dark .cx-shot img { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 24px 48px -24px rgba(0, 0, 0, 0.8); }
.cx-tile--accent .cx-shot img { box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.45); }
/* a close-up: the screen larger, running off the tile's right and bottom edges */
.cx-tile--crop { place-items: start; padding: 9% 0 0 9%; }
.cx-tile--crop .cx-shot { width: 135%; }
.cx-tile--crop .cx-shot img { border-radius: 10px 0 0 0; }
/* the phones: one wide tile, the phones standing side by side */
.cx-tile--wide { grid-column: 1 / -1; aspect-ratio: 21 / 9; }
.cx-tile--wide:not(.cx-tile--phones) { aspect-ratio: auto; padding: 5% 8%; }
/* (as specific as the rule that fits screens inside a tile, which it has to beat) */
.cx-tile.cx-tile--wide:not(.cx-tile--crop):not(.cx-tile--phones) .cx-shot, .cx-tile.cx-tile--wide:not(.cx-tile--crop):not(.cx-tile--phones) .cx-shot img { width: 100%; height: auto; max-width: 100%; max-height: none; }
.cx-tile--phones { display: flex; justify-content: center; align-items: center; gap: clamp(16px, 4vw, 72px); padding: 5% 6%; }
/* sized to stand within the tile's height (a phone is about 2.2 times as tall as it is wide); beats the
   tiles' own 100% width for a screen */
.cx-tile--phones .cx-phone { width: clamp(80px, 14vw, 230px); flex: none; }
.cx-phone img { border-radius: 22px; box-shadow: 0 0 0 6px #111, 0 30px 60px -28px rgba(0, 0, 0, 0.55); }

/* other projects: the home's cards, three in a row */
.cx-more { padding: clamp(40px, 6vw, 96px) 0 clamp(56px, 8vw, 120px); }
.cx-more .work-heading { padding-left: 8px; margin-bottom: clamp(20px, 2.4vw, 32px); font-family: var(--font-heading); font-size: clamp(32px, 4vw, 56px); font-weight: 700; line-height: 1; letter-spacing: -0.035em; }
.work-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* on a case page the footer runs straight on from the white page */
html:has(.cs-layout-gallery) .site-footer { padding-top: var(--space-5); }

@media (max-width: 899px) {
  .cx-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cx-tiles { grid-template-columns: minmax(0, 1fr); }
  .cx-tile--wide { aspect-ratio: 4 / 3; }
  .work-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 599px) {
  .cx-intro { grid-template-columns: minmax(0, 1fr); }
  .cx-intro-text { grid-column: 1; }
  .cs-layout-gallery { --ru: 14px; --cx-side: 12px; }
  .cx-cover { padding: calc(var(--ru) + 20px) var(--cx-side) 24px var(--cx-left); }
  .cx-ruler b { display: none; }
  .cx-gallery { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .cx-tile--phones { gap: 10px; padding: 6% 4%; }
  .cx-tile--phones .cx-phone { width: 24%; }
  .cx-phone img { border-radius: 14px; box-shadow: 0 0 0 4px #111, 0 20px 40px -20px rgba(0, 0, 0, 0.5); }
  .work-grid--3 { grid-template-columns: minmax(0, 1fr); }
}

/* case page, film first: the board with the film opens the page right under the header, and the name
   moves down beside the text, split in two halves as on the home (name and tags on the left, the text
   from the start of the right half).
   - the page's sides follow the header's edge (--edge), so the name, the header's logo and the image
     boxes all start on one line
   - the film (16:9) is never taller than 80% of the screen, so it's never cut off on a wide, low screen */
.cs-layout-gallery { --cx-pad: var(--edge); }
/* the board is exactly one screen tall (minus the header), on every device, and the film sits in the
   middle of it both ways: the same gap above and below it under the top ruler, and the same at its sides
   right of the left ruler. The film is held to 80% of the screen and to the board's room inside those
   gaps, so it's never cut off. A full-height board also means the text below starts at the screen's
   bottom on load, so the parallax's easing (below) never begins before the visitor scrolls */
.cx-cover {
  --cover-h: calc(100svh - var(--ruler) - var(--header-h, 56px));
  --cover-gap: clamp(20px, 4vw, 64px);
  height: var(--cover-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--ru) + var(--cover-gap)) var(--cx-side) var(--cover-gap) var(--cx-left);
}
.cx-cover-frame {
  flex: 1 1 auto;
  width: 100%;
  margin: 0;
  max-width: min(1600px, calc(min(80svh, var(--cover-h) - var(--ru) - 2 * var(--cover-gap)) * 16 / 9));
}
.cx-intro { padding-left: 0; padding-right: 0; column-gap: 0; align-items: start; }
.cx-intro .cx-head { padding: 0 var(--edge) 0 0; gap: 12px; }
.cx-intro .cx-title { font-size: clamp(48px, 7vw, 128px); line-height: 0.9; }
.cx-intro .cx-intro-text { grid-column: 2; max-width: 34em; padding-left: clamp(8px, 1vw, 16px); } /* as the home's cases sit in their half */
@media (max-width: 599px) {
  .cx-intro .cx-intro-text { grid-column: 1; padding-left: 0; margin-top: 32px; }
}

/* parallax: the board with the film holds still under the header while the details and images scroll up
   over it (they're opaque and sit above it); as the text comes in, the film eases back, a little smaller
   and fainter. The easing is scroll-driven (timeline from .cx-intro, shared through timeline-scope), so
   browsers without scroll timelines, and reduced motion, keep the covering without it */
.cx { timeline-scope: --cx-next; }
.cx-cover { position: sticky; top: calc(var(--ruler) + var(--header-h, 56px)); z-index: 0; }
.cx-cover ~ * { position: relative; z-index: 1; background-color: #fff; }
.cx-intro { view-timeline: --cx-next block; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .cx-cover-frame {
      animation: cx-recede linear both;
      animation-timeline: --cx-next;
      /* starts a little after the text enters (on load it already peeks in at the bottom, so the film opens
         at full size) and is done when the text reaches the middle of the screen */
      animation-range: cover 8% cover 50%;
    }
    /* the grid goes first, and all the way: its lines turn white and the rulers, the guides and their
       corner fade out, done when the text is a third of the way up; the film keeps fading after that */
    .cx-cover, .cx-ruler, .cx-guides, .cx-cover::before { animation-timeline: --cx-next; animation-range: cover 8% cover 30%; animation-fill-mode: both; animation-timing-function: linear; }
    .cx-cover { animation-name: cx-grid-out; }
    .cx-ruler, .cx-guides, .cx-cover::before { animation-name: cx-gone; }
  }
}
@keyframes cx-recede { to { scale: 0.92; opacity: 0.45; } }
/* the grid lines colour is a registered property, so it can be animated (to white: gone) */
@property --cx-grid { syntax: "<color>"; inherits: true; initial-value: #EFEFEF; }
/* the board's top and bottom edge lines go with it */
@keyframes cx-grid-out { to { --cx-grid: #fff; border-top-color: transparent; border-bottom-color: transparent; } }
@keyframes cx-gone { to { opacity: 0; } }
/* phones: a one-screen board left the small film alone in a sea of grid, so there it keeps its natural
   height (just around the film). The text then starts mid-screen on load, so the easing follows the
   page's own scroll instead (none at the top, done after half a screen) and the film still opens full */
@media (max-width: 599px) {
  .cx-cover { height: auto; padding: calc(var(--ru) + 20px) var(--cx-side) 24px var(--cx-left); }
  .cx-cover-frame { max-width: none; }
}
@supports (animation-timeline: scroll()) {
  @media (max-width: 599px) and (prefers-reduced-motion: no-preference) {
    .cx-cover-frame { animation-timeline: scroll(root); animation-range: 0 50svh; }
    .cx-cover, .cx-ruler, .cx-guides, .cx-cover::before { animation-timeline: scroll(root); animation-range: 0 25svh; }
  }
}

/* =========================================================
   Case pages: the design system board at the end of each case. Six cards built in HTML (no screenshots),
   like the first act of the case films: colours, type, and the product's own pieces. One component for
   the four cases; each one sets its colours with a cx-ds--<case> class.
   ========================================================= */
.cx-ds {
  --ds-bg: #16181D; --ds-card: #1F2228; --ds-line: rgba(255, 255, 255, 0.08); --ds-ink: #F4F4F5; --ds-muted: #8D929C; --ds-accent: #E10600; --ds-soft: rgba(255, 255, 255, 0.06);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.3vw, 18px);
  padding: clamp(16px, 3.5vw, 64px); border-radius: 16px; background: var(--ds-bg); color: var(--ds-ink);
}
.cx-ds--kitt { --ds-bg: #0B0920; --ds-card: #15122C; --ds-line: rgba(160, 150, 255, 0.12); --ds-ink: #F2F0FF; --ds-muted: #8E89B8; --ds-accent: #7B66F0; --ds-soft: rgba(123, 102, 240, 0.14); }
.cx-ds--loopin { --ds-bg: #0A1114; --ds-card: #111B1F; --ds-line: rgba(255, 255, 255, 0.08); --ds-ink: #E8F3F5; --ds-muted: #7F959B; --ds-accent: #22CBE3; --ds-soft: rgba(34, 203, 227, 0.12); }
.cx-ds--eugestor { --ds-bg: #E6ECF5; --ds-card: #fff; --ds-line: rgba(31, 41, 55, 0.06); --ds-ink: #1F2937; --ds-muted: #6B7280; --ds-accent: #F28A2B; --ds-soft: #EEF2F8; }
.cx-ds--eugestor .cx-ds-card { box-shadow: 0 1px 2px rgba(31, 41, 55, 0.05), 0 18px 36px -22px rgba(31, 41, 55, 0.3); }
.cx-ds-card {
  display: flex; flex-direction: column; justify-content: center; gap: 14px; min-width: 0;
  min-height: clamp(170px, 15vw, 240px); padding: clamp(16px, 1.8vw, 28px);
  border: 1px solid var(--ds-line); border-radius: 14px; background: var(--ds-card);
  font-size: 14px; line-height: 1.3;
}
.cx-ds-card > small { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ds-muted); }
.cx-ds svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* colours: a bar of swatches with a thin neutral ramp under it, or named dots */
.cx-ds-bar { display: flex; height: clamp(40px, 4vw, 56px); border-radius: 10px; overflow: hidden; }
.cx-ds-bar i, .cx-ds-ramp i { flex: 1; background: var(--c); }
.cx-ds-ramp { display: flex; height: 12px; border-radius: 6px; overflow: hidden; }
.cx-ds-dots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 8px; text-align: center; font-size: 12px; color: var(--ds-muted); }
.cx-ds-dots span { display: grid; justify-items: center; gap: 6px; }
.cx-ds-dots i { width: clamp(26px, 2.6vw, 36px); aspect-ratio: 1; border-radius: 50%; background: var(--c); }
.cx-ds-dots--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

/* type: a large specimen next to the scale or the weights */
.cx-ds-type { display: flex; align-items: center; gap: clamp(14px, 1.6vw, 24px); }
.cx-ds-aa { font-size: clamp(40px, 4vw, 60px); font-weight: 700; line-height: 0.95; letter-spacing: -0.02em; }
.cx-ds-aa--accent { color: var(--ds-accent); }
.cx-ds-scale { display: grid; gap: 2px; }
.cx-ds-scale span:nth-child(1) { font-size: 20px; font-weight: 700; }
.cx-ds-scale span:nth-child(2) { font-size: 16px; font-weight: 700; }
.cx-ds-scale span:nth-child(3) { font-size: 14px; }
.cx-ds-scale span:nth-child(4) { font-size: 11px; color: var(--ds-muted); }
.cx-ds-weights { display: grid; gap: 2px; font-size: 18px; }
.cx-ds-weights span:nth-child(1) { font-weight: 400; }
.cx-ds-weights span:nth-child(2), .cx-ds-weights span:nth-child(3) { font-weight: 700; }
.cx-ds-display { font-size: clamp(30px, 3vw, 44px); font-weight: 700; line-height: 0.9; letter-spacing: -0.01em; text-transform: uppercase; }

/* chips, segmented controls, buttons, switches */
.cx-ds-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cx-ds-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
  color: var(--c, var(--ds-ink)); background: color-mix(in srgb, var(--c, var(--ds-ink)) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c, var(--ds-ink)) 40%, transparent); }
.cx-ds-chip--dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.cx-ds-seg { display: inline-flex; width: fit-content; border: 1px solid var(--ds-line); border-radius: 9px; overflow: hidden; font-size: 13px; }
.cx-ds-seg span { padding: 7px 11px; color: var(--ds-muted); }
.cx-ds-seg span + span { border-left: 1px solid var(--ds-line); }
.cx-ds-seg .on { background: var(--ds-accent); color: #fff; }
.cx-ds-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cx-ds-btn { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 9px 14px; border-radius: 8px; font-weight: 700; font-size: 14px; background: var(--ds-soft); color: var(--ds-ink); }
.cx-ds-btn--primary { background: var(--ds-accent); color: #fff; }
.cx-ds-btn--light { background: #F4F4F5; color: #111; }
.cx-ds-btn--danger { background: transparent; color: #F0524F; padding-left: 0; padding-right: 0; }
.cx-ds-btn--pill { border-radius: 999px; }
.cx-ds-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; color: var(--ds-muted); font-size: 13px; }
.cx-ds-line > span { display: inline-flex; align-items: center; gap: 8px; }
.cx-ds-switch { width: 30px; height: 18px; border-radius: 999px; background: #2EA05A; position: relative; flex: none; }
.cx-ds-switch::after { content: ""; position: absolute; right: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; }
.cx-ds-switch--off { background: color-mix(in srgb, var(--ds-muted) 45%, transparent); }
.cx-ds-switch--off::after { right: auto; left: 2px; }
.cx-ds-check { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 4px; background: var(--ds-accent); color: #fff; }
.cx-ds-check svg { width: 12px; height: 12px; stroke-width: 2.6; }

/* lists, navigation, inputs */
.cx-ds-rows { display: grid; }
.cx-ds-rows > span { display: flex; align-items: center; gap: 10px; padding: 10px 0; font-weight: 700; font-size: 13px; }
.cx-ds-rows > span + span { border-top: 1px solid var(--ds-line); }
.cx-ds-rows .cx-ds-chip, .cx-ds-rows em { margin-left: auto; }
.cx-ds-rows em { font-style: normal; font-size: 12px; color: #3FBF6F; display: inline-flex; align-items: center; gap: 6px; }
.cx-ds-rows em::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.cx-ds-tile { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--ds-soft); color: var(--ds-muted); flex: none; }
.cx-ds-nav { display: grid; gap: 2px; font-size: 14px; }
.cx-ds-nav span { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 999px; color: var(--ds-muted); }
.cx-ds-nav span b { margin-left: auto; font-size: 12px; }
.cx-ds-nav .on { background: var(--ds-soft); color: var(--ds-ink); font-weight: 700; }
.cx-ds-input { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--ds-line); border-radius: 8px; color: var(--ds-muted); font-size: 13px; background: var(--ds-card); }
.cx-ds--eugestor .cx-ds-input { border-color: #D7DEE8; }

/* icons, the 12-column grid, numbers and meters */
.cx-ds-icons { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.cx-ds-icons span { display: grid; place-items: center; aspect-ratio: 1; border-radius: 8px; background: var(--ds-soft); color: var(--ds-ink); }
.cx-ds-icons svg { width: 17px; height: 17px; }
.cx-ds-cols { display: grid; grid-template-columns: repeat(12, 1fr); gap: 5px; height: clamp(56px, 5.5vw, 80px); }
.cx-ds-cols i { border-radius: 3px; background: color-mix(in srgb, var(--ds-accent) 22%, var(--ds-soft)); }
.cx-ds--eugestor .cx-ds-cols i { background: #DCE5F3; }
.cx-ds-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cx-ds-stats b { display: block; font-size: clamp(26px, 2.6vw, 38px); line-height: 1; letter-spacing: -0.02em; color: var(--ds-ink); margin-bottom: 4px; }
.cx-ds-stats span { font-size: 12px; color: var(--ds-muted); }
.cx-ds-meter { display: grid; gap: 10px; }
.cx-ds-meter > span { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; font-size: 12px; color: var(--ds-muted); }
.cx-ds-meter b { color: var(--ds-ink); font-size: 14px; }
.cx-ds-meter i { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--c, var(--ds-accent)) var(--v), var(--ds-soft) var(--v)); }
.cx-ds-pill { display: inline-flex; align-items: center; gap: 8px; width: fit-content; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--ds-line); font-size: 12px; }
.cx-ds-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #FFC21A; }
.cx-ds-pill b { color: #FFC21A; }

@media (max-width: 899px) { .cx-ds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .cx-ds { grid-template-columns: minmax(0, 1fr); padding: 12px; } }
