:root {
  --paper: #f3f0ea;
  --ink: #1d1c1a;
  --ink-soft: rgba(29, 28, 26, 0.62);
  --line: rgba(29, 28, 26, 0.16);
  --white: #ffffff;
  --curtain: #1d1c1a;
  --font: "Manrope", system-ui, sans-serif;
  --gutter: clamp(16px, 2.2vw, 32px);
  --ease: cubic-bezier(0.7, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Branded scrollbar: cream track, translucent graphite pill (Chrome/Edge/Safari),
   with the standard properties as a fallback for Firefox. */
::-webkit-scrollbar { width: 14px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb {
  background: rgba(29, 28, 26, 0.4);
  border: 3px solid var(--paper);
  border-radius: 1rem;
}
::-webkit-scrollbar-thumb:hover { background: rgba(29, 28, 26, 0.6); }
@supports not selector(::-webkit-scrollbar) {
  html { scrollbar-color: rgba(29, 28, 26, 0.4) var(--paper); }
}
html { background: var(--paper); -webkit-tap-highlight-color: transparent; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
:focus:not(:focus-visible) { outline: none; }
img, video { display: block; }
picture { display: contents; }

/* Home locks native scroll while the vertical carousel owns the wheel */

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px var(--gutter);
  color: var(--ink);
  background: transparent;
  transition: color 0.5s, background-color 0.5s;
  pointer-events: none;
}
/* Solid bar once the page scrolls (inner pages only). */
html.header-solid .site-header { background: var(--paper); color: var(--ink); pointer-events: auto; }
.site-header a { pointer-events: auto; }
html[data-page="home"] .site-header,
html[data-page="project"]:not(.header-solid) .site-header { color: var(--white); }
.logo { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
/* Logo igual ao das landpages: símbolo recortado do original + nome em texto, que herda a cor do cabeçalho */
.site-header .logo, .curtain .logo { display: flex; align-items: center; gap: 12px; }
.logo-marca { display: block; height: 44px; width: auto; }
.logo-nome { display: block; padding-left: 12px; border-left: 1px solid color-mix(in srgb, currentColor 22%, transparent); font-size: 12.5px; line-height: 1.12; letter-spacing: 0; }
.logo-nome b { display: block; font-weight: 800; }
.logo-nome span { display: block; font-weight: 500; text-transform: uppercase; letter-spacing: 0.2em; opacity: 0.85; }
.curtain .logo-marca { height: 56px; }
.curtain .logo-nome { font-size: 15px; }
.nav { display: flex; gap: 28px; font-size: clamp(16px, 1.5vw, 22px); font-weight: 500; letter-spacing: -0.01em; }
.nav a { position: relative; }
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease);
}
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Placeholders and media ---------- */
.ph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, hsl(var(--h) 18% 42%), hsl(calc(var(--h) + 40) 22% 24%));
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}
.cover { width: 100%; height: 100%; object-fit: cover; }
.slide-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0) 28%),
    linear-gradient(to top, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0) 42%),
    rgba(0, 0, 0, 0.12);
  pointer-events: none;
}

/* ---------- Home: full-screen vertical carousel ---------- */
.home { position: relative; width: 100%; height: 100vh; height: 100svh; color: var(--white); overflow: hidden; }
/* No celular, arrastar o hero selecionava a foto/texto e pintava tudo de azul por um instante */
.home { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.home img { -webkit-user-drag: none; pointer-events: none; }
.slide {
  position: relative;
  display: block;
  width: 100%;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: #111;
}
.slide-media { position: absolute; inset: 0; overflow: hidden; }
.reel { position: absolute; inset: 0; }
.reel-frame { position: absolute; inset: 0; will-change: transform, opacity; }
.reel picture:not(:first-child) .reel-frame { opacity: 0; }
.slide-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 0 var(--gutter);
  text-align: center;
  text-shadow: 0 1px 24px rgba(0, 0, 0, 0.35);
}
.slide-meta { font-size: 13px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.85; }
.slide-title {
  max-width: 14ch;
  font-size: clamp(48px, 8.4vw, 132px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.045em;
}
.slide-intro .slide-title { cursor: pointer; }
.slide-text { max-width: 46ch; font-size: clamp(15px, 1.2vw, 18px); line-height: 1.45; opacity: 0.9; }

.home-footer {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 22px;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 14px;
  font-weight: 500;
  pointer-events: none;
}
.home-footer a { pointer-events: auto; }
.contacts { display: flex; gap: 40px; line-height: 1.4; }
.scroll-hint { display: flex; align-items: center; gap: 10px; }
.scroll-hint i {
  position: relative;
  width: 14px;
  height: 22px;
  border: 1.5px solid currentColor;
  border-radius: 8px;
}
.scroll-hint i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 4px;
  width: 2px;
  height: 5px;
  margin-left: -1px;
  border-radius: 2px;
  background: currentColor;
  animation: wheel 1.6s var(--ease) infinite;
}
@keyframes wheel { 60% { transform: translateY(6px); opacity: 0; } }

/* Touch / no-hover devices: the carousel becomes a normal scrolling stack */
.home.is-scroll { height: auto; overflow: visible; }
.home.is-scroll .home-footer { position: fixed; z-index: 5; }

/* ---------- Inner pages ---------- */
.eyebrow { display: block; font-size: 13px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 18px; }

.project-hero { position: relative; height: 100vh; height: 100svh; overflow: hidden; color: var(--white); background: #111; }
.project-hero-media { position: absolute; inset: -6% 0; }
.project-hero-content { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 48px; }
.project-title, .about-title {
  font-size: clamp(52px, 10vw, 160px);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.05em;
  max-width: 12ch;
}

.project-info, .about-body {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  padding: 120px var(--gutter);
}
.facts { grid-column: 1 / span 4; display: grid; gap: 18px; align-content: start; border-top: 1px solid var(--line); padding-top: 18px; }
.facts dt { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 4px; }
.facts dd { font-size: 17px; font-weight: 500; }
.project-text { grid-column: 6 / span 6; display: grid; gap: 18px; font-size: 18px; line-height: 1.6; color: var(--ink-soft); }
.project-text .lead { font-size: clamp(22px, 2vw, 30px); line-height: 1.3; color: var(--ink); letter-spacing: -0.02em; }

.gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; padding: 0 var(--gutter) 120px; }
.gallery-item.is-wide { grid-column: 1 / -1; }
.gallery-item.is-left { grid-column: 1 / span 6; }
.gallery-item.is-right { grid-column: 7 / span 6; margin-top: 18vh; }
.gallery-item.is-tall { grid-column: 4 / span 6; }
.gallery-item.is-tall .reveal-img { aspect-ratio: 2 / 3; }
.reveal-img { position: relative; overflow: hidden; background: #ddd8cf; }
.gallery-item.is-wide .reveal-img { aspect-ratio: 16 / 9; }
.gallery-item.is-left .reveal-img, .gallery-item.is-right .reveal-img { aspect-ratio: 4 / 5; }
.parallax-img { position: absolute; left: 0; top: -8%; width: 100%; height: 116%; object-fit: cover; }

.next-project {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 80vh;
  overflow: hidden;
  color: var(--white);
  text-align: center;
}
.next-media { position: absolute; inset: 0; transition: transform 1.2s var(--ease); }
.next-project:hover .next-media { transform: scale(1.05); }
.next-project .eyebrow, .next-project strong { position: relative; }
.next-project strong { font-size: clamp(44px, 8vw, 120px); font-weight: 500; letter-spacing: -0.045em; line-height: 1; }

.page-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding: 48px var(--gutter);
  font-size: 14px;
  font-weight: 500;
}
.social { display: flex; gap: 20px; }

/* Projects index */
.about-intro { padding: 160px var(--gutter) 60px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.filter {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: transparent;
  color: var(--ink);
  font: 500 14px var(--font);
  cursor: pointer;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.filter:hover { border-color: var(--ink); }
.filter.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px 24px; padding: 0 var(--gutter) 120px; }
.card[hidden] { display: none; }
.card-media { aspect-ratio: 4 / 3; overflow: hidden; background: #ddd8cf; }
.card-media .cover { transition: transform 1.2s var(--ease); }
.card:hover .card-media .cover { transform: scale(1.06); }
.card-info { display: grid; grid-template-columns: 36px 1fr auto; align-items: baseline; gap: 8px; padding-top: 14px; font-size: 15px; }
.card-info span { color: var(--ink-soft); font-size: 12px; font-variant-numeric: tabular-nums; }
.card-info strong { font-weight: 500; font-size: 18px; letter-spacing: -0.01em; }
.card-info em { font-style: normal; color: var(--ink-soft); font-size: 13px; }

/* About */
.about-media { grid-column: 1 / span 5; aspect-ratio: 4 / 5; }
.about-body .project-text { grid-column: 7 / span 6; align-self: center; }

/* ---------- Page transition curtain ---------- */
.curtain {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: var(--curtain);
  color: var(--paper);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  pointer-events: none;
}

/* ---------- Cursor label ---------- */
.cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
  transition: opacity 0.3s, transform 0.4s var(--ease);
}
.cursor span {
  display: block;
  padding: 10px 16px;
  border-radius: 99px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.cursor.is-visible { opacity: 1; transform: translate(-50%, -50%) scale(1); }
@media (hover: none) { .cursor { display: none; } }

.line { padding-bottom: 0.06em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }


/* ---------- Office ---------- */
.office-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; padding: 0 var(--gutter) 120px; }
.office-nav { grid-column: 1 / span 3; position: sticky; top: 96px; align-self: start; display: flex; flex-direction: column; }
.office-nav a {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.4s;
}
.office-nav a:first-child { border-top: 1px solid var(--line); }
.office-nav a:hover, .office-nav a.is-active { color: var(--ink); }
.office-body { grid-column: 5 / -1; display: grid; gap: 140px; }
.office-section { scroll-margin-top: 96px; }
#apresentacao, .office-process { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.office-media { aspect-ratio: 4 / 5; }
.office-text { display: grid; gap: 18px; font-size: 17px; line-height: 1.65; color: var(--ink-soft); }
.office-text .lead { font-size: clamp(20px, 1.8vw, 26px); line-height: 1.35; color: var(--ink); letter-spacing: -0.015em; }
.office-h2 { font-size: clamp(32px, 3.4vw, 52px); font-weight: 500; letter-spacing: -0.035em; margin-bottom: 28px; }
.services { list-style: none; border-top: 1px solid var(--line); }
.services li { display: flex; justify-content: space-between; align-items: baseline; padding: 20px 0; border-bottom: 1px solid var(--line); }
.services a { font-size: clamp(22px, 2.2vw, 32px); font-weight: 500; letter-spacing: -0.02em; transition: opacity 0.3s; }
.services a:hover { opacity: 0.6; }
.services em { font-style: normal; font-size: 14px; color: var(--ink-soft); }
.steps { list-style: none; display: grid; gap: 48px; }
.step { display: grid; grid-template-columns: 64px 1fr; gap: 16px; opacity: 0.38; transition: opacity 0.6s; }
.step.is-active { opacity: 1; }
.step-num { font-size: 56px; font-weight: 500; line-height: 0.9; letter-spacing: -0.04em; }
.step h3 { font-size: 22px; font-weight: 500; letter-spacing: -0.015em; margin-bottom: 8px; }
.step p { font-size: 16px; line-height: 1.6; color: var(--ink-soft); }

/* ---------- Contact band ---------- */
.contact-band { background: #3a2c26; color: var(--paper); padding: 100px var(--gutter) 60px; scroll-margin-top: 70px; }
.contact-title { font-size: clamp(40px, 6vw, 96px); font-weight: 500; letter-spacing: -0.045em; line-height: 1; margin-bottom: 64px; }
.contact-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.contact-info { grid-column: 1 / span 4; display: grid; gap: 28px; align-content: start; font-size: 17px; line-height: 1.5; }
.contact-info .eyebrow { font-size: 12px; margin-bottom: 6px; opacity: 0.6; }
.contact-info .social { display: flex; gap: 18px; }
.contact-info .redes a { display: block; width: fit-content; }
.contact-form { grid-column: 6 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 24px; }
.contact-form .full { grid-column: 1 / -1; }
.contact-form label { display: grid; gap: 8px; font-size: 13px; letter-spacing: 0.04em; }
.contact-form label span { opacity: 0.65; }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid rgba(243, 240, 234, 0.35);
  background: transparent;
  color: var(--paper);
  font: 400 17px var(--font);
  outline: none;
  resize: vertical;
  transition: border-color 0.3s;
}
.contact-form select option { color: var(--ink); }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { border-color: var(--paper); }
.contact-form .is-invalid { border-color: #e8a28a; }
.form-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.form-msg { font-size: 14px; opacity: 0.8; }
.contact-form button {
  padding: 14px 26px;
  border: 0;
  border-radius: 99px;
  background: var(--paper);
  color: var(--ink);
  font: 600 14px var(--font);
  cursor: pointer;
  transition: transform 0.4s var(--ease);
}
.contact-form button:hover { transform: scale(1.04); }
.contact-jobs { margin-top: 72px; padding-top: 24px; border-top: 1px solid rgba(243, 240, 234, 0.2); font-size: 14px; opacity: 0.75; }
.contact-jobs a { text-decoration: underline; text-underline-offset: 3px; }
.contact-page .about-intro { padding-bottom: 100px; }

@media (max-width: 900px) {
  .office-nav { display: none; }
  .office-body { grid-column: 1 / -1; gap: 90px; }
  #apresentacao, .office-process { grid-template-columns: 1fr; }
  .contact-info, .contact-form { grid-column: 1 / -1; }
  .contact-form { grid-template-columns: 1fr; }
}

/* Scroll mode (touch): each slide clips a viewport-fixed title, so the next slide wipes over it. */
.home.is-scroll .slide { clip-path: inset(0 0 0 0); }
.home.is-scroll .slide-content { position: fixed; inset: 0; }

@media (max-width: 900px) {
  .nav { gap: 16px; font-size: 15px; }
  .contacts { flex-direction: column; gap: 10px; }
  .facts, .project-text, .about-media, .about-body .project-text { grid-column: 1 / -1; }
  .gallery-item.is-left, .gallery-item.is-right, .gallery-item.is-tall { grid-column: 1 / -1; margin-top: 0; }
  .cards { grid-template-columns: 1fr 1fr; gap: 32px 16px; }
  .page-footer { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .logo { font-size: 17px; }
  .site-header .logo-marca { height: 30px; }
  .site-header .logo-nome { display: none; }
  .cards { grid-template-columns: 1fr; }
  .scroll-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-hint i::after { animation: none; }
}
