:root {
  --bg: #f4eee5;
  --surface: #ebe2d4;
  --ink: #2b1e16;
  --muted: #6b584a;
  --accent: #a4552b;
  --accent-ink: #fff8f0;
  --bark: #3b2a20;
  --line: rgba(43, 30, 22, .16);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 22px;
  --gutter: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1a1310; --surface: #251b16; --ink: #f0e6d8; --muted: #b3a08e;
    --accent: #d98a5a; --accent-ink: #1a1310; --line: rgba(240, 230, 216, .16);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1a1310; --surface: #251b16; --ink: #f0e6d8; --muted: #b3a08e;
  --accent: #d98a5a; --accent-ink: #1a1310; --line: rgba(240, 230, 216, .16);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* language switch */
html[data-lang="pt"] body [lang="en"],
html[data-lang="en"] body [lang="pt"] { display: none !important; }

img, iframe { max-width: 100%; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 200; }
.skip:focus { left: 8px; }

.wrap { width: min(1180px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.block, .case { padding-block: 72px 24px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.1; letter-spacing: -.01em; margin: 0; }
h2 { font-size: clamp(30px, 5vw, 52px); margin-bottom: 20px; }
h3 { font-size: clamp(22px, 3vw, 32px); margin-bottom: 14px; }
p { margin: 0 0 1em; }
.eyebrow { font: 600 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; }
.intro { font-size: clamp(18px, 2vw, 21px); color: var(--muted); max-width: 720px; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px var(--gutter);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { font: 600 20px/1 var(--serif); text-decoration: none; }
.nav-links { display: none; gap: 24px; font-size: 14.5px; }
.nav-links a { text-decoration: none; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }
.tools { display: flex; align-items: center; gap: 8px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.seg button { border: 0; background: transparent; color: var(--muted); font: 600 12px/1 var(--sans); padding: 7px 11px; border-radius: 999px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.icon-btn { border: 1px solid var(--line); background: transparent; color: var(--ink); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
@media (min-width: 900px) { .nav { padding-inline: max(var(--gutter), calc((100vw - 1180px) / 2)); } .nav-links { display: flex; } }

/* hero */
.hero { position: relative; padding-block: 56px 40px; overflow: hidden; }
.rings { position: absolute; right: -180px; top: -120px; width: 760px; max-width: none; color: var(--accent); opacity: .16; pointer-events: none; }
.hero-grid { position: relative; display: grid; gap: 36px; align-items: center; }
.hero h1 { font-size: clamp(38px, 7vw, 76px); font-style: italic; margin-bottom: 26px; max-width: 14ch; }
.lead { font-size: clamp(19px, 2.4vw, 25px); line-height: 1.5; max-width: 34ch; }
.lead .k { color: var(--accent); font-family: var(--serif); font-style: italic; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-block; text-decoration: none; padding: 13px 22px; border-radius: 999px; border: 1px solid var(--ink); font-weight: 500; font-size: 15px; transition: transform .2s, background .2s; }
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.portrait { aspect-ratio: 4 / 5; border-radius: 46% 54% 42% 58% / 38% 40% 60% 62%; max-width: 420px; width: 100%; margin: 0; justify-self: center; }
@media (min-width: 900px) {
  .hero { padding-block: 96px 64px; }
  .hero-grid { grid-template-columns: 1.3fr .9fr; }
  .portrait { justify-self: end; }
}

/* placeholders and images */
.ph {
  position: relative; overflow: hidden;
  background: var(--g, linear-gradient(140deg, #8a6a52, #4a3628)) center / cover no-repeat;
  color: #fff8f0;
}
.ph-label { position: absolute; inset: auto 14px 12px 14px; font-size: 12px; letter-spacing: .04em; opacity: .75; }
.ph.has-img .ph-label { display: none; }
.portrait.has-img { background-position: 50% 28%; }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 28px; }
.tile {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  min-height: 170px; padding: 18px; border-radius: var(--radius);
  text-decoration: none; transition: transform .25s, box-shadow .25s;
}
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.55)); opacity: 0; transition: opacity .25s; }
.tile.has-img::after { opacity: 1; }
.tile > * { position: relative; z-index: 1; }
.tile .n { font-size: 12px; letter-spacing: .14em; opacity: .75; }
.tile .t { font: 400 clamp(20px, 2.6vw, 30px)/1.1 var(--serif); }
.tile .sub { display: block; margin-top: 10px; font-size: 13px; line-height: 1.5; opacity: .82; }
.tile:hover { transform: translateY(-4px); box-shadow: 0 14px 30px -14px rgba(0,0,0,.5); }
.tile.big { grid-column: span 2; min-height: 220px; }
.tile.big .t { font-size: clamp(30px, 4vw, 46px); }
@media (min-width: 900px) {
  .tiles { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 210px; gap: 16px; }
  .tile { min-height: 0; padding: 22px; }
  .tile.big { grid-row: span 2; min-height: 0; }
}

/* timeline */
.timeline { list-style: none; margin: 40px 0 0; padding: 0; border-left: 1px solid var(--line); }
.timeline li { position: relative; display: grid; gap: 6px; padding: 0 0 34px 24px; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.yr { font: 600 13px/1.4 var(--sans); letter-spacing: .06em; color: var(--accent); }
.yr em { font-style: normal; color: var(--muted); font-weight: 500; }
.timeline h3 { font-size: 26px; margin-bottom: 2px; }
.role { color: var(--muted); font-size: 15px; margin-bottom: 8px; }
.timeline p:last-child { margin-bottom: 0; max-width: 62ch; }
.timeline a { color: var(--accent); text-underline-offset: 3px; white-space: nowrap; }
@media (min-width: 900px) {
  .timeline li { grid-template-columns: 170px 1fr; gap: 24px; padding-left: 32px; }
  .timeline li::before { top: 9px; }
}
.edu { display: grid; gap: 28px; margin-top: 24px; padding-top: 32px; border-top: 1px solid var(--line); }
.edu h3 { font-size: 20px; }
@media (min-width: 900px) { .edu { grid-template-columns: 1fr 1fr; } }

/* cases */
.case { display: grid; gap: 28px; align-items: center; padding-block: 48px; border-top: 1px solid var(--line); }
.case-media { aspect-ratio: 3 / 2; border-radius: var(--radius); margin: 0; }
.case-media.wide { aspect-ratio: 16 / 9; }
.tile.has-img[href="#historia"] { background-position: 30% 52%; }
.tile.has-img[href="#projetos"] { background-position: 50% 60%; }
.tile.has-img[href="#fotografia"] { background-position: 30% 40%; }
.tile.has-img[href="#contato"] { background-position: 82% 50%; }
.tile.has-img[href="#dados"] { background-position: 70% 25%; }
.tile.has-img[href="#dados"]::after { background: linear-gradient(200deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.45)); }
.case-media.video { aspect-ratio: 16 / 9; background: #000; }
.case-media iframe { width: 100%; height: 100%; border: 0; display: block; }
.case { align-items: start; }
.case-body ul { padding-left: 1.1em; margin: 0; }
.case-body li { margin-bottom: 6px; }
.case-lead { font: 400 clamp(19px, 2.2vw, 22px)/1.45 var(--serif); margin-bottom: 22px; }
.csr { margin: 0; display: grid; gap: 4px 0; }
.csr dt { font: 600 11.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-top: 16px; }
.csr dt:first-of-type { margin-top: 0; }
.csr dd { margin: 6px 0 0; }
.press { font-size: 14px; color: var(--muted); margin-top: 18px; }
.press a { color: var(--accent); text-underline-offset: 3px; }
@media (min-width: 900px) {
  .case { grid-template-columns: 1fr 1fr; gap: 56px; padding-block: 64px; }
  .case.flip .case-media { order: 2; }
  .case-media { position: sticky; top: 96px; }
}
#projetos { padding-bottom: 0; }

/* featured case */
.case.featured { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 20px; margin-top: 32px; }
.case-head h3 { font-size: clamp(26px, 3.6vw, 40px); max-width: 24ch; margin-bottom: 28px; }
.steps { display: grid; gap: 28px; }
.steps h4 { font: 600 11.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; }
.steps ul { padding-left: 1.1em; margin: 0; }
.steps li { margin-bottom: 8px; }
.results { list-style: none; padding: 0 !important; display: grid; gap: 14px; }
.results li { display: grid; grid-template-columns: 78px 1fr; gap: 12px; align-items: baseline; margin: 0; }
.results strong { font: 400 30px/1 var(--serif); color: var(--accent); }
.results span { font-size: 15px; color: var(--muted); line-height: 1.45; }
@media (min-width: 900px) {
  .case.featured { padding: 48px; margin-top: 40px; }
  .steps { grid-template-columns: 1fr 1fr; gap: 40px 56px; }
}

/* data */
.data-grid { display: grid; gap: 28px; margin-top: 36px; }
.data-item { border-top: 1px solid var(--line); padding-top: 20px; }
.data-item h3 { font-size: 24px; }
.data-item p:not(.eyebrow):not(.press) { margin-bottom: 0; }
@media (min-width: 900px) { .data-grid { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.brands { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.brands h3 { font: 600 12px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0 !important; margin: 0; }
.chips li { position: relative; margin: 0; }
.chips li.open, .chips li:hover, .chips li:focus-within { z-index: 20; }
.chip { font: inherit; font-size: 13.5px; line-height: 1.4; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; cursor: pointer; transition: border-color .2s, color .2s; }
.chip:hover, .chips li.open .chip { border-color: var(--accent); color: var(--ink); }
.tip {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 30;
  width: min(280px, calc(100vw - 24px));
  padding: 12px 14px; border-radius: 14px;
  background: var(--ink); color: var(--bg);
  font-size: 14px; line-height: 1.45;
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .55);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .18s, transform .18s, visibility .18s;
  pointer-events: none;
}
.tip::before {
  content: ""; position: absolute; top: -5px; left: var(--ax, 24px);
  width: 10px; height: 10px; background: var(--ink); transform: translateX(-50%) rotate(45deg);
}
.tip-meta { display: block; margin-bottom: 4px; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .72; }
.chips li.open .tip,
.chip:focus-visible + .tip { opacity: 1; visibility: visible; transform: none; }
@media (hover: hover) { .chips li:hover .tip { opacity: 1; visibility: visible; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tip, .chip { transition: none; } }

/* gallery */
.gallery { columns: 2; column-gap: 10px; margin-top: 28px; }
.shot { display: block; width: 100%; margin: 0 0 10px; padding: 0; border: 0; background: var(--surface); border-radius: 12px; overflow: hidden; cursor: zoom-in; break-inside: avoid; }
.shot img { display: block; width: 100%; height: auto; transition: transform .5s ease, opacity .3s; }
.shot:hover img { transform: scale(1.03); }
@media (min-width: 900px) { .gallery { columns: 3; column-gap: 16px; } .shot { margin-bottom: 16px; } }
.lightbox { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(15, 10, 8, .92); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: calc(100vw - 32px); max-height: calc(100vh - 96px); width: auto; height: auto; border-radius: 6px; }
.lb-close { position: fixed; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(240, 230, 216, .4); background: transparent; color: #f0e6d8; font-size: 26px; line-height: 1; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .shot img { transition: none; } .shot:hover img { transform: none; } }

/* contact */
.contact { margin-top: 72px; background: var(--bark); color: #f0e6d8; padding-block: 88px 40px; }
.contact h2 { font-size: clamp(40px, 8vw, 88px); font-style: italic; }
.contact .intro { color: #cdbba8; }
.contact .eyebrow { color: #d98a5a; }
.contact .btn { border-color: #f0e6d8; }
.contact .btn.primary { background: #d98a5a; border-color: #d98a5a; color: #1a1310; }
.email-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 22px; }
.email-addr { font-size: 16px; color: #f0e6d8; user-select: all; overflow-wrap: anywhere; }
.copy-btn { font: 500 13px/1 var(--sans); color: #f0e6d8; background: transparent; border: 1px solid rgba(240, 230, 216, .35); border-radius: 999px; padding: 8px 14px; cursor: pointer; transition: border-color .2s, background .2s; }
.copy-btn:hover { border-color: #f0e6d8; }
.copy-btn .copy-done { display: none; }
.copy-btn.copied { background: rgba(217, 138, 90, .18); border-color: #d98a5a; }
.copy-btn.copied .copy-idle { display: none; }
.copy-btn.copied .copy-done { display: inline; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fine { margin-top: 72px; font-size: 13px; color: #b3a08e; }

/* reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .tile { transition: none; }
}
