/* ==========================================================================
   RCE Engenharia — site
   Sistema visual derivado do KV/ID "RCE AP": paleta oficial, Borna + Host
   Grotesk, grafismo em paralelogramo (60°) e chanfros do símbolo.
   ========================================================================== */

@layer reset, tokens, base, layout, components, sections, utilities;

/* -------------------------------------------------------------------------- */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body { min-height: 100svh; }
  img, svg, video, iframe { display: block; max-width: 100%; }
  input, button, textarea, select { font: inherit; color: inherit; }
  button { background: none; border: 0; padding: 0; cursor: pointer; }
  a { color: inherit; text-decoration: none; }
  ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
  p, h1, h2, h3, h4, li, dd, blockquote { overflow-wrap: break-word; }
  [hidden] { display: none !important; }
}

/* -------------------------------------------------------------------------- */
@layer tokens {
  @font-face { font-family: "Borna"; src: url("../fonts/Borna-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
  @font-face { font-family: "Borna"; src: url("../fonts/Borna-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
  @font-face { font-family: "Borna"; src: url("../fonts/Borna-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
  @font-face { font-family: "Host Grotesk"; src: url("../fonts/HostGrotesk-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
  @font-face { font-family: "Host Grotesk"; src: url("../fonts/HostGrotesk-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
  @font-face { font-family: "Host Grotesk"; src: url("../fonts/HostGrotesk-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
  @font-face { font-family: "Host Grotesk"; src: url("../fonts/HostGrotesk-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
  @font-face { font-family: "Host Grotesk"; src: url("../fonts/HostGrotesk-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }

  :root {
    /* Paleta oficial RCE */
    --ink: #0c0c0c;          /* 01 Preto */
    --red: #e52e2e;          /* 02 Vermelho vibrante */
    --wine: #500f10;         /* 03 Vinho elegante */
    --steel: #51545a;        /* 04 Cinza confiante */
    --mist: #c1c1c1;         /* 05 Cinza claro */
    --paper: #f3f1ef;        /* 06 Off-white */

    /* Derivadas (mesma família, só variação de luminosidade) */
    --paper-2: #eae7e3;
    --paper-3: #e1ddd8;
    --white: #fbfaf8;
    --ink-2: #1c1d1f;
    --red-ui: #d92a2a;       /* vermelho para fundo de botão com texto branco (AA) */
    --wine-deep: #3a0a0b;
    --line: rgb(12 12 12 / 0.13);
    --line-strong: rgb(12 12 12 / 0.28);
    --line-inv: rgb(243 241 239 / 0.16);
    --text: var(--ink-2);
    --text-2: var(--steel);
    --text-inv-2: rgb(243 241 239 / 0.7);

    --f-display: "Borna", "Host Grotesk", ui-sans-serif, system-ui, sans-serif;
    --f-text: "Host Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

    /* Escala tipográfica fluida (360px → 1440px) */
    --t-xs: 0.75rem;
    --t-sm: 0.875rem;
    --t-base: clamp(1rem, 0.96rem + 0.18vw, 1.0625rem);
    --t-lead: clamp(1.125rem, 1.03rem + 0.42vw, 1.375rem);
    --t-h4: clamp(1.1875rem, 1.1rem + 0.4vw, 1.4375rem);
    --t-h3: clamp(1.375rem, 1.18rem + 0.85vw, 1.875rem);
    --t-h2: clamp(2rem, 1.45rem + 2.45vw, 3.625rem);
    --t-h1: clamp(2.5rem, 1.55rem + 4.2vw, 5.375rem);
    --t-num: clamp(2.5rem, 1.9rem + 2.6vw, 4.25rem);

    /* Grid */
    --max: 1360px;
    --margin: clamp(20px, 4.6vw, 72px);
    --gutter: clamp(16px, 2.2vw, 32px);
    --edge: max(var(--margin), (100vw - var(--max)) / 2);

    /* Ritmo vertical */
    --section: clamp(88px, 10.5vw, 168px);
    --section-sm: clamp(64px, 7vw, 112px);
    --header-h: 76px;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --chamfer: clamp(28px, 4vw, 64px);
    --icon-accent: var(--red);
  }

  @media (max-width: 899px) { :root { --header-h: 64px; } }
}

/* -------------------------------------------------------------------------- */
@layer base {

  html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); }
  @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

  body {
    background: var(--paper);
    color: var(--text);
    font-family: var(--f-text);
    font-size: var(--t-base);
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
  }

  h1, h2, h3, h4 {
    font-family: var(--f-display);
    font-weight: 400;
    color: var(--ink);
    line-height: 1.04;
    letter-spacing: -0.025em;
    text-wrap: balance;
  }
  h1 { font-size: var(--t-h1); letter-spacing: -0.035em; line-height: 0.98; }
  h2 { font-size: var(--t-h2); letter-spacing: -0.03em; }
  h3 { font-size: var(--t-h3); line-height: 1.12; }
  h4 { font-size: var(--t-h4); line-height: 1.2; letter-spacing: -0.015em; }
  p { text-wrap: pretty; }
  strong, b { font-weight: 600; }

  ::selection { background: var(--red); color: #fff; }

  :focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

  .skip-link {
    position: fixed; left: 16px; top: 12px; z-index: 100;
    padding: 10px 16px; background: var(--ink); color: var(--paper);
    transform: translateY(-160%); transition: transform 0.2s var(--ease);
  }
  .skip-link:focus { transform: none; }
}

/* -------------------------------------------------------------------------- */
@layer layout {
  .wrap { width: min(100% - 2 * var(--margin), var(--max)); margin-inline: auto; }
  .grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }

  .section { padding-block: var(--section); position: relative; }
  .section--sm { padding-block: var(--section-sm); }
  .section--flush-top { padding-top: 0; }
  .section--paper-2 { background: var(--paper-2); }
  .section--white { background: var(--white); }

  .section--ink, .section--wine {
    --text: var(--paper);
    --text-2: var(--text-inv-2);
    --line: var(--line-inv);
    --line-strong: rgb(243 241 239 / 0.32);
    color: var(--paper);
  }
  .section--ink { background: var(--ink); }
  .section--wine { background: var(--wine); }
  .section--ink :is(h1, h2, h3, h4), .section--wine :is(h1, h2, h3, h4) { color: var(--paper); }

  .stack > * + * { margin-top: var(--stack, 1.25em); }
  .measure { max-width: 62ch; }
  .measure-sm { max-width: 48ch; }

  /* colunas utilitárias do grid de 12 */
  .c-full { grid-column: 1 / -1; }
  @media (min-width: 900px) {
    .c-1-5 { grid-column: 1 / span 5; }
    .c-1-6 { grid-column: 1 / span 6; }
    .c-1-7 { grid-column: 1 / span 7; }
    .c-1-8 { grid-column: 1 / span 8; }
    .c-6-7 { grid-column: 6 / span 7; }
    .c-7-6 { grid-column: 7 / span 6; }
    .c-8-5 { grid-column: 8 / span 5; }
    .c-2-10 { grid-column: 2 / span 10; }
    .c-3-8 { grid-column: 3 / span 8; }
  }
  @media (max-width: 899px) {
    [class*="c-"] { grid-column: 1 / -1; }
  }
}

/* -------------------------------------------------------------------------- */
@layer components {

  /* ---------- Header ---------- */
  .site-header {
    position: sticky; top: 0; z-index: 50;
    height: var(--header-h);
    transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  }
  .site-header::after {
    content: ""; position: absolute; inset: auto 0 0; height: 1px;
    background: var(--line); opacity: 0; transition: opacity 0.3s var(--ease);
  }
  .site-header.is-scrolled { background: rgb(243 241 239 / 0.86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
  .site-header.is-scrolled::after { opacity: 1; }
  .site-header__inner { height: 100%; display: flex; align-items: center; gap: 24px; }
  .brand { display: block; flex: none; }
  .brand img { height: 30px; width: auto; }
  @media (max-width: 899px) { .brand img { height: 26px; } }

  .nav { margin-left: auto; display: flex; align-items: center; gap: clamp(18px, 2.2vw, 36px); }
  .nav__list { display: flex; gap: clamp(18px, 2.2vw, 34px); list-style: none; padding: 0; }
  .nav__link {
    position: relative; font-size: var(--t-sm); font-weight: 500; color: var(--ink);
    padding-block: 8px; letter-spacing: 0.005em;
  }
  .nav__link::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1.5px;
    background: var(--red); transform: scaleX(0); transform-origin: right;
    transition: transform 0.4s var(--ease);
  }
  .nav__link:hover::after, .nav__link[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

  .menu-toggle { display: none; margin-left: auto; width: 44px; height: 44px; position: relative; }
  .menu-toggle span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--ink); transition: transform 0.35s var(--ease), opacity 0.2s; }
  .menu-toggle span:nth-child(1) { top: 17px; }
  .menu-toggle span:nth-child(2) { top: 26px; right: 17px; }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); right: 11px; }

  @media (max-width: 1023px) {
    .nav { display: none; }
    .menu-toggle { display: block; }
  }

  .mobile-menu {
    position: fixed; inset: var(--header-h) 0 0; z-index: 49;
    background: var(--paper); overflow-y: auto;
    padding: 24px var(--margin) 40px;
    display: flex; flex-direction: column; gap: 32px;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0s 0.35s;
  }
  .mobile-menu.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .mobile-menu__list { list-style: none; padding: 0; border-top: 1px solid var(--line); }
  .mobile-menu__list a {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 0; border-bottom: 1px solid var(--line);
    font-family: var(--f-display); font-size: clamp(1.75rem, 6vw, 2.5rem); letter-spacing: -0.02em; color: var(--ink);
  }
  .mobile-menu__list a[aria-current="page"] { color: var(--red); }
  .mobile-menu__meta { font-size: var(--t-sm); color: var(--text-2); display: grid; gap: 4px; }
  html.menu-open { overflow: hidden; }

  /* ---------- Buttons & links ---------- */
  .btn {
    --btn-bg: var(--red-ui); --btn-fg: #fff; --btn-bg-hover: var(--wine); --btn-border: transparent;
    position: relative; isolation: isolate;
    display: inline-flex; align-items: center; justify-content: center; gap: 0.7em;
    min-height: 54px; padding: 0 42px;
    font-size: 0.9375rem; font-weight: 500; letter-spacing: 0.01em; line-height: 1.2;
    color: var(--btn-fg); text-align: center;
    transition: color 0.3s var(--ease);
  }
  .btn::before {
    content: ""; position: absolute; inset: 0 14px; z-index: -1;
    background: var(--btn-bg); border: 1px solid var(--btn-border);
    transform: skewX(-30deg);
    transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease), inset 0.35s var(--ease);
  }
  .btn:hover::before { background: var(--btn-bg-hover); inset: 0 10px; }
  .btn .arr { transition: transform 0.35s var(--ease); }
  .btn:hover .arr { transform: translateX(4px); }
  .btn--sm { min-height: 44px; padding: 0 32px; font-size: var(--t-sm); }
  .btn--sm::before { inset: 0 11px; }
  .btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); --btn-border: var(--line-strong); --btn-bg-hover: var(--ink); }
  .btn--ghost:hover { --btn-fg: var(--paper); color: var(--paper); }
  .btn--light { --btn-bg: var(--paper); --btn-fg: var(--ink); --btn-bg-hover: #fff; }
  .section--ink .btn--ghost, .section--wine .btn--ghost { --btn-fg: var(--paper); --btn-border: rgb(243 241 239 / 0.4); --btn-bg-hover: var(--paper); }
  .section--ink .btn--ghost:hover, .section--wine .btn--ghost:hover { color: var(--ink); }
  .btn:focus-visible { outline-offset: 4px; }

  .link {
    display: inline-flex; align-items: center; gap: 0.55em;
    font-weight: 500; color: var(--ink); line-height: 1.3;
    padding-block: 4px;
    background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat;
    transition: background-size 0.45s var(--ease), color 0.3s;
  }
  .link .arr { color: var(--red); transition: transform 0.35s var(--ease); display: inline-block; }
  .link:hover { background-size: 0% 1px; background-position: right bottom; }
  .link:hover .arr { transform: translateX(5px); }
  .section--ink .link, .section--wine .link { color: var(--paper); }
  .section--wine .link .arr { color: var(--paper); }

  .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }

  /* ---------- Eyebrow / meta ---------- */
  .eyebrow {
    display: inline-flex; align-items: center; gap: 12px;
    font-size: var(--t-xs); font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--text-2); line-height: 1.4;
  }
  .eyebrow::before {
    content: ""; flex: none; width: 15px; height: 11px; background: var(--red);
    clip-path: polygon(36% 0, 100% 0, 64% 100%, 0 100%);
  }
  .meta {
    font-size: var(--t-xs); font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--text-2); line-height: 1.5;
  }
  .lead { font-size: var(--t-lead); line-height: 1.5; color: var(--text); font-weight: 400; letter-spacing: -0.005em; }
  .muted { color: var(--text-2); }
  .accent { color: var(--red); }

  /* cabeçalho de seção com régua técnica */
  .sec-rule {
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    padding-top: 18px; border-top: 1px solid var(--line-strong);
    margin-bottom: clamp(40px, 5vw, 72px);
  }

  /* ---------- Grafismo (paralelogramo do símbolo) ---------- */
  .slash { display: block; width: 100%; height: auto; overflow: visible; }

  /* ---------- Imagens ---------- */
  .media { position: relative; overflow: hidden; background: var(--paper-3); }
  .media img { width: 100%; height: 100%; object-fit: cover; }
  .media--chamfer { clip-path: polygon(0 0, 100% 0, 100% 100%, var(--chamfer) 100%, 0 calc(100% - var(--chamfer) * 1.732)); }
  .media--chamfer-tr { clip-path: polygon(0 0, calc(100% - var(--chamfer)) 0, 100% calc(var(--chamfer) * 1.732), 100% 100%, 0 100%); }
  .ar-4-3 { aspect-ratio: 4 / 3; }
  .ar-3-2 { aspect-ratio: 3 / 2; }
  .ar-16-9 { aspect-ratio: 16 / 9; }
  .ar-4-5 { aspect-ratio: 4 / 5; }
  .ar-1 { aspect-ratio: 1; }

  .graphic { position: relative; overflow: hidden; background: var(--wine); }
  .graphic svg { position: absolute; inset: 0; width: 100%; height: 100%; }
  .graphic--steel { background: var(--steel); }
  .graphic--ink { background: var(--ink); }
  .graphic__label {
    position: absolute; left: clamp(20px, 3vw, 36px); bottom: clamp(18px, 2.6vw, 32px); z-index: 1;
    color: var(--paper); font-family: var(--f-display); font-size: var(--t-h4); letter-spacing: -0.01em; line-height: 1.1;
  }
  .graphic__label small { display: block; margin-top: 6px; font-family: var(--f-text); font-size: var(--t-xs); letter-spacing: 0.14em; text-transform: uppercase; color: rgb(243 241 239 / 0.72); }

  /* ---------- Ícones da marca ---------- */
  .icon { width: var(--icon-size, 44px); height: var(--icon-size, 44px); flex: none; color: var(--ink); }
  .icon path, .icon line, .icon polyline, .icon circle, .icon rect, .icon polygon { vector-effect: non-scaling-stroke; stroke-width: var(--icon-stroke, 1.5px); }
  .section--ink .icon, .section--wine .icon { color: var(--paper); }

  /* ---------- Números ---------- */
  .stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); }
  .stat { padding: clamp(20px, 2.4vw, 32px) clamp(12px, 2vw, 28px) 0 0; position: relative; }
  .stat + .stat { padding-left: clamp(16px, 2vw, 28px); border-left: 1px solid var(--line); }
  .stat__value {
    display: block; font-family: var(--f-display); font-weight: 400; color: var(--ink);
    font-size: var(--t-num); line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  .stat__value small { font-size: 0.42em; letter-spacing: -0.01em; margin-left: 0.12em; }
  .stat__label { display: block; margin-top: 12px; font-size: var(--t-sm); color: var(--text-2); line-height: 1.4; }
  .section--ink .stat__value, .section--wine .stat__value { color: var(--paper); }
  @media (max-width: 767px) {
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat:nth-child(3) { border-left: 0; padding-left: 0; }
    .stat:nth-child(n + 3) { border-top: 1px solid var(--line); margin-top: 24px; }
  }

  /* ---------- Spec list (ficha técnica) ---------- */
  .specs { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); border-block: 1px solid var(--line); }
  .specs > div { padding: 18px 16px 18px 0; }
  .specs > div + div { padding-left: 16px; border-left: 1px solid var(--line); }
  .specs dt, .specs .k { font-family: var(--f-display); font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2.25rem); color: var(--ink); line-height: 1; letter-spacing: -0.03em; white-space: nowrap; }
  .specs dd, .specs .v { margin-top: 8px; font-size: var(--t-sm); color: var(--text-2); line-height: 1.35; }
  @media (max-width: 539px) {
    .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .specs > div:nth-child(odd) { padding-left: 0; border-left: 0; }
    .specs > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  }

  /* ficha (definição label/valor) */
  .facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border-top: 1px solid var(--line-strong); }
  .facts > div { padding: 16px 20px 16px 0; border-bottom: 1px solid var(--line); }
  .facts dt { font-size: var(--t-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2); font-weight: 500; }
  .facts dd { margin-top: 6px; font-size: var(--t-base); color: var(--ink); font-weight: 500; }

  /* ---------- Feature list (itens com ícone) ---------- */
  .features { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); border-top: 1px solid var(--line-strong); }
  .feature { padding: clamp(28px, 3vw, 44px) clamp(20px, 3vw, 44px) clamp(28px, 3vw, 44px) 0; border-bottom: 1px solid var(--line); display: grid; gap: 18px; align-content: start; }
  .features > .feature:nth-child(n) { padding-left: 0; }
  @media (min-width: 900px) {
    .features[style*="--cols: 2"] > .feature:nth-child(even),
    .features--2 > .feature:nth-child(even) { padding-left: clamp(20px, 3vw, 44px); border-left: 1px solid var(--line); }
    .features--4 > .feature + .feature { padding-left: clamp(20px, 2vw, 32px); border-left: 1px solid var(--line); }
    .features--3 > .feature + .feature { padding-left: clamp(20px, 2.4vw, 40px); border-left: 1px solid var(--line); }
  }
  .feature h3, .feature h4 { font-size: var(--t-h4); }
  .feature p { color: var(--text-2); }
  @media (max-width: 899px) { .features { grid-template-columns: 1fr; } .feature { padding-right: 0; } }

  /* ---------- Tags ---------- */
  .tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
  .tag {
    display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px;
    border: 1px solid var(--line-strong); border-radius: 999px;
    font-size: var(--t-sm); color: var(--ink); background: transparent; line-height: 1.2;
  }
  .section--ink .tag, .section--wine .tag { color: var(--paper); }

  /* ---------- Chips de filtro ---------- */
  .chip {
    display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 16px;
    border: 1px solid var(--line-strong); border-radius: 999px;
    font-size: var(--t-sm); font-weight: 500; color: var(--ink); background: transparent; line-height: 1.2;
    transition: background-color 0.25s var(--ease), color 0.25s, border-color 0.25s;
  }
  .chip:hover { border-color: var(--ink); }
  .chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
  .chip[aria-pressed="true"]::before { content: ""; width: 9px; height: 7px; background: var(--red); clip-path: polygon(36% 0, 100% 0, 64% 100%, 0 100%); }
  .chip__count { font-variant-numeric: tabular-nums; color: var(--text-2); font-weight: 400; }
  .chip[aria-pressed="true"] .chip__count { color: rgb(243 241 239 / 0.6); }

  /* ---------- Cards de projeto ---------- */
  .project-card { display: grid; gap: 20px; align-content: start; position: relative; }
  .project-card__media { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: var(--paper-3); }
  .project-card__media img, .project-card__media .graphic { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
  .project-card__media .graphic { position: absolute; inset: 0; }
  .project-card:hover .project-card__media img, .project-card:hover .project-card__media .graphic { transform: scale(1.04); }
  .project-card__media::after {
    content: ""; position: absolute; right: 0; bottom: 0; width: 46%; aspect-ratio: 1 / 0.24;
    background: var(--red); clip-path: polygon(22% 0, 100% 0, 100% 100%, 0 100%);
    transform: translateX(101%); transition: transform 0.6s var(--ease);
  }
  .project-card:hover .project-card__media::after { transform: none; }
  .project-card__body { display: grid; gap: 10px; }
  .project-card__title { font-size: var(--t-h4); line-height: 1.15; }
  .project-card__title a::after { content: ""; position: absolute; inset: 0; }
  .project-card__title span { color: var(--text-2); }
  .project-card__desc { color: var(--text-2); font-size: var(--t-sm); line-height: 1.55; max-width: 46ch; }
  .project-card--lg .project-card__title { font-size: var(--t-h3); }
  .project-card--lg .project-card__media { aspect-ratio: 16 / 10; }

  /* ---------- Post card ---------- */
  .post-card { position: relative; display: grid; gap: 20px; align-content: start; }
  .post-card__media { aspect-ratio: 3 / 2; overflow: hidden; background: var(--paper-3); }
  .post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
  .post-card:hover .post-card__media img { transform: scale(1.04); }
  .post-card__top { display: flex; gap: 16px; align-items: center; justify-content: space-between; }
  .post-card h3 { font-size: var(--t-h3); }
  .post-card h3 a::after { content: ""; position: absolute; inset: 0; }
  .post-card p { color: var(--text-2); }
  .post-card .link { position: relative; z-index: 1; justify-self: start; }

  /* ---------- Quote ---------- */
  .quote { display: grid; gap: 28px; align-content: space-between; }
  .quote blockquote { font-family: var(--f-display); font-size: clamp(1.25rem, 1.05rem + 0.75vw, 1.75rem); line-height: 1.25; letter-spacing: -0.02em; color: var(--ink); }
  .quote blockquote::before { content: "“"; display: block; font-size: 2.6em; line-height: 0.7; color: var(--red); margin-bottom: 8px; height: 0.45em; }
  .quote figcaption { font-size: var(--t-sm); line-height: 1.5; color: var(--text-2); padding-top: 18px; border-top: 1px solid var(--line); }
  .quote figcaption strong { display: block; color: var(--ink); font-weight: 600; }

  /* ---------- Formulários ---------- */
  .form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px var(--gutter); }
  .field { display: grid; gap: 8px; grid-column: span 1; }
  .field--full { grid-column: 1 / -1; }
  @media (max-width: 639px) { .form { grid-template-columns: 1fr; } .field { grid-column: 1 / -1; } }
  .field label { font-size: var(--t-sm); font-weight: 500; color: var(--ink); }
  .field label .req { color: var(--red); }
  .input {
    width: 100%; min-height: 52px; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line-strong);
    background: transparent; border-radius: 0; font-size: var(--t-base); color: var(--ink);
    transition: border-color 0.25s;
    appearance: none; -webkit-appearance: none;
  }
  .input:hover { border-bottom-color: var(--ink); }
  .input:focus { outline: none; border-bottom-color: var(--red); box-shadow: 0 1px 0 0 var(--red); }
  .input:user-invalid { border-bottom-color: var(--red); }
  textarea.input { min-height: 140px; resize: vertical; line-height: 1.55; }
  select.input {
    padding-right: 28px; cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
    background-position: calc(100% - 12px) 50%, calc(100% - 7px) 50%;
    background-size: 5px 5px; background-repeat: no-repeat;
  }
  .form-note { font-size: var(--t-sm); color: var(--text-2); }
  .form-note a { text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }

  .form-success {
    display: none; padding: clamp(28px, 4vw, 48px); background: var(--ink); color: var(--paper);
    gap: 16px; align-content: start;
  }
  .form-success.is-visible { display: grid; }
  .form-success h3 { color: var(--paper); }
  .form-success p { color: var(--text-inv-2); }

  /* ---------- Breadcrumb ---------- */
  .crumbs { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: var(--t-sm); color: var(--text-2); list-style: none; padding: 0; }
  .crumbs a { color: var(--ink); }
  .crumbs a:hover { color: var(--red); }
  .crumbs li + li::before { content: "/"; margin-right: 10px; color: var(--mist); }

  /* ---------- Vídeo placeholder ---------- */
  .video {
    position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ink);
    display: grid; place-items: center; color: var(--paper);
  }
  .video img, .video .graphic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .video::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(12 12 12 / 0.05), rgb(12 12 12 / 0.55)); z-index: 1; }
  .video__play {
    position: relative; z-index: 2; width: clamp(76px, 9vw, 112px); aspect-ratio: 1; display: grid; place-items: center;
    color: #fff; isolation: isolate;
  }
  .video__play::before { content: ""; position: absolute; inset: 0 12%; background: var(--red-ui); transform: skewX(-30deg); z-index: -1; transition: background-color .3s var(--ease); }
  .video__play:hover::before { background: var(--wine); }
  .video__play svg { width: 26%; height: auto; margin-left: 6%; }
  .video__label { position: absolute; z-index: 2; left: clamp(20px, 3vw, 36px); bottom: clamp(18px, 2.6vw, 32px); }
  .video__label .meta { color: rgb(243 241 239 / 0.82); }

  /* ---------- Slider ---------- */
  .slider { position: relative; }
  .slider__track {
    display: grid; grid-auto-flow: column; grid-auto-columns: clamp(280px, 58vw, 860px); gap: var(--gutter);
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    padding-inline: var(--edge); scroll-padding-inline: var(--edge);
    overscroll-behavior-x: contain;
  }
  .slider__track::-webkit-scrollbar { display: none; }
  .slider__slide { scroll-snap-align: start; }
  .slider__slide .media { aspect-ratio: 3 / 2; }
  .slider__slide--portrait { grid-column: span 1; }
  .slider__controls { display: flex; gap: 8px; align-items: center; }
  .icon-btn {
    width: 52px; height: 52px; display: grid; place-items: center; position: relative; isolation: isolate; color: var(--ink);
  }
  .icon-btn::before { content: ""; position: absolute; inset: 0 8px; border: 1px solid var(--line-strong); transform: skewX(-30deg); z-index: -1; transition: background-color .25s var(--ease), border-color .25s; }
  .icon-btn:hover::before { background: var(--ink); border-color: var(--ink); }
  .icon-btn:hover { color: var(--paper); }
  .icon-btn:disabled { opacity: 0.35; pointer-events: none; }
  .slider__progress { flex: 1; height: 1px; background: var(--line); position: relative; overflow: hidden; }
  .slider__progress span { position: absolute; inset: 0; background: var(--ink); transform-origin: left; transform: scaleX(var(--p, 0.2)); transition: transform 0.3s var(--ease); }

  /* ---------- Reveal ---------- */
  @media (prefers-reduced-motion: no-preference) {
    .js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
    .js [data-reveal].is-in { opacity: 1; transform: none; }
    .js [data-reveal="mask"] { opacity: 1; transform: none; clip-path: inset(0 0 100% 0); transition: clip-path 1.2s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
    .js [data-reveal="mask"].is-in { clip-path: inset(0 0 0 0); }
    .js .media--chamfer[data-reveal="mask"].is-in { clip-path: polygon(0 0, 100% 0, 100% 100%, var(--chamfer) 100%, 0 calc(100% - var(--chamfer) * 1.732)); }
  }

  /* ---------- Footer ---------- */
  .site-footer { background: var(--ink); color: var(--paper); position: relative; overflow: hidden; --line: var(--line-inv); --text-2: var(--text-inv-2); }
  .site-footer__top { padding-block: clamp(72px, 8vw, 128px) clamp(48px, 6vw, 88px); }
  .site-footer__brand img { width: clamp(180px, 18vw, 240px); height: auto; }
  .site-footer__brand p { margin-top: 28px; color: var(--text-inv-2); max-width: 34ch; }
  .site-footer h2 { font-family: var(--f-text); font-size: var(--t-xs); font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-inv-2); margin-bottom: 20px; }
  .site-footer ul { list-style: none; padding: 0; display: grid; gap: 10px; }
  .site-footer a { color: var(--paper); transition: color 0.2s; }
  .site-footer a:hover { color: var(--red); }
  .site-footer address { font-style: normal; display: grid; gap: 10px; color: var(--paper); }
  .site-footer__cols { display: grid; grid-template-columns: 1.3fr 1fr 1.3fr 1fr; gap: 48px var(--gutter); }
  @media (max-width: 999px) { .site-footer__cols { grid-template-columns: 1fr 1fr; } }
  @media (max-width: 599px) { .site-footer__cols { grid-template-columns: 1fr; } }
  .site-footer__bottom { border-top: 1px solid var(--line-inv); padding-block: 24px; display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; font-size: var(--t-sm); color: var(--text-inv-2); }
  .site-footer__bottom ul { display: flex; flex-wrap: wrap; gap: 8px 28px; }
  .site-footer > .wrap { position: relative; z-index: 1; }
  .site-footer__art { position: absolute; right: -8%; bottom: -22%; width: min(40vw, 560px); opacity: 0.55; pointer-events: none; }
  @media (max-width: 899px) { .site-footer__art { width: 80vw; right: -30%; opacity: 0.3; } }
}

/* -------------------------------------------------------------------------- */
@layer sections {

  /* ---------- Hero (Home) ---------- */
  .hero { position: relative; padding-top: clamp(32px, 5vw, 72px); }
  .hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: var(--gutter); align-items: stretch; }
  .hero__copy { padding-left: var(--edge); padding-bottom: clamp(40px, 5vw, 80px); display: flex; flex-direction: column; justify-content: center; gap: clamp(24px, 2.6vw, 36px); position: relative; z-index: 2; }
  .hero h1 { max-width: 11ch; }
  .hero h1 .accent { display: block; }
  .hero__lead { max-width: 30ch; font-family: var(--f-display); font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.75rem); line-height: 1.22; letter-spacing: -0.02em; color: var(--ink); }
  .hero__text { max-width: 50ch; color: var(--text-2); }
  .hero__visual { position: relative; min-height: clamp(440px, 64svh, 760px); }
  .hero__visual .media { position: absolute; inset: 0; --chamfer: clamp(40px, 6vw, 96px); }
  .hero__visual .media img { object-position: 50% 60%; }
  .hero__art { position: absolute; z-index: 3; pointer-events: none; }
  .hero__art--a { width: clamp(90px, 11vw, 170px); left: calc(-1 * clamp(40px, 5vw, 80px)); bottom: clamp(24px, 6vw, 96px); }
  .hero__art--b { width: clamp(70px, 8vw, 120px); right: clamp(24px, 4vw, 64px); top: clamp(24px, 4vw, 56px); }
  .hero__ticks { position: absolute; inset: 14px; z-index: 2; pointer-events: none; }
  .hero__ticks i { position: absolute; width: 18px; height: 18px; border-color: rgb(255 255 255 / 0.85); border-style: solid; border-width: 0; }
  .hero__ticks i:nth-child(1) { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
  .hero__ticks i:nth-child(2) { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }
  .hero__stats { margin-top: clamp(40px, 5vw, 72px); }
  .hero__note { margin-top: 20px; display: flex; justify-content: space-between; gap: 16px; font-size: var(--t-sm); color: var(--text-2); }
  @media (max-width: 899px) {
    .hero__grid { grid-template-columns: 1fr; }
    .hero__copy { padding-inline: var(--margin); padding-bottom: 8px; }
    .hero__visual { min-height: 0; aspect-ratio: 4 / 3.4; margin-left: var(--margin); }
    .hero__art--a { left: -14px; bottom: 18px; }
  }

  /* ---------- Page hero (internas) ---------- */
  .page-hero { padding-top: clamp(40px, 6vw, 96px); padding-bottom: clamp(56px, 7vw, 112px); position: relative; }
  .page-hero__eyebrow { margin-bottom: clamp(24px, 3vw, 40px); }
  .page-hero h1 { max-width: 16ch; }
  .page-hero__body { margin-top: clamp(28px, 3vw, 44px); display: grid; gap: 1.1em; }
  .page-hero__art { position: absolute; right: var(--edge); top: clamp(32px, 5vw, 80px); width: clamp(96px, 13vw, 200px); pointer-events: none; }
  @media (max-width: 899px) { .page-hero__art { width: 72px; top: 24px; opacity: 0.9; } }

  /* ---------- Interferência ---------- */
  .contexts { list-style: none; padding: 0; border-top: 1px solid var(--line-strong); }
  .contexts li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 24px; align-items: center; padding-block: clamp(20px, 2.4vw, 32px); border-bottom: 1px solid var(--line); }
  .contexts p { font-size: var(--t-lead); line-height: 1.4; color: var(--ink); letter-spacing: -0.005em; }
  .contexts .icon { --icon-size: 48px; }
  .sticky-col { position: sticky; top: calc(var(--header-h) + 40px); align-self: start; }
  @media (max-width: 899px) { .sticky-col { position: static; } }

  .four-lines { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); margin-top: clamp(48px, 6vw, 88px); }
  .four-lines p { font-family: var(--f-display); font-size: clamp(1.375rem, 1.1rem + 1.1vw, 2.125rem); line-height: 1.1; letter-spacing: -0.025em; color: var(--ink); padding-top: 22px; border-top: 1px solid var(--ink); position: relative; }
  .four-lines p::before { content: ""; position: absolute; top: -1px; left: 0; width: 44px; height: 3px; background: var(--red); }
  @media (max-width: 899px) { .four-lines { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; } }
  @media (max-width: 479px) { .four-lines { grid-template-columns: 1fr; } }

  .resource-strip { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr); gap: 20px var(--gutter); align-items: center; padding: clamp(20px, 2.4vw, 28px) 0; border-block: 1px solid var(--line-strong); }
  .resource-strip p { font-size: var(--t-sm); color: var(--text-2); }
  @media (max-width: 899px) { .resource-strip { grid-template-columns: 1fr; } }

  /* ---------- Destaques ---------- */
  .case { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); align-items: end; }
  .case + .case { margin-top: clamp(72px, 9vw, 144px); }
  .case__media { grid-column: 1 / span 7; position: relative; }
  .case__body { grid-column: 9 / span 4; display: grid; gap: 22px; }
  .case--rev .case__media { grid-column: 6 / span 7; grid-row: 1; }
  .case--rev .case__body { grid-column: 1 / span 4; grid-row: 1; }
  .case__media .media, .case__media .graphic { aspect-ratio: 4 / 3.1; }
  .case__title { font-size: var(--t-h3); }
  .case__title span { display: block; color: var(--text-2); font-size: 0.7em; margin-top: 6px; letter-spacing: -0.01em; }
  .case__headline { font-size: var(--t-h4); color: var(--ink); }
  .case__body p { color: var(--text-2); }
  .case__body .specs { --cols: 3; }
  @media (max-width: 1099px) { .case__body { grid-column: 8 / span 5; } .case--rev .case__body { grid-column: 1 / span 5; } }
  @media (max-width: 899px) {
    .case, .case--rev { grid-template-columns: 1fr; }
    .case__media, .case__body, .case--rev .case__media, .case--rev .case__body { grid-column: 1; grid-row: auto; }
  }

  /* ---------- Tabela de obras (dark) ---------- */
  .works { width: 100%; border-collapse: collapse; }
  .works thead th { text-align: left; font-size: var(--t-xs); font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-inv-2); padding: 0 0 16px; border-bottom: 1px solid var(--line-strong); }
  .works td { padding: 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
  .works tr { position: relative; }
  .works a.works__row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.5fr) minmax(0, 1.3fr) 40px; align-items: center; gap: var(--gutter); padding-block: clamp(20px, 2.4vw, 30px); color: var(--paper); transition: padding 0.4s var(--ease), color 0.3s; }
  .works__area { font-family: var(--f-display); font-size: clamp(1.75rem, 1.3rem + 1.8vw, 3rem); letter-spacing: -0.035em; line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; }
  .works__area small { font-size: 0.5em; letter-spacing: -0.01em; }
  .works__name { font-family: var(--f-display); font-size: var(--t-h4); letter-spacing: -0.015em; line-height: 1.2; }
  .works__sector { font-size: var(--t-sm); color: var(--text-inv-2); }
  .works__arr { justify-self: end; color: var(--red); transition: transform 0.35s var(--ease); font-size: 1.25rem; }
  .works a.works__row:hover { padding-left: 16px; }
  .works a.works__row:hover .works__arr { transform: translateX(6px); }
  .works__head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.5fr) minmax(0, 1.3fr) 40px; gap: var(--gutter); padding-bottom: 16px; border-bottom: 1px solid var(--line-strong); font-size: var(--t-xs); font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-inv-2); }
  .works-list { list-style: none; padding: 0; }
  .works-list li { border-bottom: 1px solid var(--line); }
  @media (max-width: 767px) {
    .works__head { display: none; }
    .works a.works__row { grid-template-columns: minmax(0, 1fr) 28px; gap: 6px 16px; }
    .works__area { grid-column: 1; }
    .works__name, .works__sector { grid-column: 1; }
    .works__arr { grid-row: 1 / span 3; grid-column: 2; align-self: center; }
  }
  .hover-preview {
    position: fixed; left: 0; top: 0; z-index: 30; width: clamp(240px, 22vw, 340px); aspect-ratio: 4 / 3; pointer-events: none;
    opacity: 0; transform: translate3d(var(--x, 0), var(--y, 0), 0) scale(0.92); transition: opacity 0.3s var(--ease), transform 0.25s var(--ease);
    overflow: hidden; background: var(--steel);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 26px 100%, 0 calc(100% - 45px));
  }
  .hover-preview.is-on { opacity: 1; transform: translate3d(var(--x, 0), var(--y, 0), 0) scale(1); }
  .hover-preview img, .hover-preview .graphic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  @media (hover: none), (pointer: coarse) { .hover-preview { display: none; } }

  /* ---------- Serviços (linhas) ---------- */
  .rows { list-style: none; padding: 0; border-top: 1px solid var(--line-strong); }
  .row { display: grid; grid-template-columns: 56px minmax(0, 1.05fr) minmax(0, 1.25fr); gap: var(--gutter); padding-block: clamp(24px, 3vw, 40px); border-bottom: 1px solid var(--line); align-items: start; position: relative; }
  .row::before { content: ""; position: absolute; left: 0; top: -1px; height: 2px; width: 0; background: var(--red); transition: width 0.7s var(--ease); }
  .row:hover::before { width: 100%; }
  .row h3 { font-size: var(--t-h3); }
  .row p { color: var(--text-2); max-width: 52ch; }
  .row .icon { --icon-size: 44px; margin-top: 2px; }
  @media (max-width: 767px) { .row { grid-template-columns: 44px minmax(0, 1fr); } .row p { grid-column: 2; } .row .icon { --icon-size: 36px; } }

  /* ---------- Setores (cards) ---------- */
  .sectors { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); }
  .sector { padding: clamp(24px, 2.6vw, 36px) clamp(16px, 2vw, 28px) clamp(28px, 3vw, 40px); display: grid; gap: 18px; align-content: start; border-bottom: 1px solid var(--line); transition: background-color 0.4s var(--ease); }
  .sector + .sector { border-left: 1px solid var(--line); }
  .sector:first-child { padding-left: 0; }
  .sector h3 { font-size: var(--t-h4); }
  .sector p { color: var(--text-2); font-size: var(--t-sm); line-height: 1.6; }
  .sector .icon { --icon-size: 52px; margin-bottom: clamp(12px, 3vw, 40px); }
  @media (max-width: 999px) {
    .sectors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sector:nth-child(3) { border-left: 0; padding-left: 0; }
  }
  @media (max-width: 559px) {
    .sectors { grid-template-columns: 1fr; }
    .sector, .sector + .sector { border-left: 0; padding-left: 0; padding-right: 0; }
  }

  /* ---------- Clientes ---------- */
  .clients { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); border-left: 1px solid var(--line); }
  .clients li { min-height: clamp(96px, 10vw, 148px); display: flex; align-items: center; justify-content: center; text-align: center; padding: 20px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-family: var(--f-display); font-size: clamp(1rem, 0.85rem + 0.6vw, 1.375rem); letter-spacing: -0.015em; line-height: 1.15; color: var(--ink); transition: background-color 0.35s var(--ease), color 0.35s; }
  .clients li:hover { background: var(--ink); color: var(--paper); }
  .clients__more { margin-top: 18px; text-align: right; color: var(--text-2); font-size: var(--t-sm); }
  @media (max-width: 999px) { .clients { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  @media (max-width: 559px) { .clients { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

  .quotes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(32px, 4vw, 64px) var(--gutter); }
  @media (max-width: 999px) { .quotes { grid-template-columns: 1fr; } .quote { max-width: 640px; } }

  /* ---------- RCE letters ---------- */
  .letters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); }
  .letter { padding: clamp(20px, 2.4vw, 32px) clamp(16px, 2vw, 28px) clamp(20px, 2.4vw, 32px) 0; display: grid; gap: 14px; align-content: start; }
  .letter + .letter { padding-left: clamp(16px, 2vw, 28px); border-left: 1px solid var(--line); }
  .letter__glyph { font-family: var(--f-display); font-weight: 500; font-size: clamp(4.5rem, 3rem + 6vw, 9.5rem); line-height: 0.8; letter-spacing: -0.05em; color: var(--ink); }
  .letter:first-child .letter__glyph { color: var(--red); }
  .letter__word { font-family: var(--f-display); font-size: var(--t-h4); color: var(--ink); letter-spacing: -0.015em; }
  .letter p { color: var(--text-2); font-size: var(--t-sm); line-height: 1.6; }
  .letters--compact .letter__glyph { font-size: clamp(3.25rem, 2.4rem + 3.6vw, 6rem); }
  @media (max-width: 767px) {
    .letters:not(.letters--inline) { grid-template-columns: 1fr; }
    .letters:not(.letters--inline) .letter + .letter { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  }

  /* ---------- CTA final ---------- */
  .cta { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); background: var(--wine); color: var(--paper); --line: var(--line-inv); --text-2: var(--text-inv-2); position: relative; overflow: hidden; }
  .cta__copy { padding: var(--section) var(--gutter) var(--section) var(--edge); display: grid; gap: 28px; align-content: center; position: relative; z-index: 1; }
  .cta__copy h2 { color: var(--paper); max-width: 13ch; }
  .cta__copy p { color: var(--text-inv-2); max-width: 54ch; }
  .cta__contact { display: grid; gap: 6px; padding-top: 24px; border-top: 1px solid var(--line-inv); font-size: var(--t-sm); color: var(--text-inv-2); }
  .cta__contact a { color: var(--paper); }
  .cta__contact a:hover { text-decoration: underline; text-underline-offset: 3px; }
  .cta__visual { position: relative; min-height: 420px; background: #080606; }
  .cta__visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .cta__visual::before { content: ""; position: absolute; inset: 0 auto 0 -1px; width: 38%; z-index: 1; background: var(--wine); clip-path: polygon(0 0, 100% 0, 0 100%); }
  @media (max-width: 899px) {
    .cta { grid-template-columns: 1fr; }
    .cta__copy { padding: var(--section-sm) var(--margin); }
    .cta__visual { min-height: 0; aspect-ratio: 16 / 10; order: -1; }
    .cta__visual::before { inset: auto 0 -1px 0; width: 100%; height: 34%; clip-path: polygon(0 100%, 100% 0, 100% 100%); }
  }

  /* ---------- Empresa ---------- */
  .about-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.86fr); gap: var(--gutter); align-items: end; }
  .about-hero__media .media { aspect-ratio: 4 / 4.6; }
  .about-hero__media .media img { object-position: 50% 30%; }
  @media (max-width: 899px) { .about-hero { grid-template-columns: 1fr; } }

  .mv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); }
  .mv > div { padding-top: 24px; border-top: 1px solid var(--line-strong); display: grid; gap: 20px; align-content: start; }
  .mv h2 { font-size: var(--t-h3); }
  .mv p { font-family: var(--f-display); font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.75rem); line-height: 1.3; letter-spacing: -0.015em; color: var(--paper); }
  .mv p + p { font-family: var(--f-text); font-size: var(--t-base); line-height: 1.6; letter-spacing: 0; color: var(--text-inv-2); }
  @media (max-width: 767px) { .mv { grid-template-columns: 1fr; row-gap: 48px; } }

  .team { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 5vw, 80px) var(--gutter); }
  .person { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr); gap: clamp(20px, 2.4vw, 36px); align-items: end; }
  .person .media { aspect-ratio: 3 / 4; --chamfer: 32px; }
  .person h3 { font-size: var(--t-h3); }
  .person .meta { margin-top: 8px; color: var(--red); }
  .person blockquote { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--text); font-size: var(--t-base); line-height: 1.6; }
  @media (max-width: 1099px) { .team { grid-template-columns: 1fr; } .person { max-width: 760px; } }
  @media (max-width: 539px) { .person { grid-template-columns: 1fr; } .person .media { max-width: 320px; } }

  /* ---------- Projetos (galeria) ---------- */
  .filters { position: sticky; top: var(--header-h); z-index: 20; background: rgb(243 241 239 / 0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-block: 1px solid var(--line); }
  .filters__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding-block: 14px; }
  .filters__group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border: 0; padding: 0; min-width: 0; }
  .filters__group legend { float: left; margin-right: 6px; font-size: var(--t-xs); font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-2); }
  .filters__meta { margin-left: auto; display: flex; align-items: center; gap: 16px; font-size: var(--t-sm); color: var(--text-2); font-variant-numeric: tabular-nums; }
  .filters__clear { font-size: var(--t-sm); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }
  .filters__clear[hidden] { display: none; }
  @media (max-width: 899px) {
    .filters { position: static; }
    .filters__inner { flex-direction: column; align-items: stretch; }
    .filters__group { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; min-inline-size: 0; }
    .filters__group::-webkit-scrollbar { display: none; }
    .filters__group legend { float: none; flex: none; }
    .chip { flex: none; }
    .filters__meta { margin-left: 0; }
  }

  .gallery-group + .gallery-group { margin-top: clamp(64px, 8vw, 120px); }
  .gallery-group[hidden] { display: none; }
  .gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(40px, 4vw, 64px) var(--gutter); }
  .gallery-grid--lg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-grid > [hidden] { display: none; }
  @media (max-width: 999px) { .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 639px) { .gallery-grid, .gallery-grid--lg { grid-template-columns: 1fr; } }
  .empty-state { padding: 48px 0; border-top: 1px solid var(--line); color: var(--text-2); }
  .empty-state[hidden] { display: none; }

  /* ---------- Projeto (interna) ---------- */
  .case-hero { padding-top: clamp(32px, 4vw, 56px); }
  .case-hero h1 { max-width: 18ch; margin-top: clamp(24px, 3vw, 40px); }
  .case-hero h1 span { display: block; color: var(--text-2); }
  .case-hero .facts { margin-top: clamp(36px, 4vw, 56px); }
  .case-cover { margin-top: clamp(40px, 5vw, 72px); }
  .case-cover .media, .case-cover .graphic { aspect-ratio: 21 / 9; --chamfer: clamp(40px, 6vw, 96px); }
  @media (max-width: 767px) { .case-cover .media, .case-cover .graphic { aspect-ratio: 4 / 3; } }

  .narrative { list-style: none; padding: 0; counter-reset: n; border-top: 1px solid var(--line-strong); }
  .narrative li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--gutter); padding-block: clamp(28px, 3.4vw, 48px); border-bottom: 1px solid var(--line); }
  .narrative h3 { font-size: var(--t-h3); }
  .narrative p { color: var(--text-2); max-width: 56ch; }
  @media (max-width: 767px) { .narrative li { grid-template-columns: 1fr; gap: 14px; } }

  /* ---------- Soluções ---------- */
  .expertise { display: grid; gap: clamp(72px, 9vw, 140px); }
  .exp { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); align-items: center; }
  .exp__media { grid-column: 1 / span 6; }
  .exp__media .media, .exp__media .graphic { aspect-ratio: 5 / 4; }
  .exp__body { grid-column: 8 / span 5; display: grid; gap: 20px; }
  .exp:nth-child(even) .exp__media { grid-column: 7 / span 6; grid-row: 1; }
  .exp:nth-child(even) .exp__body { grid-column: 1 / span 5; grid-row: 1; }
  .exp__body p { color: var(--text-2); }
  .exp__body .icon { --icon-size: 48px; }
  @media (max-width: 899px) {
    .exp { grid-template-columns: 1fr; }
    .exp__media, .exp__body, .exp:nth-child(even) .exp__media, .exp:nth-child(even) .exp__body { grid-column: 1; grid-row: auto; }
  }

  .method { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; position: relative; }
  .method::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line-strong); }
  .method__bar { position: absolute; left: 0; right: 0; top: -1px; height: 3px; background: var(--red); transform-origin: left; transform: scaleX(1); }
  @supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
      .method__bar { animation: grow linear both; animation-timeline: view(); animation-range: entry 10% cover 55%; }
    }
  }
  @keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  .step { padding: clamp(28px, 3vw, 40px) clamp(14px, 1.6vw, 24px) 0 0; display: grid; gap: 14px; align-content: start; position: relative; }
  .step + .step { padding-left: clamp(14px, 1.6vw, 24px); border-left: 1px solid var(--line); }
  .step__n { font-family: var(--f-display); font-size: clamp(2.75rem, 2rem + 2.6vw, 4.5rem); line-height: 0.85; letter-spacing: -0.05em; color: var(--paper); -webkit-text-stroke: 1px rgb(243 241 239 / 0.7); color: transparent; }
  .step h3 { font-size: var(--t-h4); }
  .step p { color: var(--text-2); font-size: var(--t-sm); line-height: 1.6; }
  .step .meta { color: var(--red); }
  .section--wine .step .meta, .section--ink .step .meta { color: #ff7a72; }
  @media (max-width: 1099px) {
    .method { grid-template-columns: 1fr; }
    .method::before, .method__bar { display: none; }
    .step, .step + .step { grid-template-columns: 96px minmax(0, 1fr); padding: 28px 0; border-left: 0; border-top: 1px solid var(--line); column-gap: 20px; }
    .step > *:not(.step__n) { grid-column: 2; }
    .step__n { grid-row: 1 / span 3; }
  }

  /* ---------- Blog ---------- */
  .blog-tools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 340px); gap: 20px var(--gutter); align-items: end; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
  .blog-tools .filters__group { flex-wrap: wrap; }
  .search { position: relative; }
  .search .input { padding-left: 30px; }
  .search svg { position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--steel); }
  @media (max-width: 899px) { .blog-tools { grid-template-columns: 1fr; } .blog-tools .filters__group { flex-wrap: nowrap; } }
  .posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(48px, 5vw, 72px) var(--gutter); margin-top: clamp(40px, 5vw, 64px); }
  .posts > [hidden] { display: none; }
  @media (max-width: 999px) { .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 639px) { .posts { grid-template-columns: 1fr; } }
  .pagination { display: flex; gap: 8px; justify-content: center; margin-top: 56px; list-style: none; padding: 0; }
  .pagination[hidden] { display: none; }
  .pagination button { min-width: 44px; height: 44px; border: 1px solid var(--line-strong); font-variant-numeric: tabular-nums; }
  .pagination button[aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

  /* ---------- Artigo ---------- */
  .article-hero { padding-top: clamp(32px, 4vw, 56px); }
  .article-hero h1 { font-size: clamp(2.25rem, 1.5rem + 3.2vw, 4.5rem); max-width: 20ch; margin-top: clamp(24px, 3vw, 40px); }
  .article-hero__meta { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; }
  .article-cover { margin-top: clamp(40px, 5vw, 64px); }
  .article-cover .media { aspect-ratio: 21 / 9; --chamfer: clamp(40px, 6vw, 96px); }
  @media (max-width: 767px) { .article-cover .media { aspect-ratio: 3 / 2; } }
  .prose { font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem); line-height: 1.72; color: var(--text); }
  .prose > * + * { margin-top: 1.25em; }
  .prose h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2.125rem); margin-top: 2.2em; padding-top: 0.9em; border-top: 1px solid var(--line); }
  .prose .summary { font-family: var(--f-display); font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.75rem); line-height: 1.35; letter-spacing: -0.015em; color: var(--ink); }
  .prose a:not(.link) { color: var(--ink); text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 4px; }
  .prose .callout { padding: clamp(24px, 3vw, 36px); background: var(--white); border-left: 3px solid var(--red); display: grid; gap: 16px; }
  .article-layout { display: grid; grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr); gap: var(--gutter); }
  .article-aside { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; display: grid; gap: 20px; }
  @media (max-width: 899px) { .article-layout { grid-template-columns: 1fr; } .article-aside { position: static; } }

  /* ---------- Contato ---------- */
  .contact-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr); gap: clamp(48px, 6vw, 112px); align-items: start; }
  @media (max-width: 999px) { .contact-layout { grid-template-columns: 1fr; } }
  .channels { display: grid; gap: 0; border-top: 1px solid var(--line-strong); }
  .channels > div { padding-block: 20px; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
  .channels dt { font-size: var(--t-xs); font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-2); }
  .channels dd { font-size: var(--t-lead); line-height: 1.4; color: var(--ink); display: grid; gap: 2px; }
  .channels dd a:hover { color: var(--red); }
  .map { margin-top: 32px; aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-3); position: relative; clip-path: polygon(0 0, 100% 0, 100% 100%, 32px 100%, 0 calc(100% - 55px)); }
  .map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(1) contrast(1.05); transition: filter 0.5s var(--ease); }
  .map:hover iframe { filter: none; }
  .socials { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
  .ethics { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px var(--gutter); align-items: center; padding: clamp(28px, 4vw, 56px); background: var(--white); border: 1px solid var(--line); }
  @media (max-width: 767px) { .ethics { grid-template-columns: 1fr; } }

  /* ---------- Trabalhe conosco ---------- */
  .opps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); }
  .opp { display: grid; gap: 22px; align-content: start; padding: clamp(28px, 4vw, 56px); background: var(--white); border: 1px solid var(--line); position: relative; overflow: hidden; }
  .opp .icon { --icon-size: 56px; }
  .opp h2 { font-size: var(--t-h3); }
  .opp p { color: var(--text-2); }
  .opp .btn { justify-self: start; margin-top: 8px; }
  .opp--dark { background: var(--ink); color: var(--paper); border-color: var(--ink); --text-2: var(--text-inv-2); }
  .opp--dark h2 { color: var(--paper); }
  .opp--dark .icon { color: var(--paper); }
  @media (max-width: 899px) { .opps { grid-template-columns: 1fr; } }
}

/* -------------------------------------------------------------------------- */
@layer utilities {
  .visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .mt-s { margin-top: 16px; } .mt-m { margin-top: 32px; } .mt-l { margin-top: clamp(40px, 5vw, 72px); } .mt-xl { margin-top: clamp(64px, 8vw, 120px); }
  .mb-l { margin-bottom: clamp(40px, 5vw, 72px); }
  .ta-r { text-align: right; }
  .nowrap { white-space: nowrap; }
}
