/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; color-scheme: dark; }
html.theme-light { color-scheme: light; }
body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
ul, ol { list-style: none; }
:focus-visible { outline: var(--focus-w) solid var(--color-text); outline-offset: var(--focus-offset); border-radius: 0; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 992px) { .container { padding-inline: var(--margin-page); } } /* page margin, 64px at 1440 like pauloravel.framer.media; the header overrides it with 32px */

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: transparent;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
/* Rolando para baixo o cabeçalho sai; ao subir, volta (Matt Vidal reference) */
.site-header.is-hidden:not(.is-open) { transform: translateY(-100%); }
@media (prefers-reduced-motion: reduce) { .site-header { transition: none; } }
/* No background: the header is white with mix-blend-mode: difference, so it inverts against whatever is under it (Berriel Brands reference).
   While the mobile menu is open it goes back to normal blending and the page colours. */
.site-header:not(.is-open) {
  mix-blend-mode: difference; color: var(--swatch-white);
  --color-text: var(--swatch-white); --color-text-muted: color-mix(in srgb, var(--swatch-white) 62%, transparent); --color-background: var(--swatch-black);
}
.site-header .container { padding: var(--space-6); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: var(--header-height); gap: var(--space-5); }
.brand { display: flex; align-items: center; justify-self: start; }
.brand img { width: var(--brand-mark-w); height: auto; } /* mobile monogram: 8px narrower than the old 24px-high (36px wide) version */
/* Logo: data-brand="wordmark" on the header shows the name at 204px wide (desktop); remove it to go back to the TB monogram (28px wide, always used on mobile) */
.brand-name { display: none; width: var(--brand-name-w); text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap; font-weight: 400; font-size: var(--text-brand); line-height: 1; }
.site-header[data-brand="wordmark"] .brand img { display: none; }
.site-header[data-brand="wordmark"] .brand-name { display: block; }
.nav-links { display: flex; gap: var(--space-5); }
.nav-links a { font-size: var(--text-label); letter-spacing: var(--tracking-label); text-transform: uppercase; font-weight: 400; color: var(--color-text); padding: 0.25rem 0; transition: color var(--link-fade) var(--ease-link); } /* full color at rest, lighter on hover; no underline (Berriel, Thiago 26/10/2026) */
@media (hover: hover) { .nav-links a:hover { color: var(--color-text-muted); } }
.nav-toggle { display: none; }
.menu-cta { display: none; } /* phone menu only */
.header-end { display: flex; align-items: center; gap: var(--space-5); justify-self: end; }
.header-cta {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--header-cta-w); padding: 0.625rem 1.25rem; /* fixed width: the language switch never moves when the label changes */
  background: var(--color-text); color: var(--color-background); border: 1px solid var(--color-text);
  border-radius: var(--radius-pill); text-transform: uppercase; font-size: var(--text-sm); font-weight: 500; line-height: 1.5; white-space: nowrap;
}

/* Large call-to-action button: same look as the header button (solid pill, weight 500, inverts on hover), only bigger. Padding is in em, so it grows with the font size. */
.btn-lg {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.9em 2em;
  background: var(--color-text); color: var(--color-background); border: 1px solid var(--color-text);
  border-radius: var(--radius-pill); text-transform: uppercase; font-size: var(--text-btn-lg); font-weight: 500; line-height: 1.5; white-space: nowrap;
}

/* Hover shared by .header-cta and .btn-lg (cuberto.com/projects/find, "CtaButton"): a fill in the page color rises from the bottom, the label slides up
   and its copy (data-text, built in main.js) slides in from below, and the button stretches 2% with a spring. Pointer devices only; keyboard focus gets the same. */
.header-cta, .btn-lg { position: relative; overflow: hidden; isolation: isolate; transition: scale var(--btn-spring) var(--ease-rise); }
.btn-fill { position: absolute; inset: 0; z-index: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
.btn-fill > span { display: block; width: 100%; height: 100%; background: var(--color-background); border-radius: 50% 50% 0 0; transform: translateY(101%); transition: transform var(--btn-rise) var(--ease-rise), border-radius var(--btn-rise) var(--ease-rise); }
.btn-label { position: relative; z-index: 1; display: block; overflow: hidden; }
.btn-label > span { display: block; transition: transform var(--btn-text) var(--ease-text); }
.btn-label > span::after { content: attr(data-text); position: absolute; top: 110%; left: 0; color: var(--color-text); }
@media (pointer: fine) {
  .header-cta:hover, .btn-lg:hover { scale: var(--btn-stretch) 1; transition-timing-function: var(--ease-spring); }
}
@media (pointer: fine), (hover: none) {
  .header-cta:focus-visible .btn-fill > span, .btn-lg:focus-visible .btn-fill > span { transform: translateY(0); border-radius: 0; }
  .header-cta:focus-visible .btn-label > span, .btn-lg:focus-visible .btn-label > span { transform: translateY(-110%); }
}
@media (pointer: fine) {
  .header-cta:hover .btn-fill > span, .btn-lg:hover .btn-fill > span { transform: translateY(0); border-radius: 0; transition-duration: var(--btn-rise), var(--btn-rise-radius); }
  .header-cta:hover .btn-label > span, .btn-lg:hover .btn-label > span { transform: translateY(-110%); }
}
@media (prefers-reduced-motion: reduce) {
  .header-cta, .btn-lg, .btn-fill > span, .btn-label > span { transition: none; }
}

/* Language: globe button next to the CTA (Atomsix reference) that opens a small menu; the menu sits outside the header so the header's blend mode does not touch it */
.lang-btn { display: grid; place-items: center; width: var(--icon-btn); height: var(--icon-btn); padding: 0; border: 0; border-radius: 50%; background: none; color: var(--color-text); cursor: pointer; transition: background var(--duration) var(--ease); }
.lang-btn:hover, .lang-btn[aria-expanded="true"] { background: color-mix(in srgb, var(--color-text) 14%, transparent); }
.lang-menu { position: fixed; z-index: 55; min-width: var(--lang-menu-w); padding: var(--space-2); border-radius: var(--radius-menu); border: 1px solid var(--overlay-line); background: var(--overlay-menu); -webkit-backdrop-filter: blur(var(--blur-menu)); backdrop-filter: blur(var(--blur-menu)); color: var(--swatch-white); }
.lang-menu[hidden] { display: none; }
.lang-menu a { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: var(--space-2) var(--space-3); border-radius: var(--radius-item); font-size: var(--text-sm); transition: background var(--duration) var(--ease); }
.lang-menu a:hover, .lang-menu a:focus-visible { background: var(--overlay-hover); }
.lang-menu svg { opacity: 0; }
.lang-menu a[aria-current] svg { opacity: 1; }
.lang-menu :focus-visible { outline-color: var(--swatch-white); }

/* Hero: compact, so the first project is visible without scrolling */
.hero { padding-block: clamp(3.5rem, 5.3vw, 9.5rem) clamp(3rem, 4.5vw, 8rem); } /* pure vw (as the h1 and sub): the first fold keeps the same proportions from 1366 to 2560 px wide; floors for phones. At 1920: 102px top, 86px bottom */
/* Hero stays pinned under the header (tablet and desktop only; on phones the sections scroll normally) while the project section slides over it (Balmon & Co reference): the sticky hero lives in .hero-stack, so it is released when the stack ends */
.hero-stack { position: relative; --header-h: var(--header-height); }
@media (max-width: 767px) { .hero-stack { --header-h: var(--header-height-mobile); } }
@media (min-width: 768px) and (min-height: 600px) { .hero-stack .hero { position: sticky; top: var(--header-h); } }
.hero-stack .hero-grid { will-change: transform; }
.hero-stack #work { position: relative; z-index: 1; background: var(--color-background); }
.hero-grid { display: grid; gap: var(--space-5); }
.hero-label { color: var(--color-text); font-size: var(--text-label); line-height: 1.3; text-transform: uppercase; letter-spacing: var(--tracking-label); }
.hero h1 { font-size: clamp(2.25rem, 5vw, 9rem); line-height: 1.08; font-weight: var(--weight-title); letter-spacing: -0.03em; }
.hero-sub { color: var(--color-text-desc); font-size: var(--text-desc); line-height: 1.5; max-width: 50ch; text-wrap: balance; } /* narrow and balanced so the last words do not hang alone on a line */
:lang(pt-BR) .hero-sub { max-width: 68ch; } /* the Portuguese text is longer: two lines like the English one (desktop and tablet; on phones the narrow column gives three) */
@media (max-width: 767px) { .hero h1 { font-size: clamp(1.75rem, 8vw, 1.875rem); line-height: 1.1; } } /* phones: up to 30px (28.8px at 360 wide) gives 3 lines in EN and PT (36px gave 4 and 5); caps have no descenders, so the tighter leading is safe */
@media (max-width: 991px) { .hero-label br { display: none; } } /* stacked layout: the label (Web Design & Art Direction) fits on one line */
@media (min-width: 992px) {
  .hero-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--space-5); row-gap: clamp(2rem, 3.3vw, 6rem); }
  .hero-label { grid-column: 1 / 4; grid-row: 1; padding-top: 0.6em; }
  .hero h1 { grid-column: 4 / 13; grid-row: 1; }
  .hero-sub { grid-column: 7 / 13; grid-row: 2; }
}

/* Hero text: each word rises out of its own mask (overflow clip), as on cuberto.com. The padding/negative margin give the descenders room inside the mask without changing the line height. html.hero-anim hides the text until main.js has split it. */
.hw-mask { display: inline-block; overflow: clip; vertical-align: top; margin: -0.2em; }
.hw-word { display: inline-block; padding: 0.2em; }
html.hero-anim .hero :is(.hero-label, h1, .hero-sub), html.hero-anim .site-header .brand-name, html.hero-anim .site-header .brand img { visibility: hidden; }
html.hero-anim .case-hero :is(.case-about, .case-details) { opacity: 0; }
html.hero-anim .case-stage .case-video { opacity: 0; transform: scale(0.9); clip-path: inset(5% 10% 5% 10% round var(--radius)); } /* starts small; main.js grows it to full size */
html.hero-anim #work :is(.section-label, .card) { opacity: 0; } /* home: the cards in the first fold come in with the hero text (main.js) */
html.hero-anim .site-header :is(.nav-links a, .lang-btn, .header-cta, .nav-toggle) { opacity: 0; } /* header items fade in with the hero text (main.js) */

.btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-3) var(--space-5); border-radius: var(--radius-pill);
  font-size: var(--text-sm); font-weight: 500; border: 1px solid var(--color-stroke);
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
.btn-primary { background: var(--color-text); color: var(--color-background); border-color: var(--color-text); }
.btn-primary:hover { background: var(--swatch-off-white); }
.btn-ghost:hover { border-color: var(--swatch-grey); }

/* Section */
.section { padding-block: clamp(4rem, 11vw, 10rem); }
.section-flush { padding-block: 0 clamp(4rem, 11vw, 10rem); }

/* Work grid: two columns, image on top (rounded), then title, description and tags. Tags and badges are pills. */
.section-label { font-weight: 400; margin-bottom: clamp(1rem, 1.25vw, 2.25rem); }
.work-grid { display: grid; gap: var(--gap-row) var(--gap-col); } /* measured on pauloravel.framer.media: 24px between columns, ~32px between rows, 4:3 image, 4px radius, 12px to the title */
@media (min-width: 768px) { .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Card: image with rounded corners, text outside it on the page background */
.card { display: grid; gap: var(--space-2); align-content: start; } /* 8px from image to title, as measured on pauloravel.framer.media at 1440px (was 12px) */
.card-static { cursor: default; }
.card-media { position: relative; overflow: hidden; aspect-ratio: 4 / 3; border-radius: var(--radius); background: var(--color-surface); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
.card-media--fill img { object-fit: fill; } /* the cover already has the card's 4:3 ratio, so the image is never cropped or stretched (Pet Blue Care, test 26/10/2026) */
a.card:hover .card-media img, a.card:focus-visible .card-media img { transform: scale(1.03); }
.placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: var(--space-6);
  font-size: var(--text-title); font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; color: var(--color-text-muted);
  background: repeating-linear-gradient(135deg, var(--color-surface) 0 var(--stripe-lg), var(--color-background) var(--stripe-lg) calc(var(--stripe-lg) * 2));
}
.card-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-4); align-items: center; } /* title left, tag right */
.card-meta { display: contents; }
.card-tags { grid-column: 1 / -1; grid-row: 2; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.card-body .card-tags { grid-column: 2; grid-row: 1; justify-content: flex-end; }
.tag { display: inline-block; padding: 0.375rem 0.625rem; background: var(--color-tag); border-radius: var(--radius-tag); font-size: var(--text-sm); font-weight: 500; line-height: 1.2; color: var(--color-text); }
.card-title { grid-column: 1; grid-row: 1; font-size: var(--text-card-title); line-height: 1.2; font-weight: 400; letter-spacing: var(--tracking-label); text-transform: uppercase; }
/* Project type on the card: plain grey text on the right of the title, no tag box (pauloravel.framer.media) */
.card-body .card-tags .tag { padding: 0; background: none; border-radius: 0; font-size: var(--text-md); font-weight: 400; line-height: 1.4; letter-spacing: normal; text-transform: none; color: var(--color-text-muted); }

/* Expertise: label + title on the hero grid, then one full-width row per area (number, name + tags, description) */
.expertise-head { display: grid; gap: var(--space-5); margin-bottom: clamp(2rem, 4vw, 4rem); }
.section-title, .expertise-head h2 { font-size: clamp(1.75rem, 3.6vw, 4rem); line-height: 1.12; font-weight: 300; letter-spacing: -0.02em; }
.expertise-row { position: relative; display: grid; gap: var(--space-4); padding-block: clamp(2rem, 3.4vw, 3rem); } /* between rows at least 2x the 40px inside a row (better-layout) */
.expertise-row::before { content: ""; position: absolute; inset-inline: 0; height: 1px; background: var(--color-stroke); transform: scaleX(var(--line, 1)); transform-origin: left; } /* the rules are drawn, not bordered: main.js grows them from left to right (--line) as the row comes in */
.expertise-row::before { top: 0; }
.expertise-row:first-child::before { display: none; } /* test: no rule above the first row (Web design and development) */
.expertise-num { color: var(--color-text-muted); font-size: var(--text-sm); font-variant-numeric: tabular-nums; letter-spacing: 0.1em; }
.expertise-topics { display: grid; gap: var(--space-2); color: var(--color-text-muted); font-size: var(--text-base); line-height: 1.5; } /* plain lines under the number, no tag boxes (Milan Design Studio reference, 25/10/2026) */
.expertise-row h3 { font-size: var(--text-h3); line-height: 1.15; font-weight: 400; letter-spacing: -0.02em; color: var(--color-text-secondary); transition: color var(--duration) var(--ease); }
.expertise-row:hover h3 { color: var(--color-text); }
.expertise-desc { color: var(--color-text-desc); font-size: var(--text-base); line-height: 1.5; }
.expertise-toggle { all: unset; box-sizing: border-box; width: 100%; cursor: default; }
.expertise-toggle:focus-visible { outline: 2px solid currentColor; outline-offset: var(--space-1); }
.expertise-panel, .expertise-panel-inner { display: contents; } /* desktop: the panel is only a wrapper; topics and description sit directly on the row grid */
/* Mobile and tablet accordion (27/10/2026): main.js adds .is-accordion below 992px. The row shows the title and a plus icon; a tap opens the description and the topics. The text fills the container (no max width). */
.is-accordion .expertise-num { display: none; }
.is-accordion .expertise-row { gap: 0; padding-block: var(--space-5); }
.is-accordion .expertise-toggle { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); cursor: pointer; }
.is-accordion .expertise-toggle::after { content: ""; flex: none; width: var(--size-accordion-icon); height: var(--size-accordion-icon); background:
    linear-gradient(currentColor, currentColor) center / 100% var(--stroke-accordion-icon) no-repeat,
    linear-gradient(currentColor, currentColor) center / var(--stroke-accordion-icon) 100% no-repeat; transition: background-size var(--duration) var(--ease); } /* plus; the vertical bar shrinks to nothing when open, leaving a minus */
.is-accordion .is-open .expertise-toggle::after { background-size: 100% var(--stroke-accordion-icon), var(--stroke-accordion-icon) 0; }
.is-accordion .expertise-row h3 { color: var(--color-text); }
.is-accordion .expertise-panel { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows var(--duration) var(--ease), visibility 0s linear var(--duration); }
.is-accordion .is-open .expertise-panel { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows var(--duration) var(--ease); }
.is-accordion .expertise-panel-inner { display: grid; gap: var(--gap-accordion-desc); min-height: 0; overflow: hidden; }
.is-accordion .expertise-topics { order: -1; padding-top: var(--gap-accordion-topics); } /* the topics come before the description */
/* Hover preview (ivancarlos.work reference): a video box between the number and the name, centered between the number and the name, 24px from both hairlines; its width is 70% of the free space between them. Corner radius is the same as the testimonial photo. Desktop with a mouse only. Placeholder: the box is empty until the final videos arrive. */
@media (min-width: 992px) {
  .expertise-head { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--space-5); }
  .expertise-head .hero-label { grid-column: 1 / 4; padding-top: 0.6em; }
  .expertise-head h2 { grid-column: 4 / 13; }
  .expertise-row { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--space-5); align-items: start; }
  .expertise-row { row-gap: var(--gap-expertise-row); }
  .expertise-num { grid-column: 1 / 4; grid-row: 1; padding-top: 0.5em; }
  .expertise-row h3 { grid-column: 4 / 10; grid-row: 1; } /* number and title share row 1, topics and description share row 2, so the two lines align */
  .expertise-topics { grid-column: 1 / 4; grid-row: 2; }
  .expertise-desc { grid-column: 4 / 10; grid-row: 2; max-width: 46ch; }
}

/* Project cursor: white circle over the image of every card (JS adds html.has-cursor, mouse devices only). Two states from the card's data-cursor:
   link cards show the label + a diagonal arrow on its right ("view this case"), card-static ones ("coming soon") swap the arrow for a clock (.is-soon). Icon and text use the background colour. */
.cursor { position: fixed; left: 0; top: 0; z-index: 80; pointer-events: none; will-change: transform; }
.cursor-dot {
  display: flex; align-items: center; justify-content: center; gap: var(--gap-pill); height: var(--pill-h); padding: 0 var(--pad-pill-end) 0 var(--space-5); translate: -50% -50%; border-radius: var(--radius-pill); /* pill: label first, icon on the right */
  color: var(--color-background); background: var(--color-text);
  opacity: 0; transform: scale(0.2); transition: opacity 200ms var(--ease), transform 400ms var(--ease);
}
.cursor-label { order: -1; font-size: var(--text-label); font-weight: 500; line-height: 1; letter-spacing: var(--tracking-label); text-transform: uppercase; white-space: nowrap; } /* uppercase like the other tags (26/10/2026) */
.cursor-clock, .cursor.is-soon .cursor-arrow { display: none; }
.cursor.is-soon .cursor-clock { display: block; }
.cursor.is-visible .cursor-dot { opacity: 1; transform: scale(1); }
.cursor.is-visible.is-pressed .cursor-dot { transform: scale(0.85); }
html.has-cursor .work-grid .card .card-media, html.has-cursor .work-grid .card .card-media * { cursor: none; }

/* Testimonial: one full-width white card. Company on top, small square photo on the left, quote and logo (or big number) on the same base line as the photo. */
.testimonial {
  --t-pad: clamp(1.25rem, 2.6vw, 2.5rem);
  --t-base: clamp(1.75rem, 3.6vw, 3.5rem); /* distance from the card's bottom edge to the signature and the big number */
  margin: clamp(2rem, 4vw, 4rem) 0 0; padding: var(--t-pad); /* same inset on all four sides; the extra room under the signature lives inside the quote and the metric */
  display: grid; gap: var(--space-5);
  background: var(--swatch-white); color: var(--light-text-primary); border-radius: var(--radius); /* white block that breaks the dark rhythm; same white as the CTA and cursor */
}
.testimonial-photo { display: block; object-fit: cover; object-position: center 25%; width: var(--size-testimonial-photo); aspect-ratio: 1; border-radius: calc(var(--radius) / 2); background: repeating-linear-gradient(135deg, var(--swatch-off-white) 0 var(--stripe-sm), var(--light-stroke) var(--stripe-sm) calc(var(--stripe-sm) * 2)); }
.testimonial-quote { display: grid; gap: var(--space-5); align-content: end; margin: 0; }
.testimonial-quote p { font-size: var(--text-quote); line-height: 1.4; font-weight: 400; letter-spacing: -0.01em; text-wrap: pretty; } /* 24px: weight 400 under 28px and 1.4 line height for a quote of 5+ lines (better-typography, 30/10/2026) */
.testimonial-quote footer { display: grid; gap: 0.375rem; font-size: var(--text-base); font-weight: 500; line-height: 1.2; }
.testimonial-quote footer span { color: var(--light-text-tertiary); font-size: var(--text-sm); font-weight: 400; }
/* Big number tied to the testimonial: value with its caption right under it */
.testimonial-metric { display: grid; gap: var(--space-1); align-content: end; padding-bottom: calc(var(--t-base) - var(--t-pad)); }
.testimonial-metric-value { font-size: clamp(2.75rem, 5vw, 4.5rem); line-height: 1; font-weight: 300; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.testimonial-metric-label { font-size: var(--text-sm); line-height: 1.35; color: var(--light-text-tertiary); white-space: nowrap; }
.testimonial-logo { display: block; height: var(--logo-testimonial-h); width: auto; }
@media (min-width: 992px) {
  .testimonial { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--space-5); row-gap: var(--space-5); padding-block: var(--t-base); } /* same space above and below the content (the old extra room lived under the signature only) */
  .testimonial-photo { grid-column: 1 / 3; align-self: end; } /* the photo's base sits on the signature's base line */
  /* The card's padding narrows its 12 columns, so column 4 would land half a padding to the right of the h1's column 4; the negative margin brings the quote back onto the hero's vertical line */
  .testimonial-quote { grid-column: 4 / 12; gap: var(--gap-testimonial-sign); margin-left: calc(var(--t-pad) / -2); }
  .testimonial-metric { grid-column: 12 / 13; justify-self: end; text-align: right; padding-bottom: 0; }
}
/* Mobile and tablet (27/10/2026): company, logo, quote, then a signature row with the photo on the left of the name and role. The blockquote is display: contents so its text and footer join the grid. */
@media (max-width: 991px) {
  .testimonial { grid-template-columns: auto 1fr; grid-template-areas: "logo logo" "quote quote" "photo sign"; column-gap: var(--space-4); align-items: center; }
  .testimonial { padding: var(--gap-testimonial-sign) var(--space-5); row-gap: var(--space-6); } /* 48px above the logo and below the signature row, 24px at the sides; 32px between groups (desktop proportion: 2x the 16px inside a group) */
  .testimonial-metric { grid-area: logo; justify-self: start; padding-bottom: var(--space-4); } /* with the row gap: 48px between the logo and the quote */
  .testimonial-logo { height: var(--logo-testimonial-h-mobile); }
  .testimonial-quote { display: contents; }
  .testimonial-quote p { grid-area: quote; }
  .testimonial-quote footer { grid-area: sign; }
  .testimonial-quote p { font-size: var(--text-quote-mobile); font-weight: 400; line-height: 1.4; } /* mobile: regular weight under 28px, 1.4 line height for a 9-line quote, about 30 characters per line (validated with better-typography, 27/10/2026) */
  .testimonial-photo { grid-area: photo; width: var(--size-testimonial-photo-mobile); }
}

/* About: label (same pattern as Expertise), statement, fact sheet and photo. On desktop it uses the hero's 12-column grid: label, statement and facts on the left (columns 1-6, ending where .hero-sub starts), photo on the right from column 9, on the same vertical line as .expertise-desc. The statement is bigger than a paragraph would be because the facts live in the sheet below; the sheet reuses the Expertise hairline. */
.about { display: grid; gap: var(--space-5); align-items: start; }
.about .hero-label { font-weight: 400; } /* an h2 would otherwise inherit bold; same weight as the Expertise label */
.about-text { max-width: 12em; text-wrap: balance; display: grid; gap: var(--space-4); font-size: var(--text-statement); line-height: 1; letter-spacing: -0.01em; color: var(--color-text); } /* 60px/60px from 1440px up, as measured on berrielbrands.com */
/* Scroll reveal: each word starts dimmed and reaches full color as the paragraph crosses the viewport (GSAP, see main.js) */
.about-text .rw { transition: none; }
/* Supporting paragraph under the statement (Berriel reference): smaller, muted, static, same column */
.about-support { text-wrap: pretty; margin-top: var(--about-support-gap); color: color-mix(in srgb, var(--color-text) 70%, transparent); font-size: var(--text-case); line-height: 1.5; letter-spacing: 0; } /* 20px/30px, 34px under the statement (Berriel); same width as the statement, like on berrielbrands.com. The 12em cap (em of the 60px statement) stops the support from running past the statement's balanced lines */
.about-link { justify-self: start; display: inline-flex; align-items: center; gap: var(--space-2); margin-top: var(--space-4); font-size: var(--text-md); line-height: 1.4; color: var(--color-text); transition: color var(--link-fade) var(--ease-link); } /* secondary CV download as a text link (Berriel/Jonas pattern); the PDFs in assets/cv/ (thiago-bianchini-cv-en.pdf, -pt.pdf) do not exist yet, so the link returns 404 until they are added */
.about-link svg { flex: none; transition: transform var(--duration) var(--ease); }
@media (hover: hover) { .about-link:hover { color: var(--color-text-muted); } }
.about-link:hover svg { transform: translateY(var(--nudge)); }
.about-photo { position: relative; overflow: hidden; aspect-ratio: 4 / 5; max-width: 20rem; border-radius: var(--radius); background: var(--color-surface); }
.about-photo img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; filter: grayscale(0.2); }
@media (min-width: 992px) {
  .about { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--space-5); row-gap: var(--space-6); }
  .about .hero-label { grid-column: 1 / 4; grid-row: 1; padding-top: 0.6em; }
  .about-text { grid-column: 1 / 7; grid-row: 2; }
  .about-photo { grid-column: 9 / 13; grid-row: 1 / span 2; align-self: stretch; max-width: none; aspect-ratio: auto; min-height: 26rem; } /* stretches from the title to the text */
}

/* Marquee: two identical groups; the track moves by exactly one group (-50%), so the loop is seamless. */
.marquee { overflow: hidden; }
.marquee-track { display: flex; width: max-content; animation: marquee var(--marquee-duration, 20s) linear infinite; }
.marquee-group { display: flex; flex: none; align-items: center; }
/* Messages marquee (Arco reference): sentences about what I do, separated by a small portrait, right below About. */
.marquee-messages { padding-block: clamp(1.25rem, 2.5vw, 2.5rem); }
.marquee-msg { flex: none; white-space: nowrap; font-weight: 400; font-size: var(--text-title); line-height: 1.1; letter-spacing: -0.02em; color: var(--color-text); }
.marquee-photo { flex: none; width: clamp(2.25rem, 4vw, 3.75rem); height: clamp(2.25rem, 4vw, 3.75rem); margin-inline: clamp(1.25rem, 2.5vw, 2.5rem); border-radius: var(--radius); object-fit: cover; object-position: center 20%; }
@keyframes marquee { to { transform: translate3d(-50%, 0, 0); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* Contact + footer */
.contact { padding-block: clamp(4rem, 11vw, 10rem); }
.contact h2 { font-size: clamp(2rem, 6vw, 4.5rem); line-height: 1.05; font-weight: 600; letter-spacing: -0.03em; max-width: 14ch; }
.contact-links { margin-top: var(--space-6); display: flex; flex-wrap: wrap; gap: var(--space-3); }
.site-footer { padding-block: var(--space-5); font-size: var(--text-nav); } /* one row: name left, links right (pauloravel.framer.media) */
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-3); }
.footer-name { text-transform: uppercase; letter-spacing: 0.08em; } /* same wordmark style as the header name */
.footer-links { display: flex; align-items: center; gap: var(--space-5); }
.footer-top { display: grid; place-items: center; padding: var(--space-1); border: 0; background: none; color: var(--color-text-muted); cursor: pointer; transition: color 0.5s ease-in-out; } /* only the arrow, quiet: no circle, no label */
.footer-top svg { transition: transform var(--duration) var(--ease); }
.footer-top:hover, .footer-top:focus-visible { color: var(--color-text); }
.footer-top:hover svg, .footer-top:focus-visible svg { transform: translateY(calc(var(--nudge) * -1)); }
.footer-links a { font-size: var(--text-label); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--color-text); padding: var(--space-1) 0; transition: color var(--link-fade) var(--ease-link); }
@media (hover: hover) { .footer-links a:hover { color: var(--color-text-muted); } }

/* Page transition (curtain, as on cuberto.com): a plain white shape (no name) rises from the bottom over a dimmed page and covers it,
   the next page loads under it, then the white screen dissolves (fades out) and the page effects start.
   html.pt-leave = rising, html.pt-cover = covering (set before first paint), html.pt-exit = dissolving. */
html::before {
  content: ""; position: fixed; inset: 0; z-index: 99; background: var(--curtain-dim); opacity: 0; pointer-events: none;
}
html::after {
  content: ""; position: fixed; inset: 0; z-index: 100; background: var(--swatch-white);
  transform: translate3d(0, 100%, 0); pointer-events: none;
}
html.pt-leave::before { opacity: 1; transition: opacity var(--curtain-in) var(--ease-curtain); }
html.pt-leave::after { transform: none; pointer-events: auto; transition: transform var(--curtain-in) var(--ease-curtain); }
html.pt-cover::after { transform: none; pointer-events: auto; }
html.pt-exit::after { transform: none; opacity: 0; transition: opacity var(--curtain-out) var(--ease-fade); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html::after { display: none; }
  * { transition: none !important; }
}

@media (max-width: 767px) {
  /* Mobile menu, as in the Webflow site: slides in from the right (400ms), closes with an out-expo ease (300ms) */
  .site-header .container { grid-template-columns: 1fr auto; height: 4rem; padding: 0 var(--gutter); }
  .brand, .header-end { position: relative; z-index: 2; }
  .site-header[data-brand="wordmark"] .brand img { display: block; }
  .site-header.is-open .brand img { filter: invert(1); } /* the logo is white (it relies on the header blend mode); with the menu open the blend is off and the menu is white */
  .site-header[data-brand="wordmark"] .brand-name { display: none; }
  .header-end { gap: var(--space-3); }
  .header-cta { display: none; } /* on phones the button lives inside the menu */
  .nav-toggle { display: flex; flex-direction: column; justify-content: center; gap: var(--toggle-gap); width: var(--toggle-size); height: var(--toggle-size); padding: 0; background: none; border: 0; cursor: pointer; }
  .nav-toggle span { display: block; width: 100%; height: var(--toggle-bar); border-radius: var(--radius-pill); background: var(--color-text); transition: transform 300ms var(--ease), opacity 300ms var(--ease); }
  .site-header.is-open .nav-toggle span:nth-child(1) { transform: translateY(var(--toggle-shift)) rotate(45deg); }
  .site-header.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .site-header.is-open .nav-toggle span:nth-child(3) { transform: translateY(calc(var(--toggle-shift) * -1)) rotate(-45deg); }
  .nav-links {
    position: fixed; inset: 0; z-index: 1; flex-direction: column; justify-content: flex-start; gap: var(--space-1); overflow-y: auto; /* fills the screen; link size and spacing from rmd-studio.com (40/48px, 72px rows, 4px apart) */
    padding: var(--menu-pad-top) var(--gutter) var(--space-5); background: var(--color-background);
    transform: translateX(100%); visibility: hidden;
    transition: transform 300ms cubic-bezier(0.19, 1, 0.22, 1), visibility 0s linear 300ms;
  }
  .nav-links a { font-size: 2.5rem; line-height: 3rem; padding: var(--space-3) 0; border-bottom: 0; color: var(--color-text); align-self: flex-start; }
  .nav-links .menu-cta {
    display: flex; align-items: center; justify-content: center; align-self: stretch; margin-top: auto; padding: 0.875rem 1.25rem;
    background: var(--color-text); color: var(--color-background); border: 1px solid var(--color-text); border-radius: var(--radius-pill); text-transform: uppercase;
    font-size: var(--text-sm); font-weight: 500; line-height: 1.5;
  }
  .site-header.is-open .nav-links { transform: none; visibility: visible; transition: transform 400ms ease-in-out, visibility 0s; }
}

/* Case page (Nest Vila Ipojuca). Reuses the hero grid, the Expertise rows (for the steps) and the testimonial metric type; the dark block (challenge to results) opts in with theme-dark. */
.case-hero { padding-block: clamp(3.5rem, 5.3vw, 9.5rem) clamp(2.5rem, 3.5vw, 6rem); }
/* About text in the first fold (as on paulo ravel's case pages): small label, then the paragraph, on the same row as the facts table. The top margin keeps the distance the old subtitle gave between the title and this row. */
.case-hero .case-about, .case-hero .case-details { margin-top: clamp(0.5rem, 3vw, 4.5rem); }
.case-split { display: grid; gap: var(--space-5); }
.case-intro { display: grid; gap: var(--space-4); align-content: start; }
.case-title { font-size: clamp(1.5rem, 3vw, 3.25rem); line-height: 1.12; font-weight: 300; letter-spacing: -0.02em; }
.case-text { color: var(--color-text-desc); font-size: var(--text-case); line-height: var(--leading-body); } /* fills its grid column, so the right edge matches the Deliverables fact */
.case-text + .case-text { margin-top: var(--space-4); } /* two short paragraphs in one chapter (Pet Blue Care, Solution) */
@media (min-width: 992px) {
  .case-hero .case-about { grid-column: 1 / 7; grid-row: 2; }
  .case-hero .case-details { grid-column: 7 / 13; grid-row: 2; } /* description and facts share the right column, as on paulo ravel's case pages */
  .case-info .case-about { grid-column: 1 / 7; grid-row: 1; }
  .case-info .case-details { grid-column: 7 / 13; grid-row: 1; } /* test (pt-br only): the same block placed under the animation */
  .case-split { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--space-5); row-gap: var(--gap-heading); }
  .case-split > .hero-label { grid-column: 1 / 4; padding-top: 0.6em; }
  .case-split > .case-intro, .case-split > .case-details, .case-split > .case-phones { grid-column: 4 / 13; }
}

/* Stage: the frame that grows on load (main.js); no background band, the frame sits on the page */
.case-stage { padding-bottom: var(--gap-facts); overflow-x: clip; } /* space between the top media and the facts strip: half of a chapter gap */

/* Video and image frames: poster image underneath, the Vimeo background player fades in over it once it loads (main.js adds .is-ready) */
.case-media { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: var(--radius); background: var(--color-surface); }
.case-media img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.media-layer { position: absolute; inset: calc(-1 * var(--parallax-extra)) 0; will-change: transform; } /* holds the image: taller than its frame, so it moves on scroll without showing the frame background */
.case-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.case-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; opacity: 0; transition: opacity 800ms var(--ease); }
.case-media iframe.is-ready { opacity: 1; }
.case-lottie { position: absolute; inset: 0; opacity: 0; transition: opacity 600ms var(--ease); pointer-events: none; } /* Lottie canvas over the poster; fades in once the first frame is ready (main.js) */
.case-lottie.is-ready { opacity: 1; }
.case-lottie canvas, .case-lottie svg { display: block; width: 100% !important; height: 100% !important; }

#about.section { padding-bottom: clamp(2rem, 5vw, 5rem); }
.case-info { padding-bottom: clamp(3rem, 6vw, 6rem); }
.case-details > div { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); padding-block: var(--space-4); border-top: 1px solid var(--color-stroke); }
.case-details > div:first-child { border-top: 0; }
.case-details dt { color: var(--color-text-muted); font-size: var(--text-sm); padding-top: 0.2em; }
@media (min-width: 992px) { .case-details > div { grid-template-columns: 0.75fr 1fr; } } /* values start a little left of the middle, so the deliverables fit on one line on most desktops */
.case-details dd span { white-space: nowrap; } /* wraps only at the slash */
.case-details dd { font-size: var(--text-desc); line-height: var(--leading-body); }

/* Image slider: horizontal scroll with snap, drag with the mouse (main.js), thin scrollbar as on the Webflow page */
.case-slider-wrap { padding-bottom: clamp(4rem, 11vw, 10rem); }
.case-slider { display: flex; gap: var(--space-4); overflow-x: auto; padding: 0 var(--gutter) var(--space-4); scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--color-text) var(--color-stroke); cursor: grab; }
@media (min-width: 992px) { .case-slider { padding-inline: var(--margin-page); } }
.case-slider.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.case-slider::-webkit-scrollbar { height: var(--space-1); }
.case-slider::-webkit-scrollbar-track { background: var(--color-stroke); }
.case-slider::-webkit-scrollbar-thumb { background: var(--color-text); }
.case-slider figure { flex: none; height: clamp(16rem, 38vw, 34rem); margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--color-surface); scroll-snap-align: start; }
.case-slider img { height: 100%; width: auto; max-width: none; pointer-events: none; user-select: none; }

/* Dark block: challenge, steps, page details, solution and results */
.case-dark { background: var(--color-background); color: var(--color-text); }
.case-phones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); max-width: 46rem; }
.case-phones img { border-radius: var(--radius); }
.case-steps { margin-top: clamp(3rem, 7vw, 7rem); }
.case-steps > .hero-label { margin-bottom: var(--space-5); }
.case-grid-section { padding-bottom: clamp(4rem, 8vw, 8rem); }
.case-grid { display: grid; gap: var(--space-4); }
.case-grid-lightbox, .case-grid-tour { aspect-ratio: 4 / 3; }
.case-grid-lightbox { background: var(--swatch-off-white); }
.case-grid-lightbox img { object-fit: contain; }
@media (min-width: 768px) {
  .case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-grid-video { grid-column: 1 / -1; }
}

/* Solution: text on the left stays in view while the two columns of phone screens scroll on the right */
.case-screens { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); align-items: start; }
.case-screens-col { display: grid; gap: var(--space-4); }
.case-screens-col:nth-child(2) { margin-top: clamp(3rem, 9vw, 9rem); }
@media (min-width: 992px) {
  .case-mobile > .case-intro { grid-column: 4 / 8; grid-row: 1; position: sticky; top: 7rem; }
  .case-mobile > .case-screens { grid-column: 8 / 13; grid-row: 1 / span 2; }
}


/* Lenis smooth scroll (same setup as the Webflow site) */
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* Case top, "sheet" pattern. Top: label and title only. Under the animation: a strip of facts on the 12-column grid, then the About text.
   Path A (pt-br): About text under the Category column, same size as the other descriptions. Path B (en): the first sentence as a large light statement, the rest below it in the description size. */
.case-info--sheet .case-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5) var(--space-4); margin-top: 0; }
.case-info--sheet .case-facts > div { display: block; padding-block: 0; border-top: 0; }
.case-info--sheet .case-facts dt { margin-bottom: var(--space-2); padding-top: 0; text-transform: none; letter-spacing: 0; } /* sentence case, no tracking: the label is a quiet name, not a heading */
.case-info--sheet .case-facts > div:last-child { grid-column: 1 / -1; }
.case-info--sheet .case-about { margin-top: clamp(2.5rem, 5vw, 5rem); }
@media (min-width: 992px) {
  .case-info--sheet .case-facts { grid-column: 1 / -1; grid-row: 1; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--space-5); }
  .case-info--sheet .case-facts > div:nth-child(1) { grid-column: 1 / 4; }
  .case-info--sheet .case-facts > div:nth-child(2) { grid-column: 4 / 7; }
  .case-info--sheet .case-facts > div:nth-child(3) { grid-column: 7 / 10; }
  .case-info--sheet .case-facts > div:nth-child(4) { grid-column: 10 / 13; }
  .case-info--sheet .case-facts > div:last-child { grid-column: 10 / 13; }
  .case-info--sheet .case-about { grid-column: 1 / -1; grid-row: 2; } /* the Context block is a .case-split like Challenge and Solution: same label, same text size, same columns */
}

@media (min-width: 992px) {
  .case-chapter .case-split > .case-intro, #solution .case-split > .case-intro, .case-info--sheet .case-split > .case-intro { grid-column: 7 / 13; } /* same column as the Category fact and the Context text */
}
.case-info--sheet .hero-grid, .case-chapter .case-split, #solution .case-split { padding-inline: var(--inset-case); } /* side room for the facts strip */
.case-info--sheet { padding-bottom: var(--gap-text-media); } /* Context to its first image: the same space as every other text block (see --gap-text-media) */
/* Nest case, chapters and bento (24/10/2026). Palette from the Nest mobile screens (green, lime) and the Webflow CSS (#e1f4b6).
   Image rhythm after rga.com case pages: stacked tiles of different proportions, pairs, one wide animation. */
.case-wide { margin: var(--gap-case-media) 0 0; }
.case-wide.container { margin-top: 0; padding-bottom: 0; }
.case-media--wide { aspect-ratio: 16 / 10; }
@media (min-width: 768px) { .case-media--wide { aspect-ratio: 32 / 9; } }
.case-media--wide img { object-position: center 70%; }
.case-media--wide.case-media--photo img { object-position: center 42%; } /* Pet Blue Care: keeps the faces in the crop */
@media (min-width: 768px) { .case-media--wide.case-media--photo { aspect-ratio: 21 / 9; } } /* less narrow than the Nest banner: the photo has faces from top to bottom */ /* shows more of the building base, not all the way down to the street */
.case-points { display: grid; gap: var(--space-2); margin-top: var(--space-2); }
.case-points li { display: flex; align-items: baseline; gap: var(--space-3); padding-top: var(--space-2); border-top: 1px solid var(--color-stroke); font-size: var(--text-desc); line-height: 1.4; max-width: 46ch; }
.case-points li::before { content: ""; flex: none; width: 0.5em; height: 0.5em; border-radius: 50%; background: var(--nest-lime); transform: translateY(-0.05em); }
.case-chapter { padding-top: var(--gap-chapter); } /* same rhythm as the space between a case image and the next block */
.case-dark .case-media { background: color-mix(in srgb, var(--swatch-white) 8%, var(--swatch-dark)); } /* tiles on the black band */
.case-dark .case-media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--outline-on-dark); pointer-events: none; } /* drawn over the image: an outline would sit under it */
.case-split > .hero-label { font-weight: 400; color: var(--color-text-muted); } /* same quiet label as Context: all three read alike; uppercase again (26/10/2026) */ /* h2 would inherit bold; same weight as the Expertise label */
.case-bento { display: grid; column-gap: var(--gap-col); row-gap: var(--gap-row); margin-top: var(--gap-case-media); }
.case-split + .case-bento, .case-split + .case-wide { margin-top: var(--gap-text-media); } /* every text block (Challenge, Solution) to its first image: one value on every screen and on every case page */
.case-bento + .case-bento { margin-top: var(--gap-row); } /* stacked bentos read as one grid, as on cuberto.com/projects/find */
@media (max-width: 767px) { .case-bento { column-gap: var(--gutter); row-gap: var(--gutter); } .case-bento + .case-bento { margin-top: var(--gutter); } .case-bento .case-brand-col { gap: var(--gutter); } } /* mobile (27/10/2026): the space between case images equals the side margin (16px) */
.case-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } /* pairs and wide tiles, pattern from threesixtyeight.com/work/strada: pair of 4:5, wide 16:9 */
.case-tile { margin: 0; } /* figure has a default margin */
.case-tile--wide { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.case-tile--half { aspect-ratio: 4 / 3; } /* same ratio as the home project card (466px high at 1440) */
.case-tile--43 { aspect-ratio: 4 / 3; }
.case-tile--padded { padding: var(--pad-card); }
.case-tile--padded img { position: static; width: 100%; height: 100%; }
.case-tile img { object-fit: cover; }
.case-tile--contain img { object-fit: contain; }
.case-tile--video { background: var(--swatch-tile-gray); } /* grid animation (local mp4), gray frame as on the Webflow page */
.case-tile--lottie { background: var(--swatch-mockup); } /* same gray as the phone tile beside it; also the gutter between the animated columns (was black, read as a thin dark line) */
.case-media--mockup { background: var(--swatch-mockup) !important; }
.case-media--paper { background: var(--swatch-off-white) !important; }
.case-media--lime-soft { background: var(--nest-lime-soft) !important; }
.case-media--lime { background: var(--nest-lime) !important; }
.case-media--petblue { background: var(--petblue-sky) !important; }
.case-media--petblue-ice { background: var(--petblue-ice) !important; } /* Pet Blue Care: transparent PNG screens (desktop and phone) */
.case-tile--base img { object-position: center bottom; } /* Pet Blue Care: the tablet rests on the bottom edge of the frame, no gap under it (test, 25/10/2026) */
.case-tile--natural { aspect-ratio: auto; } /* the frame takes the ratio of its image (set by the width and height attributes), so no per-page inline aspect-ratio; any case page can reuse it */
.case-tile--natural img { position: static; display: block; width: 100%; height: auto; }

/* Notebook tile: soft lime with the Virtus graphic behind the mockup (from the Webflow site) */
.case-tile--grafismo { background: var(--nest-lime-soft) url("../assets/img/nest/virtus-grafismo.svg") 100% 0 / contain no-repeat !important; }
.case-tile--grafismo img { object-fit: cover; }

/* Pet Blue Care, Challenge bento (25/10/2026): logo and photo on the left, the team screen on the right, wider (5/7 on desktop). Layout from the Webflow site. */
.case-bento--brand { grid-template-columns: minmax(0, 1fr); }
.case-brand-col { display: grid; gap: var(--gap-row); grid-template-rows: auto minmax(0, 1fr); }
.case-tile--logo { aspect-ratio: auto; display: flex; align-items: center; justify-content: center; padding-block: var(--space-5); background: var(--petblue-deep); }
.case-tile--logo img { position: static; width: auto; height: var(--logo-brand-h); max-width: 100%; object-fit: contain; }
.case-tile--photo { aspect-ratio: 4 / 3; }
.case-tile--team { aspect-ratio: 4 / 3; background: var(--petblue-ice); }
.case-tile--team img { inset: var(--inset-bleed) auto auto var(--inset-bleed); width: auto; height: calc(100% - var(--inset-bleed)); object-fit: fill; }
@media (min-width: 992px) {
  .case-bento--brand { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .case-tile--photo { aspect-ratio: auto; min-height: 0; }
  .case-tile--team { grid-column: 2; }
}

/* Results: three tiles of the same width. Each one: label on top, a stage for a small motion in the middle, number and caption at the bottom */
.case-results { margin-top: var(--gap-chapter); } /* same space above the Results label as above Challenge and Solution */
.case-results .case-split { margin-bottom: var(--gap-heading); } /* label to cards: same as label to images in the chapters */
.results-grid { display: grid; gap: var(--gap-col); }
@media (min-width: 992px) { .results-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } } /* three tiles of the same size, in funnel order */
.results-tile { display: flex; flex-direction: column; justify-content: space-between; min-height: clamp(18rem, 26vw, 24rem); padding: var(--pad-card); border-radius: var(--radius); color: var(--swatch-dark); }
.results-tile { position: relative; overflow: hidden; }
.results-tile--lime { background: var(--nest-lime); }
.results-tile--quiet { background: color-mix(in srgb, var(--swatch-white) 8%, var(--swatch-dark)); color: var(--swatch-white); } /* same surface as the other tiles on the black band: only Conversão, the number that matters, gets color */
/* Results tiles: the number rolls once like an odometer (Audiência -> Conversão -> Leads, light to deep). */
.results-label { font-size: var(--text-sm); }
.results-stat { margin-top: auto; font-size: var(--text-stat-tile); line-height: 1; font-weight: var(--stat-weight); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.results-stat [data-count] { display: inline-flex; align-items: flex-start; line-height: 1; }
.odo-digit { display: inline-block; height: 1em; overflow: hidden; }
.odo-col { display: flex; flex-direction: column; transition: transform var(--odo-dur) var(--odo-ease) calc(var(--tile, 0) * var(--odo-tile-stagger) + var(--i) * var(--odo-stagger)); } /* each digit rolls up through two turns of 0-9, left to right */
.odo-col > span { display: block; height: 1em; line-height: 1; }
.stat-arrow { display: inline-block; width: 0.28em; height: 0.28em; margin-left: 0.08em; vertical-align: top; color: var(--nest-lime); transition: opacity 1s var(--ease), translate 1.2s var(--ease); } /* arrow next to the number: fades in while moving along the diagonal, after the count ends */
.results-stat.is-counting .stat-arrow { opacity: 0; translate: -0.4em 0.4em; transition-duration: 0s; }
.results-cap { margin-top: var(--space-2); font-size: var(--text-base); line-height: var(--leading-body); opacity: 0.75; }

/* Phone screens: 8 cards in 4 columns, each column a card cropped at the top and one cropped at the bottom (cuberto.com/projects/find, measured on a 1920x1080 frame).
   All sizes are in --u, 1% of the tile width, so the whole composition scales with the tile. */
.case-tile--screens { --u: 1cqw; --n: var(--screens-cols); --col: calc((100cqw - (var(--n) + 1) * var(--gap-col)) / var(--n)); container-type: inline-size; }
.screens-col { position: absolute; top: calc(var(--u) * var(--split)); left: calc(var(--gap-col) + var(--i) * (var(--col) + var(--gap-col))); width: var(--col); }
.screens-col:nth-child(1) { --i: 0; --split: var(--screens-split-1); }
.screens-col:nth-child(2) { --i: 1; --split: var(--screens-split-2); }
.screens-col:nth-child(3) { --i: 2; --split: var(--screens-split-3); }
.screens-col:nth-child(4) { --i: 3; --split: var(--screens-split-4); }
.case-tile--screens img { position: static; display: block; width: 100%; height: auto; filter: drop-shadow(0 calc(var(--u) * 0.6) calc(var(--u) * 1.6) color-mix(in srgb, var(--swatch-dark) 14%, transparent)); }
.case-tile--screens img:first-child { position: absolute; top: auto; left: 0; bottom: calc(100% + var(--gap-row)); }
@media (max-width: 767px) { .case-tile--screens { --u: 2cqw; --n: var(--screens-cols-narrow); aspect-ratio: 4 / 5; } .screens-col:nth-child(n+3) { display: none; } }

/* About gallery (21st.dev "panoramic spread hero", rebuilt without React): polaroid cards start as a stack and unspool into a panoramic arch while the page scrolls; geometry, scroll and tilt in main.js */
.pano { position: relative; height: var(--pano-scroll); background: var(--color-background); color: var(--color-text); }
.pano-pin { position: sticky; top: 0; height: 100svh; overflow: hidden; display: grid; place-items: center; perspective: var(--perspective); }
.pano-scene { position: absolute; inset: 0; z-index: 10; list-style: none; margin: 0; padding: 0; will-change: transform; } /* flat on purpose: the cards share one plane, and preserve-3d made coplanar cards swap order while the scene tilts */
.pano-card { position: absolute; left: 50%; top: 50%; pointer-events: none; } /* flat on purpose: with preserve-3d here the tilted frames cut through each other */
.pano-frame { position: absolute; left: 0; top: 0; overflow: hidden; transform-origin: center center -50px; pointer-events: auto; cursor: pointer; padding: var(--space-2) var(--space-2) var(--space-5); background: var(--swatch-white); border-radius: var(--radius); box-shadow: var(--shadow-card); will-change: transform; } /* polaroid frame */
.pano-mask { display: block; width: 100%; height: 100%; overflow: hidden; border-radius: var(--radius-tag); } /* the hover zoom stays inside the photo, never over the white frame */
.pano-frame img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; transition: transform 0.7s var(--ease); }
@media (hover: hover) { .pano-frame:hover img { transform: scale(1.05); } }
.pano-text { position: absolute; z-index: 5; display: grid; gap: var(--space-4); justify-items: center; text-align: center; padding-inline: var(--space-5); pointer-events: none; }
.pano-statement { max-width: 19em; text-wrap: balance; font-size: clamp(1.75rem, min(4.17vw, 6.5svh), 3.75rem); line-height: 1; letter-spacing: -0.01em; } /* same statement size as before, 60px from 1440px up; also capped by the screen height so short windows keep room above the photos */
.pano-support { max-width: var(--measure-support); text-wrap: balance; font-size: var(--text-desc); line-height: var(--leading-body); color: var(--color-text-desc); }
.pano-cta { position: absolute; z-index: 20; left: 50%; top: var(--pano-cta-top); translate: -50% calc(-50% + var(--space-4)); opacity: 0; pointer-events: none; transition: opacity 0.6s var(--ease), translate 0.6s var(--ease); } /* shows only at the end of the scroll, centered between the photos and the bottom of the screen */
.pano.is-end .pano-cta { opacity: 1; pointer-events: auto; translate: -50% -50%; }
@media (prefers-reduced-motion: reduce) { .pano { height: 100svh; } .pano-frame img { transition: none; } }

/* Expertise hover image (havenlywellness.framer.website, "What We Help With"): one tilted, rounded image that sits on top of the list at the right, centered on the hovered row, and slides between rows. Desktop with mouse only. */
.expertise-lottie { position: absolute; inset: 0; opacity: 0; transition: opacity var(--duration) var(--ease); }
.expertise-lottie.is-ready { opacity: 1; }
.expertise-lottie canvas { display: block; width: 100% !important; height: 100% !important; }

.expertise-list { position: relative; }
.expertise-float { display: none; }
@media (min-width: 992px) and (hover: hover) and (pointer: fine) {
  .expertise-float { display: block; position: absolute; z-index: 5; right: 0; top: 0; width: var(--float-w); aspect-ratio: 16 / 9; margin-top: calc(var(--float-w) * -9 / 32); scale: 0.9; opacity: 0; pointer-events: none; transition: opacity var(--duration) var(--ease), scale 0.5s var(--ease), top 0.5s var(--ease); }
  .expertise-float.is-on { opacity: 1; scale: 1; }
  .expertise-float-item { position: absolute; inset: 0; overflow: hidden; border-radius: var(--radius); background: var(--color-surface); opacity: 0; transition: opacity var(--duration) var(--ease); }
  .expertise-float-item.is-on { opacity: 1; }
  .expertise-float-item:first-child .expertise-lottie { scale: var(--float-zoom-web); }
  .expertise-float-item img, .expertise-float-item video { display: block; width: 100%; height: 100%; object-fit: cover; }
}

/* Previous / next project (victorberbel.work/poesial): two cards side by side, the same card as the home grid (image, name, small tag); the tag says previous or next */
.case-pager { padding-block: calc(var(--gap-chapter) * 1.5) var(--gap-chapter); } /* room above the title and between the cards and the footer (26/10/2026: the cards sat too close to the footer) */
.case-pager-title { font-size: var(--text-title); font-weight: var(--weight-title); line-height: 1.1; letter-spacing: -0.01em; margin-bottom: calc(var(--gap-heading) * 1.25); max-width: 14em; text-wrap: balance; } /* a real section title (.section-title, same style as the Expertise heading), not a label */
.case-pager-grid { display: grid; gap: var(--gap-row) var(--gap-col); }
/* Publish rule (26/10/2026): the pager only lists published cases. A card without data-status="published" is hidden, and the whole block is hidden when no published card is left. */
.case-pager-grid .card:not([data-status="published"]) { display: none; }
.case-pager:not(:has(.card[data-status="published"])) { display: none; }
@media (min-width: 768px) { .case-pager-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }


/* 404 content: one centered column (Drawer figure, label, button) on the light theme. The figure's colors follow the site tokens; its plates are filled, so the plate color is the page background. */
.not-found { display: flex; flex-direction: column; min-height: 100svh; } /* the footer sits at the bottom of the first screen: no scroll */
.not-found main { flex: 1; display: grid; }
.not-found-content { display: grid; justify-items: center; align-content: center; gap: var(--space-4); padding: calc(var(--header-height) + var(--space-5)) var(--gutter) var(--space-6); text-align: center; }
.not-found-content > * { grid-column: 1; grid-row: auto; }
.not-found-content > .hero-label { padding-top: 0; } /* the hero rules place .hero-label and .hero-sub on the 12-column grid; here they stay in one column */
.not-found-content .header-cta { display: inline-flex; margin-top: var(--space-3); } /* the header button is hidden on phones; here it is the only action */
.not-found-drawer { width: var(--size-404-figure); --hairline-plate: var(--color-background); --hairline-hi: var(--color-text); --hairline-edge: var(--color-text-muted); --hairline-mid: color-mix(in oklab, var(--color-text-muted) 55%, var(--color-background)); --hairline-lo: color-mix(in srgb, var(--color-text) 16%, var(--color-background)); }
